diff --git a/public/js/pages/Cpeprovisioning/Cpeprovisioning.js b/public/js/pages/Cpeprovisioning/Cpeprovisioning.js
index e5341b32b..9d01244d0 100644
--- a/public/js/pages/Cpeprovisioning/Cpeprovisioning.js
+++ b/public/js/pages/Cpeprovisioning/Cpeprovisioning.js
@@ -72,7 +72,7 @@ Vue.component('Cpeprovisioning', {
-
+ handleMacInput(item, val)" sm no-form-group style="flex-grow: 1;"/>
@@ -143,7 +143,7 @@ Vue.component('Cpeprovisioning', {
-
+
@@ -343,10 +340,15 @@ Vue.component('Cpeprovisioning', {
return formatted;
},
- handleMacInput(item) {
+ handleMacInput(item, val) {
+ if (val !== undefined) {
+ item.cpe_data.mac = val;
+ }
+ const currentValue = item.cpe_data.mac;
+
console.log('[MAC Input] === START handleMacInput ===');
console.log('[MAC Input] Item:', item);
- console.log('[MAC Input] Current MAC value:', item.cpe_data.mac);
+ console.log('[MAC Input] Current MAC value:', currentValue);
console.log('[MAC Input] Router type:', item.cpe_data.routertype);
const itemKey = item.orderproduct_id;
@@ -365,6 +367,17 @@ Vue.component('Cpeprovisioning', {
clearTimeout(this.macInputTimers[itemKey]);
}
+ // Check for immediate QR code match (CWMP ID format)
+ // Format: 00040E-802395709D7C (approx 19 chars)
+ if (currentValue && currentValue.includes('-') && currentValue.length >= 18) {
+ const quickMatch = /-([0-9A-Fa-f]{12})/.test(currentValue);
+ if (quickMatch) {
+ console.log('[MAC Input] Quick match found, processing immediately');
+ this.processMacAddress(item);
+ return;
+ }
+ }
+
// Create new timer (debounce with 300ms delay)
console.log('[MAC Input] Creating new debounce timer for item:', itemKey);
this.macInputTimers[itemKey] = setTimeout(() => {
@@ -591,4 +604,4 @@ Vue.component('Cpeprovisioning', {
this.fetchData(true);
window.addEventListener('keydown', this.handleKeydown);
}
-});
\ No newline at end of file
+});