fix: 전화접수 포장명세 표 컬럼 간격·스캔 시 최신 항목 노출 개선(#14)
봉투종류 열을 줄이고 봉투코드 열을 넓혀 간격을 좁히고, 스캔 성공 시 포장명세 스크롤을 맨 위로 리셋해 8개 초과 시에도 방금 스캔한 봉투가 가려지지 않도록 한다.
This commit is contained in:
@@ -119,15 +119,15 @@
|
||||
<span class="font-semibold text-gray-700">포장 명세</span>
|
||||
<span class="text-gray-600">포장량: <span id="packing-total" class="font-bold text-blue-700">0</span> 개</span>
|
||||
</div>
|
||||
<div class="border border-gray-300 rounded-lg overflow-auto max-h-[179px]">
|
||||
<div id="packing-scroll" class="border border-gray-300 rounded-lg overflow-auto max-h-[179px]">
|
||||
<table class="w-full data-table text-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-12 text-center sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">No</th>
|
||||
<th class="w-64 text-left sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">봉투종류</th>
|
||||
<th class="w-28 text-center sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">봉투코드</th>
|
||||
<th class="w-20 text-right sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">수량</th>
|
||||
<th class="text-left sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">포장</th>
|
||||
<th class="w-10 text-center sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">No</th>
|
||||
<th class="w-40 text-left sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">봉투종류</th>
|
||||
<th class="text-left sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">봉투코드</th>
|
||||
<th class="w-16 text-right sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">수량</th>
|
||||
<th class="w-16 text-center sticky top-0 z-10" style="background:#fff;box-shadow:inset 0 -1px 0 #e5e7eb;">포장</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="packing-body">
|
||||
@@ -446,6 +446,9 @@
|
||||
// 현재 이 주문을 보고 있으면 상세·포장명세 즉시 갱신
|
||||
if (String(selectedId) === String(data.so_idx)) {
|
||||
renderPacking(order);
|
||||
// 새로 스캔한 봉투가 항상 맨 위(최신)에 보이도록 스크롤을 맨 위로 이동
|
||||
const packingScrollEl = document.getElementById('packing-scroll');
|
||||
if (packingScrollEl) packingScrollEl.scrollTop = 0;
|
||||
const cell = detailBody.querySelector('.item-packed-cell[data-bag-code="' + (window.CSS && CSS.escape ? CSS.escape(String(data.bag_code)) : String(data.bag_code)) + '"]');
|
||||
if (cell) {
|
||||
cell.textContent = nf(Number(data.packed_qty || 0));
|
||||
@@ -508,10 +511,10 @@
|
||||
const qty = parseInt(s.qty || 0, 10) || 0;
|
||||
totalQty += qty;
|
||||
return '<tr><td class="text-center">' + no + '</td>'
|
||||
+ '<td class="text-left pl-2">' + packEsc(code) + ' ' + packEsc(name) + '</td>'
|
||||
+ '<td class="text-center font-mono text-gray-600">' + packEsc(s.code || '') + '</td>'
|
||||
+ '<td class="text-left pl-2 truncate" title="' + packEsc(code) + ' ' + packEsc(name) + '">' + packEsc(code) + ' ' + packEsc(name) + '</td>'
|
||||
+ '<td class="text-left pl-2 font-mono text-gray-600">' + packEsc(s.code || '') + '</td>'
|
||||
+ '<td class="text-right pr-2">' + nf(qty) + '</td>'
|
||||
+ '<td class="text-left pl-2">' + packEsc(s.unit || '') + '</td></tr>';
|
||||
+ '<td class="text-center">' + packEsc(s.unit || '') + '</td></tr>';
|
||||
});
|
||||
packingBody.innerHTML = rows.length ? rows.join('')
|
||||
: '<tr><td colspan="5" class="text-center py-6 text-gray-400">스캔된 포장 내역이 없습니다.</td></tr>';
|
||||
|
||||
Reference in New Issue
Block a user