Compare commits
1 Commits
main
...
f108e013c2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f108e013c2 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -2,10 +2,11 @@
|
|||||||
.vscode
|
.vscode
|
||||||
instance
|
instance
|
||||||
venv/
|
venv/
|
||||||
|
__pycache__
|
||||||
123
|
123
|
||||||
*.csv
|
*.csv
|
||||||
*.db
|
*.db
|
||||||
c*.txt
|
c*.txt
|
||||||
migrations
|
|
||||||
__pycache__
|
migrations/*
|
||||||
.idea
|
.idea
|
||||||
BIN
VedomostMOL.xls
BIN
VedomostMOL.xls
Binary file not shown.
BIN
VedomostMOL.xlsx
BIN
VedomostMOL.xlsx
Binary file not shown.
132
app.py
132
app.py
@@ -8,6 +8,7 @@ import csv
|
|||||||
import random
|
import random
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///project.db"
|
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///project.db"
|
||||||
@@ -21,12 +22,6 @@ db.init_app(app)
|
|||||||
migrate = Migrate(app, db)
|
migrate = Migrate(app, db)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/login", methods=['GET', 'POST'])
|
|
||||||
def login():
|
|
||||||
return render_template('login.html')
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/", methods=['GET', 'POST'])
|
@app.route("/", methods=['GET', 'POST'])
|
||||||
def index():
|
def index():
|
||||||
results = []
|
results = []
|
||||||
@@ -124,33 +119,26 @@ def alloborud():
|
|||||||
|
|
||||||
@app.route('/getall')
|
@app.route('/getall')
|
||||||
def getall():
|
def getall():
|
||||||
oborud = db.session.query(Oboruds).order_by(Oboruds.invNumber).all()
|
oboruds = Oboruds.query.all()
|
||||||
|
oboruds_json = [{
|
||||||
|
'id': oborud.id,
|
||||||
|
'invNumber': oborud.invNumber,
|
||||||
|
'nazvanie': oborud.nazvanie,
|
||||||
|
'raspologenie': oborud.raspologenie,
|
||||||
|
'numberved': oborud.numberved,
|
||||||
|
'balancenumber': oborud.balancenumber,
|
||||||
|
'kolichestvo': oborud.kolichestvo,
|
||||||
|
'balancenumber': oborud.balancenumber,
|
||||||
|
'aud_id': oborud.aud_id
|
||||||
|
} for oborud in oboruds]
|
||||||
|
|
||||||
results = []
|
|
||||||
for oboruds in oborud:
|
|
||||||
if oboruds.aud_id is None:
|
|
||||||
results.append({
|
|
||||||
'invNumber': oboruds.invNumber,
|
|
||||||
'nazvanie': oboruds.nazvanie,
|
|
||||||
'raspologenie': oboruds.raspologenie,
|
|
||||||
'balancenumber': oboruds.balancenumber,
|
|
||||||
'kolichestvo': oboruds.kolichestvo,
|
|
||||||
'numberppasu': oboruds.numberppasu,
|
|
||||||
'numberved': oboruds.numberved,
|
|
||||||
'aud': ""})
|
|
||||||
else:
|
|
||||||
aud = db.session.query(Auditory).filter_by(id=oboruds.aud_id).first()
|
|
||||||
results.append({
|
|
||||||
'invNumber': oboruds.invNumber,
|
|
||||||
'nazvanie': oboruds.nazvanie,
|
|
||||||
'raspologenie': oboruds.raspologenie,
|
|
||||||
'balancenumber': oboruds.balancenumber,
|
|
||||||
'kolichestvo': oboruds.kolichestvo,
|
|
||||||
'numberppasu': oboruds.numberppasu,
|
|
||||||
'numberved': oboruds.numberved,
|
|
||||||
'aud': aud.audnazvanie})
|
|
||||||
|
|
||||||
return jsonify(results)
|
return jsonify(oboruds_json)
|
||||||
|
|
||||||
|
@app.route('/updateduplicate', methods=['GET', 'POST'])
|
||||||
|
def updateduplicate():
|
||||||
|
if request.method == 'POST':
|
||||||
|
aud = request.form.get('auditory_dubl')
|
||||||
|
|
||||||
|
|
||||||
@app.route('/vneaud', methods=['GET', 'POST'])
|
@app.route('/vneaud', methods=['GET', 'POST'])
|
||||||
@@ -161,7 +149,7 @@ def vneaud():
|
|||||||
ak = db.session.query(Oboruds).all()
|
ak = db.session.query(Oboruds).all()
|
||||||
|
|
||||||
for dt in data:
|
for dt in data:
|
||||||
res.append([dt.invNumber, dt.nazvanie])
|
res.append([dt.invNumber, dt.nazvanie, dt.typeBalanse])
|
||||||
|
|
||||||
return render_template('vneaud.html', res=res, kolvo=len(data), all_kol=len(ak))
|
return render_template('vneaud.html', res=res, kolvo=len(data), all_kol=len(ak))
|
||||||
|
|
||||||
@@ -204,52 +192,33 @@ def zamsearch():
|
|||||||
@app.route('/addraspved', methods=['GET', 'POST'])
|
@app.route('/addraspved', methods=['GET', 'POST'])
|
||||||
def addraspved():
|
def addraspved():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
|
||||||
query_string = request.data.decode()
|
query_string = request.data.decode()
|
||||||
|
|
||||||
|
print(query_string)
|
||||||
un_query_string = unquote(unquote(query_string)).split(',')
|
un_query_string = unquote(unquote(query_string)).split(',')
|
||||||
|
|
||||||
|
print(un_query_string)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ob = db.session.query(Oboruds).filter_by(invNumber=un_query_string[0]).first()
|
ob = db.session.query(Oboruds).filter_by(invNumber=un_query_string[0]).first()
|
||||||
|
ob.raspologenie=un_query_string[2]
|
||||||
ob.numberved = un_query_string[1]
|
ob.numberved = un_query_string[1]
|
||||||
ob.kolichestvo = un_query_string[2]
|
|
||||||
ob.balancenumber = un_query_string[3]
|
|
||||||
ob.raspologenie = un_query_string[4]
|
|
||||||
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
db.session.close()
|
db.session.close()
|
||||||
|
|
||||||
return jsonify({'success': True}, 200, {'ContentType': 'application/json'})
|
return jsonify({'success': True}, 200, {'ContentType': 'application/json'})
|
||||||
|
|
||||||
|
|
||||||
@app.route('/addoborudasu', methods=['GET', 'POST'])
|
|
||||||
def addoborud():
|
|
||||||
if request.method == 'POST':
|
|
||||||
query_string = request.data.decode()
|
|
||||||
|
|
||||||
un_query_string = unquote(unquote(query_string)).split(',')
|
|
||||||
db.session.add(
|
|
||||||
Oboruds(invNumber=un_query_string[0],
|
|
||||||
nazvanie=un_query_string[5],
|
|
||||||
raspologenie=un_query_string[4],
|
|
||||||
numberved=un_query_string[1],
|
|
||||||
kolichestvo=un_query_string[2],
|
|
||||||
balancenumber=un_query_string[3]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
db.session.commit()
|
|
||||||
|
|
||||||
return jsonify({'success': True}, 200, {'ContentType': 'application/json'})
|
|
||||||
|
|
||||||
|
|
||||||
# ==================================================================================
|
# ==================================================================================
|
||||||
|
|
||||||
|
|
||||||
def ranomraspr():
|
def ranomraspr():
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
while len(db.session.query(Oboruds).filter(Oboruds.aud_id is None).all()) > 0:
|
while len(db.session.query(Oboruds).filter(Oboruds.aud_id == None).all()) > 0:
|
||||||
audid = random.choice(db.session.query(Auditory).all())
|
audid = random.choice(db.session.query(Auditory).all())
|
||||||
oborud = random.choice(db.session.query(Oboruds).filter(Oboruds.aud_id is None).all())
|
oborud = random.choice(db.session.query(Oboruds).filter(Oboruds.aud_id == None).all())
|
||||||
oborud.aud_id = audid.id
|
oborud.aud_id = audid.id
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
@@ -297,48 +266,9 @@ def createdb():
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
||||||
def write2excell():
|
|
||||||
wb = xlrd.open_workbook("VedIsh.xls")
|
|
||||||
sheet = wb.sheet_by_index(0)
|
|
||||||
|
|
||||||
newFile = copy(wb)
|
|
||||||
newSheet = newFile.get_sheet(0)
|
|
||||||
invNomerColum = 6
|
|
||||||
|
|
||||||
column_index = 1
|
|
||||||
for row_idx in range(sheet.nrows):
|
|
||||||
cell_value = sheet.cell(row_idx, column_index)
|
|
||||||
|
|
||||||
if cell_value:
|
|
||||||
|
|
||||||
tmp_inv_number = str(cell_value).split(':')[1]
|
|
||||||
|
|
||||||
try:
|
|
||||||
a = tmp_inv_number[1:-1]
|
|
||||||
|
|
||||||
inv_number = int(tmp_inv_number[1:-1])
|
|
||||||
|
|
||||||
with app.app_context():
|
|
||||||
auditory_obj = db.session.query(Auditory).join(Oboruds, Oboruds.aud_id == Auditory.id).filter(
|
|
||||||
Oboruds.invNumber == inv_number).first()
|
|
||||||
|
|
||||||
print(auditory_obj.audnazvanie)
|
|
||||||
|
|
||||||
# cur.execute("SELECT aud.audnazvanie FROM oboruds AS ob JOIN auditory AS aud ON ob.aud_id = aud.id WHERE ob.invNumber = ?", (inv_number,))
|
|
||||||
|
|
||||||
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
"""
|
|
||||||
else:
|
|
||||||
#newSheet.write(row_idx, invNomerColum, "Нет инв номера")
|
|
||||||
pass
|
|
||||||
newFile.save("Ved31.xls")
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
#write2excell()
|
|
||||||
|
|
||||||
|
#ranomraspr()
|
||||||
|
#createdb()
|
||||||
app.run(debug=True, host='0.0.0.0', port='3800')
|
app.run(debug=True, host='0.0.0.0', port='3800')
|
||||||
|
|||||||
BIN
migrations/__pycache__/env.cpython-39.pyc
Normal file
BIN
migrations/__pycache__/env.cpython-39.pyc
Normal file
Binary file not shown.
@@ -1,32 +0,0 @@
|
|||||||
"""empty message
|
|
||||||
|
|
||||||
Revision ID: 10da3140ab2e
|
|
||||||
Revises: 4eacd6dcd461
|
|
||||||
Create Date: 2024-04-05 01:25:48.931573
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = '10da3140ab2e'
|
|
||||||
down_revision = '4eacd6dcd461'
|
|
||||||
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 ###
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
"""empty message
|
|
||||||
|
|
||||||
Revision ID: 4eacd6dcd461
|
|
||||||
Revises: c208cbc25232
|
|
||||||
Create Date: 2024-04-03 23:25:42.271936
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = '4eacd6dcd461'
|
|
||||||
down_revision = 'c208cbc25232'
|
|
||||||
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('numberved', sa.String(length=100), nullable=True))
|
|
||||||
batch_op.add_column(sa.Column('numberppasu', sa.String(length=100), nullable=True))
|
|
||||||
batch_op.add_column(sa.Column('balancenumber', sa.Integer(), nullable=True))
|
|
||||||
batch_op.alter_column('nazvanie',
|
|
||||||
existing_type=sa.TEXT(length=500),
|
|
||||||
type_=sa.String(length=500),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.alter_column('raspologenie',
|
|
||||||
existing_type=sa.TEXT(length=200),
|
|
||||||
type_=sa.String(length=200),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.drop_column('buhnumberpp')
|
|
||||||
|
|
||||||
# ### 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.add_column(sa.Column('buhnumberpp', sa.VARCHAR(length=100), nullable=True))
|
|
||||||
batch_op.alter_column('raspologenie',
|
|
||||||
existing_type=sa.String(length=200),
|
|
||||||
type_=sa.TEXT(length=200),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.alter_column('nazvanie',
|
|
||||||
existing_type=sa.String(length=500),
|
|
||||||
type_=sa.TEXT(length=500),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.drop_column('balancenumber')
|
|
||||||
batch_op.drop_column('numberppasu')
|
|
||||||
batch_op.drop_column('numberved')
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
"""empty message
|
|
||||||
|
|
||||||
Revision ID: 6fc3d1adb061
|
|
||||||
Revises: be7c94c549e5
|
|
||||||
Create Date: 2024-04-02 16:32:23.180273
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = '6fc3d1adb061'
|
|
||||||
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('buhnumberpp', sa.String(length=100), nullable=True))
|
|
||||||
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')
|
|
||||||
batch_op.drop_column('buhnumberpp')
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
"""empty message
|
|
||||||
|
|
||||||
Revision ID: 8e5efc4de919
|
|
||||||
Revises: c208cbc25232
|
|
||||||
Create Date: 2024-04-03 22:36:46.208266
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = '8e5efc4de919'
|
|
||||||
down_revision = 'c208cbc25232'
|
|
||||||
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('numberved', sa.String(length=100), nullable=True))
|
|
||||||
batch_op.add_column(sa.Column('numberppasu', sa.String(length=100), nullable=True))
|
|
||||||
batch_op.add_column(sa.Column('balancenumber', sa.Integer(), nullable=True))
|
|
||||||
batch_op.alter_column('nazvanie',
|
|
||||||
existing_type=sa.TEXT(length=500),
|
|
||||||
type_=sa.String(length=500),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.alter_column('raspologenie',
|
|
||||||
existing_type=sa.TEXT(length=200),
|
|
||||||
type_=sa.String(length=200),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.drop_column('buhnumberpp')
|
|
||||||
|
|
||||||
# ### 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.add_column(sa.Column('buhnumberpp', sa.TEXT(length=100), nullable=True))
|
|
||||||
batch_op.alter_column('raspologenie',
|
|
||||||
existing_type=sa.String(length=200),
|
|
||||||
type_=sa.TEXT(length=200),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.alter_column('nazvanie',
|
|
||||||
existing_type=sa.String(length=500),
|
|
||||||
type_=sa.TEXT(length=500),
|
|
||||||
existing_nullable=True)
|
|
||||||
batch_op.drop_column('balancenumber')
|
|
||||||
batch_op.drop_column('numberppasu')
|
|
||||||
batch_op.drop_column('numberved')
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
|
||||||
BIN
migrations/versions/__pycache__/256c3a3e91a2_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/256c3a3e91a2_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/4f95d12a8352_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/4f95d12a8352_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/50f85881169e_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/50f85881169e_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/873defe09f22_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/873defe09f22_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/885bdd7b5161_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/8e838956713f_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/8e838956713f_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/b24baa0d98e6_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/b24baa0d98e6_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/b2a61aef79e9_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/b2a61aef79e9_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/be7c94c549e5_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/be7c94c549e5_.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/ec6bbcd361bd_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/ec6bbcd361bd_.cpython-312.pyc
Normal file
Binary file not shown.
@@ -1,24 +0,0 @@
|
|||||||
"""empty message
|
|
||||||
|
|
||||||
Revision ID: c208cbc25232
|
|
||||||
Revises: 6fc3d1adb061, 885bdd7b5161
|
|
||||||
Create Date: 2024-04-03 22:11:15.008480
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = 'c208cbc25232'
|
|
||||||
down_revision = ('6fc3d1adb061', '885bdd7b5161')
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
|
||||||
pass
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
"""empty message
|
|
||||||
|
|
||||||
Revision ID: d4a8e4c9e65a
|
|
||||||
Revises: 10da3140ab2e, 8e5efc4de919
|
|
||||||
Create Date: 2024-05-06 08:27:39.088982
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = 'd4a8e4c9e65a'
|
|
||||||
down_revision = ('10da3140ab2e', '8e5efc4de919')
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
|
||||||
pass
|
|
||||||
@@ -16,17 +16,22 @@ class Oboruds(db.Model):
|
|||||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||||
invNumber=db.Column(db.Integer)
|
invNumber=db.Column(db.Integer)
|
||||||
nazvanie=db.Column(db.String(500))
|
nazvanie=db.Column(db.String(500))
|
||||||
|
balancenumber = db.Column(db.String(30))
|
||||||
raspologenie = db.Column(db.String(200))
|
raspologenie = db.Column(db.String(200))
|
||||||
numberved = db.Column(db.String(100))
|
numberved = db.Column(db.String(100))
|
||||||
numberppasu = db.Column(db.String(100))
|
numberppasu = db.Column(db.String(100))
|
||||||
kolichestvo = db.Column(db.Integer)
|
kolichestvo = db.Column(db.Integer)
|
||||||
balancenumber = db.Column(db.Integer)
|
|
||||||
aud_id = db.Column(db.Integer, db.ForeignKey(Auditory.id))
|
aud_id = db.Column(db.Integer, db.ForeignKey(Auditory.id))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Zametki(db.Model):
|
class Zametki(db.Model):
|
||||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||||
txtzam=db.Column(db.String(10000))
|
txtzam=db.Column(db.String(10000))
|
||||||
created_date = db.Column(db.DateTime, default=datetime.datetime.utcnow)
|
created_date = db.Column(db.DateTime, default=datetime.datetime.utcnow)
|
||||||
rmdt = db.Column(db.DateTime)
|
rmdt = db.Column(db.DateTime)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
serve.py
6
serve.py
@@ -1,6 +0,0 @@
|
|||||||
from waitress import serve
|
|
||||||
from app import app
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
serve(app, port='3800')
|
|
||||||
@@ -54,7 +54,7 @@ button {
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
|
|
||||||
/*width: 200px; */
|
width: 200px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
border-color: #E07D54;
|
border-color: #E07D54;
|
||||||
@@ -67,6 +67,7 @@ h5 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.hidden-column{
|
.hidden-column{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -77,17 +78,8 @@ nav {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
.table{
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
border-collapse: separate !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table td {
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 0;
|
|
||||||
max-width: 10rem;
|
|
||||||
word-break: break-all;
|
|
||||||
border-collapse: separate !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.aud{
|
.aud{
|
||||||
@@ -99,9 +91,8 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.rasp{
|
.rasp{
|
||||||
width: 200px;
|
max-width: 200px;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#modal_matcenn{
|
#modal_matcenn{
|
||||||
@@ -114,10 +105,8 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.datatable th:nth-child(7) {
|
|
||||||
width: 200px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
@@ -150,7 +139,6 @@ table {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-print {
|
.no-print {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -161,13 +149,11 @@ table {
|
|||||||
font-size: 14pt;
|
font-size: 14pt;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table.rs-table-bordered > thead > tr > th{
|
table.rs-table-bordered > thead > tr > th{
|
||||||
border:1px solid #000000;
|
border:1px solid #000000;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
font-size: 14pt;
|
font-size: 14pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.rs-table-bordered > tbody > tr > td{
|
table.rs-table-bordered > tbody > tr > td{
|
||||||
border:1px solid #000000;
|
border:1px solid #000000;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@@ -176,4 +162,6 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,282 +1,35 @@
|
|||||||
function clearTable() {
|
|
||||||
var table = document.getElementById("alldatatable");
|
|
||||||
var rowCount = table.rows.length;
|
|
||||||
|
|
||||||
// Iterate through each row and remove it
|
|
||||||
for (var i = rowCount - 1; i > 0; i--) {
|
|
||||||
table.deleteRow(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function getAllData(){
|
function getAllData(){
|
||||||
|
$.ajax({
|
||||||
|
|
||||||
clearTable();
|
url: "/getall",
|
||||||
|
type: "get",
|
||||||
|
contentType: 'application/json',
|
||||||
|
dataType: 'json',
|
||||||
|
|
||||||
let tableBody = document.getElementById('alldatatable').getElementsByTagName("tbody")[0];
|
success: function(response){
|
||||||
i = 0;
|
console.log(response)
|
||||||
$.getJSON("/getall", function (data) {
|
let data = response;
|
||||||
$.each(data, function (index, item) {
|
$('#datatable tbody').empty();
|
||||||
let newRow = tableBody.insertRow(tableBody.rows.length);
|
$.each(response, function(index, item) {
|
||||||
let cell1 = newRow.insertCell(0);
|
$('#datatable tbody').append(
|
||||||
let cell2 = newRow.insertCell(1);
|
'<tr>' +
|
||||||
let cell3 = newRow.insertCell(2);
|
'<td>' + item.invNumber + '</td>' +
|
||||||
let cell4 = newRow.insertCell(3);
|
'<td>' + item.nazvanie + '</td>' +
|
||||||
let cell5 = newRow.insertCell(4);
|
'<td>' + item.raspologenie + '</td>' +
|
||||||
let cell6 = newRow.insertCell(5);
|
'<td>' + item.numberved + '</td>' +
|
||||||
let cell7 = newRow.insertCell(6);
|
'<td>' + item.buhnumberpp + '</td>' +
|
||||||
let cell8 = newRow.insertCell(7);
|
'<td>' + item.kolichestvo + '</td>' +
|
||||||
|
'<td>' + item.balancenumber + '</td>' +
|
||||||
i++;
|
'</tr>'
|
||||||
|
);
|
||||||
cell1.innerText = i;
|
})
|
||||||
cell2.innerText = item.numberved;
|
},
|
||||||
cell3.innerText = item.invNumber;
|
|
||||||
cell4.innerText = item.nazvanie;
|
|
||||||
cell5.innerText = item.kolichestvo;
|
|
||||||
cell6.innerText = item.balancenumber;
|
|
||||||
cell7.innerText = item.aud;
|
|
||||||
cell8.innerText = item.raspologenie;
|
|
||||||
|
|
||||||
|
|
||||||
$(newRow).data('itemData', i);
|
})
|
||||||
|
|
||||||
|
|
||||||
$(newRow).on("click", function () {
|
|
||||||
|
|
||||||
let vednumbertxt = newRow.cells[1].innerText;
|
|
||||||
let invnomertxt = newRow.cells[2].innerText;
|
|
||||||
let nazvanietxt = newRow.cells[3].innerText;
|
|
||||||
let kolvotxt = newRow.cells[4].innerText;
|
|
||||||
let schettxt = newRow.cells[5].innerText;
|
|
||||||
let raspologtxt = newRow.cells[7].innerText;
|
|
||||||
|
|
||||||
|
|
||||||
$('#getmodal').modal('show');
|
|
||||||
|
|
||||||
|
|
||||||
let vedomost = document.getElementById('modal_vednumber')
|
|
||||||
let invnom = document.getElementById('modal_invnom')
|
|
||||||
let matcen = document.getElementById('modal_matcenn')
|
|
||||||
let kolvo = document.getElementById('modal_kolvo')
|
|
||||||
let balancenumber = document.getElementById('modal_balance')
|
|
||||||
let rasp = document.getElementById('modal_rapolog')
|
|
||||||
|
|
||||||
invnom.innerText = invnomertxt
|
|
||||||
matcen.innerText = nazvanietxt.substring(0, 20)
|
|
||||||
|
|
||||||
if (vednumbertxt.length > 0) {
|
|
||||||
vedomost.value = vednumbertxt;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kolvotxt.length > 0) {
|
|
||||||
kolvo.value = kolvotxt;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (schettxt.length > 0) {
|
|
||||||
balancenumber.value = schettxt;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (raspologtxt.length > 0) {
|
|
||||||
rasp.value = raspologtxt;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
getAllData();
|
getAllData()
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$('#modalclose').click(function () {
|
|
||||||
|
|
||||||
|
|
||||||
let vednumber = document.getElementById('modal_vednumber')
|
|
||||||
let kolvo = document.getElementById('modal_kolvo')
|
|
||||||
let balancenumber = document.getElementById('modal_balance')
|
|
||||||
let matcen = document.getElementById('modal_matcenn')
|
|
||||||
let rasp = document.getElementById('modal_rapolog')
|
|
||||||
|
|
||||||
|
|
||||||
vednumber.value = '';
|
|
||||||
kolvo.value = '';
|
|
||||||
balancenumber.value = '';
|
|
||||||
matcen.value = '';
|
|
||||||
rasp.value = '';
|
|
||||||
$('#getmodal').modal('hide')
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#modalsavetodb').click(function () {
|
|
||||||
|
|
||||||
let invnom = document.getElementById('modal_invnom')
|
|
||||||
let vednumber = document.getElementById('modal_vednumber')
|
|
||||||
let kolvo = document.getElementById('modal_kolvo')
|
|
||||||
let balancenumber = document.getElementById('modal_balance')
|
|
||||||
let matcen = document.getElementById('modal_matcenn')
|
|
||||||
let rasp = document.getElementById('modal_rapolog')
|
|
||||||
let nazv = document.getElementById('modal_nazvanie')
|
|
||||||
|
|
||||||
|
|
||||||
let changeddata = new Array()
|
|
||||||
|
|
||||||
changeddata[0] = invnom.text;
|
|
||||||
changeddata[1] = vednumber.value;
|
|
||||||
changeddata[2] = kolvo.value;
|
|
||||||
changeddata[3] = balancenumber.value;
|
|
||||||
changeddata[4] = rasp.value;
|
|
||||||
|
|
||||||
|
|
||||||
let sendData = changeddata.join(',')
|
|
||||||
console.log(sendData)
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
|
|
||||||
url: "/addraspved",
|
|
||||||
type: "POST",
|
|
||||||
contentType: "application/json;charset=utf-8",
|
|
||||||
dataType: "json",
|
|
||||||
data: sendData,
|
|
||||||
|
|
||||||
success: function () {
|
|
||||||
$('#getmodal').modal('hide')
|
|
||||||
|
|
||||||
vednumber.value = '';
|
|
||||||
kolvo.value = '';
|
|
||||||
balancenumber.value = '';
|
|
||||||
matcen.value = '';
|
|
||||||
rasp.value = '';
|
|
||||||
changeddata = [];
|
|
||||||
window.location.reload();
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
$('#addoborud').click(function () {
|
|
||||||
|
|
||||||
$('#addmodal').modal('show');
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
$('#modal2savetodb').click(function () {
|
|
||||||
|
|
||||||
let invnomer = document.getElementById('modal2_invnom')
|
|
||||||
let vednumber = document.getElementById('modal2_vednumber')
|
|
||||||
let kolvo = document.getElementById('modal2_kolvo')
|
|
||||||
let balancenumber = document.getElementById('modal2_balance')
|
|
||||||
let matcen = document.getElementById('modal2_matcenn')
|
|
||||||
let rasp = document.getElementById('modal2_rapolog')
|
|
||||||
let nazv = document.getElementById('modal2_nazvanie')
|
|
||||||
|
|
||||||
|
|
||||||
let changeddata = new Array()
|
|
||||||
|
|
||||||
changeddata[0] = invnomer.value;
|
|
||||||
changeddata[1] = vednumber.value;
|
|
||||||
changeddata[2] = kolvo.value;
|
|
||||||
changeddata[3] = balancenumber.value;
|
|
||||||
changeddata[4] = rasp.value;
|
|
||||||
changeddata[5] = nazv.value;
|
|
||||||
|
|
||||||
|
|
||||||
let sendData = changeddata.join(',')
|
|
||||||
console.log(sendData)
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
|
|
||||||
url: "/addoborudasu",
|
|
||||||
type: "POST",
|
|
||||||
contentType: "application/json;charset=utf-8",
|
|
||||||
dataType: "json",
|
|
||||||
data: sendData,
|
|
||||||
|
|
||||||
success: function () {
|
|
||||||
vednumber.value = '';
|
|
||||||
invnomer.value = '';
|
|
||||||
nazvanie.value = '';
|
|
||||||
kolvo.value = '';
|
|
||||||
balancenumber.value = '';
|
|
||||||
matcen.value = '';
|
|
||||||
rasp.value = '';
|
|
||||||
|
|
||||||
$('#addmodal').modal('hide')
|
|
||||||
window.location.reload()
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
$('#modal2close').click(function () {
|
|
||||||
|
|
||||||
|
|
||||||
let vednumber = document.getElementById('modal2_vednumber')
|
|
||||||
let invnomer = document.getElementById('modal2_invnom')
|
|
||||||
let nazvanie = document.getElementById('modal2_nazvanie')
|
|
||||||
let kolvo = document.getElementById('modal2_kolvo')
|
|
||||||
let balancenumber = document.getElementById('modal2_balance')
|
|
||||||
let matcen = document.getElementById('modal2_matcenn')
|
|
||||||
let rasp = document.getElementById('modal2_rapolog')
|
|
||||||
|
|
||||||
|
|
||||||
vednumber.value = '';
|
|
||||||
invnomer.value = '';
|
|
||||||
nazvanie.value = '';
|
|
||||||
kolvo.value = '';
|
|
||||||
balancenumber.value = '';
|
|
||||||
matcen.value = '';
|
|
||||||
rasp.value = '';
|
|
||||||
|
|
||||||
$('#addmodal').modal('hide')
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
$('#modal2').on('hidden.bs.modal', function () {
|
|
||||||
location.reload();
|
|
||||||
})
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
// Слушаем событие клика по заголовкам таблицы
|
|
||||||
$('#alldatatable thead th').on('click', function () {
|
|
||||||
var columnIndex = $(this).index(); // Индекс колонки
|
|
||||||
var sortColumn = $(this).text().toLowerCase(); // Текст заголовка колонки
|
|
||||||
|
|
||||||
// Сортируем таблицу по выбранной колонке
|
|
||||||
$('#alldatatable tbody tr').sort(function (a, b) {
|
|
||||||
var valA;
|
|
||||||
var valB;
|
|
||||||
|
|
||||||
if (isNaN(parseFloat($(a).find('td:eq(' + columnIndex + ')').text()))) {
|
|
||||||
// если это текстовая колонка, то сортируем по алфавиту
|
|
||||||
valA = $(a).find('td:eq(' + columnIndex + ')').text().toLowerCase();
|
|
||||||
valB = $(b).find('td:eq(' + columnIndex + ')').text().toLowerCase();
|
|
||||||
} else {
|
|
||||||
// если это числовая колонка, то сортируем по числовому значению
|
|
||||||
valA = parseFloat($(a).find('td:eq(' + columnIndex + ')').text());
|
|
||||||
valB = parseFloat($(b).find('td:eq(' + columnIndex + ')').text());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (valA < valB) return -1;
|
|
||||||
if (valA > valB) return 1;
|
|
||||||
return 0;
|
|
||||||
}).appendTo('#alldatatable tbody');
|
|
||||||
|
|
||||||
// Обновляем классы для активной колонки
|
|
||||||
$('#alldatatable thead th').removeClass('active');
|
|
||||||
$(this).addClass('active');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -16,9 +16,9 @@ function getData(){
|
|||||||
|
|
||||||
var data = response;
|
var data = response;
|
||||||
const table = document.getElementById('datatable')
|
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>'
|
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 =""
|
var tr =""
|
||||||
|
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ function getData(){
|
|||||||
|
|
||||||
tr += '</tr>'
|
tr += '</tr>'
|
||||||
});
|
});
|
||||||
table.innerHTML = headTable + tr
|
table.innerHTML += tr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,141 +3,30 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<!-- Modal -->
|
<div class="row col-12">
|
||||||
<div class="modal fade" id="getmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
|
<div class=" card col-11">
|
||||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
<h3 class=" no-print"> Все мат. ценности </h3>
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-body" id="textarea">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<a id="modal_invnom"> </a><a id="modal_matcenn"></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
№ из ведомости
|
|
||||||
<input type="text" class="form-control" id ='modal_vednumber' placeholder="Номер из ведомости">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Количество
|
|
||||||
<input type="text" class="form-control" id ='modal_kolvo' placeholder="Количество">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Балансовый счёт
|
|
||||||
<input type="text" class="form-control" id ='modal_balance' placeholder="Балансовый счёт">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Расположение
|
|
||||||
<input type="text" class="form-control" id ='modal_rapolog' placeholder="Введите расположение">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="modalclose">Закрыть</button>
|
|
||||||
<button type="button" class="btn btn-primary" id="modalsavetodb" >Сохранить изменения</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal2 -->
|
|
||||||
<div class="modal fade" id="addmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-body" id="textarea">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<a id="modal_invnom"> </a><a id="modal2_matcenn"></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
№ из ведомости
|
|
||||||
<input type="text" class="form-control" id ='modal2_vednumber' placeholder="Номер из ведомости">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Инвентарный номер
|
|
||||||
<input type="text" class="form-control" id ='modal2_invnom' placeholder="Инвентарный номер">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Название
|
|
||||||
<input type="text" class="form-control" id ='modal2_nazvanie' placeholder="Название">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Количество
|
|
||||||
<input type="text" class="form-control" id ='modal2_kolvo' placeholder="Количество">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Балансовый счёт
|
|
||||||
<input type="text" class="form-control" id ='modal2_balance' placeholder="Балансовый счёт">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Расположение
|
|
||||||
<input type="text" class="form-control" id ='modal2_rapolog' placeholder="Введите расположение">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="modal2close">Закрыть</button>
|
|
||||||
<button type="button" class="btn btn-primary" id="modal2savetodb" >Сохранить изменения</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<h3 id ='123' class=" no-print"> Все мат. ценности </h3>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<button class="button" id="printallbutton"> Печать </button>
|
<button class="button" id="printallbutton"> Печать </button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row col-12">
|
|
||||||
<button class="button" id="addoborud"> Добавить </button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="card col-md-11 table-responsive">
|
<div class="card col-md-11" >
|
||||||
<table id="alldatatable" class="alldatable table pagebreak" >
|
<table id="datable" class="datable table pagebreak" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">№ <br>п/п <br>АСУ</th>
|
<th scope="col">№ п/п</th>
|
||||||
<th scope="col">№ п/п <br>вед</th>
|
<th scope="col">№ п/п вед</th>
|
||||||
<th scope="col">Инв. номер</th>
|
<th scope="col">Инв. номер</th>
|
||||||
<th scope="col">Название</th>
|
<th scope="col">Название</th>
|
||||||
<th scope="col">Кол-во</th>
|
<th scope="col">Кол-во</th>
|
||||||
<th scope="col">Счёт</th>
|
<th scope="col">Счёт</th>
|
||||||
<th scope="col">Ауд - я</th>
|
<th scope="col">Аудитория</th>
|
||||||
<th scope="col">Расположение</th>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
147
templates/all_OLD.html
Normal file
147
templates/all_OLD.html
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="getmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-body" id="textarea">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<a id="modal_invnom"> </a><a id="modal_matcenn"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
№ из ведомости
|
||||||
|
<input type="text" class="form-control" id ='modal_vednumber' placeholder="Номер из ведомости">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Количество
|
||||||
|
<input type="text" class="form-control" id ='modal_kolvo' placeholder="Количество">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Балансовый счёт
|
||||||
|
<input type="text" class="form-control" id ='modal_balance' placeholder="Балансовый счёт">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Расположение
|
||||||
|
<input type="text" class="form-control" id ='modal_rapolog' placeholder="Введите расположение">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="modalclose">Закрыть</button>
|
||||||
|
<button type="button" class="btn btn-primary" id="modalsavetodb" >Сохранить изменения</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modal2 -->
|
||||||
|
<div class="modal fade" id="addmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-body" id="textarea">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<a id="modal_invnom"> </a><a id="modal2_matcenn"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
№ из ведомости
|
||||||
|
<input type="text" class="form-control" id ='modal2_vednumber' placeholder="Номер из ведомости">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Инвентарный номер
|
||||||
|
<input type="text" class="form-control" id ='modal2_invnom' placeholder="Инвентарный номер">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Название
|
||||||
|
<input type="text" class="form-control" id ='modal2_nazvanie' placeholder="Название">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Количество
|
||||||
|
<input type="text" class="form-control" id ='modal2_kolvo' placeholder="Количество">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Балансовый счёт
|
||||||
|
<input type="text" class="form-control" id ='modal2_balance' placeholder="Балансовый счёт">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
Расположение
|
||||||
|
<input type="text" class="form-control" id ='modal2_rapolog' placeholder="Введите расположение">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="modal2close">Закрыть</button>
|
||||||
|
<button type="button" class="btn btn-primary" id="modal2savetodb" >Сохранить изменения</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<h3 id ='123' class=" no-print"> Все мат. ценности </h3>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row col-12">
|
||||||
|
<button class="button" id="printallbutton"> Печать </button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row col-12">
|
||||||
|
<button class="button" id="addoborud"> Добавить </button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="card col-md-11 table-responsive">
|
||||||
|
<table id="alldatatable" class="alldatable table pagebreak" >
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">№ <br>п/п <br>АСУ</th>
|
||||||
|
<th scope="col">№ п/п <br>вед</th>
|
||||||
|
<th scope="col">Инв. номер</th>
|
||||||
|
<th scope="col">Название</th>
|
||||||
|
<th scope="col">Кол-во</th>
|
||||||
|
<th scope="col">Счёт</th>
|
||||||
|
<th scope="col">Ауд - я</th>
|
||||||
|
<th scope="col">Расположение</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="{{url_for('static', filename='js/allmatc.js') }}"></script>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@@ -10,4 +10,3 @@
|
|||||||
<script src="{{url_for('static', filename='js/searchonaud.js') }}"></script>
|
<script src="{{url_for('static', filename='js/searchonaud.js') }}"></script>
|
||||||
<script src="{{url_for('static', filename='js/print.js') }}"></script>
|
<script src="{{url_for('static', filename='js/print.js') }}"></script>
|
||||||
<script src="{{url_for('static', filename='js/modal.js') }}"></script>
|
<script src="{{url_for('static', filename='js/modal.js') }}"></script>
|
||||||
<script src="{{url_for('static', filename='js/allmatc.js') }}"></script>
|
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="card col-4" >
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
|
|
||||||
<form class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
|
|
||||||
<!-- Form Name -->
|
|
||||||
<legend>Авторизация</legend>
|
|
||||||
|
|
||||||
<!-- Text input-->
|
|
||||||
<div class="form-group">
|
|
||||||
<label control-label" for="logininput">Логин</label>
|
|
||||||
<div>
|
|
||||||
<input id="logininput" name="logininput" type="text" placeholder="Введите логин" class="form-control input-md">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Password input-->
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label" for="passwordinput">Пароль</label>
|
|
||||||
<input id="passwordinput" name="passwordinput" type="password" placeholder="Введите пароль" class="form-control input-md">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<button id="btn_login" name="btn_login" class="btn btn-primary">Войти</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
@@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="getmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
|
<div class="modal fade" id="getmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
|
||||||
aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-body" id="textarea">
|
<div class="modal-body" id="textarea">
|
||||||
@@ -13,36 +12,11 @@
|
|||||||
<input type="text" class="form-control" id ='vednumber' placeholder="Номер из веломости">
|
<input type="text" class="form-control" id ='vednumber' placeholder="Номер из веломости">
|
||||||
<input type="text" class="form-control" id ='rapolog' placeholder="Введите расположение">
|
<input type="text" class="form-control" id ='rapolog' placeholder="Введите расположение">
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<a id="modal_invnom"> </a><a id="modal_matcenn"></a>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form method="POST" action="/addraspved">
|
|
||||||
<div class="row">
|
|
||||||
№ из ведомости
|
|
||||||
<input type="text" class="form-control" name="modal_vednumber" id='modal_vednumber'
|
|
||||||
placeholder="Номер из ведомости">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
Расположение
|
|
||||||
<input type="text" class="form-control" name="modal_rapolog" id='modal_rapolog'
|
|
||||||
placeholder="Введите расположение">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="modalclose">Закрыть
|
<button type="button" class="btn btn-secondary" data-dismiss="modal" id="modalclose">Закрыть</button>
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-primary" id="modalsavetodb" >Сохранить изменения</button>
|
<button type="button" class="btn btn-primary" id="modalsavetodb" >Сохранить изменения</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -71,16 +45,16 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title no-print"> Поаудиторно </h3>
|
<h3 class="card-title no-print"> Поаудиторно </h3>
|
||||||
|
|
||||||
<table class="table " id="datatable">
|
<table class="table" id="datatable" col-md-10>
|
||||||
|
|
||||||
<th>Номер в Инв. вед</th>
|
<td >Номер в Инв. вед</td>
|
||||||
<th>Инв. номер</th>
|
<td >Инв. номер</td>
|
||||||
<th>Название</th>
|
<td >Название</td>
|
||||||
<th class="no-print">Аудитория</th>
|
<td class="no-print">Аудитория</td>
|
||||||
<th>Расположение</th>
|
<td >Расположение</td>
|
||||||
|
|
||||||
|
|
||||||
{% for item in res %}
|
{% for item in res: %}
|
||||||
|
|
||||||
<td> <input type="hidden" name="invnomer" value="{{ item[0] }}"> {{ item[0] }} </td>
|
<td> <input type="hidden" name="invnomer" value="{{ item[0] }}"> {{ item[0] }} </td>
|
||||||
<td> {{ item[1] }} </td>
|
<td> {{ item[1] }} </td>
|
||||||
|
|||||||
Reference in New Issue
Block a user