printedparts: QR label with gage tag + revision; record taken rev

Label switches from CODE128 to a QR encoding 'TAG|rev' (gage lab tag + latest
print-file revision), so a physical part carries which revision it was printed
from - short payload stays low-version + reliable at 0.5in (margin quiet zone,
EC M, no logo). Item exposes latestrevision; kiosk strips the |rev to resolve
and records the scanned revision on the take (migration 0004 adds
printeditemtransactions.revision) for traceability of which rev was consumed.
Manual entry records a null revision.
This commit is contained in:
cproudlock
2026-07-22 07:52:17 -04:00
parent e85553e5e7
commit baf6862151
6 changed files with 151 additions and 34 deletions

View File

@@ -106,6 +106,7 @@ const doneMessage = ref('')
const submitting = ref(false)
const manualCode = ref('')
const manualBadge = ref('')
const scannedRevision = ref(null)
const entryInput = ref(null)
let resetTimer = null
@@ -126,6 +127,9 @@ async function lookupItem(itemcode) {
error.value = ''
const code = (itemcode || '').trim()
if (!code) return
// A label QR carries "TAG|rev"; capture the revision, resolve by the TAG part.
const pipe = code.indexOf('|')
scannedRevision.value = pipe >= 0 ? (parseInt(code.slice(pipe + 1), 10) || null) : null
try {
const response = await printedpartsApi.kioskItem(code)
item.value = response.data.data
@@ -156,7 +160,8 @@ async function submitTake() {
const response = await printedpartsApi.kioskTake({
itemcode: item.value.itemcode,
badge: badge.value,
quantity: parseInt(quantity.value, 10)
quantity: parseInt(quantity.value, 10),
revision: scannedRevision.value
})
doneMessage.value = response.data.message
step.value = 'done'
@@ -182,6 +187,7 @@ function reset() {
quantity.value = ''
manualCode.value = ''
manualBadge.value = ''
scannedRevision.value = null
error.value = ''
doneMessage.value = ''
focusEntry()