printedparts: kiosk tag prefix + labels use the gage lab tag
Kiosk item lookup shows a fixed "WJ" prefix addon so operators type only the number off the label. The label page - and the detail "Part Label" button, renamed from "Bin Label" - now barcodes and prints the gage lab tag, falling back to the internal item code when a part has no tag assigned.
This commit is contained in:
@@ -15,9 +15,14 @@
|
|||||||
<!-- one visible field: keyboard-wedge scanners, a plugged-in keyboard or
|
<!-- one visible field: keyboard-wedge scanners, a plugged-in keyboard or
|
||||||
numpad, and the on-screen keypad all type into it. -->
|
numpad, and the on-screen keypad all type into it. -->
|
||||||
<div class="entry-panel">
|
<div class="entry-panel">
|
||||||
<input ref="entryInput" v-model="manualCode" class="entry-input"
|
<!-- The tag prefix is shown as a fixed addon so operators type only
|
||||||
inputmode="none" autocomplete="off" placeholder="label number"
|
the number part off the label. -->
|
||||||
|
<div class="entry-input-group">
|
||||||
|
<span class="entry-prefix">{{ LABEL_PREFIX }}</span>
|
||||||
|
<input ref="entryInput" v-model="manualCode" class="entry-input has-prefix"
|
||||||
|
inputmode="none" autocomplete="off" placeholder="number"
|
||||||
@keydown.enter.prevent="lookupItem(manualCode)" />
|
@keydown.enter.prevent="lookupItem(manualCode)" />
|
||||||
|
</div>
|
||||||
<TouchKeypad @digit="manualCode += $event"
|
<TouchKeypad @digit="manualCode += $event"
|
||||||
@clear="manualCode = ''"
|
@clear="manualCode = ''"
|
||||||
@backspace="manualCode = manualCode.slice(0, -1)" />
|
@backspace="manualCode = manualCode.slice(0, -1)" />
|
||||||
@@ -88,6 +93,10 @@ import { printedpartsApi } from '@/api'
|
|||||||
import { withBase } from '@/utils/basePath'
|
import { withBase } from '@/utils/basePath'
|
||||||
import TouchKeypad from '@/components/TouchKeypad.vue'
|
import TouchKeypad from '@/components/TouchKeypad.vue'
|
||||||
|
|
||||||
|
// Fixed tag prefix shown before the label number at the kiosk. Change here if
|
||||||
|
// the gage lab tags use a different leading string.
|
||||||
|
const LABEL_PREFIX = 'WJ'
|
||||||
|
|
||||||
const step = ref('item')
|
const step = ref('item')
|
||||||
const item = ref(null)
|
const item = ref(null)
|
||||||
const badge = ref('')
|
const badge = ref('')
|
||||||
@@ -255,6 +264,29 @@ function reset() {
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
.entry-input:focus { border-color: var(--primary); }
|
.entry-input:focus { border-color: var(--primary); }
|
||||||
|
.entry-input-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
width: 16.9rem;
|
||||||
|
}
|
||||||
|
.entry-prefix {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 0.7rem;
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-light);
|
||||||
|
background: var(--bg-card);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-right: none;
|
||||||
|
border-radius: 0.75rem 0 0 0.75rem;
|
||||||
|
}
|
||||||
|
.entry-input.has-prefix {
|
||||||
|
width: auto;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
border-radius: 0 0.75rem 0.75rem 0;
|
||||||
|
}
|
||||||
.entry-input::placeholder {
|
.entry-input::placeholder {
|
||||||
color: var(--text-light);
|
color: var(--text-light);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<router-link :to="`/printedparts/${item.printeditemid}/edit`"
|
<router-link :to="`/printedparts/${item.printeditemid}/edit`"
|
||||||
class="btn btn-secondary btn-sm">Edit</router-link>
|
class="btn btn-secondary btn-sm">Edit</router-link>
|
||||||
<router-link :to="`/print/printedparts-labels?item=${item.printeditemid}`"
|
<router-link :to="`/print/printedparts-labels?item=${item.printeditemid}`"
|
||||||
class="btn btn-secondary btn-sm">Bin Label</router-link>
|
class="btn btn-secondary btn-sm">Part Label</router-link>
|
||||||
<button v-if="item.isactive" class="btn btn-danger btn-sm"
|
<button v-if="item.isactive" class="btn btn-danger btn-sm"
|
||||||
@click="retireItem">Retire</button>
|
@click="retireItem">Retire</button>
|
||||||
<button v-else class="btn btn-primary btn-sm"
|
<button v-else class="btn btn-primary btn-sm"
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
<h3>Print 3D Parts Bin Labels (1in x 0.5in)</h3>
|
<h3>Print 3D Parts Bin Labels (1in x 0.5in)</h3>
|
||||||
<p>
|
<p>
|
||||||
Each label is one page on 1in x 0.5in roll stock: CODE128 barcode of
|
Each label is one page on 1in x 0.5in roll stock: CODE128 barcode of
|
||||||
the item code, scannable at the parts kiosk.
|
the gage lab tag (the internal code is used when a part has no tag),
|
||||||
|
scannable at the parts kiosk.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div v-if="loading" class="loading-msg">Loading parts...</div>
|
<div v-if="loading" class="loading-msg">Loading parts...</div>
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
>
|
>
|
||||||
<input type="checkbox" :checked="isSelected(item)" @click.stop />
|
<input type="checkbox" :checked="isSelected(item)" @click.stop />
|
||||||
<label>
|
<label>
|
||||||
<strong><code>{{ item.itemcode }}</code></strong>
|
<strong><code>{{ item.gagelabtag || item.itemcode }}</code></strong>
|
||||||
<div class="alias">{{ item.itemname }}</div>
|
<div class="alias">{{ item.itemname }}</div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
<div class="labels-container">
|
<div class="labels-container">
|
||||||
<div v-for="(label, index) in printLabels" :key="index" class="bin-label">
|
<div v-for="(label, index) in printLabels" :key="index" class="bin-label">
|
||||||
<svg :ref="element => setBarcodeElement(element, index)" class="bin-barcode"></svg>
|
<svg :ref="element => setBarcodeElement(element, index)" class="bin-barcode"></svg>
|
||||||
<div class="bin-code">{{ label.itemcode }}</div>
|
<div class="bin-code">{{ label.gagelabtag || label.itemcode }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -111,9 +112,9 @@ watch(printLabels, async labels => {
|
|||||||
labels.forEach((label, index) => {
|
labels.forEach((label, index) => {
|
||||||
const element = barcodeElements.value[index]
|
const element = barcodeElements.value[index]
|
||||||
if (element) {
|
if (element) {
|
||||||
// CODE128 of the short item code fits 1x0.5in with comfortable
|
// CODE128 of the gage lab tag (or the internal code when untagged) fits
|
||||||
// scanner tolerance; a QR at this size would be marginal.
|
// 1x0.5in with comfortable scanner tolerance; a QR here would be marginal.
|
||||||
JsBarcode(element, label.itemcode, {
|
JsBarcode(element, label.gagelabtag || label.itemcode, {
|
||||||
format: 'CODE128',
|
format: 'CODE128',
|
||||||
displayValue: false,
|
displayValue: false,
|
||||||
width: 1.4,
|
width: 1.4,
|
||||||
|
|||||||
Reference in New Issue
Block a user