Added logic in ocr create page
This commit is contained in:
@@ -741,6 +741,8 @@ function cameraCapture() {
|
||||
{{-- <input type="hidden" x-ref="serialInput" name="serialNumbers"> --}}
|
||||
{{-- <input type="hidden" x-model="serialNumbers" name="serialNumbers"> --}}
|
||||
<input type="hidden" x-model="serialNumbers" name="serialNumbers">
|
||||
<input type="hidden" x-ref="hiddenInputSerials" name="serial_numbers">
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Scripts -->
|
||||
@@ -877,7 +879,7 @@ function cameraCapture() {
|
||||
// Extract serial numbers (digits only)
|
||||
const matches = detectedText.match(/\d+/g) || [];
|
||||
this.serialNumbers = matches.slice(0, 4); // take first 4 serials
|
||||
|
||||
this.$refs.hiddenInputSerials.value = JSON.stringify(this.serialNumbers);
|
||||
//this.$refs.serialInput.value = JSON.stringify(this.serialNumbers);
|
||||
alert("Serial numbers stored in hidden input:\n" + this.$refs.serialInput.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user