清除產品表面 AI 自動化人工阻擋
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-01 13:36:36 +08:00
parent 71a9ca4f3d
commit 3351f5f93e
14 changed files with 387 additions and 157 deletions

View File

@@ -623,12 +623,12 @@ let priceChartInstance = null;
const sku = button.dataset.reviewSku || '';
const action = button.dataset.reviewAction || '';
if (!sku || !action) return;
const confirmText = button.dataset.reviewConfirm || '確認寫入這筆覆核決策?';
const confirmText = button.dataset.reviewConfirm || '執行這筆 AI 例外決策?';
if (!confirm(confirmText)) return;
const reason = prompt('補充覆核原因(可留空)', '') || '';
const reason = prompt('補充 AI 決策依據(可留空)', '') || '';
const originalText = button.textContent;
button.disabled = true;
button.textContent = '寫入中';
button.textContent = '執行中';
fetch(`/api/pchome-review/${encodeURIComponent(sku)}/decision`, {
method: 'POST',
headers: {
@@ -640,9 +640,9 @@ let priceChartInstance = null;
.then(response => response.json().then(data => ({ ok: response.ok, data })))
.then(({ ok, data }) => {
if (!ok || !data.success) {
throw new Error(data.message || '覆核寫入失敗');
throw new Error(data.message || 'AI 決策寫入失敗');
}
alert(data.message || '覆核已寫入');
alert(data.message || 'AI 決策已寫入');
window.location.reload();
})
.catch(error => {