Kaynağa Gözat

update

MergeProblem1
CANCERYS\kw093 5 saat önce
ebeveyn
işleme
ad35404904
2 değiştirilmiş dosya ile 20 ekleme ve 4 silme
  1. +13
    -3
      src/app/api/stockTake/actions.ts
  2. +7
    -1
      src/components/StockTakeManagement/ApproverStockTakeAll.tsx

+ 13
- 3
src/app/api/stockTake/actions.ts Dosyayı Görüntüle

@@ -371,14 +371,24 @@ export interface BatchSaveApproverStockTakeRecordResponse {
errorCount: number;
errors: string[];
}
/*
export interface BatchSaveApproverStockTakeAllRequest {
stockTakeId: number;
approverId: number;
variancePercentTolerance?: number | null;
}


*/
export interface BatchSaveApproverStockTakeAllRequest {
stockTakeId: number;
approverId: number;
// UI 用,batch 不應該用它來 skip
variancePercentTolerance?: number | null;
// 新增:讓 batch 只處理搜尋結果那批
itemKeyword?: string | null;
warehouseKeyword?: string | null;
sectionDescription?: string | null;
stockTakeSections?: string | null; // 逗號字串
}
export const saveApproverStockTakeRecord = async (
request: SaveApproverStockTakeRecordRequest,
stockTakeId: number


+ 7
- 1
src/components/StockTakeManagement/ApproverStockTakeAll.tsx Dosyayı Görüntüle

@@ -672,7 +672,13 @@ const ApproverStockTakeAll: React.FC<ApproverStockTakeAllProps> = ({
const request: BatchSaveApproverStockTakeAllRequest = {
stockTakeId: selectedSession.stockTakeId,
approverId: currentUserId,
variancePercentTolerance: parseFloat(variancePercentTolerance || "0") || undefined,
itemKeyword: appliedFilters?.itemKeyword || null,
warehouseKeyword: appliedFilters?.warehouseKeyword || null,
sectionDescription:
appliedFilters?.sectionDescription && appliedFilters.sectionDescription !== "All"
? appliedFilters.sectionDescription
: null,
stockTakeSections: appliedFilters?.stockTakeSession || null,
};

const result = await batchSaveApproverStockTakeRecordsAll(request);


Yükleniyor…
İptal
Kaydet