Ver a proveniência

bug fix

production
CANCERYS\kw093 há 2 semanas
ascendente
cometimento
a1e25d83bc
5 ficheiros alterados com 45 adições e 11 eliminações
  1. +1
    -1
      src/components/DoSearch/DoSearch.tsx
  2. +26
    -8
      src/components/DoWorkbench/WorkbenchGoodPickExecutionDetail.tsx
  3. +1
    -1
      src/components/ImportBom/ImportBomResultForm.tsx
  4. +10
    -1
      src/components/StockIssue/StockIssueRecordTab.tsx
  5. +7
    -0
      src/i18n/zh/do.json

+ 1
- 1
src/components/DoSearch/DoSearch.tsx Ver ficheiro

@@ -584,7 +584,7 @@ const DoSearch: React.FC<Props> = ({ filterArgs, searchQuery, onDeliveryOrderSea
${currentSearchParams.code ? `${t("Code")}: ${currentSearchParams.code} ` : ""}
${currentSearchParams.shopName ? `${t("Shop Name")}: ${currentSearchParams.shopName} ` : ""}
${currentSearchParams.estimatedArrivalDate ? `${t("Estimated Arrival")}: ${currentSearchParams.estimatedArrivalDate} ` : ""}
${status ? `${t("Status")}: ${status} ` : ""}
${status ? `${t("Status")}: ${t(status)} ` : ""}
</p>
</div>
`,


+ 26
- 8
src/components/DoWorkbench/WorkbenchGoodPickExecutionDetail.tsx Ver ficheiro

@@ -150,6 +150,20 @@ function hasPendingActiveRowForStockInLine(
);
}

/** Any pending active SOL for this item (e.g. scan different location, same lot no → auto-switch). */
function hasPendingActiveRowForItem(
indexes: { activeLotsByItemId: Map<number, any[]> },
itemId: number,
processedByItemId: ProcessedStockOutLinesByItemId,
): boolean {
const activeLots = indexes.activeLotsByItemId.get(itemId) ?? [];
return activeLots.some(
(lot) =>
isLotRowPending(lot) &&
!isStockOutLineAlreadyProcessed(processedByItemId, itemId, lot.stockOutLineId),
);
}

function findExactActiveMatchForStockInLine(
stockInLineLots: any[],
scannedItemId: number,
@@ -1560,14 +1574,18 @@ const fetchAllCombinedLotData = useCallback(async (userId?: number, pickOrderIdO
const scannedItemId = qrData.itemId;
const scannedStockInLineId = qrData.stockInLineId;

if (
!hasPendingActiveRowForStockInLine(
indexes,
scannedItemId,
scannedStockInLineId,
processedQrCombinations,
)
) {
const hasPendingOnScannedSil = hasPendingActiveRowForStockInLine(
indexes,
scannedItemId,
scannedStockInLineId,
processedQrCombinations,
);
const hasPendingOnItem = hasPendingActiveRowForItem(
indexes,
scannedItemId,
processedQrCombinations,
);
if (!hasPendingOnScannedSil && !hasPendingOnItem) {
console.log(
` [SKIP] No pending stock-out line left for itemId=${scannedItemId}, stockInLineId=${scannedStockInLineId}`,
);


+ 1
- 1
src/components/ImportBom/ImportBomResultForm.tsx Ver ficheiro

@@ -271,7 +271,7 @@ type Props = {
{items.length > 0 && (
<Typography variant="caption" color="text.secondary">
將匯入 {items.length} 個 BOM
{wipCount > 0 ? `,其中 ${wipCount} 個同時建立 WIP` : ""}
{wipCount > 0 ? `,其中 ${wipCount} 個同時建立 半成品` : ""}
{drinkCount > 0 ? `,${drinkCount} 個飲料` : ""}
{powderMixtureCount > 0 ? `,${powderMixtureCount} 個箱料粉` : ""}
</Typography>


+ 10
- 1
src/components/StockIssue/StockIssueRecordTab.tsx Ver ficheiro

@@ -160,7 +160,16 @@ const StockIssueRecordTab: React.FC<Props> = ({ kind }) => {
label: kind === "expiry" ? t("Expiry Item Qty") : t("Bad Item Qty"),
renderCell: (row) => (
<>
{Number(row.qty).toFixed(2)} {row.uomDesc ?? ""}
{Number(row.qty).toFixed(2)}
</>
),
},
{
name: "uomDesc",
label: t("UOM"),
renderCell: (row) => (
<>
{row.uomDesc ?? ""}
</>
),
},


+ 7
- 0
src/i18n/zh/do.json Ver ficheiro

@@ -10,6 +10,10 @@
"Estimated Arrival To": "預計送貨日期至",
"Status": "來貨狀態",
"Etra": "加單",
"Loading": "正在加載...",
"No delivery orders selected for batch release. Uncheck orders you want to exclude, or search again to reset selection.": "沒有選擇送貨訂單進行批量放單。取消勾選您想排除的訂單,或重新搜索以重置選擇。",
"No Records": "沒有找到記錄",
"OK": "確認",
"Truck X": "車線-X",
"DO Workbench": "新版成品出倉",
"Order Date From": "訂單日期",
@@ -48,8 +52,11 @@
"Supplier Name": "供應商名稱",
"Details": "詳情",
"Pending": "待處理",
"pending": "待處理",
"Receiving": "接收中",
"receiving": "接收中",
"Completed": "已完成",
"completed": "已完成",
"Please wait": "請稍候",
"Selected Shop(s): ": "已選擇店舖數量: ",
"Selected Item(s): ": "總貨品數量: ",


Carregando…
Cancelar
Guardar