Saved successfully

Visitor Registration

Record visitor information & visit requirements

0 records saved
0 today
Visitor Information
Visit Requirements

Recent Records

0 total

No records yet. Save your first visitor above.

'; html += ''; html += ''; headers.forEach(function (h) { html += ''; }); html += ''; records.forEach(function (r, i) { html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; html += ''; }); html += '
' + escapeHtml(h) + '
' + (i + 1) + '' + escapeHtml(r.fullName) + '' + escapeHtml(r.phone) + '' + escapeHtml(r.company) + '' + escapeHtml(r.visitTime) + '' + escapeHtml(r.visitPurpose) + '' + escapeHtml(r.requirements) + '' + escapeHtml(r.followUp) + '' + escapeHtml(r.receptionist) + '' + escapeHtml(r.submittedAt) + '
'; var blob = new Blob(['\ufeff' + html], { type: 'application/vnd.ms-excel' }); var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; var dateStr = new Date().toISOString().slice(0, 10); a.download = 'Visitor_Records_' + dateStr + '.xls'; document.body.appendChild(a); a.click(); document.body.removeChild(a); setTimeout(function () { URL.revokeObjectURL(url); }, 100); } function escapeHtml(str) { if (str === null || str === undefined) return ''; return String(str) .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/\n/g, '
'); } // ===== Format datetime for display ===== function formatDateTime(iso) { if (!iso) return '-'; var d = new Date(iso); if (isNaN(d.getTime())) return iso; var mon = ('0' + (d.getMonth() + 1)).slice(-2); var day = ('0' + d.getDate()).slice(-2); var h = ('0' + d.getHours()).slice(-2); var m = ('0' + d.getMinutes()).slice(-2); return d.getFullYear() + '-' + mon + '-' + day + ' ' + h + ':' + m; } // ===== Render History ===== function renderHistory() { var records = getRecords(); var total = records.length; totalCountEl.textContent = total; historyCount.textContent = total + ' total'; // today count var today = new Date().toDateString(); var todayCount = records.filter(function (r) { return new Date(r.submittedAt).toDateString() === today; }).length; todayCountEl.textContent = todayCount; // show/hide download button downloadAllBtn.style.display = total > 0 ? 'flex' : 'none'; if (total === 0) { historyList.innerHTML = '
' + '' + '

No records yet. Save your first visitor above.

'; return; } // show latest 20 var recent = records.slice(-20).reverse(); var html = ''; recent.forEach(function (r) { html += '
'; html += '
' + escapeHtml(r.fullName) + ''; html += '' + formatDateTime(r.submittedAt) + '
'; html += '
' + escapeHtml(r.phone || '-'); if (r.company) html += ' · ' + escapeHtml(r.company); html += '
'; if (r.visitPurpose) { html += '' + escapeHtml(r.visitPurpose) + ''; } html += '
'; }); historyList.innerHTML = html; } // ===== Form Submit ===== form.addEventListener('submit', function (e) { e.preventDefault(); var record = { fullName: document.getElementById('fullName').value.trim(), phone: document.getElementById('phone').value.trim(), company: document.getElementById('company').value.trim(), visitTime: document.getElementById('visitTime').value, visitPurpose: document.getElementById('visitPurpose').value, requirements: document.getElementById('requirements').value.trim(), followUp: document.getElementById('followUp').value.trim(), receptionist: document.getElementById('receptionist').value.trim(), submittedAt: new Date().toISOString() }; // basic validation if (!record.fullName || !record.phone || !record.requirements) { showToast('Please fill in all required fields', true); return; } var records = getRecords(); records.push(record); saveRecords(records); // export to excel exportToExcel(records); showToast('Saved! Excel downloaded (' + records.length + ' records)'); // reset form but keep receptionist var receptionist = record.receptionist; form.reset(); document.getElementById('receptionist').value = receptionist; // reset default time var now = new Date(); now.setMinutes(now.getMinutes() - now.getTimezoneOffset()); document.getElementById('visitTime').value = now.toISOString().slice(0, 16); renderHistory(); }); // ===== Clear Button ===== clearBtn.addEventListener('click', function () { form.reset(); var now = new Date(); now.setMinutes(now.getMinutes() - now.getTimezoneOffset()); document.getElementById('visitTime').value = now.toISOString().slice(0, 16); showToast('Form cleared'); }); // ===== Download All ===== downloadAllBtn.addEventListener('click', function () { var records = getRecords(); if (records.length === 0) { showToast('No records to download', true); return; } exportToExcel(records); showToast('Excel file downloaded'); }); // ===== Init ===== renderHistory();

Solutions

Technical research and development
Extrusion production
Deep processing
Quality monitoring
Full chain logistics
Vendor-Managed Inventory (VMI)
After sales service

Cost control


Service

Support

Downloads

Company

About Us

Contact Us

 

Contact us

Sales hotline

 +855 883-778-105

[email protected]

 

Manhattan Bavet Special Economic Zone, Ta Pov Village, Bavet Commune, Bavet City, Svay Rieng Province, Cambodia


© Copyright - 2025-2028 : All Rights Reserved.

Online
TOP
Add WeChat friend to learn more about the product
Use Enterprise WeChat
"Scan" to join the group chat
Copy success!
Add WeChat friend to learn more about the product
I see.