feat(inventory): 商品管理新增儲位欄位
This commit is contained in:
@@ -46,6 +46,7 @@ export default function ProductDialog({
|
||||
large_unit_id: "",
|
||||
conversion_rate: "",
|
||||
purchase_unit_id: "",
|
||||
location: "",
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -63,6 +64,7 @@ export default function ProductDialog({
|
||||
large_unit_id: product.largeUnitId?.toString() || "",
|
||||
conversion_rate: product.conversionRate ? product.conversionRate.toString() : "",
|
||||
purchase_unit_id: product.purchaseUnitId?.toString() || "",
|
||||
location: product.location || "",
|
||||
});
|
||||
} else {
|
||||
reset();
|
||||
@@ -208,6 +210,16 @@ export default function ProductDialog({
|
||||
/>
|
||||
{errors.brand && <p className="text-sm text-red-500">{errors.brand}</p>}
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="location">儲位</Label>
|
||||
<Input
|
||||
id="location"
|
||||
value={data.location}
|
||||
onChange={(e) => setData("location", e.target.value)}
|
||||
placeholder="例:A-1-1"
|
||||
/>
|
||||
{errors.location && <p className="text-sm text-red-500">{errors.location}</p>}
|
||||
</div>
|
||||
|
||||
<div className="space-y-2 col-span-2">
|
||||
<Label htmlFor="specification">規格描述</Label>
|
||||
|
||||
Reference in New Issue
Block a user