From e3df7b3975e4480d3adf2b3ecd2eef8897aeb452 Mon Sep 17 00:00:00 2001 From: "CANCERYS\\kw093" Date: Thu, 26 Mar 2026 16:39:43 +0800 Subject: [PATCH] update --- src/app/api/stockTake/actions.ts | 59 +++----------------------------- 1 file changed, 5 insertions(+), 54 deletions(-) diff --git a/src/app/api/stockTake/actions.ts b/src/app/api/stockTake/actions.ts index 2772bc9..bf9b425 100644 --- a/src/app/api/stockTake/actions.ts +++ b/src/app/api/stockTake/actions.ts @@ -3,7 +3,7 @@ import { cache } from 'react'; import { serverFetchJson } from "@/app/utils/fetchUtil"; // 改为 serverFetchJson import { BASE_API_URL } from "@/config/api"; -import { stockTakeDebugLog } from "@/components/StockTakeManagement/stockTakeDebugLog"; +//import { stockTakeDebugLog } from "@/components/StockTakeManagement/stockTakeDebugLog"; export interface RecordsRes { records: T[]; @@ -270,20 +270,7 @@ export const saveStockTakeRecord = async ( console.log('saveStockTakeRecord: request:', request); console.log('saveStockTakeRecord: stockTakeId:', stockTakeId); console.log('saveStockTakeRecord: stockTakerId:', stockTakerId); - // #region agent log - stockTakeDebugLog( - "actions.ts:saveStockTakeRecord", - "server action saveStockTakeRecord ok", - "H3", - { - stockTakeId, - stockTakerId, - inventoryLotLineId: request.inventoryLotLineId, - hasRecordId: request.stockTakeRecordId != null, - resultId: result?.id ?? null, - } - ); - // #endregion + return result; } catch (error: any) { // 尝试从错误响应中提取消息 @@ -319,19 +306,7 @@ export const batchSaveStockTakeRecords = cache(async (data: BatchSaveStockTakeRe body: JSON.stringify(data), headers: { "Content-Type": "application/json" }, }) - // #region agent log - stockTakeDebugLog( - "actions.ts:batchSaveStockTakeRecords", - "server batch picker result", - "H4", - { - stockTakeId: data.stockTakeId, - stockTakeSection: data.stockTakeSection, - successCount: r.successCount, - errorCount: r.errorCount, - } - ); - // #endregion + return r }) // Add these interfaces and functions @@ -381,19 +356,7 @@ export const saveApproverStockTakeRecord = async ( body: JSON.stringify(request), }, ); - // #region agent log - stockTakeDebugLog( - "actions.ts:saveApproverStockTakeRecord", - "server action saveApproverStockTakeRecord ok", - "H3", - { - stockTakeId, - stockTakeRecordId: request.stockTakeRecordId ?? null, - lastSelect: request.lastSelect ?? null, - hasApproverQty: request.approverQty != null, - } - ); - // #endregion + return result; } catch (error: any) { if (error?.response) { @@ -431,19 +394,7 @@ export const batchSaveApproverStockTakeRecordsAll = cache(async (data: BatchSave headers: { "Content-Type": "application/json" }, } ) - // #region agent log - stockTakeDebugLog( - "actions.ts:batchSaveApproverStockTakeRecordsAll", - "server batch approver-all result", - "H4", - { - stockTakeId: data.stockTakeId, - approverId: data.approverId, - successCount: r.successCount, - errorCount: r.errorCount, - } - ); - // #endregion + return r })