feat(consumable): 소모품 마스터에 "규격(spec)" 필드 추가
품목의 규격 정보(예: 4" 용접, M16)를 분리 저장할 수 있도록 spec 컬럼 추가. DB ALTER 필요: ALTER TABLE consumable_items ADD COLUMN spec VARCHAR(200) DEFAULT NULL AFTER item_name; Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1909,6 +1909,10 @@
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">품명 <span class="text-red-400">*</span></label>
|
||||
<input type="text" id="newConsumableNameTkuser" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
|
||||
</div>
|
||||
<div class="col-span-2">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">규격</label>
|
||||
<input type="text" id="newConsumableSpecTkuser" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder='예: 4" 용접, M16, 면(500G)-10게이지'>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">메이커</label>
|
||||
<input type="text" id="newConsumableMakerTkuser" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
||||
@@ -1959,6 +1963,10 @@
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">품명 <span class="text-red-400">*</span></label>
|
||||
<input type="text" id="editConsumableNameTkuser" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
|
||||
</div>
|
||||
<div class="col-span-2">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">규격</label>
|
||||
<input type="text" id="editConsumableSpecTkuser" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder='예: 4" 용접, M16, 면(500G)-10게이지'>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">메이커</label>
|
||||
<input type="text" id="editConsumableMakerTkuser" class="input-field w-full px-3 py-2 rounded-lg text-sm">
|
||||
@@ -2014,7 +2022,7 @@
|
||||
<script src="/static/js/tkuser-layout-map.js?v=2026031401"></script>
|
||||
<script src="/static/js/tkuser-partners.js?v=2026031601"></script>
|
||||
<script src="/static/js/tkuser-vendors.js?v=2026031401"></script>
|
||||
<script src="/static/js/tkuser-consumables.js?v=2026031401"></script>
|
||||
<script src="/static/js/tkuser-consumables.js?v=2026031602"></script>
|
||||
<script src="/static/js/tkuser-notificationRecipients.js?v=2026031401"></script>
|
||||
<!-- Boot -->
|
||||
<script>init();</script>
|
||||
|
||||
@@ -59,7 +59,7 @@ function renderConsumablesListTkuser() {
|
||||
? `<img src="${item.photo_path}" class="w-16 h-16 rounded object-cover flex-shrink-0 cursor-pointer" onclick="document.getElementById('photoViewImage').src=this.src; document.getElementById('photoViewModal').classList.remove('hidden');" onerror="this.style.display='none'">`
|
||||
: `<div class="w-16 h-16 rounded bg-gray-100 flex items-center justify-center flex-shrink-0"><i class="fas fa-box text-gray-300 text-xl"></i></div>`}
|
||||
<div class="flex-1 min-w-0">
|
||||
<div class="text-sm font-medium text-gray-800 truncate">${escHtml(item.item_name)}</div>
|
||||
<div class="text-sm font-medium text-gray-800 truncate">${escHtml(item.item_name)}${item.spec ? ' <span class="text-gray-400">[' + escHtml(item.spec) + ']</span>' : ''}</div>
|
||||
<div class="text-xs text-gray-500 mt-0.5">${escHtml(item.maker) || '-'}</div>
|
||||
<div class="flex items-center gap-2 mt-1">
|
||||
<span class="px-1.5 py-0.5 rounded text-xs ${catColor}">${catLabel}</span>
|
||||
@@ -102,6 +102,7 @@ async function submitAddConsumableTkuser(e) {
|
||||
|
||||
const fd = new FormData();
|
||||
fd.append('item_name', itemName);
|
||||
fd.append('spec', document.getElementById('newConsumableSpecTkuser').value.trim());
|
||||
fd.append('maker', document.getElementById('newConsumableMakerTkuser').value.trim());
|
||||
fd.append('category', category);
|
||||
fd.append('base_price', document.getElementById('newConsumablePriceTkuser').value || '0');
|
||||
@@ -130,6 +131,7 @@ function openEditConsumableTkuser(id) {
|
||||
if (!item) return;
|
||||
document.getElementById('editConsumableIdTkuser').value = item.item_id;
|
||||
document.getElementById('editConsumableNameTkuser').value = item.item_name;
|
||||
document.getElementById('editConsumableSpecTkuser').value = item.spec || '';
|
||||
document.getElementById('editConsumableMakerTkuser').value = item.maker || '';
|
||||
document.getElementById('editConsumableCategoryTkuser').value = item.category;
|
||||
document.getElementById('editConsumablePriceTkuser').value = item.base_price || '';
|
||||
@@ -155,6 +157,7 @@ async function submitEditConsumableTkuser(e) {
|
||||
const id = document.getElementById('editConsumableIdTkuser').value;
|
||||
const fd = new FormData();
|
||||
fd.append('item_name', document.getElementById('editConsumableNameTkuser').value.trim());
|
||||
fd.append('spec', document.getElementById('editConsumableSpecTkuser').value.trim());
|
||||
fd.append('maker', document.getElementById('editConsumableMakerTkuser').value.trim());
|
||||
fd.append('category', document.getElementById('editConsumableCategoryTkuser').value);
|
||||
fd.append('base_price', document.getElementById('editConsumablePriceTkuser').value || '0');
|
||||
|
||||
Reference in New Issue
Block a user