feat: 標準化全系統數值輸入欄位與擴充商品價格功能
1. UI 標準化: - 針對全系統數值輸入欄位統一加上 step='any' 以支援小數點。 - 表格形式 (Table) 的數值輸入欄位統一加上 text-right 靠右對齊。 - 修正 Components 與 Pages 中所有涉及金額與數量的輸入框。 2. 功能擴充與修正: - 擴充 Product 模型與相關 Dialog 以支援多種價格設定。 - 修正 Inventory/GoodsReceipt/Create.tsx 未使用的變數錯誤。 - 優化庫存相關頁面的 UI 一致性。 3. 其他: - 更新相關的 Type 定義與 Controller 邏輯。
This commit is contained in:
@@ -276,7 +276,14 @@ export default function Show({ doc }: any) {
|
||||
<span className="text-xs text-gray-500 font-mono">{item.product_code}</span>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell className="text-sm font-mono">{item.batch_number || '-'}</TableCell>
|
||||
<TableCell className="text-sm font-mono">
|
||||
<div>{item.batch_number || '-'}</div>
|
||||
{item.expiry_date && (
|
||||
<div className="text-xs text-gray-400 mt-1">
|
||||
效期: {item.expiry_date}
|
||||
</div>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell className="text-right font-medium">{Number(item.system_qty)}</TableCell>
|
||||
<TableCell className="text-right px-1 py-3">
|
||||
{isReadOnly ? (
|
||||
@@ -284,12 +291,12 @@ export default function Show({ doc }: any) {
|
||||
) : (
|
||||
<Input
|
||||
type="number"
|
||||
step="0.01"
|
||||
step="any"
|
||||
value={formItem.counted_qty ?? ''}
|
||||
onChange={(e) => updateItem(index, 'counted_qty', e.target.value)}
|
||||
onWheel={(e: any) => e.target.blur()}
|
||||
disabled={processing}
|
||||
className="h-9 text-right font-medium focus:ring-primary-main"
|
||||
className="h-9 font-medium focus:ring-primary-main text-right"
|
||||
placeholder="盤點..."
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user