feat: [재고생산] 품목코드+로트번호 표시 추가 (목록/등록/상세 전체)
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user