feat: [재고생산] 품목코드+로트번호 표시 추가 (목록/등록/상세 전체)

This commit is contained in:
김보곤
2026-03-22 13:25:18 +09:00
parent 8fcb305980
commit 21f8282ade
3 changed files with 36 additions and 2 deletions

View File

@@ -486,7 +486,7 @@ export function BendingLotForm({ initialData, isEditMode = false }: BendingLotFo
<div className="space-y-6">
{/* 기본 정보 */}
<FormSection title="기본 정보" icon={ClipboardList}>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
<div className="space-y-2">
<Label></Label>
<DatePicker
@@ -494,6 +494,14 @@ export function BendingLotForm({ initialData, isEditMode = false }: BendingLotFo
onChange={(date) => setForm((prev) => ({ ...prev, regDate: date }))}
/>
</div>
<div className="space-y-2">
<Label></Label>
<Input
value={isEditMode ? (initialData?.items?.[0]?.itemCode || '-') : (resolvedItem?.item_code || '품목 선택 시 자동')}
disabled
className={resolvedItem?.item_code ? 'font-mono font-semibold' : ''}
/>
</div>
<div className="space-y-2">
<Label></Label>
<NumberInput
@@ -505,6 +513,16 @@ export function BendingLotForm({ initialData, isEditMode = false }: BendingLotFo
placeholder="수량"
/>
</div>
<div className="space-y-2">
<Label></Label>
<Input
value={isEditMode && initialData?.bendingLot?.lotNumber
? initialData.bendingLot.lotNumber
: lotPreview ? `${lotPreview}-___` : '저장 시 자동 생성'}
disabled
className="font-mono"
/>
</div>
</div>
</FormSection>

View File

@@ -141,6 +141,14 @@ export function StockProductionDetail({ orderId }: StockProductionDetailProps) {
<Label></Label>
<Input value={data.orderNo} disabled />
</div>
<div className="space-y-2">
<Label></Label>
<Input value={data.items?.[0]?.itemCode || '-'} disabled />
</div>
<div className="space-y-2">
<Label></Label>
<Input value={data.bendingLot?.lotNumber || '-'} disabled />
</div>
<div className="space-y-2">
<Label></Label>
<Input value={data.regDate} disabled />

View File

@@ -209,8 +209,9 @@ export function StockProductionList() {
const tableColumns: TableColumn[] = useMemo(() => [
{ key: "rowNumber", label: "번호", className: "px-2 text-center w-[60px]" },
{ key: "orderNo", label: "생산번호", className: "px-2", sortable: true, copyable: true },
{ key: "itemCode", label: "품목코드", className: "px-2", sortable: true, copyable: true },
{ key: "lotNumber", label: "로트번호", className: "px-2", copyable: true },
{ key: "itemSummary", label: "품목", className: "px-2", sortable: true, copyable: true },
{ key: "itemSummary", label: "품목", className: "px-2", sortable: true, copyable: true },
{ key: "quantity", label: "수량", className: "px-2 text-center", sortable: true },
{ key: "regDate", label: "등록일", className: "px-2", sortable: true, copyable: true },
{ key: "status", label: "상태", className: "px-2 text-center", sortable: true },
@@ -240,6 +241,13 @@ export function StockProductionList() {
{order.orderNo}
</code>
</TableCell>
<TableCell>
{order.items?.[0]?.itemCode ? (
<code className="text-xs bg-purple-50 text-purple-700 px-2 py-1 rounded font-mono">
{order.items[0].itemCode}
</code>
) : "-"}
</TableCell>
<TableCell>
{order.bendingLot?.lotNumber ? (
<code className="text-xs bg-blue-50 text-blue-700 px-2 py-1 rounded font-mono">