| @@ -181,9 +181,9 @@ const PoDetail: React.FC<Props> = ({ po, qc, warehouse }) => { | |||||
| const pathname = usePathname() | const pathname = usePathname() | ||||
| const searchParams = useSearchParams(); | const searchParams = useSearchParams(); | ||||
| const [row, setRow] = useState(rows[0]); | |||||
| const [stockInLine, setStockInLine] = useState<StockInLine[]>(rows[0].stockInLine); | |||||
| const [processedQty, setProcessedQty] = useState(rows[0].processed); | |||||
| const [row, setRow] = useState<PurchaseOrderLine>({}); | |||||
| const [stockInLine, setStockInLine] = useState<StockInLine[]>([]); | |||||
| const [processedQty, setProcessedQty] = useState(0); | |||||
| const router = useRouter(); | const router = useRouter(); | ||||
| const [poList, setPoList] = useState<PoResult[]>([]); | const [poList, setPoList] = useState<PoResult[]>([]); | ||||
| @@ -671,7 +671,7 @@ const PoDetail: React.FC<Props> = ({ po, qc, warehouse }) => { | |||||
| {/* area5: selected item info */} | {/* area5: selected item info */} | ||||
| <Grid container xs={12} justifyContent="start"> | <Grid container xs={12} justifyContent="start"> | ||||
| <Grid item xs={12}> | <Grid item xs={12}> | ||||
| <Typography variant="h6">已選擇: {row.itemNo}-{row.itemName}</Typography> | |||||
| <Typography variant="h6">{row.itemNo && row.itemName ? `已選擇: ${row.itemNo}-${row.itemName}` : `未選擇貨品`}</Typography> | |||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12}> | <Grid item xs={12}> | ||||
| <TableContainer component={Paper} sx={{ width: 'fit-content', overflow: 'auto' }}> | <TableContainer component={Paper} sx={{ width: 'fit-content', overflow: 'auto' }}> | ||||