diff --git a/src/components/Jodetail/JobPickExecutionsecondscan.tsx b/src/components/Jodetail/JobPickExecutionsecondscan.tsx index cc4ffe6..622de57 100644 --- a/src/components/Jodetail/JobPickExecutionsecondscan.tsx +++ b/src/components/Jodetail/JobPickExecutionsecondscan.tsx @@ -1233,7 +1233,8 @@ const paginatedData = useMemo(() => { - {lot.secondQrScanStatus?.toLowerCase() !== 'pending' ? ( + {lot.secondQrScanStatus?.toLowerCase() === 'scanned' || + lot.secondQrScanStatus?.toLowerCase() === 'completed' ? ( = ({ inputProps={{ min: 1, step: 1, - style: { textAlign: 'center' } + style: { textAlign: 'right' } }} sx={{ width: '80px', diff --git a/src/components/PickOrderSearch/LotTable.tsx b/src/components/PickOrderSearch/LotTable.tsx index a047c8d..f03ed07 100644 --- a/src/components/PickOrderSearch/LotTable.tsx +++ b/src/components/PickOrderSearch/LotTable.tsx @@ -714,10 +714,18 @@ const LotTable: React.FC = ({ {t("Scan")} ) : ( - // ✅ 当有 stockOutLineId 时,显示 TextField + Pick Form 按钮 - - {/* ✅ 恢复 TextField 用于正常数量输入 */} - + {/* ✅ 恢复 TextField 用于正常数量输入 */} + = ({ if (selectedRowId) { const inputValue = parseFloat(e.target.value) || 0; const maxAllowed = Math.min(calculateRemainingAvailableQty(lot), calculateRemainingRequiredQty(lot)); - {/* - // ✅ Validate input - if (inputValue > maxAllowed) { - // Set validation error for this lot - setValidationErrors(prev => ({ ...prev, [`lot_${lot.lotId}`]: `${t('Input quantity cannot exceed')} ${maxAllowed}` })); - return; - } else { - // Clear validation error if valid - setValidationErrors(prev => { - const newErrors = { ...prev }; - delete newErrors[`lot_${lot.lotId}`]; - return newErrors; - }); - */} - onPickQtyChange(selectedRowId, lot.lotId, inputValue); } @@ -751,8 +744,8 @@ const LotTable: React.FC = ({ selectedLotRowId !== `row_${index}` || lot.stockOutLineStatus === 'completed' } - error={!!validationErrors[`lot_${lot.lotId}`]} // ✅ Show red border when error - helperText={validationErrors[`lot_${lot.lotId}`]} // ✅ Show red error text below + error={!!validationErrors[`lot_${lot.lotId}`]} + helperText={validationErrors[`lot_${lot.lotId}`]} inputProps={{ min: 0, max: calculateRemainingRequiredQty(lot), @@ -768,32 +761,32 @@ const LotTable: React.FC = ({ } }} placeholder="0" -/> - - {/* ✅ 添加 Pick Form 按钮用于问题情况 */} - - + /> + + {/* ✅ 添加 Pick Form 按钮用于问题情况 */} + + )} {/*{lot.availableQty.toLocaleString()}*/}