xuất excel
This commit is contained in:
@@ -680,6 +680,25 @@
|
||||
</div>
|
||||
|
||||
<!-- Export Asset Modal -->
|
||||
<div class="modal-backdrop fixed inset-0 z-[110] flex items-center justify-center bg-black/40 backdrop-blur-sm" id="exportRequestDocumentModal">
|
||||
<div class="modal-content w-full max-w-lg bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden m-4">
|
||||
<div class="px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50">
|
||||
<h3 class="text-base font-extrabold text-slate-900">Phiếu đề nghị xuất Excel</h3>
|
||||
<button type="button" class="p-1.5 rounded-lg hover:bg-slate-200 text-slate-400" data-close-modal="exportRequestDocumentModal" aria-label="Đóng">
|
||||
<span class="material-symbols-outlined">close</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-6 space-y-4">
|
||||
<p class="text-sm text-slate-700">Đã xuất thành công và tạo phiếu Excel. Nếu file chưa tải xuống, bạn có thể tải lại bên dưới.</p>
|
||||
<p id="exportRequestDocumentName" class="text-sm font-semibold text-slate-700 break-all"></p>
|
||||
<p class="text-xs text-slate-500">Phần chữ ký, họ tên và ngày ký để trống để điền sau.</p>
|
||||
<div class="flex gap-3">
|
||||
<button type="button" class="flex-1 px-4 py-2 text-xs font-bold text-slate-600 border border-slate-200 rounded-lg" data-close-modal="exportRequestDocumentModal">Đóng</button>
|
||||
<button type="button" id="downloadExportRequestDocumentBtn" class="flex-1 px-4 py-2 bg-primary text-on-primary rounded-lg text-xs font-bold">Tải lại phiếu Excel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-backdrop fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm" id="borrowAssetModal">
|
||||
<div class="modal-content w-full max-w-lg bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden m-4">
|
||||
<div class="px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50">
|
||||
@@ -736,12 +755,55 @@
|
||||
</div>
|
||||
<div class="flex gap-3 pt-2">
|
||||
<button type="button" class="flex-1 px-4 py-2 text-xs font-bold text-slate-600 border border-slate-200 rounded-lg" data-close-modal="borrowAssetModal">Hủy</button>
|
||||
<button type="submit" class="flex-1 px-4 py-2 bg-primary hover:bg-primary-dim text-on-primary rounded-lg text-xs font-bold">Xác nhận xuất</button>
|
||||
<button type="submit" class="flex-1 px-4 py-2 bg-primary hover:bg-primary-dim text-on-primary rounded-lg text-xs font-bold">Xuất và tải Excel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Batch Asset Export Modal -->
|
||||
<div class="modal-backdrop fixed inset-0 z-[110] flex items-center justify-center bg-black/40 backdrop-blur-sm" id="batchAssetExportModal">
|
||||
<div class="modal-content w-full max-w-5xl bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden m-4 flex flex-col" style="max-height: calc(100vh - 2rem);">
|
||||
<div class="px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50">
|
||||
<div><h3 class="text-base font-extrabold text-slate-900">Xuất nhiều tài sản</h3><p class="mt-1 text-xs text-slate-500">Chọn số lượng và dự án cho từng tài sản trong một phiếu.</p></div>
|
||||
<button type="button" class="p-1.5 rounded-lg hover:bg-slate-200 text-slate-400" data-close-modal="batchAssetExportModal" aria-label="Đóng"><span class="material-symbols-outlined">close</span></button>
|
||||
</div>
|
||||
<form id="batchAssetExportForm" class="p-6 space-y-4 overflow-y-auto">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<label class="text-xs font-semibold text-slate-600">Người mượn<select id="batchAssetExportUserInput" class="mt-1 w-full border border-slate-200 rounded-lg px-3 py-2 text-sm" required><option value="">-- Chọn người mượn --</option></select></label>
|
||||
<label class="text-xs font-semibold text-slate-600">Dự án chung (tùy chọn)<select id="batchAssetExportCommonProject" class="mt-1 w-full border border-slate-200 rounded-lg px-3 py-2 text-sm"><option value="">-- Áp dụng dự án cho tất cả --</option></select></label>
|
||||
</div>
|
||||
<p id="batchAssetExportSummary" class="text-sm font-semibold text-slate-700" aria-live="polite"></p>
|
||||
<div class="overflow-x-auto rounded-lg border border-slate-200">
|
||||
<table class="w-full text-left text-sm" style="min-width: 760px;">
|
||||
<thead class="bg-slate-50 text-xs text-slate-500"><tr><th class="px-3 py-3">Tài sản</th><th class="px-3 py-3">Có thể xuất</th><th class="px-3 py-3">Số lượng</th><th class="px-3 py-3">Dự án</th><th class="px-3 py-3"></th></tr></thead>
|
||||
<tbody id="batchAssetExportTableBody" class="divide-y divide-slate-100"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<label class="block text-xs font-semibold text-slate-600">Ghi chú xuất<textarea id="batchAssetExportNoteInput" class="mt-1 w-full border border-slate-200 rounded-lg px-3 py-2 text-sm h-20 resize-none" maxlength="1000" placeholder="Nhập ghi chú (nếu có)"></textarea></label>
|
||||
<div class="flex gap-3 pt-2">
|
||||
<button type="button" class="flex-1 px-4 py-2 text-xs font-bold text-slate-600 border border-slate-200 rounded-lg" data-close-modal="batchAssetExportModal">Hủy</button>
|
||||
<button type="submit" class="flex-1 px-4 py-2 bg-primary hover:bg-primary-dim text-on-primary rounded-lg text-xs font-bold">Xuất và tải Excel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Saved Asset Export Preview -->
|
||||
<div class="modal-backdrop fixed inset-0 z-[110] flex items-center justify-center bg-black/40 backdrop-blur-sm" id="assetExportPreviewModal" style="z-index: 145;">
|
||||
<div class="modal-content w-full max-w-5xl bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden m-4 flex flex-col" style="max-height: calc(100vh - 2rem);">
|
||||
<div class="px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50">
|
||||
<div class="min-w-0"><h3 class="text-base font-extrabold text-slate-900">Phiếu xuất tài sản</h3><p id="assetExportPreviewFileName" class="mt-1 truncate text-xs text-slate-500"></p></div>
|
||||
<button type="button" class="p-1.5 rounded-lg hover:bg-slate-200 text-slate-400" data-close-modal="assetExportPreviewModal" aria-label="Đóng"><span class="material-symbols-outlined">close</span></button>
|
||||
</div>
|
||||
<div id="assetExportPreviewContent" class="p-6 overflow-y-auto"></div>
|
||||
<div class="px-6 py-4 border-t border-slate-100 flex items-center justify-between gap-3">
|
||||
<p class="text-xs text-slate-500">Nội dung ghi nhận tại thời điểm xuất.</p>
|
||||
<button type="button" id="assetExportPreviewDownloadBtn" class="shrink-0 px-4 py-2 bg-primary text-on-primary rounded-lg text-xs font-bold">Tải Excel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Asset Damage/Disposal Modal -->
|
||||
<div class="modal-backdrop fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm" id="assetDamageModal">
|
||||
<div class="modal-content w-full max-w-lg bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden m-4">
|
||||
@@ -804,17 +866,26 @@
|
||||
|
||||
<!-- Asset Export History Modal -->
|
||||
<div class="modal-backdrop fixed inset-0 z-[110] flex items-center justify-center bg-black/40 backdrop-blur-sm" id="assetExportHistoryModal" style="z-index: 125;">
|
||||
<div class="modal-content w-full max-w-6xl bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden m-4 flex flex-col" style="max-height: calc(100vh - 2rem);">
|
||||
<div class="px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50">
|
||||
<div class="modal-content asset-export-history-dialog bg-white rounded-xl shadow-2xl border border-slate-200 overflow-hidden flex flex-col">
|
||||
<div class="px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50 shrink-0">
|
||||
<h3 class="text-base font-extrabold text-slate-900">Lịch sử xuất tài sản</h3>
|
||||
<button type="button" class="p-1.5 rounded-lg hover:bg-slate-200 text-slate-400 transition-colors" data-close-modal="assetExportHistoryModal">
|
||||
<span class="material-symbols-outlined">close</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="p-6 pt-4 overflow-auto">
|
||||
<div class="rounded-xl border border-slate-200 overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left border-collapse" style="min-width: 1100px;">
|
||||
<div class="p-6 pt-4 min-h-0">
|
||||
<div class="asset-export-history-scroll rounded-xl border border-slate-200">
|
||||
<table class="asset-export-history-table w-full text-left">
|
||||
<colgroup>
|
||||
<col style="width: 180px;">
|
||||
<col>
|
||||
<col style="width: 88px;">
|
||||
<col style="width: 144px;">
|
||||
<col style="width: 156px;">
|
||||
<col style="width: 140px;">
|
||||
<col style="width: 168px;">
|
||||
<col style="width: 248px;">
|
||||
</colgroup>
|
||||
<thead class="bg-slate-50 border-b border-slate-200">
|
||||
<tr>
|
||||
<th class="px-4 py-2.5 text-[10px] font-bold uppercase tracking-wider text-slate-500">Ngày giờ</th>
|
||||
@@ -824,15 +895,15 @@
|
||||
<th class="px-4 py-2.5 text-[10px] font-bold uppercase tracking-wider text-slate-500">Người phụ trách</th>
|
||||
<th class="px-4 py-2.5 text-[10px] font-bold uppercase tracking-wider text-slate-500">Người xuất</th>
|
||||
<th class="px-4 py-2.5 text-[10px] font-bold uppercase tracking-wider text-slate-500">Ghi chú</th>
|
||||
<th class="asset-export-history-document px-4 py-2.5 text-[10px] font-bold uppercase tracking-wider text-slate-500 whitespace-nowrap">Phiếu Excel</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="assetExportHistoryTableBody" class="divide-y divide-slate-100">
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-8 text-sm text-center text-slate-500">Chưa có dữ liệu lịch sử xuất.</td>
|
||||
<td colspan="8" class="px-4 py-8 text-sm text-center text-slate-500">Chưa có dữ liệu lịch sử xuất.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user