采购报价
This commit is contained in:
parent
500a04d339
commit
05c7c64d72
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
||||||
UsePackages=0
|
UsePackages=0
|
||||||
[Parameters]
|
[Parameters]
|
||||||
RunParams=
|
RunParams=
|
||||||
HostApplication=D:\徐加艳项目代码\项目代码\贝其\贝其贸易管理\testDll.exe
|
HostApplication=D:\Dp7Repo\项目代码\D7wmbeiqi\贝其贸易管理\testDll.exe
|
||||||
Launcher=
|
Launcher=
|
||||||
UseLauncher=0
|
UseLauncher=0
|
||||||
DebugCWD=
|
DebugCWD=
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ library TradeManage;
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils,
|
SysUtils,
|
||||||
classes,
|
classes,
|
||||||
forms,
|
forms,
|
||||||
WinTypes,
|
WinTypes,
|
||||||
WinProcs,
|
WinProcs,
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,26 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses, cxControls,
|
cxEdit, DB, cxDBData, cxGridLevel, cxClasses, cxControls, cxGridCustomView,
|
||||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, ComCtrls,
|
||||||
cxGridDBTableView, cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu,
|
ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, cxPC, ExtCtrls,
|
||||||
cxGridPopupMenu, ADODB, cxPC, ExtCtrls, StdCtrls, DBClient, cxCalendar,
|
StdCtrls, DBClient, cxCalendar, RM_Dataset, RM_Common, RM_Class, RM_e_Xls,
|
||||||
RM_Dataset, RM_Common, RM_Class, RM_e_Xls, RM_System, RM_GridReport,
|
RM_System, RM_GridReport, cxDropDownEdit, cxSplitter, cxLookAndFeels,
|
||||||
cxDropDownEdit, cxSplitter, cxLookAndFeels, cxLookAndFeelPainters,
|
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, dxSkinsCore, dxSkinBlack,
|
||||||
cxNavigator, dxBarBuiltInMenu;
|
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
|
type
|
||||||
TFrmCgBJList = class(TForm)
|
TFrmCgBJList = class(TForm)
|
||||||
|
|
@ -115,9 +127,7 @@ type
|
||||||
procedure PONoChange(Sender: TObject);
|
procedure PONoChange(Sender: TObject);
|
||||||
procedure TglvClick(Sender: TObject);
|
procedure TglvClick(Sender: TObject);
|
||||||
procedure TPrintClick(Sender: TObject);
|
procedure TPrintClick(Sender: TObject);
|
||||||
procedure TV1CellClick(Sender: TcxCustomGridTableView;
|
procedure TV1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
|
||||||
AShift: TShiftState; var AHandled: Boolean);
|
|
||||||
procedure TBCopyClick(Sender: TObject);
|
procedure TBCopyClick(Sender: TObject);
|
||||||
procedure ordernoChange(Sender: TObject);
|
procedure ordernoChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
|
@ -135,48 +145,50 @@ var
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses U_DataLink,U_Fun,U_frmCgBjPut;
|
uses
|
||||||
|
U_DataLink, U_Fun, U_frmCgBjPut;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
procedure TFrmCgBJList.InitSub();
|
procedure TFrmCgBJList.InitSub();
|
||||||
begin
|
begin
|
||||||
ADOQuerySub.Close;
|
ADOQuerySub.Close;
|
||||||
IF cds_Main.IsEmpty then exit;
|
if cds_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
with ADOQuerySub do
|
with ADOQuerySub do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from Contract_Sub_Sh ');
|
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;
|
open;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.setStatus();
|
procedure TFrmCgBJList.setStatus();
|
||||||
begin
|
begin
|
||||||
Tupdate.Enabled:=true;
|
Tupdate.Enabled := true;
|
||||||
Tdel.Enabled:=true;
|
Tdel.Enabled := true;
|
||||||
Tnochk.Visible:=False;
|
Tnochk.Visible := False;
|
||||||
Tchk.Visible:=False;
|
Tchk.Visible := False;
|
||||||
if trim(Ftype)='高权限' then
|
if trim(Ftype) = '高权限' then
|
||||||
begin
|
begin
|
||||||
if cxTabControl1.TabIndex=0 then
|
if cxTabControl1.TabIndex = 0 then
|
||||||
begin
|
begin
|
||||||
Tupdate.Enabled:=true;
|
Tupdate.Enabled := true;
|
||||||
Tdel.Enabled:=true;
|
Tdel.Enabled := true;
|
||||||
Tchk.Visible:=true;
|
Tchk.Visible := true;
|
||||||
end;
|
end;
|
||||||
if cxTabControl1.TabIndex=1 then
|
if cxTabControl1.TabIndex = 1 then
|
||||||
begin
|
begin
|
||||||
Tnochk.Visible:=true;
|
Tnochk.Visible := true;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if cxTabControl1.TabIndex=0 then
|
if cxTabControl1.TabIndex = 0 then
|
||||||
begin
|
begin
|
||||||
Tupdate.Enabled:=true;
|
Tupdate.Enabled := true;
|
||||||
Tdel.Enabled:=true;
|
Tdel.Enabled := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -190,26 +202,26 @@ begin
|
||||||
sql.Add('select A.* ');
|
sql.Add('select A.* ');
|
||||||
sql.add('from CGBJ_Main A ');
|
sql.add('from CGBJ_Main A ');
|
||||||
// sql.Add('inner join CGBJ_zb D on D.mainid=A.mainid ');
|
// 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('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.SQDate<''' + formatdatetime('yyyy-MM-dd', Enddate.datetime + 1) + ''' ');
|
||||||
// if cxtabControl1.TabIndex=0 then
|
// if cxtabControl1.TabIndex=0 then
|
||||||
// sql.Add('and A.ChkStatus=''0'' ');
|
// sql.Add('and A.ChkStatus=''0'' ');
|
||||||
// if CxtabControl1.TabIndex=1 then
|
// if CxtabControl1.TabIndex=1 then
|
||||||
// sql.Add('and A.ChkStatus=''1'' ');
|
// sql.Add('and A.ChkStatus=''1'' ');
|
||||||
if trim(Ftype)<>'高权限' then
|
if trim(Ftype) <> '高权限' then
|
||||||
begin
|
begin
|
||||||
sql.Add('and A.SQName='''+trim(DName)+'''');
|
sql.Add('and A.SQName=''' + trim(DName) + '''');
|
||||||
end;
|
end;
|
||||||
// ShowMessage(SQL.Text);
|
// ShowMessage(SQL.Text);
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,cds_Main);
|
SCreateCDS20(ADOQueryMain, cds_Main);
|
||||||
SInitCDSData20(ADOQueryMain,cds_Main);
|
SInitCDSData20(ADOQueryMain, cds_Main);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.FormCreate(Sender: TObject);
|
procedure TFrmCgBJList.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
cxGrid1.Align:=alclient;
|
cxGrid1.Align := alclient;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TCloseClick(Sender: TObject);
|
procedure TFrmCgBJList.TCloseClick(Sender: TObject);
|
||||||
|
|
@ -220,18 +232,18 @@ end;
|
||||||
procedure TFrmCgBJList.FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure TFrmCgBJList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
begin
|
begin
|
||||||
// writeCxGrid(self.Caption+tv1.Name,Tv1);
|
// writeCxGrid(self.Caption+tv1.Name,Tv1);
|
||||||
action:=cafree;
|
Action := cafree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TaddClick(Sender: TObject);
|
procedure TFrmCgBJList.TaddClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmCgBjPut:=TfrmCgBjPut.create(self);
|
frmCgBjPut := TfrmCgBjPut.create(self);
|
||||||
with frmCgBjPut do
|
with frmCgBjPut do
|
||||||
begin
|
begin
|
||||||
PState:=0;
|
PState := 0;
|
||||||
FMainId:='';
|
FMainId := '';
|
||||||
if showmodal=1 then
|
if showmodal = 1 then
|
||||||
begin
|
begin
|
||||||
initData();
|
initData();
|
||||||
end;
|
end;
|
||||||
|
|
@ -243,9 +255,9 @@ end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.FormShow(Sender: TObject);
|
procedure TFrmCgBJList.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ReadCxGrid(self.Caption+tv1.Name,Tv1);
|
ReadCxGrid(self.Caption + tv1.Name, Tv1);
|
||||||
begdate.datetime:=SGetServerDateTime(ADOQueryTmp)-7;
|
begdate.datetime := SGetServerDateTime(ADOQueryTmp) - 7;
|
||||||
enddate.datetime:=SGetServerDateTime(ADOQueryTmp);
|
enddate.datetime := SGetServerDateTime(ADOQueryTmp);
|
||||||
setStatus();
|
setStatus();
|
||||||
initdata();
|
initdata();
|
||||||
end;
|
end;
|
||||||
|
|
@ -282,12 +294,13 @@ begin
|
||||||
// end;
|
// end;
|
||||||
|
|
||||||
try
|
try
|
||||||
frmCgBjPut:=TfrmCgBjPut.create(self);
|
frmCgBjPut := TfrmCgBjPut.create(self);
|
||||||
with frmCgBjPut do
|
with frmCgBjPut do
|
||||||
begin
|
begin
|
||||||
PState:=1;
|
PState := 1;
|
||||||
FMainId:=Trim(Self.cds_Main.fieldbyname('MainId').AsString);;
|
FMainId := Trim(Self.cds_Main.fieldbyname('MainId').AsString);
|
||||||
if showmodal=1 then
|
;
|
||||||
|
if showmodal = 1 then
|
||||||
begin
|
begin
|
||||||
initData();
|
initData();
|
||||||
end;
|
end;
|
||||||
|
|
@ -309,30 +322,32 @@ end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TdelClick(Sender: TObject);
|
procedure TFrmCgBJList.TdelClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if cds_Main.IsEmpty then exit;
|
if cds_Main.IsEmpty then
|
||||||
if application.MessageBox('确定要删除吗?','提示',1)=2 then exit;
|
exit;
|
||||||
|
if application.MessageBox('确定要删除吗?', '提示', 1) = 2 then
|
||||||
|
exit;
|
||||||
try
|
try
|
||||||
with ADOQueryDel do
|
with ADOQueryDel do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('delete from CGBJ_Main ');
|
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('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('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;
|
execsql;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
application.messagebox('数据删除失败','提示',0);
|
application.messagebox('数据删除失败', '提示', 0);
|
||||||
end;
|
end;
|
||||||
initdata();
|
initdata();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.FormDestroy(Sender: TObject);
|
procedure TFrmCgBJList.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FrmCgBJList:=nil;
|
FrmCgBJList := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.cxTabControl1Change(Sender: TObject);
|
procedure TFrmCgBJList.cxTabControl1Change(Sender: TObject);
|
||||||
|
|
@ -343,26 +358,28 @@ end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TchkClick(Sender: TObject);
|
procedure TFrmCgBJList.TchkClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if cds_Main.IsEmpty then exit;
|
if cds_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
try
|
try
|
||||||
with ADOQueryTmp do
|
with ADOQueryTmp do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('update contract_Main_Sh set chkstatus=''1'',chktime=getdate(),chker='+quotedstr(trim(Dname)));
|
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(' where Mainid=''' + trim(cds_Main.fieldbyname('Mainid').asstring) + '''');
|
||||||
execsql;
|
execsql;
|
||||||
end;
|
end;
|
||||||
application.MessageBox('审核成功','提示');
|
application.MessageBox('审核成功', '提示');
|
||||||
initdata();
|
initdata();
|
||||||
except
|
except
|
||||||
application.messagebox('审核失败','提示');
|
application.messagebox('审核失败', '提示');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TNochkClick(Sender: TObject);
|
procedure TFrmCgBJList.TNochkClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if cds_Main.IsEmpty then exit;
|
if cds_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
try
|
try
|
||||||
{ with ADOQueryTmp do
|
{ with ADOQueryTmp do
|
||||||
begin
|
begin
|
||||||
|
|
@ -382,35 +399,36 @@ begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('update contract_Main_Sh set chkstatus=''0'',chktime=null,chker=null');
|
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;
|
execsql;
|
||||||
end;
|
end;
|
||||||
application.MessageBox('撤销成功','提示');
|
application.MessageBox('撤销成功', '提示');
|
||||||
initdata();
|
initdata();
|
||||||
except
|
except
|
||||||
application.MessageBox('撤销失败','提示');
|
application.MessageBox('撤销失败', '提示');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.PONoChange(Sender: TObject);
|
procedure TFrmCgBJList.PONoChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SDofilter(AdoQueryTmp,SGetFilters(Panel1,1,0));
|
SDofilter(AdoQueryTmp, SGetFilters(Panel1, 1, 0));
|
||||||
SCreateCDS20(AdoQueryTmp,cds_Main);
|
SCreateCDS20(AdoQueryTmp, cds_Main);
|
||||||
SInitCDSData20(AdoQueryTmp,cds_Main);
|
SInitCDSData20(AdoQueryTmp, cds_Main);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TglvClick(Sender: TObject);
|
procedure TFrmCgBJList.TglvClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SDofilter(AdoQueryTmp,SGetFilters(Panel1,1,0));
|
SDofilter(AdoQueryTmp, SGetFilters(Panel1, 1, 0));
|
||||||
SCreateCDS20(AdoQueryTmp,cds_Main);
|
SCreateCDS20(AdoQueryTmp, cds_Main);
|
||||||
SInitCDSData20(AdoQueryTmp,cds_Main);
|
SInitCDSData20(AdoQueryTmp, cds_Main);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TPrintClick(Sender: TObject);
|
procedure TFrmCgBJList.TPrintClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile:string;
|
fPrintFile: string;
|
||||||
begin
|
begin
|
||||||
if cds_Main.IsEmpty then exit;
|
if cds_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
with ADOQueryPrint do
|
with ADOQueryPrint do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
|
|
@ -421,7 +439,7 @@ begin
|
||||||
// sql.Add(' left join CGBJ_ZB D on D.mainID=A.Mainid ');
|
// 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('inner join CGBJ_ZB D on D.Mainid=A.Mainid ');
|
||||||
// sql.Add('left join JYOrderFy_Other C on C.OrderNo=A.FYNO ');
|
// 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);
|
// ShowMessage(SQL.Text);
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
|
|
@ -430,24 +448,23 @@ begin
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.clear;
|
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;
|
open;
|
||||||
end;
|
end;
|
||||||
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\采购报价表.rmf' ;
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\采购报价表.rmf';
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
RM1.LoadFromFile(fPrintFile);
|
RM1.LoadFromFile(fPrintFile);
|
||||||
RM1.ShowReport;
|
RM1.ShowReport;
|
||||||
end else
|
end
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
Application.MessageBox(PChar('没有找'+trim(fPrintFile)),'提示',0);
|
Application.MessageBox(PChar('没有找' + trim(fPrintFile)), '提示', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmCgBJList.TV1CellClick(Sender: TcxCustomGridTableView;
|
procedure TFrmCgBJList.TV1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
|
||||||
AShift: TShiftState; var AHandled: Boolean);
|
|
||||||
begin
|
begin
|
||||||
initsub();
|
initsub();
|
||||||
end;
|
end;
|
||||||
|
|
@ -462,17 +479,17 @@ begin
|
||||||
// free;
|
// free;
|
||||||
// end;
|
// end;
|
||||||
|
|
||||||
frmCgBjPut:=TfrmCgBjPut.create(self);
|
frmCgBjPut := TfrmCgBjPut.create(self);
|
||||||
with frmCgBjPut do
|
with frmCgBjPut do
|
||||||
|
begin
|
||||||
|
PState := 1;
|
||||||
|
CopyInt := 99;
|
||||||
|
FMainId := Trim(Self.cds_Main.fieldbyname('MainId').AsString);
|
||||||
|
if showmodal = 1 then
|
||||||
begin
|
begin
|
||||||
PState := 1;
|
initData();
|
||||||
CopyInt := 99;
|
|
||||||
FMainId := Trim(Self.cds_Main.fieldbyname('MainId').AsString);
|
|
||||||
if showmodal=1 then
|
|
||||||
begin
|
|
||||||
initData();
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -480,22 +497,23 @@ procedure TFrmCgBJList.ordernoChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select A.* ');
|
sql.Add('select A.* ');
|
||||||
sql.add('from CGBJ_Main A ');
|
sql.add('from CGBJ_Main A ');
|
||||||
sql.Add('where A.SQDate>='''+formatdatetime('yyyy-MM-dd',begdate.datetime)+''' ' );
|
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.SQDate<''' + formatdatetime('yyyy-MM-dd', Enddate.datetime + 1) + ''' ');
|
||||||
sql.Add('and A.orderno like '''+'%'+Trim(OrderNo.Text)+'%'+''' ');
|
sql.Add('and A.orderno like ''' + '%' + Trim(OrderNo.Text) + '%' + ''' ');
|
||||||
if trim(Ftype)<>'高权限' then
|
if trim(Ftype) <> '高权限' then
|
||||||
begin
|
begin
|
||||||
sql.Add('and A.SQName='''+trim(DName)+'''');
|
sql.Add('and A.SQName=''' + trim(DName) + '''');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
open;
|
open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,cds_Main);
|
SCreateCDS20(ADOQueryMain, cds_Main);
|
||||||
SInitCDSData20(ADOQueryMain,cds_Main);
|
SInitCDSData20(ADOQueryMain, cds_Main);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmProductOrderNewList: TfrmProductOrderNewList
|
object frmProductOrderNewList: TfrmProductOrderNewList
|
||||||
Left = 145
|
Left = 241
|
||||||
Top = 196
|
Top = 195
|
||||||
Width = 1378
|
Width = 1378
|
||||||
Height = 753
|
Height = 753
|
||||||
Caption = #29983#20135#25351#31034#21333
|
Caption = #29983#20135#25351#31034#21333
|
||||||
|
|
@ -534,6 +534,12 @@ object frmProductOrderNewList: TfrmProductOrderNewList
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 60
|
Width = 60
|
||||||
end
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'CustomerNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ type
|
||||||
TWc: TToolButton;
|
TWc: TToolButton;
|
||||||
TCxwc: TToolButton;
|
TCxwc: TToolButton;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: 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);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmProductOrderNewList_JD10: TfrmProductOrderNewList_JD10
|
object frmProductOrderNewList_JD10: TfrmProductOrderNewList_JD10
|
||||||
Left = 704
|
Left = 392
|
||||||
Top = 329
|
Top = 310
|
||||||
Width = 1382
|
Width = 1382
|
||||||
Height = 754
|
Height = 754
|
||||||
Caption = #29983#20135#25351#31034#21333
|
Caption = #29983#20135#25351#31034#21333
|
||||||
|
|
@ -866,6 +866,12 @@ object frmProductOrderNewList_JD10: TfrmProductOrderNewList_JD10
|
||||||
Styles.Header = DataLink_TradeManage.Default
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
Width = 94
|
Width = 94
|
||||||
end
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'CustomerNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
object v1MPRTCodeName: TcxGridDBColumn
|
object v1MPRTCodeName: TcxGridDBColumn
|
||||||
Caption = #21697#21517
|
Caption = #21697#21517
|
||||||
DataBinding.FieldName = 'MPRTCodeName'
|
DataBinding.FieldName = 'MPRTCodeName'
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,21 @@ uses
|
||||||
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxPC, cxCurrencyEdit,
|
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxPC, cxCurrencyEdit,
|
||||||
Mask, DBCtrls, cxContainer, cxTextEdit, cxDBEdit, cxLookAndFeels,
|
Mask, DBCtrls, cxContainer, cxTextEdit, cxDBEdit, cxLookAndFeels,
|
||||||
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu;
|
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
|
type
|
||||||
TfrmProductOrderNewList_JD10 = class(TForm)
|
TfrmProductOrderNewList_JD10 = class(TForm)
|
||||||
|
|
@ -274,6 +288,7 @@ type
|
||||||
DBEdit43: TDBEdit;
|
DBEdit43: TDBEdit;
|
||||||
DBEdit44: TDBEdit;
|
DBEdit44: TDBEdit;
|
||||||
v1Column44: TcxGridDBColumn;
|
v1Column44: TcxGridDBColumn;
|
||||||
|
Tv1Column1: 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);
|
||||||
|
|
@ -480,7 +495,7 @@ begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Filtered := False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
|
|
@ -497,7 +512,7 @@ begin
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
TBFind.Click;
|
TBFind.Click;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmProductOrderNewList_JD10.InitGridFH();
|
procedure TfrmProductOrderNewList_JD10.InitGridFH();
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -325,24 +325,24 @@ begin
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from CGBJ_Main where PBName=''' + Trim(PBName.Text) + '''');
|
sql.Add('select * from CGBJ_Main where PBName=''' + Trim(PBName.Text) + ''' and orderno=''' + Trim(orderno.Text) + '''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOCmd.RecordCount > 1 then
|
if ADOCmd.RecordCount > 1 then
|
||||||
begin
|
begin
|
||||||
ADOCmd.Connection.RollbackTrans;
|
ADOCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('坯布名称重复!', '提示', 0);
|
Application.MessageBox('订单号坯布名称重复!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
FMainId := Trim(maxNo);
|
FMainId := Trim(maxNo);
|
||||||
|
|
||||||
// if PState = 0 then
|
// if PState = 0 then
|
||||||
// begin
|
// begin
|
||||||
// ffacction := '寧刻데劤藤';
|
// ffacction := '寧刻데劤藤';
|
||||||
// OpEvent:=trim('寧刻데뵀:' + Trim(OrderNo.Text));
|
// OpEvent:=trim('寧刻데뵀:' + Trim(OrderNo.Text));
|
||||||
// end
|
// end
|
||||||
// else
|
// else
|
||||||
// begin
|
// begin
|
||||||
// ffacction := '寧刻데錦맣';
|
// ffacction := '寧刻데錦맣';
|
||||||
// OpEvent:=OpEvent+trim('錦맣빈寧刻데뵀:' + Trim(OrderNo.Text));
|
// OpEvent:=OpEvent+trim('錦맣빈寧刻데뵀:' + Trim(OrderNo.Text));
|
||||||
// end;
|
// end;
|
||||||
|
|
@ -883,9 +883,9 @@ begin
|
||||||
end;
|
end;
|
||||||
EnableControls;
|
EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
except
|
except
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PBPrice.Text := FloatToStr((sumPrice) + StrToFloatDef(Trim(JGPrice.Text), 0));
|
PBPrice.Text := FloatToStr((sumPrice) + StrToFloatDef(Trim(JGPrice.Text), 0));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user