|
|
@ -429,9 +429,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<button class="verify-btn" id="verifyBtn" onclick="checkSubmissionStatus()">经销商查验</button> |
|
|
<button class="verify-btn" id="verifyBtn" onclick="checkSubmissionStatus()">提交信息</button> |
|
|
<button class="verify-btn" id="exportBtn" onclick="exportCertificate()" style="margin-top: 10px;">导出信息</button> |
|
|
<button class="verify-btn" id="exportBtn" onclick="exportCertificate()" style="margin-top: 10px;">导出信息</button> |
|
|
<button class="verify-btn" id="resetBtn" onclick="resetSubmissionStatus()" style="margin-top: 10px; background-color: #6c757d;">重置提交</button> |
|
|
<button class="verify-btn" id="resetBtn" onclick="resetSubmissionStatus()" style="display: none; margin-top: 10px; background-color: #6c757d;">重置提交</button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="hint"> |
|
|
<div class="hint"> |
|
|
@ -552,6 +552,12 @@ |
|
|
return dateValue; |
|
|
return dateValue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 隐藏电话号码中间四位 |
|
|
|
|
|
function hidePhoneNumber(phone) { |
|
|
|
|
|
if (!phone || phone.length !== 11) return phone; |
|
|
|
|
|
return phone.substring(0, 3) + '****' + phone.substring(7); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 显示合格证信息 |
|
|
// 显示合格证信息 |
|
|
function displayCertificate(certificate) { |
|
|
function displayCertificate(certificate) { |
|
|
const container = document.getElementById('certificateInfo'); |
|
|
const container = document.getElementById('certificateInfo'); |
|
|
@ -580,7 +586,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="info-item"> |
|
|
<div class="info-item"> |
|
|
<span class="label">联系方式:</span> |
|
|
<span class="label">联系方式:</span> |
|
|
<span class="value">${certificate.contact || ''}</span> |
|
|
<span class="value">${hidePhoneNumber(certificate.contact) || ''}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="info-item"> |
|
|
<div class="info-item"> |
|
|
<span class="label">开具日期:</span> |
|
|
<span class="label">开具日期:</span> |
|
|
@ -839,6 +845,15 @@ |
|
|
padding: 20px; |
|
|
padding: 20px; |
|
|
`; |
|
|
`; |
|
|
|
|
|
|
|
|
|
|
|
// 创建二维码标题 |
|
|
|
|
|
const qrTitle = document.createElement('h3'); |
|
|
|
|
|
qrTitle.style.cssText = ` |
|
|
|
|
|
color: #28a745; |
|
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
|
font-size: 20px; |
|
|
|
|
|
`; |
|
|
|
|
|
qrTitle.innerHTML = '📋 导出信息二维码'; |
|
|
|
|
|
|
|
|
// 创建二维码图片 |
|
|
// 创建二维码图片 |
|
|
const qrImage = document.createElement('img'); |
|
|
const qrImage = document.createElement('img'); |
|
|
qrImage.id = 'qrCodeImage'; |
|
|
qrImage.id = 'qrCodeImage'; |
|
|
@ -859,8 +874,11 @@ |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
margin-bottom: 20px; |
|
|
margin-bottom: 20px; |
|
|
max-width: 90%; |
|
|
max-width: 90%; |
|
|
|
|
|
background-color: rgba(40, 167, 69, 0.1); |
|
|
|
|
|
padding: 15px; |
|
|
|
|
|
border-radius: 8px; |
|
|
`; |
|
|
`; |
|
|
qrText.innerHTML = '扫描二维码查看完整信息<br>长按保存二维码'; |
|
|
qrText.innerHTML = '<p style="font-weight: 500; margin-bottom: 10px;">作用:查看完整的合格证信息</p><p>扫描二维码查看完整信息<br>长按保存二维码</p>'; |
|
|
|
|
|
|
|
|
// 创建关闭按钮 |
|
|
// 创建关闭按钮 |
|
|
const closeBtn = document.createElement('button'); |
|
|
const closeBtn = document.createElement('button'); |
|
|
@ -900,6 +918,7 @@ |
|
|
qrImage.src = qrCodeUrl; |
|
|
qrImage.src = qrCodeUrl; |
|
|
|
|
|
|
|
|
// 组装容器 |
|
|
// 组装容器 |
|
|
|
|
|
qrContainer.appendChild(qrTitle); |
|
|
qrContainer.appendChild(qrImage); |
|
|
qrContainer.appendChild(qrImage); |
|
|
qrContainer.appendChild(qrText); |
|
|
qrContainer.appendChild(qrText); |
|
|
qrContainer.appendChild(closeBtn); |
|
|
qrContainer.appendChild(closeBtn); |
|
|
@ -1027,6 +1046,17 @@ |
|
|
window.onload = function() { |
|
|
window.onload = function() { |
|
|
loadCertificate(); |
|
|
loadCertificate(); |
|
|
setupDateInput(); |
|
|
setupDateInput(); |
|
|
|
|
|
|
|
|
|
|
|
// 自动检查提交状态,如果未提交则弹出填写窗口 |
|
|
|
|
|
setTimeout(function() { |
|
|
|
|
|
const sessionId = getSessionId(); |
|
|
|
|
|
const hasSubmitted = sessionStorage.getItem('certificateSubmitted_' + sessionId); |
|
|
|
|
|
|
|
|
|
|
|
if (!hasSubmitted) { |
|
|
|
|
|
// 未提交过,自动打开填写弹窗 |
|
|
|
|
|
openModal(); |
|
|
|
|
|
} |
|
|
|
|
|
}, 500); // 延迟执行,确保页面完全加载 |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
</body> |
|
|
</body> |
|
|
|