2022-03-16 12:06:42 +00:00
|
|
|
{% extends "ereuse_devicehub/base_site.html" %}
|
|
|
|
{% block main %}
|
|
|
|
|
|
|
|
<div class="pagetitle">
|
2022-03-17 08:41:03 +00:00
|
|
|
<h1>Print Labels</h1>
|
2022-03-16 12:06:42 +00:00
|
|
|
<nav>
|
|
|
|
<ol class="breadcrumb">
|
2022-04-28 09:47:52 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ url_for('labels.label_list')}}">Unique Identifier management</a></li>
|
2022-03-17 08:41:03 +00:00
|
|
|
<li class="breadcrumb-item active">Print Labels</li>
|
2022-03-16 12:06:42 +00:00
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
</div><!-- End Page Title -->
|
|
|
|
|
|
|
|
<section class="section profile">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xl-8">
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="pt-4 pb-2">
|
2022-03-17 08:41:03 +00:00
|
|
|
<h5 class="card-title text-center pb-0 fs-4">Print Labels</h5>
|
2022-03-16 12:06:42 +00:00
|
|
|
<p class="text-center small">{{ title }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-3 col-md-4">
|
2022-04-27 16:56:15 +00:00
|
|
|
{% for dev in devices %}
|
|
|
|
<div style="width:256px; min-height:148px; border: solid 1px; padding: 10px;">
|
|
|
|
<div>
|
2022-03-16 12:06:42 +00:00
|
|
|
<div class="row">
|
2022-04-27 16:56:15 +00:00
|
|
|
<div class="col qr">
|
|
|
|
<div id="{{ dev.devicehub_id }}"></div>
|
|
|
|
</div>
|
|
|
|
<div class="col dhid">
|
|
|
|
<div style="padding-top: 55px">
|
|
|
|
<b class="tag" data-serial-number="{{ dev.serial_number or '' }}"
|
|
|
|
data-manufacturer="{{ dev.manufacturer or '' }}"
|
2022-06-08 07:26:09 +00:00
|
|
|
data-model="{{ dev.model or '' }}"
|
|
|
|
data-sid="{{ dev.sid or '' }}">{{ dev.devicehub_id }}</b>
|
2022-04-27 16:56:15 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-08 09:59:47 +00:00
|
|
|
<div class="col sid" style="display: none">
|
|
|
|
<div>
|
|
|
|
<b>{{ dev.sid or '' }}</b>
|
2022-04-27 16:56:15 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row serial_number" style="display: none">
|
2022-03-16 12:06:42 +00:00
|
|
|
<div class="col">
|
2022-04-27 16:56:15 +00:00
|
|
|
<div>
|
|
|
|
<b>{{ dev.serial_number or '' }}</b>
|
|
|
|
</div>
|
2022-03-16 12:06:42 +00:00
|
|
|
</div>
|
2022-04-27 16:56:15 +00:00
|
|
|
</div>
|
|
|
|
<div class="row manufacturer" style="display: none">
|
2022-03-16 12:06:42 +00:00
|
|
|
<div class="col">
|
2022-04-27 16:56:15 +00:00
|
|
|
<div>
|
|
|
|
<b>{{ dev.manufacturer or '' }}</b>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row model" style="display: none">
|
|
|
|
<div class="col">
|
|
|
|
<div>
|
|
|
|
<span style="font-size: 12px;">{{ dev.model or '' }}</span>
|
2022-03-16 13:27:55 +00:00
|
|
|
</div>
|
2022-03-16 12:06:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<div class="col-1">
|
|
|
|
</div>
|
|
|
|
<div class="col label">
|
2022-06-08 10:26:47 +00:00
|
|
|
<label class="col-form-label col-sm-2">Logo</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<div class="input-group mb-3">
|
|
|
|
<input class="form-control" id="width-tag" name='width-tag' type="file" value="62" min="52" max="300" />
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-16 12:06:42 +00:00
|
|
|
<label class="col-form-label col-sm-2">Size</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<div class="input-group mb-3">
|
|
|
|
<select class="form-select" id="printerType">
|
|
|
|
<option label="Brother small size (62 x 29)" value="brotherSmall" selected="selected">
|
|
|
|
Brother small size (62 x 29)
|
|
|
|
</option>
|
|
|
|
<option label="Printer tag small (97 x 59)" value="smallTagPrinter">
|
|
|
|
Printer tag small (97 x 59)
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<label class="col-form-label col-sm-2">Width</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<div class="input-group mb-3">
|
|
|
|
<input class="form-control" id="width-tag" name='width-tag' type="number" value="62" min="52" max="300" />
|
|
|
|
<span class="input-group-text">mm</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<label class="col-form-label col-sm-2">Height</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<div class="input-group mb-3">
|
|
|
|
<input class="form-control" id="height-tag" name='height-tag' type="number" value="29" min="28" max="200" />
|
|
|
|
<span class="input-group-text">mm</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-04-27 16:56:15 +00:00
|
|
|
<div class="col-sm-10">
|
|
|
|
<div class="form-switch">
|
|
|
|
<input class="form-check-input" name="qr" type="checkbox" id="qrCheck" checked="">
|
|
|
|
<label class="form-check-label" for="qrCheck">QR</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-switch">
|
|
|
|
<input class="form-check-input" name="dhid" type="checkbox" id="dhidCheck" checked="">
|
|
|
|
<label class="form-check-label" for="dhidCheck">Dhid</label>
|
|
|
|
</div>
|
2022-06-08 07:26:09 +00:00
|
|
|
<div class="form-switch">
|
2022-06-08 09:59:47 +00:00
|
|
|
<input class="form-check-input" name="sid" type="checkbox" id="sidCheck">
|
|
|
|
<label class="form-check-label" for="sidCheck">Sid</label>
|
2022-06-08 07:26:09 +00:00
|
|
|
</div>
|
2022-04-27 16:56:15 +00:00
|
|
|
<div class="form-switch">
|
|
|
|
<input class="form-check-input" name="serial_number" type="checkbox" id="serialNumberCheck">
|
|
|
|
<label class="form-check-label" for="serialNumberCheck">Serial number</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-switch">
|
|
|
|
<input class="form-check-input" name="manufacturer" type="checkbox" id="manufacturerCheck">
|
|
|
|
<label class="form-check-label" for="manufacturerCheck">Manufacturer</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-switch">
|
|
|
|
<input class="form-check-input" name="model" type="checkbox" id="modelCheck">
|
|
|
|
<label class="form-check-label" for="modelCheck">Model</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row mt-5">
|
|
|
|
<div class="col-lg-3 col-md-4">
|
|
|
|
<a href="javascript:printpdf()" class="btn btn-success">Print labels</a>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-3 col-md-4">
|
|
|
|
<a href="javascript:save_settings()" class="btn btn-primary">Save settings</a>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-3 col-md-4">
|
|
|
|
<a href="javascript:reset_settings()" class="btn btn-danger">Reset settings</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-16 12:06:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<script src="{{ url_for('static', filename='js/qrcode.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/jspdf.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/print.pdf.js') }}"></script>
|
|
|
|
<script type="text/javascript">
|
2022-04-27 16:56:15 +00:00
|
|
|
{% for dev in devices %}
|
|
|
|
qr_draw("{{ url_for('inventory.device_details', id=dev.devicehub_id, _external=True) }}", "#{{ dev.devicehub_id }}")
|
2022-03-16 12:06:42 +00:00
|
|
|
{% endfor %}
|
|
|
|
</script>
|
|
|
|
{% endblock main %}
|