From 3682ad63b5bdb47228325dea1efe2bb9069254a5 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 11 五月 2026 15:53:18 +0800
Subject: [PATCH] 合格出库扫销售二维码进行发货

---
 src/pages/inventoryManagement/scanOut/scanOut.fields.ts |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/src/pages/inventoryManagement/scanOut/scanOut.fields.ts b/src/pages/inventoryManagement/scanOut/scanOut.fields.ts
index 3e1fd49..ea46b12 100644
--- a/src/pages/inventoryManagement/scanOut/scanOut.fields.ts
+++ b/src/pages/inventoryManagement/scanOut/scanOut.fields.ts
@@ -1,6 +1,19 @@
 import { computed, type Ref } from "vue";
 import { CONTRACT_KIND, type ContractKind } from "./scanOut.constants";
 
+const outboundQuantityRows = [
+  { label: "宸插嚭搴撴暟閲�", key: "shippedQuantity" },
+  { label: "涓嶅悎鏍煎嚭搴撴暟閲�", key: "unqualifiedShippedQuantity" },
+  { label: "涓嶅悎鏍煎叆搴撴暟閲�", key: "unqualifiedStockedQuantity" },
+  { label: "鍓╀綑鍑哄簱鏁伴噺", key: "remainingShippedQuantity" },
+] as const;
+
+const inboundQuantityRows = [
+  { label: "宸插叆搴撴暟閲�", key: "stockedQuantity" },
+  { label: "涓嶅悎鏍煎叆搴撴暟閲�", key: "unqualifiedStockedQuantity" },
+  { label: "鍓╀綑鍏ュ簱鏁伴噺", key: "remainingQuantity" },
+] as const;
+
 export const detailFieldRowsSales = [
   { label: "妤煎眰缂栧彿", key: "floorCode" },
   { label: "浜у搧澶х被", key: "productCategory" },
@@ -15,12 +28,12 @@
   { label: "閲嶇", key: "heavyBox" },
   { label: "浜у搧鐘舵��", key: "approveStatus" },
   { label: "鍏ュ簱鐘舵��", key: "productStockStatus" },
+  { label: "鍙戣揣鐘舵��", key: "ledgerShippingStatus" },
   { label: "蹇�掑叕鍙�", key: "expressCompany" },
   { label: "蹇�掑崟鍙�", key: "expressNumber" },
   { label: "鍙戣揣杞︾墝", key: "shippingCarNumber" },
   { label: "鍙戣揣鏃ユ湡", key: "shippingDate" },
   { label: "鏁伴噺", key: "quantity" },
-  { label: "鍓╀綑鏁伴噺", key: "remainingQuantity" },
   { label: "绋庣巼(%)", key: "taxRate" },
   { label: "鍚◣鍗曚环(鍏�)", key: "taxInclusiveUnitPrice" },
   { label: "鍚◣鎬讳环(鍏�)", key: "taxInclusiveTotalPrice" },
@@ -33,7 +46,6 @@
   { label: "鍗曚綅", key: "unit" },
   { label: "鏁伴噺", key: "quantity" },
   { label: "鍙敤鏁伴噺", key: "availableQuality" },
-  { label: "鍓╀綑鏁伴噺", key: "remainingQuantity" },
   { label: "閫�璐ф暟閲�", key: "returnQuality" },
   { label: "绋庣巼(%)", key: "taxRate" },
   { label: "鍚◣鍗曚环(鍏�)", key: "taxInclusiveUnitPrice" },
@@ -46,9 +58,9 @@
   { label: "浜у搧澶х被", key: "productCategory" },
   { label: "瑙勬牸鍨嬪彿", key: "specificationModel" },
   { label: "鏁伴噺", key: "quantity" },
-  { label: "鍓╀綑鏁伴噺", key: "remainingQuantity" },
   { label: "浜у搧鐘舵��", key: "approveStatus" },
   { label: "鍏ュ簱鐘舵��", key: "productStockStatus" },
+  { label: "鍙戣揣鐘舵��", key: "ledgerShippingStatus" },
 ] as const;
 
 export const summaryFieldRowsPurchase = [
@@ -57,22 +69,23 @@
   { label: "鍗曚綅", key: "unit" },
   { label: "鏁伴噺", key: "quantity" },
   { label: "鍙敤鏁伴噺", key: "availableQuality" },
-  { label: "鍓╀綑鏁伴噺", key: "remainingQuantity" },
 ] as const;
 
 type FieldRow = { label: string; key: string };
+type ScanScene = "outbound" | "inbound";
 
-export function useScanOutFieldRows(contractKindRef: Ref<ContractKind>) {
+export function useScanOutFieldRows(contractKindRef: Ref<ContractKind>, scene: ScanScene = "outbound") {
+  const quantityRows = scene === "inbound" ? inboundQuantityRows : outboundQuantityRows;
   const fieldRowsByContractKind = {
     [CONTRACT_KIND.sales]: {
-      detail: detailFieldRowsSales,
-      summary: summaryFieldRowsSales,
+      detail: [...detailFieldRowsSales, ...quantityRows],
+      summary: [...summaryFieldRowsSales, ...quantityRows],
     },
     [CONTRACT_KIND.purchase]: {
-      detail: detailFieldRowsPurchase,
-      summary: summaryFieldRowsPurchase,
+      detail: [...detailFieldRowsPurchase, ...quantityRows],
+      summary: [...summaryFieldRowsPurchase, ...quantityRows],
     },
-  } as const satisfies Record<ContractKind, { detail: readonly FieldRow[]; summary: readonly FieldRow[] }>;
+  } satisfies Record<ContractKind, { detail: readonly FieldRow[]; summary: readonly FieldRow[] }>;
 
   const currentContractFieldRows = computed(() => fieldRowsByContractKind[contractKindRef.value]);
 

--
Gitblit v1.9.3