From b65f12eba2c7bf3c5d5ef3b4bb566a7998a79b3a Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Thu, 14 Aug 2025 09:39:52 +0800 Subject: [PATCH] ~ --- 复合检验管理/U_MJManageNewFDNew.pas | 39 ++++++++++++++++------------- 1 file changed, 22 insertions(+), 17 deletions(-) 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;