瀏覽代碼

no message

reset-do-picking-order
[email protected] 2 週之前
父節點
當前提交
0a24dc116f
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. +8
    -4
      src/components/PutAwayScan/PutAwayCamScan.tsx

+ 8
- 4
src/components/PutAwayScan/PutAwayCamScan.tsx 查看文件

@@ -90,12 +90,13 @@ const PutAwayCamScan: React.FC<Props> = ({ warehouse }) => {
[scannedSilId, scannedWareHouseId],
);

// Open modal only after both stock-in-line and location (warehouse) are scanned
useEffect(() => {
if (scannedSilId > 0) {
if (scannedSilId > 0 && scannedWareHouseId > 0) {
setOpenPutAwayModal(true);
setScanStatus("pending");
}
}, [scannedSilId]);
}, [scannedSilId, scannedWareHouseId]);

const closeModal = () => {
setScannedSilId(0);
@@ -108,11 +109,14 @@ const PutAwayCamScan: React.FC<Props> = ({ warehouse }) => {
if (scanStatus === "scanning") {
return t("Scanning");
}
if (scannedSilId > 0) {
if (scannedSilId > 0 && scannedWareHouseId > 0) {
return t("Scanned, opening detail");
}
if (scannedSilId > 0) {
return t("Please scan warehouse qr code");
}
return t("Pending scan");
}, [scanStatus, scannedSilId, t]);
}, [scanStatus, scannedSilId, scannedWareHouseId, t]);

const scannerConfig: ScannerConfig = {
...defaultScannerConfig,


Loading…
取消
儲存