feat(production): 優化生產單 BOM 原物料選取邏輯,支援商品 -> 倉庫 -> 批號連動與 API 分佈查詢
This commit is contained in:
@@ -542,6 +542,7 @@ export default function Show({ doc }: { auth: any, doc: AdjDoc }) {
|
||||
<div className="flex justify-end pr-2">
|
||||
<Input
|
||||
type="number"
|
||||
step="0.01"
|
||||
className="text-right h-9 w-32 font-medium"
|
||||
value={item.adjust_qty}
|
||||
onChange={e => updateItem(index, 'adjust_qty', e.target.value)}
|
||||
|
||||
@@ -265,14 +265,14 @@ export default function Show({ doc }: any) {
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell className="text-sm font-mono">{item.batch_number || '-'}</TableCell>
|
||||
<TableCell className="text-right font-medium">{item.system_qty.toFixed(0)}</TableCell>
|
||||
<TableCell className="text-right font-medium">{Number(item.system_qty)}</TableCell>
|
||||
<TableCell className="text-right px-1 py-3">
|
||||
{isReadOnly ? (
|
||||
<span className="font-semibold mr-2">{item.counted_qty}</span>
|
||||
) : (
|
||||
<Input
|
||||
type="number"
|
||||
step="1"
|
||||
step="0.01"
|
||||
value={formItem.counted_qty ?? ''}
|
||||
onChange={(e) => updateItem(index, 'counted_qty', e.target.value)}
|
||||
onWheel={(e: any) => e.target.blur()}
|
||||
@@ -290,7 +290,7 @@ export default function Show({ doc }: any) {
|
||||
: 'text-red-600'
|
||||
}`}>
|
||||
{formItem.counted_qty !== '' && formItem.counted_qty !== null
|
||||
? diff.toFixed(0)
|
||||
? Number(diff.toFixed(2))
|
||||
: '-'}
|
||||
</span>
|
||||
</TableCell>
|
||||
|
||||
@@ -314,7 +314,7 @@ export default function GoodsReceiptCreate({ warehouses, pendingPurchaseOrders,
|
||||
{/* Header */}
|
||||
<div className="mb-6">
|
||||
<Link href={route('goods-receipts.index')}>
|
||||
<Button variant="outline" className="gap-2 mb-4 w-fit">
|
||||
<Button variant="outline" type="button" className="gap-2 mb-4 w-fit button-outlined-primary">
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
返回進貨單
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user