diff --git a/复合检验管理/U_MJManageNewFDNew.pas b/复合检验管理/U_MJManageNewFDNew.pas index 0916668..1bf700b 100644 --- a/复合检验管理/U_MJManageNewFDNew.pas +++ b/复合检验管理/U_MJManageNewFDNew.pas @@ -1745,30 +1745,35 @@ begin end else begin - - with ADOTmp do + + with ADOTmp do begin Close; sql.Clear; - SQL.Add('select sum(mjlen)ddzc,sum(mjqty4)DDzz from WFB_MJJY where subid=''' + trim(FsubId) + ''' '); + SQL.Add('select count(*)ydps from WFB_MJJY where subid=''' + trim(FsubId) + ''' '); //sum(mjlen)ddzc,sum(mjqty4)DDzz open; end; - if (FOrderUnit <> 'KG') or (FOrderUnit <> 'Kg') or (FOrderUnit <> 'kG') or (FOrderUnit <> 'kg') then + if ADOTmp.FieldByName('ydps').asfloat >= FPRTOrderQty then begin - if ADOTmp.FieldByName('ddzc').asfloat + strtofloatdef((MJLen.text), 0) > FPRTOrderQty then - begin - Application.MessageBox('Ѿﵽɨ', 'ʾ', 0); - Exit; - end; - end - else - begin - if ADOTmp.FieldByName('ddzz').asfloat + strtofloatdef((mjqty4.text), 0) > FPRTOrderQty then - begin - Application.MessageBox('Ѿﵽɨ', 'ʾ', 0); - Exit; - end; + Application.MessageBox('Ѿﵽɨ', 'ʾ', 0); + Exit; end; +// if (FOrderUnit <> 'KG') or (FOrderUnit <> 'Kg') or (FOrderUnit <> 'kG') or (FOrderUnit <> 'kg') then +// begin +// if ADOTmp.FieldByName('ddzc').asfloat + strtofloatdef((MJLen.text), 0) > FPRTOrderQty then +// begin +// Application.MessageBox('Ѿﵽɨ', 'ʾ', 0); +// Exit; +// end; +// end +// else +// begin +// if ADOTmp.FieldByName('ddzz').asfloat + strtofloatdef((mjqty4.text), 0) > FPRTOrderQty then +// begin +// Application.MessageBox('Ѿﵽɨ', 'ʾ', 0); +// Exit; +// end; +// end; end; BTPrint.Enabled := False; Timer1.Enabled := True;