@@ -201,8 +168,8 @@ export default function SalesOrderShow({ order }: Props) {
此區塊顯示同步時接收到的完整原始 JSON 內容,可用於排查資料問題。
-
+
+
{JSON.stringify(order.raw_payload, null, 2)}
diff --git a/resources/js/Pages/Inventory/GoodsReceipt/Show.tsx b/resources/js/Pages/Inventory/GoodsReceipt/Show.tsx
index 259868f..1f0a080 100644
--- a/resources/js/Pages/Inventory/GoodsReceipt/Show.tsx
+++ b/resources/js/Pages/Inventory/GoodsReceipt/Show.tsx
@@ -8,7 +8,7 @@ import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
import { Head, Link, usePage, useForm } from "@inertiajs/react";
import { useState } from "react";
import GoodsReceiptStatusBadge from "@/Components/Inventory/GoodsReceiptStatusBadge";
-import CopyButton from "@/Components/shared/CopyButton";
+
import {
Table,
TableBody,
@@ -70,82 +70,83 @@ interface GoodsReceipt {
interface Props {
receipt: GoodsReceipt;
+ navigation?: {
+ from?: string;
+ from_id?: string;
+ from_label?: string;
+ };
}
-export default function ViewGoodsReceiptPage({ receipt }: Props) {
+export default function ViewGoodsReceiptPage({ receipt, navigation }: Props) {
const typeMap: Record = {
standard: "標準採購進貨",
miscellaneous: "雜項入庫",
other: "其他入庫",
};
- const breadcrumbs = [
+ const breadcrumbs: any[] = [
{ label: "庫存管理", href: "#" },
{ label: "進貨單管理", href: route("goods-receipts.index") },
- { label: `單據詳情 (#${receipt.code})` },
];
+ let backUrl = route("goods-receipts.index");
+ let backLabel = "返回進貨單列表";
+
+ if (navigation?.from === 'account-payables' && navigation.from_id) {
+ breadcrumbs.push({
+ label: `應付帳款: ${navigation.from_label || navigation.from_id}`,
+ href: route('account-payables.show', [navigation.from_id])
+ });
+ backUrl = route('account-payables.show', [navigation.from_id]);
+ backLabel = `返回應付帳款 (${navigation.from_label || navigation.from_id})`;
+ }
+
+ breadcrumbs.push({ label: `單據詳情 (#${receipt.code})`, isPage: true });
+
return (
{/* Header */}
-
+
-
-
-
-
- 查看進貨單
-
-
+ {/* 頁面標題與操作 */}
+
+
+
+
+
+ 進貨單: {receipt.code}
+
-
單號:{receipt.code}
+
+ 入庫類型: {typeMap[receipt.type] || receipt.type} |
+ 倉庫: {receipt.warehouse?.name || "-"} |
+ 供應商: {receipt.vendor?.name || "-"} |
+ 進貨日期: {formatDate(receipt.received_date)}
+
-
- {/* 基本資訊卡片 */}
+ {/* 進階資訊卡片 */}
-
基本資訊
+
進階資訊
-
-
進貨單編號
-
- {receipt.code}
-
-
-
-
- 入庫類型
- {typeMap[receipt.type] || receipt.type}
-
-
- 倉庫
- {receipt.warehouse?.name || "-"}
-
-
- 供應商
- {receipt.vendor?.name || "-"}
-
-
- 進貨日期
- {formatDate(receipt.received_date)}
-
建立時間
{formatDateTime(receipt.created_at)}
diff --git a/resources/js/Pages/PurchaseOrder/Show.tsx b/resources/js/Pages/PurchaseOrder/Show.tsx
index 073e9f5..0048f91 100644
--- a/resources/js/Pages/PurchaseOrder/Show.tsx
+++ b/resources/js/Pages/PurchaseOrder/Show.tsx
@@ -12,6 +12,7 @@ import CopyButton from "@/Components/shared/CopyButton";
import { PurchaseOrderItemsTable } from "@/Components/PurchaseOrder/PurchaseOrderItemsTable";
import type { PurchaseOrder } from "@/types/purchase-order";
import { formatCurrency, formatDateTime } from "@/utils/format";
+import { formatDate } from "@/lib/date";
import { getShowBreadcrumbs } from "@/utils/breadcrumb";
import { toast } from "sonner";
import { PageProps } from "@/types/global";
@@ -40,18 +41,23 @@ export default function ViewPurchaseOrderPage({ order }: Props) {
{/* 頁面標題與操作 */}
-
-
-
-
- 查看採購單
-
-
+
+
+
+
+
+ 採購單: {order.poNumber}
+
-
單號:{order.poNumber}
+
+ 供應商: {order.supplierName} |
+ {/* 此處將申請單位及申請人一起顯示 */}
+ 建立者: {order.warehouse_name} ({order.createdBy}) |
+ 時間: {formatDateTime(order.createdAt)}
+
-
@@ -64,39 +70,17 @@ export default function ViewPurchaseOrderPage({ order }: Props) {
{/* 基本資訊與品項 */}
-
- {/* 基本資訊卡片 */}
+ {/* 基本資訊卡片 (省略已在標題顯示的欄位) */}
-
基本資訊
-
-
-
採購單編號
-
- {order.poNumber}
-
-
-
-
- 供應商
- {order.supplierName}
-
-
- 申請單位 (申請人)
-
- {order.warehouse_name} ({order.createdBy})
-
-
-
- 建立日期
- {formatDateTime(order.createdAt)}
-
+
進階資訊
+
下單日期
- {order.orderDate || "-"}
+ {order.orderDate ? formatDate(order.orderDate) : "-"}
預計到貨日期
- {order.expectedDate || "-"}
+ {order.expectedDate ? formatDate(order.expectedDate) : "-"}
{order.remark && (
diff --git a/resources/js/Pages/Sales/Import/Show.tsx b/resources/js/Pages/Sales/Import/Show.tsx
index bd36323..634cfde 100644
--- a/resources/js/Pages/Sales/Import/Show.tsx
+++ b/resources/js/Pages/Sales/Import/Show.tsx
@@ -128,18 +128,22 @@ export default function SalesImportShow({ import: batch, items, filters = {} }:
-
-
-
-
- 銷售匯入詳情
-
-
批次編號:#{batch.id} | 匯入時間:{format(new Date(batch.created_at), 'yyyy/MM/dd HH:mm')}
+
+
+
+
+
+ 銷售匯入: #{batch.id}
+
+
+ {batch.status === 'confirmed' ? '已確認' : '待確認'}
+
+
+
+ 匯入時間: {format(new Date(batch.created_at), 'yyyy/MM/dd HH:mm')}
+
-
-
- {batch.status === 'confirmed' ? '已確認' : '待確認'}
-
+
{batch.status === 'pending' && (
{can('sales_imports.delete') && (
diff --git a/resources/js/Pages/StoreRequisition/Show.tsx b/resources/js/Pages/StoreRequisition/Show.tsx
index 5a85178..62b3ed7 100644
--- a/resources/js/Pages/StoreRequisition/Show.tsx
+++ b/resources/js/Pages/StoreRequisition/Show.tsx
@@ -23,13 +23,7 @@ import {
DialogFooter,
DialogDescription,
} from "@/Components/ui/dialog";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@/Components/ui/select";
+
import {
AlertDialog,
AlertDialogAction,
@@ -119,7 +113,7 @@ export default function Show({ requisition, warehouses }: Props) {
// 核准狀態
const [showApproveDialog, setShowApproveDialog] = useState(false);
- const [supplyWarehouseId, setSupplyWarehouseId] = useState("");
+
const [approvedItems, setApprovedItems] = useState<{ id: number; approved_qty: string }[]>(
requisition.items.map((item) => ({
id: item.id,
@@ -235,22 +229,35 @@ export default function Show({ requisition, warehouses }: Props) {
{/* 頁面標題與操作 */}
-
-
-
-
- {requisition.doc_no}
-
-
+
+
+
+
+
+ 門市叫貨單: {requisition.doc_no}
+
{getStatusBadge(requisition.status)}
-
- {formatDate(requisition.created_at)}
-
+
+ 申請倉庫: {requisition.store_warehouse_name} |
+ 建立者: {requisition.creator_name} |
+ 時間: {formatDate(requisition.created_at)}
+ {requisition.transfer_order_id && (
+ <>
+ |
+
+ 關聯調撥單: {requisition.transfer_order_id}
+
+ >
+ )}
+
{/* 操作按鈕 */}
-
+
{isEditable && (
<>
@@ -300,16 +307,10 @@ export default function Show({ requisition, warehouses }: Props) {
{/* 基本資訊 */}
-
基本資訊
-
+
基本資訊
+
-
申請倉庫
-
- {requisition.store_warehouse_name}
-
-
-
-
供貨倉庫
+
供貨倉庫
{isPending && canApprove ? (
-
-
申請人
-
- {requisition.creator_name}
-
-
{requisition.submitted_at && (
-
提交時間
-
+ 提交時間
+
{formatDate(requisition.submitted_at)}
@@ -349,14 +344,14 @@ export default function Show({ requisition, warehouses }: Props) {
{requisition.approved_at && (
<>
-
審核人
-
+ 審核人
+
{requisition.approver_name}
-
審核時間
-
+ 審核時間
+
{formatDate(requisition.approved_at)}
@@ -364,8 +359,8 @@ export default function Show({ requisition, warehouses }: Props) {
)}
{requisition.remark && (
-
備註
-
+ 備註
+
{requisition.remark}