added scan page

This commit is contained in:
2025-04-17 15:02:08 +03:00
parent fc355333cb
commit 9244ff90f6
8 changed files with 243 additions and 24 deletions

View File

@@ -3,9 +3,17 @@
{% block title %}Dashboard{% endblock %}
{% block content %}
<div class="card">
<h3>Manage Settings</h3>
<p>Access and manage application settings.</p>
<a href="{{ url_for('main.settings') }}" class="btn">Access Settings Page</a>
<div class="card-container">
<div class="card">
<h3>Accesare modul scanare</h3>
<p>Modul de scanare finala a comenzilor de productie</p>
<a href="{{ url_for('main.scan') }}" class="btn">Lansare modul de scanare</a>
</div>
<div class="card">
<h3>Manage Settings</h3>
<p>Access and manage application settings.</p>
<a href="{{ url_for('main.settings') }}" class="btn">Access Settings Page</a>
</div>
</div>
{% endblock %}

View File

@@ -1,6 +1,69 @@
{% extends "base.html" %}
{% block title %}Scan Module{% endblock %}
{% block content %}
<h2>Scan Module</h2>
<p>Welcome to the Scan Module.</p>
<div class="scan-container">
<!-- Input Form Card -->
<div class="card scan-form-card">
<h3>Scan Input</h3>
<form method="POST" class="form-centered">
<label for="operator_code">Operator Code:</label>
<input type="text" id="operator_code" name="operator_code" maxlength="4" required>
<label for="cp_code">CP Code:</label>
<input type="text" id="cp_code" name="cp_code" maxlength="14" required>
<label for="oc1_code">OC1 Code:</label>
<input type="text" id="oc1_code" name="oc1_code" maxlength="4" required>
<label for="oc2_code">OC2 Code:</label>
<input type="text" id="oc2_code" name="oc2_code" maxlength="4" required>
<label for="defect_code">Defect Code:</label>
<input type="text" id="defect_code" name="defect_code" maxlength="4" required>
<label for="date">Date:</label>
<input type="text" id="date" name="date" value="{{ now().strftime('%Y-%m-%d') }}" readonly>
<label for="time">Time:</label>
<input type="text" id="time" name="time" value="{{ now().strftime('%H:%M:%S') }}" readonly>
<button type="submit" class="btn">Submit</button>
</form>
</div>
<!-- Latest Scans Card -->
<div class="card scan-table-card">
<h3>Latest Scans</h3>
<table class="scan-table">
<thead>
<tr>
<th>ID</th>
<th>Operator Code</th>
<th>CP Code</th>
<th>OC1 Code</th>
<th>OC2 Code</th>
<th>Defect Code</th>
<th>Date</th>
<th>Time</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
{% for row in scan_data %}
<tr>
<td>{{ row.id }}</td>
<td>{{ row.operator_code }}</td>
<td>{{ row.cp_code }}</td>
<td>{{ row.oc1_code }}</td>
<td>{{ row.oc2_code }}</td>
<td>{{ row.defect_code }}</td>
<td>{{ row.date }}</td>
<td>{{ row.time }}</td>
<td>{{ row.quantity }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}