~
This commit is contained in:
parent
6369e4d72d
commit
4cbe32486a
|
|
@ -472,6 +472,11 @@ object frmYSYGGJList: TfrmYSYGGJList
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column6: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid2Level1: TcxGridLevel
|
object cxGrid2Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ type
|
||||||
CheckBox4: TCheckBox;
|
CheckBox4: TCheckBox;
|
||||||
CheckBox5: TCheckBox;
|
CheckBox5: TCheckBox;
|
||||||
Button9: TButton;
|
Button9: TButton;
|
||||||
|
Tv1Column6: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
|
@ -163,18 +164,18 @@ procedure TfrmYSYGGJList.InitGrid();
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
Filtered := False;
|
Filtered := False;
|
||||||
sql.Add('select A.*,B.PRTCodeName,B.prtcode,B.PRTColor,B.SOrddefstr5,');
|
sql.Add('select A.*,B.PRTCodeName,B.prtcode,B.PRTColor,B.SOrddefstr5,C.OrderNo,');
|
||||||
sql.Add(' isnull((A.GxPrice ),0) as gxdj ,isnull(((A.GxPrice)*qty ),0) as gxmoney ');
|
sql.Add(' isnull((A.GxPrice ),0) as gxdj ,isnull(((A.GxPrice)*qty ),0) as gxmoney ');
|
||||||
// sql.Add('gxdj=case when A.qty<=30 then isnull((select (A.GxPrice)*2 from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
// sql.Add('gxdj=case when A.qty<=30 then isnull((select (A.GxPrice)*2 from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||||
// SQL.Add('else isnull((A.GxPrice ),0) end, ');
|
// SQL.Add('else isnull((A.GxPrice ),0) end, ');
|
||||||
// sql.Add('gxmoney=case when A.qty<=30 then isnull((select ((A.GxPrice)*2)*B.qty from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
// sql.Add('gxmoney=case when A.qty<=30 then isnull((select ((A.GxPrice)*2)*B.qty from JyOrder_Yield B where A.CLID=B.clid ),0)');
|
||||||
// SQL.Add(' else isnull(((A.GxPrice)*qty ),0) end ');
|
// SQL.Add(' else isnull(((A.GxPrice)*qty ),0) end ');
|
||||||
sql.Add('from JyOrder_Yield A ');
|
sql.Add('from JyOrder_Yield A inner join JYOrder_Main C on A.mainid=C.mainid');
|
||||||
sql.Add('left join JYOrder_Sub B on A.mainid=B.mainid and A.subid=B.subid');
|
sql.Add('left join JYOrder_Sub B on A.mainid=B.mainid and A.subid=B.subid');
|
||||||
sql.Add('where A.filltime>=''' + FormatDateTime('yyyy-MM-dd', begdate.DateTime) + ''' ');
|
sql.Add('where A.filltime>=''' + FormatDateTime('yyyy-MM-dd', begdate.DateTime) + ''' ');
|
||||||
sql.Add(' and A.filltime<''' + FormatDateTime('yyyy-MM-dd', Enddate.DateTime + 1) + ''' ');
|
sql.Add(' and A.filltime<''' + FormatDateTime('yyyy-MM-dd', Enddate.DateTime + 1) + ''' ');
|
||||||
|
|
@ -434,16 +435,17 @@ begin
|
||||||
First;
|
First;
|
||||||
while not eof do
|
while not eof do
|
||||||
begin
|
begin
|
||||||
if Fieldbyname('ssel').AsBoolean then
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.add('insert into JyOrder_Yield_Del select * from WFB_MJJY where mjid=''' + trim(CDS_Main.fieldbyname('CLID').AsString) + ''' ');
|
sql.add('insert into JyOrder_Yield_Del select * from JyOrder_Yield where CLID=''' + trim(CDS_Main.fieldbyname('CLID').AsString) + ''' ');
|
||||||
sql.Add('update JyOrder_Yield_Del Set DelTime=Getdate(),Deler=''' + trim(DName) + ''' where CLID=''' + trim(CDS_Main.fieldbyname('CLID').AsString) + ''' ');
|
sql.Add('update JyOrder_Yield_Del Set DelTime=Getdate(),Deler=''' + trim(DName) + ''' where CLID=''' + trim(CDS_Main.fieldbyname('CLID').AsString) + ''' ');
|
||||||
sql.Add('delete JyOrder_Yield where MJID=''' + Trim(CDS_Main.fieldbyname('CLID').AsString) + '''');
|
sql.Add('delete JyOrder_Yield where CLID=''' + Trim(CDS_Main.fieldbyname('CLID').AsString) + '''');
|
||||||
ExecSQL;
|
// ShowMessage(sql.text);
|
||||||
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
CDS_Main.Delete;
|
CDS_Main.Delete;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user