|
|
|
|
@ -4,14 +4,26 @@ interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
|
|
|
|
cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses, cxControls,
|
|
|
|
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
|
|
|
|
cxGridDBTableView, cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu,
|
|
|
|
|
cxGridPopupMenu, ADODB, cxPC, ExtCtrls, StdCtrls, DBClient, cxCalendar,
|
|
|
|
|
RM_Dataset, RM_Common, RM_Class, RM_e_Xls, RM_System, RM_GridReport,
|
|
|
|
|
cxDropDownEdit, cxSplitter, cxLookAndFeels, cxLookAndFeelPainters,
|
|
|
|
|
cxNavigator, dxBarBuiltInMenu;
|
|
|
|
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
|
|
|
|
cxEdit, DB, cxDBData, cxGridLevel, cxClasses, cxControls, cxGridCustomView,
|
|
|
|
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, ComCtrls,
|
|
|
|
|
ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, cxPC, ExtCtrls,
|
|
|
|
|
StdCtrls, DBClient, cxCalendar, RM_Dataset, RM_Common, RM_Class, RM_e_Xls,
|
|
|
|
|
RM_System, RM_GridReport, cxDropDownEdit, cxSplitter, cxLookAndFeels,
|
|
|
|
|
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, dxSkinsCore, dxSkinBlack,
|
|
|
|
|
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
|
|
|
|
|
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
|
|
|
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
|
|
|
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
TFrmCgBJList = class(TForm)
|
|
|
|
|
@ -115,9 +127,7 @@ type
|
|
|
|
|
procedure PONoChange(Sender: TObject);
|
|
|
|
|
procedure TglvClick(Sender: TObject);
|
|
|
|
|
procedure TPrintClick(Sender: TObject);
|
|
|
|
|
procedure TV1CellClick(Sender: TcxCustomGridTableView;
|
|
|
|
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
|
|
|
|
AShift: TShiftState; var AHandled: Boolean);
|
|
|
|
|
procedure TV1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
|
|
|
|
procedure TBCopyClick(Sender: TObject);
|
|
|
|
|
procedure ordernoChange(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
@ -135,48 +145,50 @@ var
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses U_DataLink,U_Fun,U_frmCgBjPut;
|
|
|
|
|
uses
|
|
|
|
|
U_DataLink, U_Fun, U_frmCgBjPut;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
procedure TFrmCgBJList.InitSub();
|
|
|
|
|
begin
|
|
|
|
|
ADOQuerySub.Close;
|
|
|
|
|
IF cds_Main.IsEmpty then exit;
|
|
|
|
|
if cds_Main.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
with ADOQuerySub do
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
sql.Clear;
|
|
|
|
|
sql.Add('select * from Contract_Sub_Sh ');
|
|
|
|
|
sql.Add('where mainID ='+quotedstr((cds_Main.fieldbyname('mainID').AsString)));
|
|
|
|
|
sql.Add('where mainID =' + quotedstr((cds_Main.fieldbyname('mainID').AsString)));
|
|
|
|
|
open;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.setStatus();
|
|
|
|
|
begin
|
|
|
|
|
Tupdate.Enabled:=true;
|
|
|
|
|
Tdel.Enabled:=true;
|
|
|
|
|
Tnochk.Visible:=False;
|
|
|
|
|
Tchk.Visible:=False;
|
|
|
|
|
if trim(Ftype)='高权限' then
|
|
|
|
|
Tupdate.Enabled := true;
|
|
|
|
|
Tdel.Enabled := true;
|
|
|
|
|
Tnochk.Visible := False;
|
|
|
|
|
Tchk.Visible := False;
|
|
|
|
|
if trim(Ftype) = '高权限' then
|
|
|
|
|
begin
|
|
|
|
|
if cxTabControl1.TabIndex=0 then
|
|
|
|
|
if cxTabControl1.TabIndex = 0 then
|
|
|
|
|
begin
|
|
|
|
|
Tupdate.Enabled:=true;
|
|
|
|
|
Tdel.Enabled:=true;
|
|
|
|
|
Tchk.Visible:=true;
|
|
|
|
|
Tupdate.Enabled := true;
|
|
|
|
|
Tdel.Enabled := true;
|
|
|
|
|
Tchk.Visible := true;
|
|
|
|
|
end;
|
|
|
|
|
if cxTabControl1.TabIndex=1 then
|
|
|
|
|
if cxTabControl1.TabIndex = 1 then
|
|
|
|
|
begin
|
|
|
|
|
Tnochk.Visible:=true;
|
|
|
|
|
Tnochk.Visible := true;
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
if cxTabControl1.TabIndex=0 then
|
|
|
|
|
if cxTabControl1.TabIndex = 0 then
|
|
|
|
|
begin
|
|
|
|
|
Tupdate.Enabled:=true;
|
|
|
|
|
Tdel.Enabled:=true;
|
|
|
|
|
Tupdate.Enabled := true;
|
|
|
|
|
Tdel.Enabled := true;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
@ -190,26 +202,26 @@ begin
|
|
|
|
|
sql.Add('select A.* ');
|
|
|
|
|
sql.add('from CGBJ_Main A ');
|
|
|
|
|
// sql.Add('inner join CGBJ_zb D on D.mainid=A.mainid ');
|
|
|
|
|
sql.Add('where A.SQDate>='''+formatdatetime('yyyy-MM-dd',begdate.datetime)+''' ' );
|
|
|
|
|
sql.Add('and A.SQDate<'''+formatdatetime('yyyy-MM-dd',Enddate.datetime+1)+''' ' );
|
|
|
|
|
sql.Add('where A.SQDate>=''' + formatdatetime('yyyy-MM-dd', begdate.datetime) + ''' ');
|
|
|
|
|
sql.Add('and A.SQDate<''' + formatdatetime('yyyy-MM-dd', Enddate.datetime + 1) + ''' ');
|
|
|
|
|
// if cxtabControl1.TabIndex=0 then
|
|
|
|
|
// sql.Add('and A.ChkStatus=''0'' ');
|
|
|
|
|
// if CxtabControl1.TabIndex=1 then
|
|
|
|
|
// sql.Add('and A.ChkStatus=''1'' ');
|
|
|
|
|
if trim(Ftype)<>'高权限' then
|
|
|
|
|
if trim(Ftype) <> '高权限' then
|
|
|
|
|
begin
|
|
|
|
|
sql.Add('and A.SQName='''+trim(DName)+'''');
|
|
|
|
|
sql.Add('and A.SQName=''' + trim(DName) + '''');
|
|
|
|
|
end;
|
|
|
|
|
// ShowMessage(SQL.Text);
|
|
|
|
|
open;
|
|
|
|
|
end;
|
|
|
|
|
SCreateCDS20(ADOQueryMain,cds_Main);
|
|
|
|
|
SInitCDSData20(ADOQueryMain,cds_Main);
|
|
|
|
|
SCreateCDS20(ADOQueryMain, cds_Main);
|
|
|
|
|
SInitCDSData20(ADOQueryMain, cds_Main);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.FormCreate(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
cxGrid1.Align:=alclient;
|
|
|
|
|
cxGrid1.Align := alclient;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TCloseClick(Sender: TObject);
|
|
|
|
|
@ -220,18 +232,18 @@ end;
|
|
|
|
|
procedure TFrmCgBJList.FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
// writeCxGrid(self.Caption+tv1.Name,Tv1);
|
|
|
|
|
action:=cafree;
|
|
|
|
|
Action := cafree;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TaddClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
frmCgBjPut:=TfrmCgBjPut.create(self);
|
|
|
|
|
frmCgBjPut := TfrmCgBjPut.create(self);
|
|
|
|
|
with frmCgBjPut do
|
|
|
|
|
begin
|
|
|
|
|
PState:=0;
|
|
|
|
|
FMainId:='';
|
|
|
|
|
if showmodal=1 then
|
|
|
|
|
PState := 0;
|
|
|
|
|
FMainId := '';
|
|
|
|
|
if showmodal = 1 then
|
|
|
|
|
begin
|
|
|
|
|
initData();
|
|
|
|
|
end;
|
|
|
|
|
@ -243,9 +255,9 @@ end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
ReadCxGrid(self.Caption+tv1.Name,Tv1);
|
|
|
|
|
begdate.datetime:=SGetServerDateTime(ADOQueryTmp)-7;
|
|
|
|
|
enddate.datetime:=SGetServerDateTime(ADOQueryTmp);
|
|
|
|
|
ReadCxGrid(self.Caption + tv1.Name, Tv1);
|
|
|
|
|
begdate.datetime := SGetServerDateTime(ADOQueryTmp) - 7;
|
|
|
|
|
enddate.datetime := SGetServerDateTime(ADOQueryTmp);
|
|
|
|
|
setStatus();
|
|
|
|
|
initdata();
|
|
|
|
|
end;
|
|
|
|
|
@ -282,12 +294,13 @@ begin
|
|
|
|
|
// end;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
frmCgBjPut:=TfrmCgBjPut.create(self);
|
|
|
|
|
frmCgBjPut := TfrmCgBjPut.create(self);
|
|
|
|
|
with frmCgBjPut do
|
|
|
|
|
begin
|
|
|
|
|
PState:=1;
|
|
|
|
|
FMainId:=Trim(Self.cds_Main.fieldbyname('MainId').AsString);;
|
|
|
|
|
if showmodal=1 then
|
|
|
|
|
PState := 1;
|
|
|
|
|
FMainId := Trim(Self.cds_Main.fieldbyname('MainId').AsString);
|
|
|
|
|
;
|
|
|
|
|
if showmodal = 1 then
|
|
|
|
|
begin
|
|
|
|
|
initData();
|
|
|
|
|
end;
|
|
|
|
|
@ -309,30 +322,32 @@ end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TdelClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if cds_Main.IsEmpty then exit;
|
|
|
|
|
if application.MessageBox('确定要删除吗?','提示',1)=2 then exit;
|
|
|
|
|
if cds_Main.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
if application.MessageBox('确定要删除吗?', '提示', 1) = 2 then
|
|
|
|
|
exit;
|
|
|
|
|
try
|
|
|
|
|
with ADOQueryDel do
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
sql.Clear;
|
|
|
|
|
sql.Add('delete from CGBJ_Main ');
|
|
|
|
|
sql.Add('where mainid='''+trim(cds_Main.fieldbyname('Mainid').AsString)+'''');
|
|
|
|
|
sql.Add('where mainid=''' + trim(cds_Main.fieldbyname('Mainid').AsString) + '''');
|
|
|
|
|
sql.Add('delete from CGBJ_Sub ');
|
|
|
|
|
sql.Add('where mainid='''+trim(cds_Main.fieldbyname('Mainid').AsString)+'''');
|
|
|
|
|
sql.Add('where mainid=''' + trim(cds_Main.fieldbyname('Mainid').AsString) + '''');
|
|
|
|
|
sql.Add('delete from CGBJ_ZB ');
|
|
|
|
|
sql.Add('where mainid='''+trim(cds_Main.fieldbyname('Mainid').AsString)+'''');
|
|
|
|
|
sql.Add('where mainid=''' + trim(cds_Main.fieldbyname('Mainid').AsString) + '''');
|
|
|
|
|
execsql;
|
|
|
|
|
end;
|
|
|
|
|
except
|
|
|
|
|
application.messagebox('数据删除失败','提示',0);
|
|
|
|
|
application.messagebox('数据删除失败', '提示', 0);
|
|
|
|
|
end;
|
|
|
|
|
initdata();
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.FormDestroy(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
FrmCgBJList:=nil;
|
|
|
|
|
FrmCgBJList := nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.cxTabControl1Change(Sender: TObject);
|
|
|
|
|
@ -343,26 +358,28 @@ end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TchkClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if cds_Main.IsEmpty then exit;
|
|
|
|
|
if cds_Main.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
try
|
|
|
|
|
with ADOQueryTmp do
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
sql.Clear;
|
|
|
|
|
sql.Add('update contract_Main_Sh set chkstatus=''1'',chktime=getdate(),chker='+quotedstr(trim(Dname)));
|
|
|
|
|
sql.Add(' where Mainid='''+trim(cds_Main.fieldbyname('Mainid').asstring)+'''');
|
|
|
|
|
sql.Add('update contract_Main_Sh set chkstatus=''1'',chktime=getdate(),chker=' + quotedstr(trim(Dname)));
|
|
|
|
|
sql.Add(' where Mainid=''' + trim(cds_Main.fieldbyname('Mainid').asstring) + '''');
|
|
|
|
|
execsql;
|
|
|
|
|
end;
|
|
|
|
|
application.MessageBox('审核成功','提示');
|
|
|
|
|
application.MessageBox('审核成功', '提示');
|
|
|
|
|
initdata();
|
|
|
|
|
except
|
|
|
|
|
application.messagebox('审核失败','提示');
|
|
|
|
|
application.messagebox('审核失败', '提示');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TNochkClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if cds_Main.IsEmpty then exit;
|
|
|
|
|
if cds_Main.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
try
|
|
|
|
|
{ with ADOQueryTmp do
|
|
|
|
|
begin
|
|
|
|
|
@ -382,35 +399,36 @@ begin
|
|
|
|
|
close;
|
|
|
|
|
sql.Clear;
|
|
|
|
|
sql.Add('update contract_Main_Sh set chkstatus=''0'',chktime=null,chker=null');
|
|
|
|
|
sql.add(' where Mainid='''+trim(cds_Main.fieldbyname('Mainid').asstring)+'''');
|
|
|
|
|
sql.add(' where Mainid=''' + trim(cds_Main.fieldbyname('Mainid').asstring) + '''');
|
|
|
|
|
execsql;
|
|
|
|
|
end;
|
|
|
|
|
application.MessageBox('撤销成功','提示');
|
|
|
|
|
application.MessageBox('撤销成功', '提示');
|
|
|
|
|
initdata();
|
|
|
|
|
except
|
|
|
|
|
application.MessageBox('撤销失败','提示');
|
|
|
|
|
application.MessageBox('撤销失败', '提示');
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.PONoChange(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
SDofilter(AdoQueryTmp,SGetFilters(Panel1,1,0));
|
|
|
|
|
SCreateCDS20(AdoQueryTmp,cds_Main);
|
|
|
|
|
SInitCDSData20(AdoQueryTmp,cds_Main);
|
|
|
|
|
SDofilter(AdoQueryTmp, SGetFilters(Panel1, 1, 0));
|
|
|
|
|
SCreateCDS20(AdoQueryTmp, cds_Main);
|
|
|
|
|
SInitCDSData20(AdoQueryTmp, cds_Main);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TglvClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
SDofilter(AdoQueryTmp,SGetFilters(Panel1,1,0));
|
|
|
|
|
SCreateCDS20(AdoQueryTmp,cds_Main);
|
|
|
|
|
SInitCDSData20(AdoQueryTmp,cds_Main);
|
|
|
|
|
SDofilter(AdoQueryTmp, SGetFilters(Panel1, 1, 0));
|
|
|
|
|
SCreateCDS20(AdoQueryTmp, cds_Main);
|
|
|
|
|
SInitCDSData20(AdoQueryTmp, cds_Main);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TPrintClick(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
fPrintFile:string;
|
|
|
|
|
fPrintFile: string;
|
|
|
|
|
begin
|
|
|
|
|
if cds_Main.IsEmpty then exit;
|
|
|
|
|
if cds_Main.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
with ADOQueryPrint do
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
@ -421,7 +439,7 @@ begin
|
|
|
|
|
// sql.Add(' left join CGBJ_ZB D on D.mainID=A.Mainid ');
|
|
|
|
|
// sql.Add('inner join CGBJ_ZB D on D.Mainid=A.Mainid ');
|
|
|
|
|
// sql.Add('left join JYOrderFy_Other C on C.OrderNo=A.FYNO ');
|
|
|
|
|
sql.Add('where A.Mainid='''+trim(cds_Main.fieldbyname('Mainid').asstring)+''' ');
|
|
|
|
|
sql.Add('where A.Mainid=''' + trim(cds_Main.fieldbyname('Mainid').asstring) + ''' ');
|
|
|
|
|
// ShowMessage(SQL.Text);
|
|
|
|
|
open;
|
|
|
|
|
end;
|
|
|
|
|
@ -430,24 +448,23 @@ begin
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
sql.clear;
|
|
|
|
|
sql.Add(' select * from CGBJ_ZB where MainId='''+trim(cds_Main.fieldbyname('Mainid').asstring)+'''');
|
|
|
|
|
sql.Add(' select * from CGBJ_ZB where MainId=''' + trim(cds_Main.fieldbyname('Mainid').asstring) + '''');
|
|
|
|
|
|
|
|
|
|
open;
|
|
|
|
|
end;
|
|
|
|
|
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\采购报价表.rmf' ;
|
|
|
|
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\采购报价表.rmf';
|
|
|
|
|
if FileExists(fPrintFile) then
|
|
|
|
|
begin
|
|
|
|
|
RM1.LoadFromFile(fPrintFile);
|
|
|
|
|
RM1.ShowReport;
|
|
|
|
|
end else
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
Application.MessageBox(PChar('没有找'+trim(fPrintFile)),'提示',0);
|
|
|
|
|
Application.MessageBox(PChar('没有找' + trim(fPrintFile)), '提示', 0);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TFrmCgBJList.TV1CellClick(Sender: TcxCustomGridTableView;
|
|
|
|
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
|
|
|
|
AShift: TShiftState; var AHandled: Boolean);
|
|
|
|
|
procedure TFrmCgBJList.TV1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
initsub();
|
|
|
|
|
end;
|
|
|
|
|
@ -462,13 +479,13 @@ begin
|
|
|
|
|
// free;
|
|
|
|
|
// end;
|
|
|
|
|
|
|
|
|
|
frmCgBjPut:=TfrmCgBjPut.create(self);
|
|
|
|
|
frmCgBjPut := TfrmCgBjPut.create(self);
|
|
|
|
|
with frmCgBjPut do
|
|
|
|
|
begin
|
|
|
|
|
PState := 1;
|
|
|
|
|
CopyInt := 99;
|
|
|
|
|
FMainId := Trim(Self.cds_Main.fieldbyname('MainId').AsString);
|
|
|
|
|
if showmodal=1 then
|
|
|
|
|
if showmodal = 1 then
|
|
|
|
|
begin
|
|
|
|
|
initData();
|
|
|
|
|
end;
|
|
|
|
|
@ -484,18 +501,19 @@ begin
|
|
|
|
|
sql.Clear;
|
|
|
|
|
sql.Add('select A.* ');
|
|
|
|
|
sql.add('from CGBJ_Main A ');
|
|
|
|
|
sql.Add('where A.SQDate>='''+formatdatetime('yyyy-MM-dd',begdate.datetime)+''' ' );
|
|
|
|
|
sql.Add('and A.SQDate<'''+formatdatetime('yyyy-MM-dd',Enddate.datetime+1)+''' ' );
|
|
|
|
|
sql.Add('and A.orderno like '''+'%'+Trim(OrderNo.Text)+'%'+''' ');
|
|
|
|
|
if trim(Ftype)<>'高权限' then
|
|
|
|
|
sql.Add('where A.SQDate>=''' + formatdatetime('yyyy-MM-dd', begdate.datetime) + ''' ');
|
|
|
|
|
sql.Add('and A.SQDate<''' + formatdatetime('yyyy-MM-dd', Enddate.datetime + 1) + ''' ');
|
|
|
|
|
sql.Add('and A.orderno like ''' + '%' + Trim(OrderNo.Text) + '%' + ''' ');
|
|
|
|
|
if trim(Ftype) <> '高权限' then
|
|
|
|
|
begin
|
|
|
|
|
sql.Add('and A.SQName='''+trim(DName)+'''');
|
|
|
|
|
sql.Add('and A.SQName=''' + trim(DName) + '''');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
open;
|
|
|
|
|
end;
|
|
|
|
|
SCreateCDS20(ADOQueryMain,cds_Main);
|
|
|
|
|
SInitCDSData20(ADOQueryMain,cds_Main);
|
|
|
|
|
SCreateCDS20(ADOQueryMain, cds_Main);
|
|
|
|
|
SInitCDSData20(ADOQueryMain, cds_Main);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|
|