|
|
|
@@ -53,7 +53,14 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
scrapUom: "", |
|
|
|
byproductName: "", |
|
|
|
byproductQty: 0, |
|
|
|
byproductUom: "" |
|
|
|
byproductUom: "", |
|
|
|
defect2Qty: 0, |
|
|
|
defect2Uom: "", |
|
|
|
defect3Qty: 0, |
|
|
|
defect3Uom: "", |
|
|
|
defectDescription: "", |
|
|
|
defectDescription2: "", |
|
|
|
defectDescription3: "" |
|
|
|
}); |
|
|
|
const [isManualScanning, setIsManualScanning] = useState(false); |
|
|
|
const [processedQrCodes, setProcessedQrCodes] = useState<Set<string>>(new Set()); |
|
|
|
@@ -135,6 +142,13 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
// outputFromProcessUom: outputData.outputFromProcessUom, |
|
|
|
defectQty: outputData.defectQty, |
|
|
|
defectUom: outputData.defectUom, |
|
|
|
defect2Qty: outputData.defect2Qty, |
|
|
|
defect2Uom: outputData.defect2Uom, |
|
|
|
defect3Qty: outputData.defect3Qty, |
|
|
|
defect3Uom: outputData.defect3Uom, |
|
|
|
defectDescription: outputData.defectDescription, |
|
|
|
defectDescription2: outputData.defectDescription2, |
|
|
|
defectDescription3: outputData.defectDescription3, |
|
|
|
scrapQty: outputData.scrapQty, |
|
|
|
scrapUom: outputData.scrapUom, |
|
|
|
}); |
|
|
|
@@ -152,6 +166,13 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
outputFromProcessUom: (detail as any).outputFromProcessUom || "", // 取消注释,使用类型断言 |
|
|
|
defectQty: detail.defectQty || 0, |
|
|
|
defectUom: detail.defectUom || "", |
|
|
|
defectDescription: detail.defectDescription || "", |
|
|
|
defectDescription2: detail.defectDescription2 || "", |
|
|
|
defectDescription3: detail.defectDescription3 || "", |
|
|
|
defectQty2: detail.defectQty2 || 0, |
|
|
|
defectUom2: detail.defectUom2 || "", |
|
|
|
defectQty3: detail.defectQty3 || 0, |
|
|
|
defectUom3: detail.defectUom3 || "", |
|
|
|
scrapQty: detail.scrapQty || 0, |
|
|
|
scrapUom: detail.scrapUom || "", |
|
|
|
byproductName: detail.byproductName || "", |
|
|
|
@@ -256,9 +277,10 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
<Table size="small" sx={{ mt: 2 }}> |
|
|
|
<TableHead> |
|
|
|
<TableRow> |
|
|
|
<TableCell width="30%"><strong>{t("Type")}</strong></TableCell> |
|
|
|
<TableCell width="35%"><strong>{t("Quantity")}</strong></TableCell> |
|
|
|
<TableCell width="35%"><strong>{t("Unit")}</strong></TableCell> |
|
|
|
<TableCell width="25%"><strong>{t("Type")}</strong></TableCell> |
|
|
|
<TableCell width="25%"><strong>{t("Quantity")}</strong></TableCell> |
|
|
|
<TableCell width="25%"><strong>{t("Unit")}</strong></TableCell> |
|
|
|
<TableCell width="25%"><strong>{t("Description")}</strong></TableCell> |
|
|
|
</TableRow> |
|
|
|
</TableHead> |
|
|
|
<TableBody> |
|
|
|
@@ -306,8 +328,41 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectUom || "-"}</Typography> |
|
|
|
</TableCell> |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectDescription || "-"}</Typography> |
|
|
|
</TableCell> |
|
|
|
|
|
|
|
</TableRow> |
|
|
|
<TableRow sx={{ bgcolor: 'warning.50' }}> |
|
|
|
<TableCell> |
|
|
|
<Typography fontWeight={500} color="warning.dark">{t("Defect")}{t("(3)")}</Typography> |
|
|
|
</TableCell> |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectQty3}</Typography> |
|
|
|
</TableCell> |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectUom3 || "-"}</Typography> |
|
|
|
</TableCell> |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectDescription3 || "-"}</Typography> |
|
|
|
</TableCell> |
|
|
|
|
|
|
|
</TableRow> |
|
|
|
<TableRow sx={{ bgcolor: 'warning.50' }}> |
|
|
|
<TableCell> |
|
|
|
<Typography fontWeight={500} color="warning.dark">{t("Defect")}{t("(2)")}</Typography> |
|
|
|
</TableCell> |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectQty2}</Typography> |
|
|
|
</TableCell> |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectUom2 || "-"}</Typography> |
|
|
|
</TableCell> |
|
|
|
<TableCell> |
|
|
|
<Typography>{lineDetail.defectDescription2 || "-"}</Typography> |
|
|
|
</TableCell> |
|
|
|
|
|
|
|
</TableRow> |
|
|
|
|
|
|
|
{/* Scrap */} |
|
|
|
<TableRow sx={{ bgcolor: 'error.50' }}> |
|
|
|
<TableCell> |
|
|
|
@@ -506,7 +561,7 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
//value={outputData.defectUom} |
|
|
|
onChange={(e) => setOutputData({ |
|
|
|
...outputData, |
|
|
|
defectUom: e.target.value |
|
|
|
defectDescription: e.target.value |
|
|
|
})} |
|
|
|
/> |
|
|
|
</TableCell> |
|
|
|
@@ -521,10 +576,10 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
type="number" |
|
|
|
fullWidth |
|
|
|
size="small" |
|
|
|
value={outputData.defectQty} |
|
|
|
value={outputData.defect2Qty} |
|
|
|
onChange={(e) => setOutputData({ |
|
|
|
...outputData, |
|
|
|
defectQty: parseInt(e.target.value) || 0 |
|
|
|
defect2Qty: parseInt(e.target.value) || 0 |
|
|
|
})} |
|
|
|
/> |
|
|
|
</TableCell> |
|
|
|
@@ -532,10 +587,10 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
<TextField |
|
|
|
fullWidth |
|
|
|
size="small" |
|
|
|
value={outputData.defectUom} |
|
|
|
value={outputData.defect2Uom} |
|
|
|
onChange={(e) => setOutputData({ |
|
|
|
...outputData, |
|
|
|
defectUom: e.target.value |
|
|
|
defect2Uom: e.target.value |
|
|
|
})} |
|
|
|
/> |
|
|
|
</TableCell> |
|
|
|
@@ -546,7 +601,7 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
//value={outputData.defectUom} |
|
|
|
onChange={(e) => setOutputData({ |
|
|
|
...outputData, |
|
|
|
defectUom: e.target.value |
|
|
|
defectDescription2: e.target.value |
|
|
|
})} |
|
|
|
/> |
|
|
|
</TableCell> |
|
|
|
@@ -561,10 +616,10 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
type="number" |
|
|
|
fullWidth |
|
|
|
size="small" |
|
|
|
value={outputData.defectQty} |
|
|
|
value={outputData.defect3Qty} |
|
|
|
onChange={(e) => setOutputData({ |
|
|
|
...outputData, |
|
|
|
defectQty: parseInt(e.target.value) || 0 |
|
|
|
defect3Qty: parseInt(e.target.value) || 0 |
|
|
|
})} |
|
|
|
/> |
|
|
|
</TableCell> |
|
|
|
@@ -572,10 +627,10 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
<TextField |
|
|
|
fullWidth |
|
|
|
size="small" |
|
|
|
value={outputData.defectUom} |
|
|
|
value={outputData.defect3Uom} |
|
|
|
onChange={(e) => setOutputData({ |
|
|
|
...outputData, |
|
|
|
defectUom: e.target.value |
|
|
|
defect3Uom: e.target.value |
|
|
|
})} |
|
|
|
/> |
|
|
|
</TableCell> |
|
|
|
@@ -586,7 +641,7 @@ const ProductionProcessStepExecution: React.FC<ProductionProcessStepExecutionPro |
|
|
|
//value={outputData.defectUom} |
|
|
|
onChange={(e) => setOutputData({ |
|
|
|
...outputData, |
|
|
|
defectUom: e.target.value |
|
|
|
defectDescription3: e.target.value |
|
|
|
})} |
|
|
|
/> |
|
|
|
</TableCell> |
|
|
|
|