/* task-detail.html 专用 — 放弃客户弹窗 */
function showAbandonModal() {
    document.getElementById('abandonModal').classList.remove('hidden');
    document.getElementById('abandonModal').classList.add('flex');
    document.getElementById('abandonReason').value = '';
    document.getElementById('abandonError').classList.add('hidden');
}

function hideAbandonModal() {
    document.getElementById('abandonModal').classList.add('hidden');
    document.getElementById('abandonModal').classList.remove('flex');
}

function submitAbandon() {
    var reason = document.getElementById('abandonReason').value.trim();
    if (!reason) {
        document.getElementById('abandonError').classList.remove('hidden');
        document.getElementById('abandonReason').focus();
        return;
    }
    hideAbandonModal();
    showToast('已放弃该客户的维护');
}
