|
|
@@ -119,17 +119,41 @@ const WarehouseDetail: React.FC = () => { |
|
|
/> |
|
|
/> |
|
|
)} |
|
|
)} |
|
|
/> |
|
|
/> |
|
|
{/* stockTakeSection field in the same row */} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Box sx={{ flex: 1, minWidth: "150px", ml: 2 }}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
label={t("order")} |
|
|
|
|
|
fullWidth |
|
|
|
|
|
size="small" |
|
|
|
|
|
{...register("order", { |
|
|
|
|
|
pattern: { |
|
|
|
|
|
value: /^[A-Za-z0-9]{2}-[A-Za-z0-9]{3}$/, |
|
|
|
|
|
message: `${t("order")} 格式必須為 XF-YYY`, |
|
|
|
|
|
}, |
|
|
|
|
|
})} |
|
|
|
|
|
error={Boolean(errors.order)} |
|
|
|
|
|
helperText={errors.order?.message} |
|
|
|
|
|
/> |
|
|
|
|
|
</Box> |
|
|
|
|
|
|
|
|
<Box sx={{ flex: 1, minWidth: "150px", ml: 2 }}> |
|
|
<Box sx={{ flex: 1, minWidth: "150px", ml: 2 }}> |
|
|
<TextField |
|
|
<TextField |
|
|
label={t("stockTakeSection")} |
|
|
label={t("stockTakeSection")} |
|
|
fullWidth |
|
|
fullWidth |
|
|
size="small" |
|
|
size="small" |
|
|
{...register("stockTakeSection")} |
|
|
|
|
|
|
|
|
{...register("stockTakeSection", { |
|
|
|
|
|
pattern: { |
|
|
|
|
|
value: /^[A-Za-z0-9]{2}-[A-Za-z0-9]{3}$/, |
|
|
|
|
|
message: `${t("stockTakeSection")} 格式必須為 ST-YYY`, |
|
|
|
|
|
}, |
|
|
|
|
|
})} |
|
|
error={Boolean(errors.stockTakeSection)} |
|
|
error={Boolean(errors.stockTakeSection)} |
|
|
helperText={errors.stockTakeSection?.message} |
|
|
helperText={errors.stockTakeSection?.message} |
|
|
/> |
|
|
/> |
|
|
</Box> |
|
|
</Box> |
|
|
|
|
|
|
|
|
</Box> |
|
|
</Box> |
|
|
</CardContent> |
|
|
</CardContent> |
|
|
</Card> |
|
|
</Card> |
|
|
|