This commit is contained in:
DESKTOP-E401PHE\Administrator 2026-02-05 17:24:27 +08:00
parent 57680f1055
commit 792700dde1

View File

@ -259,7 +259,7 @@ type
Button5: TButton; Button5: TButton;
ADOQueryPrint1: TADOQuery; ADOQueryPrint1: TADOQuery;
RMDB_Main1: TRMDBDataSet; RMDB_Main1: TRMDBDataSet;
RM3: TRMGridReport; RM3: TRMGridReport;
Edit5: TEdit; Edit5: TEdit;
Label43: TLabel; Label43: TLabel;
Label53: TLabel; Label53: TLabel;
@ -1701,7 +1701,7 @@ begin
begin begin
Close; Close;
sql.Clear; sql.Clear;
sql.Add('select sum(A.mjlen) as ZC,sum(A.MJMaoZ) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' '); sql.Add('select sum(A.mjlen) as ZC,sum(A.MJQty4) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' ');
Open; Open;
end; end;
with ADOQuery2 do with ADOQuery2 do
@ -1730,8 +1730,8 @@ begin
Close; Close;
sql.Clear; sql.Clear;
sql.Add('select sum(A.mjlen) as GCD,sum(A.MJMaoZ) as Gzl,count(*) as Gps '); sql.Add('select sum(A.mjlen) as GCD,sum(A.MJMaoZ) as Gzl,count(*) as Gps ');
sql.Add(',ZPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''ÕýÆ·'' ) '); sql.Add(',ZPgj=(select sum(MJQty4) from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''ÕýÆ·'' ) ');
sql.Add(',CPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''´ÎÆ·'') '); sql.Add(',CPgj=(select sum(MJQty4) from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''´ÎÆ·'') ');
sql.Add(',ZPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''正品'' ) '); sql.Add(',ZPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''正品'' ) ');
sql.Add(',CPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''次品'') '); sql.Add(',CPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''次品'') ');
sql.Add(' from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' group by mainid,subid '); //and A.mjstr4=''' + trim(mjstr4.text) + ''' sql.Add(' from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' group by mainid,subid '); //and A.mjstr4=''' + trim(mjstr4.text) + '''
@ -2544,7 +2544,7 @@ begin
begin begin
Close; Close;
sql.Clear; sql.Clear;
sql.Add('select sum(mjlen) as ZC ,sum(MJMaoZ) as ZZ from WFB_MJJY where Subid=''' + Trim(APID.Text) + ''' '); sql.Add('select sum(mjlen) as ZC ,sum(MJQty4) as ZZ from WFB_MJJY where Subid=''' + Trim(APID.Text) + ''' ');
Open; Open;
end; end;
sycd := strtofloatdef(Label56.Caption, 0) - strtofloatdef(Trim(ADOQuery1.fieldbyname('ZC').AsString), 0); sycd := strtofloatdef(Label56.Caption, 0) - strtofloatdef(Trim(ADOQuery1.fieldbyname('ZC').AsString), 0);
@ -2564,13 +2564,13 @@ begin
Close; Close;
sql.Clear; sql.Clear;
sql.Add('select sum(A.mjlen) as GCD,sum(A.MJMaoZ) as Gzl,count(*) as Gps '); sql.Add('select sum(A.mjlen) as GCD,sum(A.MJMaoZ) as Gzl,count(*) as Gps ');
sql.Add(',ZPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''ÕýÆ·'' ) '); sql.Add(',ZPgj=(select sum(MJQty4)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''ÕýÆ·'' ) ');
sql.Add(',CPgj=(select sum(MJMaoZ)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''´ÎÆ·'') '); sql.Add(',CPgj=(select sum(MJQty4)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''´ÎÆ·'') ');
sql.Add(',ZPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''正品'' ) '); sql.Add(',ZPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''正品'' ) ');
sql.Add(',CPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''次品'') '); sql.Add(',CPps=(select count(*)from WFB_MJJY X where X.mainid=A.mainid and X.subid=A.subid and MJType=''次品'') ');
sql.Add(' from WFB_MJJY A where A.Subid=''' + Trim(APID.Text) + ''' group by mainid,subid '); sql.Add(' from WFB_MJJY A where A.Subid=''' + Trim(APID.Text) + ''' group by mainid,subid ');
Open; Open;
end; end;
Label62.Caption := '正品公斤:' + Trim(ADOQuery2.fieldbyname('ZPgj').AsString); Label62.Caption := '正品公斤:' + Trim(ADOQuery2.fieldbyname('ZPgj').AsString);
Label63.Caption := '次品公斤:' + Trim(ADOQuery2.fieldbyname('CPgj').AsString); Label63.Caption := '次品公斤:' + Trim(ADOQuery2.fieldbyname('CPgj').AsString);
@ -2939,7 +2939,7 @@ begin
begin begin
Close; Close;
sql.Clear; sql.Clear;
sql.Add('select sum(A.mjlen) as ZC,sum(A.MJMaoZ) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' '); sql.Add('select sum(A.mjlen) as ZC,sum(A.MJQty4) as ZZ from WFB_MJJY A where A.Subid=''' + Trim(FSubId) + ''' ');
Open; Open;
end; end;
with ADOQuery2 do with ADOQuery2 do