|
|
|
@@ -3313,8 +3313,10 @@ const JobPickExecution: React.FC<Props> = ({ filterArgs, onBackToList, printerCo |
|
|
|
}, 1000); |
|
|
|
} catch (error) { |
|
|
|
console.error("Error submitting pick quantity:", error); |
|
|
|
const message = error instanceof Error ? error.message.trim() : ""; |
|
|
|
setQrScanError(true); |
|
|
|
setQrScanSuccess(false); |
|
|
|
if (message) setQrScanErrorMsg(message); |
|
|
|
} finally { |
|
|
|
if (solId > 0) |
|
|
|
setActionBusyBySolId((prev) => ({ ...prev, [solId]: false })); |
|
|
|
@@ -4074,6 +4076,11 @@ const JobPickExecution: React.FC<Props> = ({ filterArgs, onBackToList, printerCo |
|
|
|
: lockedSubmitQtyDisplay; |
|
|
|
const totalAvail = Number(lot.itemTotalAvailableQty ?? 0); |
|
|
|
const isLastLotUnavailable = Number.isFinite(totalAvail) && totalAvail === 0; |
|
|
|
const rejectDisplay = buildLotRejectDisplayMessage( |
|
|
|
lot, |
|
|
|
scanRejectMessageBySolId, |
|
|
|
tPick, |
|
|
|
); |
|
|
|
return ( |
|
|
|
<TableRow |
|
|
|
key={`${lot.pickOrderLineId}-${lot.lotId}`} |
|
|
|
@@ -4188,16 +4195,35 @@ const JobPickExecution: React.FC<Props> = ({ filterArgs, onBackToList, printerCo |
|
|
|
</> |
|
|
|
|
|
|
|
) : ( |
|
|
|
lot.lotNo |
|
|
|
<> |
|
|
|
{lot.lotNo} |
|
|
|
{rejectDisplay ? ( |
|
|
|
<Box |
|
|
|
component="span" |
|
|
|
sx={{ |
|
|
|
display: "block", |
|
|
|
mt: 0.5, |
|
|
|
color: "error.main", |
|
|
|
fontSize: "0.85rem", |
|
|
|
lineHeight: 1.4, |
|
|
|
whiteSpace: "normal", |
|
|
|
wordBreak: "break-word", |
|
|
|
}} |
|
|
|
> |
|
|
|
{rejectDisplay} |
|
|
|
</Box> |
|
|
|
) : null} |
|
|
|
</> |
|
|
|
) |
|
|
|
) : ( |
|
|
|
<Box |
|
|
|
component="span" |
|
|
|
sx={{ fontSize: "0.85rem", lineHeight: 1.4 }} |
|
|
|
sx={{ fontSize: "0.85rem", lineHeight: 1.4, color: rejectDisplay ? "error.main" : undefined }} |
|
|
|
> |
|
|
|
{t( |
|
|
|
"Please check around have QR code or not, may be have just now stock in or transfer in or transfer out.", |
|
|
|
)} |
|
|
|
{rejectDisplay || |
|
|
|
t( |
|
|
|
"Please check around have QR code or not, may be have just now stock in or transfer in or transfer out.", |
|
|
|
)} |
|
|
|
</Box> |
|
|
|
)} |
|
|
|
</Typography> |
|
|
|
|