Upload index.excel-fix.html
Browse files- index.excel-fix.html +74 -0
index.excel-fix.html
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="vi">
|
| 3 |
+
<head>
|
| 4 |
+
<script>window.huggingface={variables:{"SPACE_CREATOR_USER_ID":"661b9191e7b0ab12bceb66f3","VAISTUDIO":"HF_TOKEN_REDACTED","REBUILD_TRIGGER":"2"}};</script>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 7 |
+
<title>V.AI STUDIO - Excel Fix Applied</title>
|
| 8 |
+
|
| 9 |
+
<!-- Libraries for quotation export -->
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/exceljs@4.4.0/dist/exceljs.min.js"></script>
|
| 11 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
|
| 12 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
|
| 13 |
+
|
| 14 |
+
<!-- V.AI STUDIO Excel Multi-Download Fix v1050 -->
|
| 15 |
+
<script src="vai-quote-excel-order-fix-v1050.js"></script>
|
| 16 |
+
|
| 17 |
+
<!-- Auto loader for fallback -->
|
| 18 |
+
<script src="auto-excel-fix-loader.js"></script>
|
| 19 |
+
|
| 20 |
+
<style>
|
| 21 |
+
/* Minimal styles for testing */
|
| 22 |
+
body { font-family: Inter, sans-serif; padding: 20px; }
|
| 23 |
+
.success { color: #217346; font-weight: bold; }
|
| 24 |
+
button { padding: 10px 20px; background: #003f62; color: white; border: none; border-radius: 8px; cursor: pointer; margin: 5px; }
|
| 25 |
+
button:hover { background: #005a8c; }
|
| 26 |
+
.test-section { margin: 20px 0; padding: 20px; background: #f8fafc; border-radius: 12px; }
|
| 27 |
+
</style>
|
| 28 |
+
</head>
|
| 29 |
+
<body>
|
| 30 |
+
<h1>V.AI STUDIO - Excel Multi-Download Fix</h1>
|
| 31 |
+
<p><span class="success">✅ Fix đã được áp dụng</span> - Excel tải được nhiều lần</p>
|
| 32 |
+
|
| 33 |
+
<div class="test-section">
|
| 34 |
+
<h2>Kiểm tra nhanh</h2>
|
| 35 |
+
<button onclick="testExcel()">Test Excel Download</button>
|
| 36 |
+
<p id="result"></p>
|
| 37 |
+
</div>
|
| 38 |
+
|
| 39 |
+
<script>
|
| 40 |
+
async function testExcel() {
|
| 41 |
+
try {
|
| 42 |
+
var wb = new ExcelJS.Workbook();
|
| 43 |
+
var ws = wb.addWorksheet('Test');
|
| 44 |
+
ws.getCell('A1').value = 'TEST - V.AI STUDIO Excel Fix v1050';
|
| 45 |
+
ws.getCell('A2').value = 'Thời gian: ' + new Date().toLocaleString();
|
| 46 |
+
|
| 47 |
+
var buf = await wb.xlsx.writeBuffer();
|
| 48 |
+
var blob = new Blob([buf], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
| 49 |
+
var url = URL.createObjectURL(blob);
|
| 50 |
+
|
| 51 |
+
var a = document.createElement('a');
|
| 52 |
+
a.href = url;
|
| 53 |
+
a.download = 'test_vai_' + Date.now() + '.xlsx';
|
| 54 |
+
document.body.appendChild(a);
|
| 55 |
+
a.click();
|
| 56 |
+
document.body.removeChild(a);
|
| 57 |
+
|
| 58 |
+
document.getElementById('result').innerHTML = '<span class="success">✅ Tải Excel thành công! Click lại nút này để kiểm tra tải lại...</span>';
|
| 59 |
+
} catch (e) {
|
| 60 |
+
document.getElementById('result').innerHTML = '❌ Lỗi: ' + e.message;
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
</script>
|
| 64 |
+
|
| 65 |
+
<hr>
|
| 66 |
+
<h3>Hướng dẫn admin:</h3>
|
| 67 |
+
<ol>
|
| 68 |
+
<li>Copy nội dung file <code>vai-quote-excel-order-fix-v1050.js</code> vào cuối <code>index.html</code> (trước <code></body></code>)</li>
|
| 69 |
+
<li>HOẶC thêm dòng: <code><script src="vai-quote-excel-order-fix-v1050.js"></script></code></li>
|
| 70 |
+
<li>Click nút "Rebuild" trong Space Settings</li>
|
| 71 |
+
<li>Kiểm tra: nút Excel trong modal lập báo giá và đơn hàng</li>
|
| 72 |
+
</ol>
|
| 73 |
+
</body>
|
| 74 |
+
</html>
|