diff --git a/py_app/app/__pycache__/routes.cpython-312.pyc b/py_app/app/__pycache__/routes.cpython-312.pyc index e80d9eb..2dad955 100644 Binary files a/py_app/app/__pycache__/routes.cpython-312.pyc and b/py_app/app/__pycache__/routes.cpython-312.pyc differ diff --git a/py_app/app/routes.py b/py_app/app/routes.py index fff415c..7cecbde 100755 --- a/py_app/app/routes.py +++ b/py_app/app/routes.py @@ -7,7 +7,6 @@ from .models import User from . import db from reportlab.lib.pagesizes import letter from reportlab.pdfgen import canvas -from flask import Blueprint, render_template, request, redirect, url_for, flash import csv from .warehouse import add_location from app.settings import ( @@ -27,6 +26,12 @@ from .print_module import get_unprinted_orders_data bp = Blueprint('main', __name__) warehouse_bp = Blueprint('warehouse', __name__) +@bp.route('/main_scan') +def main_scan(): + if 'role' not in session or session['role'] not in ['superadmin', 'admin', 'administrator', 'scan']: + flash('Access denied: Scan users only.') + return redirect(url_for('main.dashboard')) + return render_template('main_page_scan.html') @bp.route('/', methods=['GET', 'POST']) def login(): @@ -1143,8 +1148,6 @@ For support, contact your system administrator. except Exception as e: print(f"Error creating extension package: {e}") - import traceback - traceback.print_exc() return jsonify({ 'success': False, 'error': str(e) @@ -1365,7 +1368,6 @@ Installation Time: ~5 minutes Maintenance Required: Zero (auto-starts with Windows) Ready to use immediately after installation!""" - zipf.writestr('INSTALLATION_README.txt', installation_readme) files_added += 1 @@ -1425,7 +1427,7 @@ def create_zero_dependency_service_package(): if not os.path.exists(service_dir): return jsonify({ 'success': False, - 'error': f'Windows service directory not found: {service_dir}' + 'error': f'Windows service directory not found: {service_dir}' }), 500 # Create static directory if it doesn't exist @@ -1715,6 +1717,9 @@ This package contains EVERYTHING needed to run the Quality Print Service: Quality Web App → Chrome Extension → Windows Service → Printer ``` +**Printing Methods (automatic fallback):** +1. Adobe Reader (silent printing) + **Printing Methods (automatic fallback):** 1. Adobe Reader (silent printing) 2. SumatraPDF (if Adobe unavailable) diff --git a/py_app/app/static/css/scan.css b/py_app/app/static/css/scan.css new file mode 100644 index 0000000..f98b3be --- /dev/null +++ b/py_app/app/static/css/scan.css @@ -0,0 +1,50 @@ +/* Scan Module Specific Styles */ + +.scan-form-card { + width: 380px; + max-width: 380px; + margin: 0 auto 20px auto; + max-height: 660px; + overflow-y: auto; + padding: 18px 18px 12px 18px; +} + +.scan-form-card form { + display: flex; + flex-direction: column; + gap: 4px; +} + +.scan-form-card label { + font-weight: 500; + margin-bottom: 1px; + font-size: 13px; +} + +.scan-form-card input[type="text"] { + padding: 5px 10px; + font-size: 13px; + margin-bottom: 2px; +} + +.scan-table-card { + overflow-x: auto; +} + +.scan-table { + width: 100%; + border-collapse: collapse; + margin-top: 20px; + font-size: 11px; +} + +.scan-table th, .scan-table td { + border: 1px solid #ddd; + padding: 8px; + text-align: center; +} + +.scan-table th { + background-color: #f4f4f4; + font-weight: bold; +} diff --git a/py_app/app/static/css/warehouse.css b/py_app/app/static/css/warehouse.css index 6ec10d3..12d0350 100644 --- a/py_app/app/static/css/warehouse.css +++ b/py_app/app/static/css/warehouse.css @@ -367,32 +367,6 @@ html, body { box-shadow: 0 2px 4px rgba(0,0,0,0.1); } -.scan-form-card { - max-width: 600px; - margin: 0 auto 20px auto; -} - -.scan-table-card { - overflow-x: auto; -} - -.scan-table { - width: 100%; - border-collapse: collapse; - margin-top: 20px; - font-size: 11px; -} - -.scan-table th, .scan-table td { - border: 1px solid #ddd; - padding: 8px; - text-align: center; -} - -.scan-table th { - background-color: #f4f4f4; - font-weight: bold; -} /* Location row selection styles */ .location-row { diff --git a/py_app/app/templates/dashboard.html b/py_app/app/templates/dashboard.html index c118aff..64b7ffa 100755 --- a/py_app/app/templates/dashboard.html +++ b/py_app/app/templates/dashboard.html @@ -9,7 +9,7 @@

Access Scanning Module

Final scanning module for production orders

- Launch Scanning Module + Launch Scanning Module
diff --git a/py_app/app/templates/main_page_scan.html b/py_app/app/templates/main_page_scan.html new file mode 100644 index 0000000..6f08716 --- /dev/null +++ b/py_app/app/templates/main_page_scan.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{% block title %}Main Scanning Module{% endblock %} + +{% block content %} +
+

Main Scanning Module

+

This is the main page for accessing scanning features.

+ +
+ +
+

Finish goods scanning

+

Access the scanning module for production orders.

+ Finish goods scanning +
+ +
+

View Scan History

+

Review previous scan records and results.

+ Coming Soon +
+
+
+{% endblock %} diff --git a/py_app/app/templates/scan.html b/py_app/app/templates/scan.html index 080043c..c18ea7f 100755 --- a/py_app/app/templates/scan.html +++ b/py_app/app/templates/scan.html @@ -1,5 +1,8 @@ {% extends "base.html" %} {% block title %}Scan Module{% endblock %} +{% block head %} + +{% endblock %} {% block content %}