~
This commit is contained in:
parent
b3618ba9db
commit
2ff5b74bb8
|
@ -393,17 +393,19 @@ var
|
|||
begin
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from JYOrder_Sub where 1=1 ');
|
||||
if PState = 1 then
|
||||
begin
|
||||
sql.Add(' and MainId=''' + Trim(FMainId) + '''');
|
||||
sql.Add('order by XHNo')
|
||||
end;
|
||||
if PState = 0 then
|
||||
begin
|
||||
sql.Add(' and 1<>1');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuery1, Order_Sub);
|
||||
|
|
|
@ -20,16 +20,16 @@ uses
|
|||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||
dxSkinscxPCPainter;
|
||||
|
||||
type
|
||||
TfrmProductOrderNewList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
|
@ -290,9 +290,9 @@ begin
|
|||
SQL.Add('MaxRoll=(select isnull(sum(maxroll),0) from (select Subid,mjstr4,max(mjxh) as maxroll from wfb_mjjy X group by mjstr4,Subid) XX where XX.subid=A.subid)');
|
||||
sql.Add('from JYOrder_sub A ');
|
||||
sql.Add('where A.mainID =' + quotedstr((Order_Main.fieldbyname('mainID').AsString)));
|
||||
sql.Add(')AA');
|
||||
open;
|
||||
end;
|
||||
sql.Add(')AA order by XHNo');
|
||||
open;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderNewList.FormDestroy(Sender: TObject);
|
||||
|
@ -534,7 +534,7 @@ begin
|
|||
begin
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
fFlileFlag := self.fFlileFlag;
|
||||
fFlileFlag := self.fFlileFlag;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
|
@ -845,10 +845,10 @@ begin
|
|||
Exit;
|
||||
RMDBMain.DataSet := CDS_Print;
|
||||
LBName := RadioGroup1.Items.Strings[RadioGroup1.ItemIndex];
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(LBName) + '.rmf';
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(LBName) + '.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,C.Filesother,ColorCount=(select isnull(Count(subID),0) from JYOrder_Sub where MainId=A.MainId), ');
|
||||
sql.add('ZQty=(select sum(PRTOrderQty) from JYOrder_Sub where MainId=A.MainId),');
|
||||
|
@ -859,7 +859,8 @@ begin
|
|||
sql.Add(' left join TP_File C on C.TFID=B.Subid and C.WBID=B.Mainid ');
|
||||
// sql.Add(' left join TP_File D on D.TFID=A.orderNO ');
|
||||
sql.Add(' Where A.MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
sql.Add(' order by B.PRTCode,B.PRTCodeName,B.subID ');
|
||||
sql.Add(' order by cast(B.xhno as int) ');
|
||||
// sql.Add(' order by B.PRTCode,B.PRTCodeName,B.subID ');
|
||||
|
||||
Open;
|
||||
end;
|
||||
|
@ -869,7 +870,7 @@ begin
|
|||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
RMDBMain.DataSet :=nil;
|
||||
RMDBMain.DataSet := nil;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue
Block a user