新建3-04
This commit is contained in:
commit
8452f471f5
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
**/layout
|
||||
**/report
|
||||
**/report10
|
||||
**/实施文件
|
||||
**/image
|
||||
**/doc
|
||||
**/wav
|
||||
**/__history
|
||||
**/__recovery
|
||||
*.dll
|
||||
*.exe
|
||||
*.rmf
|
||||
*.ddp
|
||||
*.dcu
|
||||
*.~pas
|
||||
*.~dfm
|
||||
*.~ddp
|
||||
*.~dpr
|
||||
317
BI(BIView.dll)/AES.pas
Normal file
317
BI(BIView.dll)/AES.pas
Normal file
|
|
@ -0,0 +1,317 @@
|
|||
(**************************************************)
|
||||
|
||||
unit AES;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Math, ElAES;
|
||||
|
||||
type
|
||||
TKeyBit = (kb128, kb192, kb256);
|
||||
|
||||
function StrToHex(Value: string): string;
|
||||
function HexToStr(Value: string): string;
|
||||
function EncryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
function DecryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
function EncryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
function DecryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
procedure EncryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
procedure DecryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
|
||||
implementation
|
||||
|
||||
function StrToHex(Value: string): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := 1 to Length(Value) do
|
||||
Result := Result + IntToHex(Ord(Value[I]), 2);
|
||||
end;
|
||||
|
||||
function HexToStr(Value: string): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := 1 to Length(Value) do
|
||||
begin
|
||||
if ((I mod 2) = 1) then
|
||||
Result := Result + Chr(StrToInt('0x'+ Copy(Value, I, 2)));
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 字符串加密函数 默认按照 128 位密匙加密 -- }
|
||||
function EncryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
var
|
||||
SS, DS: TStringStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
Result := '';
|
||||
SS := TStringStream.Create(Value);
|
||||
DS := TStringStream.Create('');
|
||||
try
|
||||
Size := SS.Size;
|
||||
DS.WriteBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey128, DS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey192, DS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey256, DS);
|
||||
end;
|
||||
Result := StrToHex(DS.DataString);
|
||||
finally
|
||||
SS.Free;
|
||||
DS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 字符串解密函数 默认按照 128 位密匙解密 -- }
|
||||
function DecryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
var
|
||||
SS, DS: TStringStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
Result := '';
|
||||
SS := TStringStream.Create(HexToStr(Value));
|
||||
DS := TStringStream.Create('');
|
||||
try
|
||||
Size := SS.Size;
|
||||
SS.ReadBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey128, DS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey192, DS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey256, DS);
|
||||
end;
|
||||
Result := DS.DataString;
|
||||
finally
|
||||
SS.Free;
|
||||
DS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 流加密函数 默认按照 128 位密匙解密 -- }
|
||||
function EncryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
var
|
||||
Count: Int64;
|
||||
OutStrm: TStream;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
OutStrm := TStream.Create;
|
||||
Stream.Position := 0;
|
||||
Count := Stream.Size;
|
||||
OutStrm.Write(Count, SizeOf(Count));
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey128, OutStrm);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey192, OutStrm);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey256, OutStrm);
|
||||
end;
|
||||
Result := OutStrm;
|
||||
finally
|
||||
OutStrm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 流解密函数 默认按照 128 位密匙解密 -- }
|
||||
function DecryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
var
|
||||
Count, OutPos: Int64;
|
||||
OutStrm: TStream;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
OutStrm := TStream.Create;
|
||||
Stream.Position := 0;
|
||||
OutPos :=OutStrm.Position;
|
||||
Stream.ReadBuffer(Count, SizeOf(Count));
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey128, OutStrm);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey192, OutStrm);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey256, OutStrm);
|
||||
end;
|
||||
OutStrm.Size := OutPos + Count;
|
||||
OutStrm.Position := OutPos;
|
||||
Result := OutStrm;
|
||||
finally
|
||||
OutStrm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 文件加密函数 默认按照 128 位密匙解密 -- }
|
||||
procedure EncryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
var
|
||||
SFS, DFS: TFileStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
SFS := TFileStream.Create(SourceFile, fmOpenRead);
|
||||
try
|
||||
DFS := TFileStream.Create(DestFile, fmCreate);
|
||||
try
|
||||
Size := SFS.Size;
|
||||
DFS.WriteBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey128, DFS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey192, DFS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey256, DFS);
|
||||
end;
|
||||
finally
|
||||
DFS.Free;
|
||||
end;
|
||||
finally
|
||||
SFS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 文件解密函数 默认按照 128 位密匙解密 -- }
|
||||
procedure DecryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
var
|
||||
SFS, DFS: TFileStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
SFS := TFileStream.Create(SourceFile, fmOpenRead);
|
||||
try
|
||||
SFS.ReadBuffer(Size, SizeOf(Size));
|
||||
DFS := TFileStream.Create(DestFile, fmCreate);
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey128, DFS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey192, DFS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey256, DFS);
|
||||
end;
|
||||
DFS.Size := Size;
|
||||
finally
|
||||
DFS.Free;
|
||||
end;
|
||||
finally
|
||||
SFS.Free;
|
||||
end;
|
||||
end;
|
||||
end.
|
||||
42
BI(BIView.dll)/BIView.cfg
Normal file
42
BI(BIView.dll)/BIView.cfg
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J-
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T-
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-U"D:\말繫ERP"
|
||||
-O"D:\말繫ERP"
|
||||
-I"D:\말繫ERP"
|
||||
-R"D:\말繫ERP"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
138
BI(BIView.dll)/BIView.dof
Normal file
138
BI(BIView.dll)/BIView.dof
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
[FileVersion]
|
||||
Version=7.0
|
||||
[Compiler]
|
||||
A=8
|
||||
B=0
|
||||
C=1
|
||||
D=1
|
||||
E=0
|
||||
F=0
|
||||
G=1
|
||||
H=1
|
||||
I=1
|
||||
J=0
|
||||
K=0
|
||||
L=1
|
||||
M=0
|
||||
N=1
|
||||
O=1
|
||||
P=1
|
||||
Q=0
|
||||
R=0
|
||||
S=0
|
||||
T=0
|
||||
U=0
|
||||
V=1
|
||||
W=0
|
||||
X=1
|
||||
Y=1
|
||||
Z=1
|
||||
ShowHints=1
|
||||
ShowWarnings=1
|
||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
NamespacePrefix=
|
||||
SymbolDeprecated=1
|
||||
SymbolLibrary=1
|
||||
SymbolPlatform=1
|
||||
UnitLibrary=1
|
||||
UnitPlatform=1
|
||||
UnitDeprecated=1
|
||||
HResultCompat=1
|
||||
HidingMember=1
|
||||
HiddenVirtual=1
|
||||
Garbage=1
|
||||
BoundsError=1
|
||||
ZeroNilCompat=1
|
||||
StringConstTruncated=1
|
||||
ForLoopVarVarPar=1
|
||||
TypedConstVarPar=1
|
||||
AsgToTypedConst=1
|
||||
CaseLabelRange=1
|
||||
ForVariable=1
|
||||
ConstructingAbstract=1
|
||||
ComparisonFalse=1
|
||||
ComparisonTrue=1
|
||||
ComparingSignedUnsigned=1
|
||||
CombiningSignedUnsigned=1
|
||||
UnsupportedConstruct=1
|
||||
FileOpen=1
|
||||
FileOpenUnitSrc=1
|
||||
BadGlobalSymbol=1
|
||||
DuplicateConstructorDestructor=1
|
||||
InvalidDirective=1
|
||||
PackageNoLink=1
|
||||
PackageThreadVar=1
|
||||
ImplicitImport=1
|
||||
HPPEMITIgnored=1
|
||||
NoRetVal=1
|
||||
UseBeforeDef=1
|
||||
ForLoopVarUndef=1
|
||||
UnitNameMismatch=1
|
||||
NoCFGFileFound=1
|
||||
MessageDirective=1
|
||||
ImplicitVariants=1
|
||||
UnicodeToLocale=1
|
||||
LocaleToUnicode=1
|
||||
ImagebaseMultiple=1
|
||||
SuspiciousTypecast=1
|
||||
PrivatePropAccessor=1
|
||||
UnsafeType=0
|
||||
UnsafeCode=0
|
||||
UnsafeCast=0
|
||||
[Linker]
|
||||
MapFile=0
|
||||
OutputObjs=0
|
||||
ConsoleApp=1
|
||||
DebugInfo=0
|
||||
RemoteSymbols=0
|
||||
MinStackSize=16384
|
||||
MaxStackSize=1048576
|
||||
ImageBase=4194304
|
||||
ExeDescription=
|
||||
[Directories]
|
||||
OutputDir=
|
||||
UnitOutputDir=
|
||||
PackageDLLOutputDir=
|
||||
PackageDCPOutputDir=
|
||||
SearchPath=D:\富通ERP
|
||||
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\马国钢开发代码\项目代码\D7gmYongjin\BI(BIView.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||
68
BI(BIView.dll)/BIView.dpr
Normal file
68
BI(BIView.dll)/BIView.dpr
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
library BIView;
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_RTFun in '..\..\..\RTFunAndForm\Fun\U_RTFun.pas',
|
||||
U_ModuleNote in 'U_ModuleNote.pas' {frmModuleNote},
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_BIView: TDataModule},
|
||||
U_ZDYHelpSel in 'U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||
U_iniParam in 'U_iniParam.pas',
|
||||
U_ZDYHelp in 'U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
|
||||
U_SelExportField in '..\..\..\ThreeFun\Fun\U_SelExportField.pas' {frmSelExportField},
|
||||
U_ColumnSet in '..\..\..\ThreeFun\Form\U_ColumnSet.pas' {frmColumnSet},
|
||||
U_ColumnBandSet in '..\..\..\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
|
||||
U_SelPrintFieldNew in '..\..\..\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||
U_SysLogHelp in '..\..\..\ThreeFun\Form\U_SysLogHelp.pas' {frmSysLogHelp},
|
||||
U_DDDJJHMXGang in 'U_DDDJJHMXGang.pas' {frmDDDJJHMXGang},
|
||||
U_JYFTopMX in 'U_JYFTopMX.pas' {frmJYFTopMX},
|
||||
U_DCCarMX_Worker in 'U_DCCarMX_Worker.pas' {frmDCCarMX_Worker},
|
||||
U_BIHZList in 'U_BIHZList.pas' {frmBIHZList},
|
||||
U_PBNameDayQtyList in 'U_PBNameDayQtyList.pas' {frmPBNameDayQtyList},
|
||||
U_OrderHSInPutTS in 'U_OrderHSInPutTS.pas' {frmOrderHSInPutTS},
|
||||
U_OrderHSList in 'U_OrderHSList.pas' {frmOrderHSList},
|
||||
U_ContractListSel in 'U_ContractListSel.pas' {frmContractListSel},
|
||||
U_FjList in 'U_FjList.pas' {frmFjList},
|
||||
U_DeptType in 'U_DeptType.pas' {frmDeptType},
|
||||
U_BXListChk in 'U_BXListChk.pas' {frmBXListChk},
|
||||
U_DCTimeZhou in 'U_DCTimeZhou.pas' {frmDCTimeZhou},
|
||||
U_purview in 'U_purview.pas' {frmpurviewDL},
|
||||
U_User in 'U_User.pas' {frmUser};
|
||||
|
||||
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
||||
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
||||
// U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField},
|
||||
// U_SelPrintFieldNew in '..\..\SelfForm\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||
//U_FormPas in '..\CommonPas\formPas\U_FormPas.pas',
|
||||
//U_CxGridSet in '..\CommonPas\cxgridPas\U_CxGridSet.pas';
|
||||
|
||||
//U_RSFormPas in '..\CommonPas\RSCommon\U_RSFormPas.pas';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;
|
||||
begin
|
||||
DLLProc := @DLLEnterPoint;
|
||||
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||
end;
|
||||
|
||||
procedure DLLUnloadProc(Reason: Integer); register;
|
||||
begin
|
||||
|
||||
end;
|
||||
exports
|
||||
GetDllForm;
|
||||
begin
|
||||
try
|
||||
NewDllApp:=Application;
|
||||
DLLProc := @DLLUnloadProc;
|
||||
except
|
||||
|
||||
end;
|
||||
end.
|
||||
|
||||
BIN
BI(BIView.dll)/BIView.res
Normal file
BIN
BI(BIView.dll)/BIView.res
Normal file
Binary file not shown.
3
BI(BIView.dll)/Desktop.ini
Normal file
3
BI(BIView.dll)/Desktop.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[.ShellClassInfo]
|
||||
IconFile=C:\Program Files (x86)\360\360WangPan\new_desktop_win7.ico
|
||||
IconIndex=0
|
||||
2488
BI(BIView.dll)/ElAES.pas
Normal file
2488
BI(BIView.dll)/ElAES.pas
Normal file
File diff suppressed because it is too large
Load Diff
2
BI(BIView.dll)/FieldExportSet/订单核算列表.INI
Normal file
2
BI(BIView.dll)/FieldExportSet/订单核算列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/订单号
|
||||
4
BI(BIView.dll)/File.INI
Normal file
4
BI(BIView.dll)/File.INI
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=99
|
||||
成品DLL文件=CYZZ.dll
|
||||
成品DLL调用号=11
|
||||
7
BI(BIView.dll)/FileHelp.ini
Normal file
7
BI(BIView.dll)/FileHelp.ini
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[FILEPATH]
|
||||
FileClass=YP,AA,BB,HT
|
||||
YP=D:\YP
|
||||
AA=D:\AA
|
||||
BB=D:\BB
|
||||
HT=D:\HT
|
||||
OTHER=D:\OTHER
|
||||
7
BI(BIView.dll)/JCYData.INI
Normal file
7
BI(BIView.dll)/JCYData.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com1
|
||||
波特率=9600
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
7
BI(BIView.dll)/JZCRS323C.INI
Normal file
7
BI(BIView.dll)/JZCRS323C.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com2
|
||||
波特率=1200
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
0
BI(BIView.dll)/JZCRS323CList.txt
Normal file
0
BI(BIView.dll)/JZCRS323CList.txt
Normal file
23
BI(BIView.dll)/ProjectGroup1.bpg
Normal file
23
BI(BIView.dll)/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#------------------------------------------------------------------------------
|
||||
VERSION = BWS.01
|
||||
#------------------------------------------------------------------------------
|
||||
!ifndef ROOT
|
||||
ROOT = $(MAKEDIR)\..
|
||||
!endif
|
||||
#------------------------------------------------------------------------------
|
||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||
#------------------------------------------------------------------------------
|
||||
PROJECTS = testDll.exe ProductPrice.dll
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
testDll.exe: testDll.dpr
|
||||
$(DCC)
|
||||
|
||||
ProductPrice.dll: ProductPrice.dpr
|
||||
$(DCC)
|
||||
|
||||
|
||||
5
BI(BIView.dll)/SYSTEMSET.ini
Normal file
5
BI(BIView.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[SERVER]
|
||||
服务器地址=139.196.189.214
|
||||
服务器地址类型=176
|
||||
是否自动更新=1
|
||||
软件名称=涌金管理软件
|
||||
792
BI(BIView.dll)/U_BIHZList.dfm
Normal file
792
BI(BIView.dll)/U_BIHZList.dfm
Normal file
|
|
@ -0,0 +1,792 @@
|
|||
object frmBIHZList: TfrmBIHZList
|
||||
Left = 117
|
||||
Top = 66
|
||||
Width = 1737
|
||||
Height = 920
|
||||
Caption = #25968#25454#22823#38598#21512
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1719
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 65
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 69
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 138
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1719
|
||||
Height = 49
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 25
|
||||
Top = 16
|
||||
Width = 32
|
||||
Height = 15
|
||||
Caption = #24180#20221
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object begdate10: TDateTimePicker
|
||||
Left = 59
|
||||
Top = 11
|
||||
Width = 76
|
||||
Height = 23
|
||||
Date = 41256.918237847230000000
|
||||
Format = 'yyyy'
|
||||
Time = 41256.918237847230000000
|
||||
TabOrder = 0
|
||||
OnChange = begdate10Change
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 80
|
||||
Width = 1719
|
||||
Height = 377
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBBandedTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DS_FP
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column14
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column15
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column16
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column18
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = cxStyle1
|
||||
Styles.IncSearch = cxStyle1
|
||||
Styles.Selection = cxStyle1
|
||||
Bands = <
|
||||
item
|
||||
Caption = #24180#20221
|
||||
Styles.Header = cxStyle2
|
||||
Width = 96
|
||||
end
|
||||
item
|
||||
Caption = #20179#24211
|
||||
Width = 342
|
||||
end
|
||||
item
|
||||
Caption = #26579#21378
|
||||
Width = 252
|
||||
end
|
||||
item
|
||||
Caption = #22278#26426#21378
|
||||
Width = 354
|
||||
end
|
||||
item
|
||||
Caption = #21152#24377#21378
|
||||
Width = 434
|
||||
end>
|
||||
object Tv1Column1: TcxGridDBBandedColumn
|
||||
Caption = #26376#20221
|
||||
DataBinding.FieldName = 'FMonth'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Position.BandIndex = 0
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column2: TcxGridDBBandedColumn
|
||||
Caption = #21407#19997#35745#21010
|
||||
DataBinding.FieldName = 'JTSJH'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 69
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column3: TcxGridDBBandedColumn
|
||||
Caption = #21407#19997#21040#36135
|
||||
DataBinding.FieldName = 'JTSDH'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 70
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column4: TcxGridDBBandedColumn
|
||||
Caption = #29983#20135
|
||||
DataBinding.FieldName = 'JTSRK'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 66
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 3
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column5: TcxGridDBBandedColumn
|
||||
Caption = #20986#24211
|
||||
DataBinding.FieldName = 'JTSCK'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 72
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 4
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column6: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'JTSKC'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 87
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 5
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column7: TcxGridDBBandedColumn
|
||||
Caption = #21407#19997#26410#21040
|
||||
DataBinding.FieldName = 'JTSWD'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 70
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column8: TcxGridDBBandedColumn
|
||||
Caption = #29983#20135
|
||||
DataBinding.FieldName = 'YJRK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 99
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column9: TcxGridDBBandedColumn
|
||||
Caption = #20986#24211
|
||||
DataBinding.FieldName = 'YJCK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 85
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column10: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'YJKC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 80
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 3
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column11: TcxGridDBBandedColumn
|
||||
Caption = #25910#36135
|
||||
DataBinding.FieldName = 'RCRK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaBottom
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 86
|
||||
Position.BandIndex = 2
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column12: TcxGridDBBandedColumn
|
||||
Caption = #21457#36135
|
||||
DataBinding.FieldName = 'RCCK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaBottom
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 84
|
||||
Position.BandIndex = 2
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column13: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'RCKC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaBottom
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 82
|
||||
Position.BandIndex = 2
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column14: TcxGridDBBandedColumn
|
||||
Caption = #24320#21345
|
||||
DataBinding.FieldName = 'CKKK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 87
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column15: TcxGridDBBandedColumn
|
||||
Caption = #25171#21367
|
||||
DataBinding.FieldName = 'CKRK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 86
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column16: TcxGridDBBandedColumn
|
||||
Caption = #20986#36135
|
||||
DataBinding.FieldName = 'CKCK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 86
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column17: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'CKKC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 83
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 3
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object Tv1Column18: TcxGridDBBandedColumn
|
||||
Caption = #29983#20135#21152#24037#36153
|
||||
DataBinding.FieldName = 'YJJGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 600
|
||||
Top = 260
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 457
|
||||
Width = 1719
|
||||
Height = 416
|
||||
Align = alClient
|
||||
TabOrder = 4
|
||||
object Tv2: TcxGridDBBandedTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn14
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn15
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn16
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBBandedColumn18
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Bands = <
|
||||
item
|
||||
Caption = #24180#20221
|
||||
Styles.Header = cxStyle2
|
||||
Width = 96
|
||||
end
|
||||
item
|
||||
Caption = #20179#24211
|
||||
Width = 342
|
||||
end
|
||||
item
|
||||
Caption = #26579#21378
|
||||
Width = 252
|
||||
end
|
||||
item
|
||||
Caption = #22278#26426#21378
|
||||
Width = 354
|
||||
end
|
||||
item
|
||||
Caption = #21152#24377#21378
|
||||
Width = 434
|
||||
end>
|
||||
object cxGridDBBandedColumn1: TcxGridDBBandedColumn
|
||||
Caption = #26376#20221
|
||||
DataBinding.FieldName = 'FMonth'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Position.BandIndex = 0
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn2: TcxGridDBBandedColumn
|
||||
Caption = #21407#19997#35745#21010
|
||||
DataBinding.FieldName = 'JTSJH'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 69
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn3: TcxGridDBBandedColumn
|
||||
Caption = #21407#19997#21040#36135
|
||||
DataBinding.FieldName = 'JTSDH'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 70
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn4: TcxGridDBBandedColumn
|
||||
Caption = #29983#20135
|
||||
DataBinding.FieldName = 'JTSRK'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 66
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 3
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn5: TcxGridDBBandedColumn
|
||||
Caption = #20986#24211
|
||||
DataBinding.FieldName = 'JTSCK'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 72
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 4
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn6: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'JTSKC'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 87
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 5
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn7: TcxGridDBBandedColumn
|
||||
Caption = #21407#19997#26410#21040
|
||||
DataBinding.FieldName = 'JTSWD'
|
||||
GroupSummaryAlignment = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 70
|
||||
Position.BandIndex = 4
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn8: TcxGridDBBandedColumn
|
||||
Caption = #29983#20135
|
||||
DataBinding.FieldName = 'YJRK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 99
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn9: TcxGridDBBandedColumn
|
||||
Caption = #20986#24211
|
||||
DataBinding.FieldName = 'YJCK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 85
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn10: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'YJKC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 80
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 3
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn11: TcxGridDBBandedColumn
|
||||
Caption = #25910#36135
|
||||
DataBinding.FieldName = 'RCRK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaBottom
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 86
|
||||
Position.BandIndex = 2
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn12: TcxGridDBBandedColumn
|
||||
Caption = #21457#36135
|
||||
DataBinding.FieldName = 'RCCK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaBottom
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 84
|
||||
Position.BandIndex = 2
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn13: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'RCKC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaBottom
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 82
|
||||
Position.BandIndex = 2
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn14: TcxGridDBBandedColumn
|
||||
Caption = #24320#21345
|
||||
DataBinding.FieldName = 'CKKK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 87
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn15: TcxGridDBBandedColumn
|
||||
Caption = #25171#21367
|
||||
DataBinding.FieldName = 'CKRK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 86
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn16: TcxGridDBBandedColumn
|
||||
Caption = #20986#36135
|
||||
DataBinding.FieldName = 'CKCK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 86
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 2
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn17: TcxGridDBBandedColumn
|
||||
Caption = #24211#23384
|
||||
DataBinding.FieldName = 'CKKC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Moving = False
|
||||
Width = 83
|
||||
Position.BandIndex = 1
|
||||
Position.ColIndex = 3
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
object cxGridDBBandedColumn18: TcxGridDBBandedColumn
|
||||
Caption = #29983#20135#21152#24037#36153
|
||||
DataBinding.FieldName = 'YJJGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
Position.BandIndex = 3
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 531
|
||||
Top = 195
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 616
|
||||
Top = 195
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 293
|
||||
Top = 233
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 528
|
||||
Top = 256
|
||||
end
|
||||
object DS_FP: TDataSource
|
||||
DataSet = CDS_FP
|
||||
Left = 443
|
||||
Top = 243
|
||||
end
|
||||
object CDS_FP: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 472
|
||||
Top = 192
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 528
|
||||
Top = 224
|
||||
PixelsPerInch = 120
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svColor, svFont, svTextColor]
|
||||
Color = clYellow
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
TextColor = clBlack
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 368
|
||||
Top = 280
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
end
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 787
|
||||
Top = 619
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 568
|
||||
end
|
||||
object cxStyleRepository2: TcxStyleRepository
|
||||
PixelsPerInch = 120
|
||||
object cxStyle2: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
end
|
||||
255
BI(BIView.dll)/U_BIHZList.pas
Normal file
255
BI(BIView.dll)/U_BIHZList.pas
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
unit U_BIHZList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDropDownEdit, cxPC, RM_e_Xls, Menus, ComObj,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxGridBandedTableView,
|
||||
cxGridDBBandedTableView;
|
||||
|
||||
type
|
||||
FdDy = record
|
||||
inc: integer; //客户端套接字句柄
|
||||
FDdys: string[32]; //客户端套接字
|
||||
FdDysName: string[32]; //客户端套接字
|
||||
end;
|
||||
|
||||
TfrmBIHZList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
Label2: TLabel;
|
||||
begdate10: TDateTimePicker;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_FP: TDataSource;
|
||||
CDS_FP: TClientDataSet;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBBandedTableView;
|
||||
Tv1Column1: TcxGridDBBandedColumn;
|
||||
Tv1Column2: TcxGridDBBandedColumn;
|
||||
Tv1Column3: TcxGridDBBandedColumn;
|
||||
Tv1Column4: TcxGridDBBandedColumn;
|
||||
Tv1Column5: TcxGridDBBandedColumn;
|
||||
Tv1Column6: TcxGridDBBandedColumn;
|
||||
Tv1Column7: TcxGridDBBandedColumn;
|
||||
Panel10: TPanel;
|
||||
Tv1Column8: TcxGridDBBandedColumn;
|
||||
Tv1Column9: TcxGridDBBandedColumn;
|
||||
Tv1Column10: TcxGridDBBandedColumn;
|
||||
Tv1Column11: TcxGridDBBandedColumn;
|
||||
Tv1Column12: TcxGridDBBandedColumn;
|
||||
Tv1Column13: TcxGridDBBandedColumn;
|
||||
Tv1Column14: TcxGridDBBandedColumn;
|
||||
Tv1Column15: TcxGridDBBandedColumn;
|
||||
Tv1Column16: TcxGridDBBandedColumn;
|
||||
Tv1Column17: TcxGridDBBandedColumn;
|
||||
Tv1Column18: TcxGridDBBandedColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBBandedTableView;
|
||||
cxGridDBBandedColumn1: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn2: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn3: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn4: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn5: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn6: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn7: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn8: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn9: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn10: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn11: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn12: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn13: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn14: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn15: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn16: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn17: TcxGridDBBandedColumn;
|
||||
cxGridDBBandedColumn18: TcxGridDBBandedColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxStyleRepository2: TcxStyleRepository;
|
||||
cxStyle2: TcxStyle;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure begdate10Change(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBIHZList: TfrmBIHZList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
|
||||
procedure TfrmBIHZList.InitGrid();
|
||||
var
|
||||
QYear:string;
|
||||
begin
|
||||
try
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' exec P_BI_HZ :begdate');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(formatdatetime('yyyy', begdate10.datetime));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_FP);
|
||||
SInitCDSData20(ADOQueryMain, CDS_FP);
|
||||
QYear:=IntToStr(StrToInt(Trim(formatdatetime('yyyy', begdate10.datetime)))-1);
|
||||
Tv2.Bands[0].Caption:=QYear+'年';
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' exec P_BI_HZ :begdate');
|
||||
Parameters.ParamByName('begdate').Value:=QYear;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
finally
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBIHZList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxBandedGrid('BIHZMonth', Tv1, 'BI');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxBandedGrid('BIHZMonth', Tv1, 'BI');
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
begdate10.SetFocus;
|
||||
Panel10.Visible:=True;
|
||||
Panel10.Refresh;
|
||||
InitGrid();
|
||||
Panel10.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxgrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
{if CDS_FP.IsEmpty then Exit;
|
||||
if CDS_FP.fieldbyname('InvoiceNo').AsInteger=-1 then
|
||||
begin
|
||||
frmXJBXInPut := TfrmXJBXInPut.Create(self);
|
||||
with frmXJBXInPut do
|
||||
begin
|
||||
InvoiceNo.Enabled := False;
|
||||
FInvoiceNo := trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||
ToolBar2.Visible:=False;
|
||||
frmXJBXInPut.TSave.Visible:=False;
|
||||
if showmodal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear:string;
|
||||
FMonth:string;
|
||||
FDate:TDate;
|
||||
begin
|
||||
FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate10.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
end else
|
||||
begin
|
||||
BegDate10.Date:=StrToDate(FYear+'-02-01');
|
||||
end;
|
||||
Tv1.Bands[0].Caption:=Trim(FormatDateTime('yyyy',begdate10.Date))+'年';
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.begdate10Change(Sender: TObject);
|
||||
begin
|
||||
Tv1.Bands[0].Caption:=Trim(FormatDateTime('yyyy',begdate10.Date))+'年';
|
||||
end;
|
||||
|
||||
procedure TfrmBIHZList.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ClientDataSet2.Locate('FMonth',CDS_FP.fieldbyname('FMonth').Value,[]);
|
||||
Tv2.Styles.Inactive:=cxStyle1;
|
||||
Tv2.Styles.IncSearch:=cxStyle1;
|
||||
Tv2.Styles.Selection:=cxStyle1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
497
BI(BIView.dll)/U_BXList.dfm
Normal file
497
BI(BIView.dll)/U_BXList.dfm
Normal file
|
|
@ -0,0 +1,497 @@
|
|||
object frmBXList: TfrmBXList
|
||||
Left = 125
|
||||
Top = 95
|
||||
Width = 1580
|
||||
Height = 858
|
||||
Caption = #25253#38144#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1562
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 69
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 138
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 247
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25903#20184
|
||||
ImageIndex = 79
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 316
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25903#20184#25764#38144
|
||||
ImageIndex = 52
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 415
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1562
|
||||
Height = 52
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label5: TLabel
|
||||
Left = 16
|
||||
Top = 18
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 193
|
||||
Top = 18
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 342
|
||||
Top = 18
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #37096#38376
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 466
|
||||
Top = 18
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #36153#29992#31867#22411
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 617
|
||||
Top = 18
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #36153#29992#21517#31216
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 769
|
||||
Top = 17
|
||||
Width = 45
|
||||
Height = 15
|
||||
Caption = #25253#38144#20154
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 905
|
||||
Top = 17
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #23545#26041#21333#20301
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 1069
|
||||
Top = 17
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #21457#31080#32534#21495
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 14
|
||||
Width = 114
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 213
|
||||
Top = 14
|
||||
Width = 111
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object DeptName: TEdit
|
||||
Tag = 2
|
||||
Left = 375
|
||||
Top = 14
|
||||
Width = 77
|
||||
Height = 23
|
||||
TabOrder = 2
|
||||
OnChange = DeptNameChange
|
||||
end
|
||||
object FeeType: TEdit
|
||||
Tag = 2
|
||||
Left = 528
|
||||
Top = 14
|
||||
Width = 76
|
||||
Height = 23
|
||||
TabOrder = 3
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object FeeName: TEdit
|
||||
Tag = 2
|
||||
Left = 679
|
||||
Top = 13
|
||||
Width = 76
|
||||
Height = 23
|
||||
TabOrder = 4
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object Filler: TEdit
|
||||
Tag = 2
|
||||
Left = 815
|
||||
Top = 13
|
||||
Width = 77
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object DFDW: TEdit
|
||||
Tag = 2
|
||||
Left = 971
|
||||
Top = 13
|
||||
Width = 77
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object FPBH: TEdit
|
||||
Tag = 2
|
||||
Left = 1132
|
||||
Top = 13
|
||||
Width = 77
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 7
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 112
|
||||
Width = 1562
|
||||
Height = 496
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'HXDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 137
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'DeptName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
object v1XH: TcxGridDBColumn
|
||||
Caption = #36153#29992#31867#22411
|
||||
DataBinding.FieldName = 'FeeType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 119
|
||||
end
|
||||
object v1FXH: TcxGridDBColumn
|
||||
Caption = #36153#29992#21517#31216
|
||||
DataBinding.FieldName = 'FeeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 102
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #25253#38144#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 98
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #23545#26041#21333#20301
|
||||
DataBinding.FieldName = 'DFDW'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 161
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #21457#31080#32534#21495
|
||||
DataBinding.FieldName = 'FPBH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 149
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 113
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #24065#31181
|
||||
DataBinding.FieldName = 'MUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #23457#25209#27969#31243
|
||||
DataBinding.FieldName = 'ChkerHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 321
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #29366#24577
|
||||
DataBinding.FieldName = 'ChkStatus'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #26410#23457#26680#20154
|
||||
DataBinding.FieldName = 'WChker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 170
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #24050#25903#20184
|
||||
DataBinding.FieldName = 'ZFFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 546
|
||||
Top = 310
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 83
|
||||
Width = 1562
|
||||
Height = 29
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 8
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
' '#24050#25552#20132' '
|
||||
' '#23457#26680#20013' '
|
||||
' '#24050#23457#26680' '
|
||||
' '#24050#25903#20184' '
|
||||
' '#20840#37096' ')
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 31
|
||||
ClientRectRight = 1562
|
||||
ClientRectTop = 31
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 0
|
||||
Top = 608
|
||||
Width = 1562
|
||||
Height = 203
|
||||
Align = alBottom
|
||||
Caption = #65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 5
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 17
|
||||
Width = 1558
|
||||
Height = 184
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 300
|
||||
Top = 252
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 523
|
||||
Top = 192
|
||||
end
|
||||
end
|
||||
429
BI(BIView.dll)/U_BXList.pas
Normal file
429
BI(BIView.dll)/U_BXList.pas
Normal file
|
|
@ -0,0 +1,429 @@
|
|||
unit U_BXList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator, dxCore, ActiveX, dxBarBuiltInMenu, U_SLT,
|
||||
jpeg;
|
||||
|
||||
type
|
||||
TfrmBXList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
ToolButton1: TToolButton;
|
||||
Panel2: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1XH: TcxGridDBColumn;
|
||||
v1FXH: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel10: TPanel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
cxTabControl1: TcxTabControl;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
DeptName: TEdit;
|
||||
FeeType: TEdit;
|
||||
FeeName: TEdit;
|
||||
Filler: TEdit;
|
||||
Label7: TLabel;
|
||||
DFDW: TEdit;
|
||||
Label8: TLabel;
|
||||
FPBH: TEdit;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
GroupBox1: TGroupBox;
|
||||
ScrollBox1: TScrollBox;
|
||||
adoqueryPicture: TADOQuery;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure DeptNameChange(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
procedure InitImage();
|
||||
public
|
||||
canshu1: string;
|
||||
end;
|
||||
|
||||
var
|
||||
//frmBXList: TfrmBXList;
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBXList.InitGrid();
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.* ');
|
||||
SQL.Add(',WChker=[dbo].[F_Get_Order_SubStr](A.HMID,''BXWChk'') from Bx_HxMain A ');
|
||||
sql.Add(' where Filltime>=:begdate and FillTime<:enddate');
|
||||
if Trim(canshu1) = '查询' then
|
||||
begin
|
||||
// SQL.Add(' and ((isnull(sfgk,'''')=''公开'') or (isnull(Filler,'''')=''' + Trim(DName) + '''))');
|
||||
SQL.Add(' and ((isnull(sfgk,'''')=''公开'') or (isnull(Filler,'''')=''' + Trim(DName) + ''') OR (isnull(chkerHZ,'''') like ''%' + Trim(DName) + '%'') )');
|
||||
end;
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
begin
|
||||
sql.Add('and isnull(ChkStatus,'''')=''已提交'' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
sql.Add('and isnull(ChkStatus,'''')=''审核中'' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 2 then
|
||||
begin
|
||||
sql.Add('and isnull(ChkStatus,'''')=''已审核'' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 3 then
|
||||
begin
|
||||
sql.Add('and isnull(ChkStatus,'''')=''已审核'' and ZFFlag=1 ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 4 then
|
||||
begin
|
||||
sql.Add('and isnull(ChkStatus,'''') in (''已审核'',''已提交'',''审核中'') ');
|
||||
end;
|
||||
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
//frmBXList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
i, j: integer;
|
||||
begin
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('Tv1', Tv1, Self.Caption);
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('Tv1', Tv1, Self.Caption);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel2, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear: string;
|
||||
FMonth: string;
|
||||
FDate: TDate;
|
||||
begin
|
||||
{FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
//EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
//EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end; }
|
||||
EndDate.Date := SGetServerDate(ADOQueryTemp);
|
||||
BegDate.Date := EndDate.Date - 30;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if ClientDataSet1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while Locate('SSel', False, []) do
|
||||
begin
|
||||
Delete;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
TcxGridToExcel('费用报销列表', cxGrid1);
|
||||
TBRafresh.Click;
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.DeptNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 2 then
|
||||
Exit;
|
||||
if ClientDataSet1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要进行数据操作?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while ClientDataSet1.Locate('SSel', True, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxMain set ZFFlag=1,ZFTime=getdate(),ZFPerson=''' + Trim(DName) + '''');
|
||||
sql.Add(' where HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 3 then
|
||||
Exit;
|
||||
if ClientDataSet1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要进行数据撤销操作?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while ClientDataSet1.Locate('SSel', True, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxMain set ZFFlag=0,ZFTime=getdate(),ZFPerson=''' + Trim(DName) + '''');
|
||||
sql.Add(' where HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFilter(Tv1, True);
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFilter(Tv1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.InitImage();
|
||||
var
|
||||
i, j: integer;
|
||||
jpg: TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
begin
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
if ClientDataSet1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with adoqueryPicture do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.TFID,A.WBID,A.FilesOther,A.FileName,A.url from TP_File A ');
|
||||
sql.add('where A.WBID=' + quotedstr(trim(ClientDataSet1.fieldbyname('HMID').AsString)));
|
||||
sql.Add(' and A.TFType=''报销登记'' ');
|
||||
open;
|
||||
end;
|
||||
j := adoqueryPicture.RecordCount;
|
||||
if j < 1 then
|
||||
exit;
|
||||
adoqueryPicture.DisableControls;
|
||||
adoqueryPicture.First;
|
||||
SetLength(Mach, j);
|
||||
jpg := TJpegImage.Create();
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString) <> '' then
|
||||
begin
|
||||
myStream := tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')), bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Mach[i] := TfrmSlt.Create(Self);
|
||||
Mach[i].Name := trim(adoqueryPicture.fieldbyname('TFID').AsString);
|
||||
Mach[i].Parent := ScrollBox1;
|
||||
Mach[i].Left := 0 + i * 165;
|
||||
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString, adoqueryPicture.fieldbyname('FileName').AsString, adoqueryPicture.fieldbyname('url').AsString, jpg);
|
||||
end;
|
||||
adoqueryPicture.Next;
|
||||
end;
|
||||
adoqueryPicture.EnableControls;
|
||||
finally
|
||||
jpg.free;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBXList.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
495
BI(BIView.dll)/U_BXListChk.dfm
Normal file
495
BI(BIView.dll)/U_BXListChk.dfm
Normal file
|
|
@ -0,0 +1,495 @@
|
|||
object frmBXListChk: TfrmBXListChk
|
||||
Left = 282
|
||||
Top = 151
|
||||
Width = 1580
|
||||
Height = 858
|
||||
Caption = #25253#38144#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1564
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 89
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 219
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 282
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680#25764#38144
|
||||
ImageIndex = 52
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 369
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1564
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label5: TLabel
|
||||
Left = 13
|
||||
Top = 14
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 154
|
||||
Top = 14
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 274
|
||||
Top = 14
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #37096#38376
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 373
|
||||
Top = 14
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #36153#29992#31867#22411
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 494
|
||||
Top = 14
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #36153#29992#21517#31216
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 615
|
||||
Top = 14
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #25253#38144#20154
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 724
|
||||
Top = 14
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23545#26041#21333#20301
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 855
|
||||
Top = 14
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #21457#31080#32534#21495
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 62
|
||||
Top = 11
|
||||
Width = 91
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 170
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object DeptName: TEdit
|
||||
Tag = 2
|
||||
Left = 300
|
||||
Top = 11
|
||||
Width = 62
|
||||
Height = 23
|
||||
TabOrder = 2
|
||||
OnChange = DeptNameChange
|
||||
end
|
||||
object FeeType: TEdit
|
||||
Tag = 2
|
||||
Left = 422
|
||||
Top = 11
|
||||
Width = 61
|
||||
Height = 23
|
||||
TabOrder = 3
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object FeeName: TEdit
|
||||
Tag = 2
|
||||
Left = 543
|
||||
Top = 10
|
||||
Width = 61
|
||||
Height = 23
|
||||
TabOrder = 4
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object Filler: TEdit
|
||||
Tag = 2
|
||||
Left = 652
|
||||
Top = 10
|
||||
Width = 62
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object DFDW: TEdit
|
||||
Tag = 2
|
||||
Left = 777
|
||||
Top = 10
|
||||
Width = 61
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
object FPBH: TEdit
|
||||
Tag = 2
|
||||
Left = 906
|
||||
Top = 10
|
||||
Width = 61
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 7
|
||||
OnChange = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 96
|
||||
Width = 1564
|
||||
Height = 560
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'HXDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 137
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'DeptName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
object v1XH: TcxGridDBColumn
|
||||
Caption = #36153#29992#31867#22411
|
||||
DataBinding.FieldName = 'FeeType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 119
|
||||
end
|
||||
object v1FXH: TcxGridDBColumn
|
||||
Caption = #36153#29992#21517#31216
|
||||
DataBinding.FieldName = 'FeeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 102
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #25253#38144#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 98
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #23545#26041#21333#20301
|
||||
DataBinding.FieldName = 'DFDW'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 161
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #21457#31080#32534#21495
|
||||
DataBinding.FieldName = 'FPBH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 149
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 113
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #24065#31181
|
||||
DataBinding.FieldName = 'MUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #23457#25209#27969#31243
|
||||
DataBinding.FieldName = 'ChkerHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 321
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #29366#24577
|
||||
DataBinding.FieldName = 'ChkStatus'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #26410#23457#26680#20154
|
||||
DataBinding.FieldName = 'WChker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 170
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #24050#25903#20184
|
||||
DataBinding.FieldName = 'ZFFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 437
|
||||
Top = 248
|
||||
Width = 249
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 72
|
||||
Width = 1564
|
||||
Height = 24
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 8
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
' '#24453#23457#26680' '
|
||||
' '#24050#23457#26680' '
|
||||
' '#20840#37096' ')
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 26
|
||||
ClientRectRight = 1564
|
||||
ClientRectTop = 26
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 0
|
||||
Top = 656
|
||||
Width = 1564
|
||||
Height = 163
|
||||
Align = alBottom
|
||||
Caption = #65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 5
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 1560
|
||||
Height = 147
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 300
|
||||
Top = 252
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 523
|
||||
Top = 192
|
||||
end
|
||||
end
|
||||
530
BI(BIView.dll)/U_BXListChk.pas
Normal file
530
BI(BIView.dll)/U_BXListChk.pas
Normal file
|
|
@ -0,0 +1,530 @@
|
|||
unit U_BXListChk;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator, dxCore, ActiveX, dxBarBuiltInMenu, U_SLT,
|
||||
jpeg, 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
|
||||
TfrmBXListChk = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
ToolButton1: TToolButton;
|
||||
Panel2: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1XH: TcxGridDBColumn;
|
||||
v1FXH: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel10: TPanel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
cxTabControl1: TcxTabControl;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
DeptName: TEdit;
|
||||
FeeType: TEdit;
|
||||
FeeName: TEdit;
|
||||
Filler: TEdit;
|
||||
Label7: TLabel;
|
||||
DFDW: TEdit;
|
||||
Label8: TLabel;
|
||||
FPBH: TEdit;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
GroupBox1: TGroupBox;
|
||||
ScrollBox1: TScrollBox;
|
||||
adoqueryPicture: TADOQuery;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure DeptNameChange(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
procedure InitImage();
|
||||
public
|
||||
canshu1: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmBXListChk: TfrmBXListChk;
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBXListChk.InitGrid();
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*,B.HSID ');
|
||||
SQL.Add(',WChker=[dbo].[F_Get_Order_SubStr](A.HMID,''BXWChk'') from Bx_HxMain A ');
|
||||
SQL.Add(' inner join Bx_HxSub B on A.HMid=B.HMid');
|
||||
sql.Add(' where A.Filltime>=:begdate and A.FillTime<:enddate');
|
||||
sql.Add(' and (isnull(B.Chker,'''')='''+Trim(DName)+''' or isnull(ChkerHZ,'''')=''李静'') ');
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
begin
|
||||
sql.Add('and isnull(B.ChkStatus,'''')<>''已审核'' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
sql.Add('and isnull(B.ChkStatus,'''')=''已审核'' ');
|
||||
end;
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
// ShowMessage(sql.text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBXListChk := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
i, j: integer;
|
||||
begin
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('Tv1', Tv1, Self.Caption);
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('Tv1', Tv1, Self.Caption);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel2, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear: string;
|
||||
FMonth: string;
|
||||
FDate: TDate;
|
||||
begin
|
||||
{FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
//EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
//EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end; }
|
||||
EndDate.Date := SGetServerDate(ADOQueryTemp);
|
||||
BegDate.Date := EndDate.Date - 30;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if ClientDataSet1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while Locate('SSel', False, []) do
|
||||
begin
|
||||
Delete;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
TcxGridToExcel('费用报销列表', cxGrid1);
|
||||
TBRafresh.Click;
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.DeptNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
FSJ,FSJ1:String;
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
Exit;
|
||||
if ClientDataSet1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要进行数据操作?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while ClientDataSet1.Locate('SSel', True, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxSub set ChkTime=getdate(),ChkStatus=''已审核'' ');
|
||||
sql.Add(' where HSID=''' + Trim(ClientDataSet1.fieldbyname('HSID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 * from Bx_HxSub where isnull(ChkStatus,'''')=''待审核'' ');
|
||||
sql.Add(' and HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
open;
|
||||
end;
|
||||
FSJ:=Trim(ADOQueryCmd.fieldbyname('ChkStatus').AsString);
|
||||
if Trim(FSJ)='' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxMain set ChkTime=getdate(),ChkStatus=''已审核'',Chker='''+Trim(DName)+''',chkcode='''+Trim(DCode)+'''');
|
||||
sql.Add(',Step=(select Chkint from Bx_HxSub where HSID='''+Trim(ClientDataSet1.fieldbyname('HSID').AsString)+''')');
|
||||
sql.Add(' where HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 * from Bx_HxSub where isnull(ChkStatus,'''')=''已审核'' ');
|
||||
sql.Add(' and HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
open;
|
||||
end;
|
||||
FSJ1:=Trim(ADOQueryCmd.fieldbyname('ChkStatus').AsString);
|
||||
if (Trim(FSJ)<>'') and (Trim(FSJ1)<>'') then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxMain set ChkTime=getdate(),ChkStatus=''审核中'',Chker='''+Trim(DName)+''',chkcode='''+Trim(DCode)+'''');
|
||||
sql.Add(',Step=(select Chkint from Bx_HxSub where HSID='''+Trim(ClientDataSet1.fieldbyname('HSID').AsString)+''')');
|
||||
sql.Add(' where HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.ToolButton4Click(Sender: TObject);
|
||||
var
|
||||
FSJ,FSJ1,FSJ2:String;
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 1 then
|
||||
Exit;
|
||||
if ClientDataSet1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要进行数据操作?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while ClientDataSet1.Locate('SSel', True, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxSub set ChkTime=getdate(),ChkStatus=''待审核'' ');
|
||||
sql.Add(' where HSID=''' + Trim(ClientDataSet1.fieldbyname('HSID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 * from Bx_HxSub where isnull(ChkStatus,'''')=''已审核'' ');
|
||||
sql.Add(' and HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
open;
|
||||
end;
|
||||
FSJ:=Trim(ADOQueryCmd.fieldbyname('ChkStatus').AsString);
|
||||
if Trim(FSJ)='' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxMain set ChkTime=Null,ChkStatus=''已提交'',Chker=Filler,chkcode=FillCode');
|
||||
sql.Add(',Step=0');
|
||||
sql.Add(' where HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 * from Bx_HxSub where isnull(ChkStatus,'''')=''未审核'' ');
|
||||
sql.Add(' and HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
open;
|
||||
end;
|
||||
FSJ1:=Trim(ADOQueryCmd.fieldbyname('ChkStatus').AsString);
|
||||
if (Trim(FSJ)<>'') and (Trim(FSJ1)<>'') then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select ChkInt=Chkint-1 from Bx_HxSub ');
|
||||
sql.Add(' where HSID=''' + Trim(ClientDataSet1.fieldbyname('HSID').AsString) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
FSJ2:=Trim(ADOQueryCmd.fieldbyname('ChkInt').AsString);
|
||||
if StrToInt(FSJ2)>0 then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' update Bx_HxMain set ChkStatus=''审核中'',Step='+Trim(FSJ2));
|
||||
sql.Add(',ChkTime=(select ChkTime from Bx_HxSub where HMID='''+ Trim(ClientDataSet1.fieldbyname('HMID').AsString)+''' and ChkInt='+FSJ2+' ),');
|
||||
sql.Add(',Chker=(select Chker from Bx_HxSub where HMID='''+ Trim(ClientDataSet1.fieldbyname('HMID').AsString)+''' and ChkInt='+FSJ2+' ) ');
|
||||
sql.Add(' where HMID=''' + Trim(ClientDataSet1.fieldbyname('HMID').AsString) + ''' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ClientDataSet1.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmBXListChk.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFilter(Tv1, True);
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFilter(Tv1, False);
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.InitImage();
|
||||
var
|
||||
i, j: integer;
|
||||
jpg: TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
begin
|
||||
j := length(Mach);
|
||||
if j > 0 then
|
||||
begin
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
if ClientDataSet1.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with adoqueryPicture do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.TFID,A.WBID,A.FilesOther,A.FileName,A.url from TP_File A ');
|
||||
sql.add('where A.WBID=' + quotedstr(trim(ClientDataSet1.fieldbyname('HMID').AsString)));
|
||||
sql.Add(' and A.TFType=''报销登记'' ');
|
||||
open;
|
||||
end;
|
||||
j := adoqueryPicture.RecordCount;
|
||||
if j < 1 then
|
||||
exit;
|
||||
adoqueryPicture.DisableControls;
|
||||
adoqueryPicture.First;
|
||||
SetLength(Mach, j);
|
||||
jpg := TJpegImage.Create();
|
||||
for i := 0 to j - 1 do
|
||||
begin
|
||||
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString) <> '' then
|
||||
begin
|
||||
myStream := tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')), bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Mach[i] := TfrmSlt.Create(Self);
|
||||
Mach[i].Name := trim(adoqueryPicture.fieldbyname('TFID').AsString);
|
||||
Mach[i].Parent := ScrollBox1;
|
||||
Mach[i].Left := 0 + i * 165;
|
||||
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString, adoqueryPicture.fieldbyname('FileName').AsString, adoqueryPicture.fieldbyname('url').AsString, jpg);
|
||||
end;
|
||||
adoqueryPicture.Next;
|
||||
end;
|
||||
adoqueryPicture.EnableControls;
|
||||
finally
|
||||
jpg.free;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBXListChk.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
677
BI(BIView.dll)/U_CPAddPN.dfm
Normal file
677
BI(BIView.dll)/U_CPAddPN.dfm
Normal file
|
|
@ -0,0 +1,677 @@
|
|||
object frmCPAddPN: TfrmCPAddPN
|
||||
Left = 356
|
||||
Top = 50
|
||||
Width = 884
|
||||
Height = 920
|
||||
Anchors = []
|
||||
Caption = #26679#21697#24405#20837
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 866
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 65
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_YPGL.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 69
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 866
|
||||
Height = 842
|
||||
Align = alClient
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clBtnFace
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 71
|
||||
Top = 45
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #32534#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 71
|
||||
Top = 627
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #22791#27880#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 71
|
||||
Top = 120
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #21697#21517#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 71
|
||||
Top = 281
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #25104#20998#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 468
|
||||
Top = 242
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #38376#24133#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 71
|
||||
Top = 242
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #20811#37325#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label23: TLabel
|
||||
Left = 71
|
||||
Top = 316
|
||||
Width = 69
|
||||
Height = 44
|
||||
Caption = #21407#26009#13#10#25104#20998#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 19
|
||||
Top = 920
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #39068#33394#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 394
|
||||
Top = 920
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #33457#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 446
|
||||
Top = 83
|
||||
Width = 92
|
||||
Height = 22
|
||||
Caption = #25104#26412#20215#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 468
|
||||
Top = 45
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #26465#30721#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 466
|
||||
Top = 553
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #38388#36317#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 466
|
||||
Top = 588
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #32447#38271#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 71
|
||||
Top = 553
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #26426#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 71
|
||||
Top = 588
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #20135#37327#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl1: TLabel
|
||||
Left = 48
|
||||
Top = 159
|
||||
Width = 92
|
||||
Height = 22
|
||||
Caption = #35746#21333#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 71
|
||||
Top = 433
|
||||
Width = 69
|
||||
Height = 44
|
||||
Caption = #25104#26412#13#10#26680#31639#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl3: TLabel
|
||||
Left = 25
|
||||
Top = 83
|
||||
Width = 115
|
||||
Height = 22
|
||||
Caption = #26356#26032#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 71
|
||||
Top = 201
|
||||
Width = 69
|
||||
Height = 22
|
||||
Caption = #31867#21035#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 446
|
||||
Top = 201
|
||||
Width = 92
|
||||
Height = 22
|
||||
Caption = #19994#21153#21592#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CYNo: TEdit
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 41
|
||||
Width = 273
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
end
|
||||
object CYNote: TMemo
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 627
|
||||
Width = 684
|
||||
Height = 161
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 14
|
||||
end
|
||||
object CYName: TEdit
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 120
|
||||
Width = 663
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object CYCF: TEdit
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 281
|
||||
Width = 664
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object CYMF: TEdit
|
||||
Tag = 2
|
||||
Left = 521
|
||||
Top = 242
|
||||
Width = 273
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
OnExit = CYMFExit
|
||||
end
|
||||
object CYKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 242
|
||||
Width = 273
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnExit = CYKZExit
|
||||
end
|
||||
object CYColor: TEdit
|
||||
Tag = 2
|
||||
Left = 73
|
||||
Top = 916
|
||||
Width = 272
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 12
|
||||
Visible = False
|
||||
end
|
||||
object CYHX: TEdit
|
||||
Tag = 2
|
||||
Left = 448
|
||||
Top = 916
|
||||
Width = 272
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 13
|
||||
Visible = False
|
||||
end
|
||||
object CYPrice: TEdit
|
||||
Tag = 2
|
||||
Left = 521
|
||||
Top = 83
|
||||
Width = 273
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnKeyPress = CYColorKeyPress
|
||||
end
|
||||
object CYID: TEdit
|
||||
Left = 521
|
||||
Top = 41
|
||||
Width = 273
|
||||
Height = 28
|
||||
Enabled = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object ZhenXing: TEdit
|
||||
Tag = 2
|
||||
Left = 519
|
||||
Top = 553
|
||||
Width = 272
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 9
|
||||
end
|
||||
object ShaChang: TEdit
|
||||
Tag = 2
|
||||
Left = 519
|
||||
Top = 588
|
||||
Width = 272
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 11
|
||||
end
|
||||
object CarType: TEdit
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 553
|
||||
Width = 273
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
end
|
||||
object CYSpec: TMemo
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 316
|
||||
Width = 685
|
||||
Height = 105
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 4
|
||||
end
|
||||
object CYCL: TEdit
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 588
|
||||
Width = 273
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 10
|
||||
end
|
||||
object CYConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 159
|
||||
Width = 663
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 15
|
||||
end
|
||||
object BaoHuDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 79
|
||||
Width = 273
|
||||
Height = 30
|
||||
BevelInner = bvNone
|
||||
Date = 40916.670856296290000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.670856296290000000
|
||||
ShowCheckbox = True
|
||||
Checked = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 16
|
||||
end
|
||||
object CYCNHS: TMemo
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 433
|
||||
Width = 683
|
||||
Height = 105
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 17
|
||||
end
|
||||
object CPType: TComboBox
|
||||
Tag = 2
|
||||
Left = 131
|
||||
Top = 197
|
||||
Width = 274
|
||||
Height = 30
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemHeight = 22
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 18
|
||||
Text = #22823#36135
|
||||
Items.Strings = (
|
||||
#22823#36135
|
||||
#25171#26679
|
||||
#22806#26469#26679)
|
||||
end
|
||||
object YWY: TBtnEditA
|
||||
Tag = 2
|
||||
Left = 523
|
||||
Top = 196
|
||||
Width = 273
|
||||
Height = 32
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 19
|
||||
OnBtnClick = YWYBtnClick
|
||||
end
|
||||
end
|
||||
object CDS_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 424
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 477
|
||||
Top = 1
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Sub
|
||||
Left = 539
|
||||
Top = 3
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
Parameters = <>
|
||||
Left = 309
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 373
|
||||
Top = 1
|
||||
end
|
||||
end
|
||||
290
BI(BIView.dll)/U_CPAddPN.pas
Normal file
290
BI(BIView.dll)/U_CPAddPN.pas
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
unit U_CPAddPN;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
|
||||
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit;
|
||||
|
||||
type
|
||||
TfrmCPAddPN = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
CDS_Sub: TClientDataSet;
|
||||
ADOQueryMain: TADOQuery;
|
||||
DataSource2: TDataSource;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label1: TLabel;
|
||||
Label7: TLabel;
|
||||
CYNo: TEdit;
|
||||
CYNote: TMemo;
|
||||
Label5: TLabel;
|
||||
CYName: TEdit;
|
||||
Label11: TLabel;
|
||||
CYCF: TEdit;
|
||||
Label15: TLabel;
|
||||
CYMF: TEdit;
|
||||
Label22: TLabel;
|
||||
CYKZ: TEdit;
|
||||
Label23: TLabel;
|
||||
Label2: TLabel;
|
||||
CYColor: TEdit;
|
||||
Label4: TLabel;
|
||||
CYHX: TEdit;
|
||||
Label10: TLabel;
|
||||
CYPrice: TEdit;
|
||||
CYID: TEdit;
|
||||
Label3: TLabel;
|
||||
Label6: TLabel;
|
||||
ZhenXing: TEdit;
|
||||
Label8: TLabel;
|
||||
ShaChang: TEdit;
|
||||
Label9: TLabel;
|
||||
CarType: TEdit;
|
||||
CYSpec: TMemo;
|
||||
Label13: TLabel;
|
||||
CYCL: TEdit;
|
||||
lbl1: TLabel;
|
||||
lbl2: TLabel;
|
||||
CYConNo: TEdit;
|
||||
lbl3: TLabel;
|
||||
BaoHuDate: TDateTimePicker;
|
||||
CYCNHS: TMemo;
|
||||
Label12: TLabel;
|
||||
CPType: TComboBox;
|
||||
Label14: TLabel;
|
||||
YWY: TBtnEditA;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CYKZExit(Sender: TObject);
|
||||
procedure CYMFExit(Sender: TObject);
|
||||
procedure YWYBtnClick(Sender: TObject);
|
||||
private
|
||||
canshu1: string;
|
||||
Fint: Integer;
|
||||
procedure InitSubGrid();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FCYID, FCYCode, FCPID, FCPNO, FCPName: string;
|
||||
CopyInt: Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCPAddPN: TfrmCPAddPN;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_iniParam, U_ZDYHelp, U_ZdyAttachGYS, U_FileUp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCPAddPN.InitSubGrid();
|
||||
begin
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from CP_YDang where CYID=''' + Trim(FCYID) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryMain.IsEmpty then
|
||||
begin
|
||||
BaoHuDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
BaoHuDate.Checked := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(ADOQueryMain.FieldByName('BaoHuDate').AsString) = '' then
|
||||
begin
|
||||
BaoHuDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
BaoHuDate.Checked := False;
|
||||
end;
|
||||
end;
|
||||
SCSHDataNew(ADOQueryMain, ScrollBox1, 2);
|
||||
SCSHDataNew(ADOQueryMain, ScrollBox1, 0);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAddPN.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitSubGrid();
|
||||
if CopyInt = 1 then
|
||||
begin
|
||||
FCYID := '';
|
||||
CYID.text := '';
|
||||
BaoHuDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAddPN.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
function TfrmCPAddPN.SaveData(): Boolean;
|
||||
var
|
||||
maxId, FCYNo: string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(FCYID) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, maxId, 'Y', 'CP_YDang', 4, 1) = False then
|
||||
begin
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
CYID.Text := trim(maxId);
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxId := Trim(FCYID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from CP_YDang where CYID=''' + Trim(FCYID) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCYID) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CYType').Value := Trim(FCPID);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('FillTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('CYID').Value := Trim(maxId);
|
||||
if trim(CYNo.Text) = '' then
|
||||
CYNo.Text := Trim(maxId);
|
||||
SSetsaveSqlNew(ADOQueryCmd, 'CP_YDang', ScrollBox1, 2);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select count(*) as AA from CP_YDang where CYNo='''+Trim(CYNo.Text)+'''');
|
||||
Open;
|
||||
if FieldByName('AA').AsInteger>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('编号重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FCYID := maxId;
|
||||
Result := True;
|
||||
except
|
||||
Result := False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAddPN.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if CYName.Text = '' then
|
||||
begin
|
||||
Application.MessageBox('产品名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CPType.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('类别不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(YWY.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('业务员不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAddPN.CYColorKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
c: Integer;
|
||||
begin
|
||||
if Key = '.' then
|
||||
begin
|
||||
for c := 1 to length(TEdit(Sender).text) do
|
||||
begin
|
||||
if Tedit(Sender).text[c] = '.' then
|
||||
Key := #0;
|
||||
end;
|
||||
end
|
||||
else if Key = #13 then
|
||||
PerForm(WM_NEXTDLGCTL, 0, 0)
|
||||
else if Key = #8 then
|
||||
Key := #8
|
||||
else if (Key < '0') or (Key > '9') then
|
||||
Key := #0;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAddPN.CYKZExit(Sender: TObject);
|
||||
begin
|
||||
if pos('GSM', trim(CYKZ.Text)) = 0 then
|
||||
CYKZ.Text := trim(CYKZ.Text) + 'GSM';
|
||||
end;
|
||||
|
||||
procedure TfrmCPAddPN.CYMFExit(Sender: TObject);
|
||||
begin
|
||||
if pos('CM', trim(CYMF.Text)) = 0 then
|
||||
CYMF.Text := trim(CYMF.Text) + 'CM';
|
||||
end;
|
||||
|
||||
procedure TfrmCPAddPN.YWYBtnClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='YWY';
|
||||
flagname:='业务员';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.YWY.Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('zdyname').AsString)
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
959
BI(BIView.dll)/U_CPAllTop.dfm
Normal file
959
BI(BIView.dll)/U_CPAllTop.dfm
Normal file
|
|
@ -0,0 +1,959 @@
|
|||
object frmCPAllTop: TfrmCPAllTop
|
||||
Left = 88
|
||||
Top = 58
|
||||
Width = 1283
|
||||
Height = 669
|
||||
Caption = #20135#21697'Top20'#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1265
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 65
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 297
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 307
|
||||
Top = 9
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #21697#21517
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 14
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 170
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 5
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 64
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 184
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 297
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 366
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 435
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1265
|
||||
Height = 372
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 368
|
||||
Height = 368
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 364
|
||||
Height = 317
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column15
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #25490#21517
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 35
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 44
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH2: TPanel
|
||||
Left = 2
|
||||
Top = 342
|
||||
Width = 364
|
||||
Height = 24
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #25910#36135#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 364
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25910#36135'Top20'#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 370
|
||||
Top = 2
|
||||
Width = 369
|
||||
Height = 368
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 365
|
||||
Height = 317
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #25490#21517
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 35
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 44
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object KK2: TPanel
|
||||
Left = 2
|
||||
Top = 342
|
||||
Width = 365
|
||||
Height = 24
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #24320#21345#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object KK1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 365
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #24320#21345'Top20'#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 739
|
||||
Top = 2
|
||||
Width = 369
|
||||
Height = 368
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 365
|
||||
Height = 317
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #25490#21517
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 35
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 44
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object DJ2: TPanel
|
||||
Left = 2
|
||||
Top = 342
|
||||
Width = 365
|
||||
Height = 24
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object DJ1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 365
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367'Top20'#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object Panel9: TPanel
|
||||
Left = 1108
|
||||
Top = 2
|
||||
Width = 369
|
||||
Height = 368
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 3
|
||||
object cxGrid4: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 365
|
||||
Height = 317
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv4: TcxGridDBTableView
|
||||
OnDblClick = Tv4DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource4
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #25490#21517
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 35
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 44
|
||||
end
|
||||
end
|
||||
object cxGridLevel4: TcxGridLevel
|
||||
GridView = Tv4
|
||||
end
|
||||
end
|
||||
object CH2: TPanel
|
||||
Left = 2
|
||||
Top = 342
|
||||
Width = 365
|
||||
Height = 24
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #20986#36135#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object CH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 365
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #20986#36135'Top20'#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 403
|
||||
Width = 1265
|
||||
Height = 219
|
||||
Align = alBottom
|
||||
Caption = 'Panel4'
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
object Panel5: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 370
|
||||
Height = 217
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 0
|
||||
object DBChart1: TDBChart
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 366
|
||||
Height = 213
|
||||
AllowPanning = pmVertical
|
||||
BackWall.Brush.Color = clWhite
|
||||
Gradient.EndColor = clWhite
|
||||
Gradient.Visible = True
|
||||
LeftWall.Color = clWhite
|
||||
Title.Text.Strings = (
|
||||
'')
|
||||
Title.Visible = False
|
||||
AxisVisible = False
|
||||
Legend.Visible = False
|
||||
View3D = False
|
||||
View3DOptions.Elevation = 315
|
||||
View3DOptions.Orthogonal = False
|
||||
View3DOptions.Perspective = 0
|
||||
View3DOptions.Rotation = 360
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 0
|
||||
object Series1: TBarSeries
|
||||
HorizAxis = aTopAxis
|
||||
Marks.ArrowLength = 20
|
||||
Marks.Clip = True
|
||||
Marks.Visible = True
|
||||
SeriesColor = clRed
|
||||
BarStyle = bsRectGradient
|
||||
XValues.DateTime = False
|
||||
XValues.Name = 'X'
|
||||
XValues.Multiplier = 1.000000000000000000
|
||||
XValues.Order = loAscending
|
||||
YValues.DateTime = False
|
||||
YValues.Name = 'Bar'
|
||||
YValues.Multiplier = 1.000000000000000000
|
||||
YValues.Order = loNone
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 371
|
||||
Top = 1
|
||||
Width = 369
|
||||
Height = 217
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 1
|
||||
object DBChart2: TDBChart
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 365
|
||||
Height = 213
|
||||
BackWall.Brush.Color = clWhite
|
||||
Gradient.EndColor = clWhite
|
||||
Gradient.Visible = True
|
||||
LeftWall.Color = clWhite
|
||||
Title.Text.Strings = (
|
||||
'')
|
||||
Title.Visible = False
|
||||
AxisVisible = False
|
||||
Legend.Visible = False
|
||||
View3D = False
|
||||
View3DOptions.Elevation = 315
|
||||
View3DOptions.Orthogonal = False
|
||||
View3DOptions.Perspective = 0
|
||||
View3DOptions.Rotation = 360
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Series2: TBarSeries
|
||||
Marks.ArrowLength = 20
|
||||
Marks.Visible = True
|
||||
SeriesColor = clRed
|
||||
BarStyle = bsRectGradient
|
||||
XValues.DateTime = False
|
||||
XValues.Name = 'X'
|
||||
XValues.Multiplier = 1.000000000000000000
|
||||
XValues.Order = loAscending
|
||||
YValues.DateTime = False
|
||||
YValues.Name = 'Bar'
|
||||
YValues.Multiplier = 1.000000000000000000
|
||||
YValues.Order = loNone
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel11: TPanel
|
||||
Left = 740
|
||||
Top = 1
|
||||
Width = 369
|
||||
Height = 217
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object DBChart3: TDBChart
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 365
|
||||
Height = 213
|
||||
BackWall.Brush.Color = clWhite
|
||||
Gradient.EndColor = clWhite
|
||||
Gradient.Visible = True
|
||||
LeftWall.Color = clWhite
|
||||
Title.Text.Strings = (
|
||||
'')
|
||||
Title.Visible = False
|
||||
AxisVisible = False
|
||||
Legend.Visible = False
|
||||
View3D = False
|
||||
View3DOptions.Elevation = 315
|
||||
View3DOptions.Orthogonal = False
|
||||
View3DOptions.Perspective = 0
|
||||
View3DOptions.Rotation = 360
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object BarSeries1: TBarSeries
|
||||
Marks.ArrowLength = 20
|
||||
Marks.Visible = True
|
||||
SeriesColor = clRed
|
||||
BarStyle = bsRectGradient
|
||||
XValues.DateTime = False
|
||||
XValues.Name = 'X'
|
||||
XValues.Multiplier = 1.000000000000000000
|
||||
XValues.Order = loAscending
|
||||
YValues.DateTime = False
|
||||
YValues.Name = 'Bar'
|
||||
YValues.Multiplier = 1.000000000000000000
|
||||
YValues.Order = loNone
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel13: TPanel
|
||||
Left = 1109
|
||||
Top = 1
|
||||
Width = 370
|
||||
Height = 217
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object DBChart4: TDBChart
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 366
|
||||
Height = 213
|
||||
BackWall.Brush.Color = clWhite
|
||||
Gradient.EndColor = clWhite
|
||||
Gradient.Visible = True
|
||||
LeftWall.Color = clWhite
|
||||
Title.Text.Strings = (
|
||||
'')
|
||||
Title.Visible = False
|
||||
AxisVisible = False
|
||||
Legend.Visible = False
|
||||
View3D = False
|
||||
View3DOptions.Elevation = 315
|
||||
View3DOptions.Orthogonal = False
|
||||
View3DOptions.Perspective = 0
|
||||
View3DOptions.Rotation = 360
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object BarSeries2: TBarSeries
|
||||
Marks.ArrowLength = 20
|
||||
Marks.Visible = True
|
||||
SeriesColor = clRed
|
||||
BarStyle = bsRectGradient
|
||||
XValues.DateTime = False
|
||||
XValues.Name = 'X'
|
||||
XValues.Multiplier = 1.000000000000000000
|
||||
XValues.Order = loAscending
|
||||
YValues.DateTime = False
|
||||
YValues.Name = 'Bar'
|
||||
YValues.Multiplier = 1.000000000000000000
|
||||
YValues.Order = loNone
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 600
|
||||
Top = 260
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 229
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 467
|
||||
Top = 163
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 468
|
||||
Top = 200
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
object DataSource4: TDataSource
|
||||
DataSet = ClientDataSet4
|
||||
Left = 955
|
||||
Top = 187
|
||||
end
|
||||
object ClientDataSet4: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 956
|
||||
Top = 224
|
||||
end
|
||||
object ClientDataSet11: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 304
|
||||
end
|
||||
object ClientDataSet21: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 476
|
||||
Top = 264
|
||||
end
|
||||
object ClientDataSet31: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 772
|
||||
Top = 264
|
||||
end
|
||||
object ClientDataSet41: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 956
|
||||
Top = 272
|
||||
end
|
||||
end
|
||||
383
BI(BIView.dll)/U_CPAllTop.pas
Normal file
383
BI(BIView.dll)/U_CPAllTop.pas
Normal file
|
|
@ -0,0 +1,383 @@
|
|||
unit U_CPAllTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmCPAllTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH2: TPanel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Panel4: TPanel;
|
||||
Panel5: TPanel;
|
||||
DBChart1: TDBChart;
|
||||
Series1: TBarSeries;
|
||||
Panel6: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
KK2: TPanel;
|
||||
KK1: TPanel;
|
||||
Panel7: TPanel;
|
||||
DBChart2: TDBChart;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
Series2: TBarSeries;
|
||||
Panel8: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
DJ2: TPanel;
|
||||
DJ1: TPanel;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel11: TPanel;
|
||||
DBChart3: TDBChart;
|
||||
BarSeries1: TBarSeries;
|
||||
Panel9: TPanel;
|
||||
cxGrid4: TcxGrid;
|
||||
Tv4: TcxGridDBTableView;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridLevel4: TcxGridLevel;
|
||||
CH2: TPanel;
|
||||
CH1: TPanel;
|
||||
Panel13: TPanel;
|
||||
DBChart4: TDBChart;
|
||||
BarSeries2: TBarSeries;
|
||||
DataSource4: TDataSource;
|
||||
ClientDataSet4: TClientDataSet;
|
||||
Panel10: TPanel;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
C_Code: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
ClientDataSet11: TClientDataSet;
|
||||
ClientDataSet21: TClientDataSet;
|
||||
ClientDataSet31: TClientDataSet;
|
||||
ClientDataSet41: TClientDataSet;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv4DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmCPAllTop: TfrmCPAllTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_PBTopMX,U_CPCHTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmCPAllTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible:=True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_20M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='收货';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
SH1.Caption:='收货Top20排行榜('+Trim(ClientDataSet1.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet1.fieldbyname('QSBL').AsString)+'%)';
|
||||
SH2.Caption:='收货总数量'+'('+Trim(ClientDataSet1.fieldbyname('HZPS').AsString)+')';
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='收货';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet11);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet11);
|
||||
DBChart1.Series[0].DataSource:=nil;
|
||||
DBChart1.Series[0].DataSource:=ClientDataSet11;
|
||||
DBChart1.Series[0].XLabelsSource:='XH';
|
||||
DBChart1.Series[0].YValues.ValueSource:='BL';
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_20M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='开卡';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
KK1.Caption:='开卡Top20排行榜('+Trim(ClientDataSet2.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet2.fieldbyname('QSBL').AsString)+'%)';
|
||||
KK2.Caption:='开卡总数量'+'('+Trim(ClientDataSet2.fieldbyname('HZPS').AsString)+')';
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='开卡';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet21);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet21);
|
||||
DBChart2.Series[0].DataSource:=nil;
|
||||
DBChart2.Series[0].DataSource:=ClientDataSet21;
|
||||
DBChart2.Series[0].XLabelsSource:='XH';
|
||||
DBChart2.Series[0].YValues.ValueSource:='PS';
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_20M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='打卷';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
DJ1.Caption:='打卷Top20排行榜('+Trim(ClientDataSet3.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet3.fieldbyname('QSBL').AsString)+'%)';
|
||||
DJ2.Caption:='打卷总数量'+'('+Trim(ClientDataSet3.fieldbyname('HZPS').AsString)+')';
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='打卷';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet31);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet31);
|
||||
DBChart3.Series[0].DataSource:=nil;
|
||||
DBChart3.Series[0].DataSource:=ClientDataSet31;
|
||||
DBChart3.Series[0].XLabelsSource:='XH';
|
||||
DBChart3.Series[0].YValues.ValueSource:='PS';
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_20M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='出货';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet4);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet4);
|
||||
CH1.Caption:='出货Top20排行榜('+Trim(ClientDataSet4.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet4.fieldbyname('QSBL').AsString)+'%)';
|
||||
CH2.Caption:='出货总数量'+'('+Trim(ClientDataSet4.fieldbyname('HZPS').AsString)+')';
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='出货';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet41);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet41);
|
||||
DBChart4.Series[0].DataSource:=nil;
|
||||
DBChart4.Series[0].DataSource:=ClientDataSet41;
|
||||
DBChart4.Series[0].XLabelsSource:='XH';
|
||||
DBChart4.Series[0].YValues.ValueSource:='PS';
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCPAllTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear:string;
|
||||
FMonth:string;
|
||||
FDate:TDate;
|
||||
begin
|
||||
FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
if Trim(ClientDataSet1.fieldbyname('SPName').AsString)='其它' then Exit;
|
||||
try
|
||||
frmPBTopMX:=TfrmPBTopMX.Create(Application);
|
||||
with frmPBTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FSPName:=Trim(Self.ClientDataSet1.fieldbyname('SPName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmPBTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTop.Tv4DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet4.IsEmpty then Exit;
|
||||
if Trim(ClientDataSet4.fieldbyname('SPName').AsString)='其它' then Exit;
|
||||
try
|
||||
frmCPCHTopMX:=TfrmCPCHTopMX.Create(Application);
|
||||
with frmCPCHTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FSPName:=Trim(Self.ClientDataSet4.fieldbyname('SPName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCPCHTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
763
BI(BIView.dll)/U_CPAllTopQ30.dfm
Normal file
763
BI(BIView.dll)/U_CPAllTopQ30.dfm
Normal file
|
|
@ -0,0 +1,763 @@
|
|||
object frmCPAllTopQ30: TfrmCPAllTopQ30
|
||||
Left = 301
|
||||
Top = 76
|
||||
Width = 1283
|
||||
Height = 669
|
||||
Caption = #20135#21697#30334#22823#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1267
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 297
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 307
|
||||
Top = 9
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21697#21517
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 14
|
||||
Top = 9
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 170
|
||||
Top = 9
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 5
|
||||
Width = 89
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 64
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 184
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 297
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 360
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 423
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1267
|
||||
Height = 599
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 294
|
||||
Height = 595
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 20
|
||||
Width = 290
|
||||
Height = 554
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column15
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 39
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH2: TPanel
|
||||
Left = 2
|
||||
Top = 574
|
||||
Width = 290
|
||||
Height = 19
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #25910#36135#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 290
|
||||
Height = 18
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25910#36135#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 296
|
||||
Top = 2
|
||||
Width = 295
|
||||
Height = 595
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 20
|
||||
Width = 291
|
||||
Height = 554
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 39
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object KK2: TPanel
|
||||
Left = 2
|
||||
Top = 574
|
||||
Width = 291
|
||||
Height = 19
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #24320#21345#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object KK1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 291
|
||||
Height = 18
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #24320#21345#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 591
|
||||
Top = 2
|
||||
Width = 295
|
||||
Height = 595
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 20
|
||||
Width = 291
|
||||
Height = 554
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 39
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object DJ2: TPanel
|
||||
Left = 2
|
||||
Top = 574
|
||||
Width = 291
|
||||
Height = 19
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object DJ1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 291
|
||||
Height = 18
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object Panel9: TPanel
|
||||
Left = 886
|
||||
Top = 2
|
||||
Width = 296
|
||||
Height = 595
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 3
|
||||
object cxGrid4: TcxGrid
|
||||
Left = 2
|
||||
Top = 20
|
||||
Width = 292
|
||||
Height = 554
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv4: TcxGridDBTableView
|
||||
OnDblClick = Tv4DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource4
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 39
|
||||
end
|
||||
end
|
||||
object cxGridLevel4: TcxGridLevel
|
||||
GridView = Tv4
|
||||
end
|
||||
end
|
||||
object CH2: TPanel
|
||||
Left = 2
|
||||
Top = 574
|
||||
Width = 292
|
||||
Height = 19
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
Caption = #20986#36135#24635#25968#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object CH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 292
|
||||
Height = 18
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #20986#36135#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 480
|
||||
Top = 208
|
||||
Width = 249
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 229
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 467
|
||||
Top = 163
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 468
|
||||
Top = 200
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
object DataSource4: TDataSource
|
||||
DataSet = ClientDataSet4
|
||||
Left = 955
|
||||
Top = 187
|
||||
end
|
||||
object ClientDataSet4: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 956
|
||||
Top = 224
|
||||
end
|
||||
object ClientDataSet11: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 304
|
||||
end
|
||||
object ClientDataSet21: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 476
|
||||
Top = 264
|
||||
end
|
||||
object ClientDataSet31: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 772
|
||||
Top = 264
|
||||
end
|
||||
object ClientDataSet41: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 956
|
||||
Top = 272
|
||||
end
|
||||
end
|
||||
305
BI(BIView.dll)/U_CPAllTopQ30.pas
Normal file
305
BI(BIView.dll)/U_CPAllTopQ30.pas
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
unit U_CPAllTopQ30;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmCPAllTopQ30 = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH2: TPanel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Panel6: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
KK2: TPanel;
|
||||
KK1: TPanel;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
Panel8: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
DJ2: TPanel;
|
||||
DJ1: TPanel;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel9: TPanel;
|
||||
cxGrid4: TcxGrid;
|
||||
Tv4: TcxGridDBTableView;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridLevel4: TcxGridLevel;
|
||||
CH2: TPanel;
|
||||
CH1: TPanel;
|
||||
DataSource4: TDataSource;
|
||||
ClientDataSet4: TClientDataSet;
|
||||
Panel10: TPanel;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
C_Code: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
ClientDataSet11: TClientDataSet;
|
||||
ClientDataSet21: TClientDataSet;
|
||||
ClientDataSet31: TClientDataSet;
|
||||
ClientDataSet41: TClientDataSet;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv4DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmCPAllTopQ30: TfrmCPAllTopQ30;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_PBTopMX,U_CPCHTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmCPAllTopQ30.InitGrid();
|
||||
begin
|
||||
Panel10.Visible:=True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_60M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='收货';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
{SH1.Caption:='收货百大排行榜('+Trim(ClientDataSet1.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet1.fieldbyname('QSBL').AsString)+'%)'; }
|
||||
SH2.Caption:='收货总数量'+'('+Trim(ClientDataSet1.fieldbyname('HZPS').AsString)+')';
|
||||
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_60M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='开卡';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
{ KK1.Caption:='开卡百大排行榜('+Trim(ClientDataSet2.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet2.fieldbyname('QSBL').AsString)+'%)'; }
|
||||
KK2.Caption:='开卡总数量'+'('+Trim(ClientDataSet2.fieldbyname('HZPS').AsString)+')';
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_60M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='打卷';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
{DJ1.Caption:='打卷百大排行榜('+Trim(ClientDataSet3.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet3.fieldbyname('QSBL').AsString)+'%)'; }
|
||||
DJ2.Caption:='打卷总数量'+'('+Trim(ClientDataSet3.fieldbyname('HZPS').AsString)+')';
|
||||
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_60M :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='出货';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet4);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet4);
|
||||
{CH1.Caption:='出货百大排行榜('+Trim(ClientDataSet4.fieldbyname('QSPS').AsString)
|
||||
+','+Trim(ClientDataSet4.fieldbyname('QSBL').AsString)+'%)'; }
|
||||
CH2.Caption:='出货总数量'+'('+Trim(ClientDataSet4.fieldbyname('HZPS').AsString)+')';
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCPAllTopQ30 := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear:string;
|
||||
FMonth:string;
|
||||
FDate:TDate;
|
||||
begin
|
||||
FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
if Trim(ClientDataSet1.fieldbyname('SPName').AsString)='其它' then Exit;
|
||||
try
|
||||
frmPBTopMX:=TfrmPBTopMX.Create(Application);
|
||||
with frmPBTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FSPName:=Trim(Self.ClientDataSet1.fieldbyname('SPName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmPBTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPAllTopQ30.Tv4DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet4.IsEmpty then Exit;
|
||||
if Trim(ClientDataSet4.fieldbyname('SPName').AsString)='其它' then Exit;
|
||||
try
|
||||
frmCPCHTopMX:=TfrmCPCHTopMX.Create(Application);
|
||||
with frmCPCHTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FSPName:=Trim(Self.ClientDataSet4.fieldbyname('SPName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCPCHTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
194
BI(BIView.dll)/U_CPCHTopMX.dfm
Normal file
194
BI(BIView.dll)/U_CPCHTopMX.dfm
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
object frmCPCHTopMX: TfrmCPCHTopMX
|
||||
Left = 328
|
||||
Top = 58
|
||||
Width = 644
|
||||
Height = 666
|
||||
Caption = #22383#24067#37319#36141#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 628
|
||||
Height = 628
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 624
|
||||
Height = 624
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 620
|
||||
Height = 598
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 175
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 105
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 108
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 620
|
||||
Height = 22
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #20986#36135#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
103
BI(BIView.dll)/U_CPCHTopMX.pas
Normal file
103
BI(BIView.dll)/U_CPCHTopMX.pas
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
unit U_CPCHTopMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh;
|
||||
|
||||
type
|
||||
TfrmCPCHTopMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FSPName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmCPCHTopMX: TfrmCPCHTopMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmCPCHTopMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_CPAll_CHMX :begdate,:enddate,:SPName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('SPName').Value:=FSPName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPCHTopMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCPCHTopMX := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCPCHTopMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCPCHTopMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption:='³ö»õÅÅÐаñ'+' ( '+FSPName+' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
848
BI(BIView.dll)/U_CPManage.dfm
Normal file
848
BI(BIView.dll)/U_CPManage.dfm
Normal file
|
|
@ -0,0 +1,848 @@
|
|||
object frmCPManage: TfrmCPManage
|
||||
Left = 189
|
||||
Top = 150
|
||||
Width = 1648
|
||||
Height = 822
|
||||
Caption = #20135#21697#26723#26696
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1630
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 95
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_YPGL.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 9
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFilter: TToolButton
|
||||
Left = 69
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 59
|
||||
OnClick = TBFilterClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 138
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 3
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBCopy: TToolButton
|
||||
Left = 207
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
ImageIndex = 57
|
||||
OnClick = TBCopyClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 54
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBMLEdit: TToolButton
|
||||
Left = 345
|
||||
Top = 0
|
||||
Caption = #30446#24405#20462#25913
|
||||
ImageIndex = 54
|
||||
OnClick = TBMLEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 440
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 17
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBImport: TToolButton
|
||||
Left = 509
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20837
|
||||
ImageIndex = 7
|
||||
OnClick = TBImportClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 578
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 53
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 647
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#25171#21360
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 746
|
||||
Top = 0
|
||||
Width = 33
|
||||
Height = 30
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Text = '1'
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 779
|
||||
Top = 1
|
||||
Width = 112
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 19
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
Text = #26679#21697#26631#31614
|
||||
Items.Strings = (
|
||||
#26679#21697#26631#31614
|
||||
#26679#21697#26631#31614'1')
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 891
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#39044#35272
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object TBUP: TToolButton
|
||||
Left = 990
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#19978#20256
|
||||
ImageIndex = 109
|
||||
OnClick = TBUPClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1089
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 275
|
||||
Top = 123
|
||||
Width = 8
|
||||
Height = 654
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = Panel5
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1630
|
||||
Height = 92
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 20
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #25195#25551#20837#21475
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 270
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 1340
|
||||
Top = 134
|
||||
Width = 9
|
||||
Height = 15
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 1400
|
||||
Top = 139
|
||||
Width = 9
|
||||
Height = 15
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 466
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #20135#21697#21517#31216
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 666
|
||||
Top = 15
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #39068#33394
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 830
|
||||
Top = 15
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #21407#26009#25104#20998
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 1048
|
||||
Top = 15
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #25104#20998
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 1218
|
||||
Top = 15
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #22791#27880
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 469
|
||||
Top = 49
|
||||
Width = 62
|
||||
Height = 15
|
||||
Caption = #20811' '#37325
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 666
|
||||
Top = 48
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #26426#22411
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 271
|
||||
Top = 49
|
||||
Width = 62
|
||||
Height = 15
|
||||
Caption = #38376' '#24133
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 858
|
||||
Top = 48
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #38024#22411
|
||||
end
|
||||
object CYID: TEdit
|
||||
Tag = 3
|
||||
Left = 90
|
||||
Top = 10
|
||||
Width = 151
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
OnKeyPress = CYIDKeyPress
|
||||
end
|
||||
object CYNO: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 10
|
||||
Width = 112
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYName: TEdit
|
||||
Tag = 2
|
||||
Left = 528
|
||||
Top = 10
|
||||
Width = 111
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYColor: TEdit
|
||||
Tag = 2
|
||||
Left = 705
|
||||
Top = 10
|
||||
Width = 111
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYSpec: TEdit
|
||||
Tag = 2
|
||||
Left = 896
|
||||
Top = 10
|
||||
Width = 112
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYCF: TEdit
|
||||
Tag = 2
|
||||
Left = 1086
|
||||
Top = 10
|
||||
Width = 112
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYNote: TEdit
|
||||
Tag = 2
|
||||
Left = 1256
|
||||
Top = 10
|
||||
Width = 112
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 530
|
||||
Top = 44
|
||||
Width = 111
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 10
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CarType: TEdit
|
||||
Tag = 2
|
||||
Left = 705
|
||||
Top = 43
|
||||
Width = 111
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 7
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYMF: TEdit
|
||||
Tag = 2
|
||||
Left = 333
|
||||
Top = 44
|
||||
Width = 111
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 9
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object ZhenXing: TEdit
|
||||
Tag = 2
|
||||
Left = 896
|
||||
Top = 43
|
||||
Width = 112
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 8
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 640
|
||||
Top = 290
|
||||
Width = 231
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 0
|
||||
Top = 123
|
||||
Width = 275
|
||||
Height = 654
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 271
|
||||
Height = 650
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'CPParent'
|
||||
DataController.KeyField = 'CPID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_YPGL.Red
|
||||
Styles.Selection = DataLink_YPGL.Red
|
||||
Styles.IncSearch = DataLink_YPGL.Red
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 283
|
||||
Top = 123
|
||||
Width = 1347
|
||||
Height = 654
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 4
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1343
|
||||
Height = 406
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
OnCustomDrawCell = Tv1CustomDrawCell
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_YPGL.SHuangSe
|
||||
Styles.IncSearch = DataLink_YPGL.SHuangSe
|
||||
Styles.Selection = DataLink_YPGL.SHuangSe
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
Width = 40
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'CPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
Width = 54
|
||||
end
|
||||
object v1CYNo: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'CYNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'CYName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 96
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21407#26009#25104#20998
|
||||
DataBinding.FieldName = 'CYSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
Width = 56
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'CYCF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
Width = 89
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #32447#38271
|
||||
DataBinding.FieldName = 'ShaChang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'CYMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
Width = 66
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'CYKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'CYHX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_YPGL.Default
|
||||
Width = 66
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'CYColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 77
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #38388#36317
|
||||
DataBinding.FieldName = 'ZhenXing'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #20135#37327
|
||||
DataBinding.FieldName = 'CYCL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column39: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'CYNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 166
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #26426#22411
|
||||
DataBinding.FieldName = 'CarType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #22270#29255
|
||||
DataBinding.FieldName = 'IsImg'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'CYConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object cxgrdCYCNHS: TcxGridDBColumn
|
||||
Caption = #25104#26412#26680#31639
|
||||
DataBinding.FieldName = 'CYCNHS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #26356#26032#26085#26399
|
||||
DataBinding.FieldName = 'BaoHuDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'YWY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #31867#21035
|
||||
DataBinding.FieldName = 'CPTYpe'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #26368#21518#20462#25913#26085#26399
|
||||
DataBinding.FieldName = 'EditTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 104
|
||||
end
|
||||
object cxgrdbclmnv1Column17: TcxGridDBColumn
|
||||
Caption = #26368#26032#35746#21333#21495
|
||||
DataBinding.FieldName = 'NewConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 2
|
||||
Top = 408
|
||||
Width = 1343
|
||||
Height = 244
|
||||
Align = alBottom
|
||||
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 1
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 17
|
||||
Width = 1339
|
||||
Height = 225
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTree
|
||||
Left = 91
|
||||
Top = 147
|
||||
end
|
||||
object ADOQueryTree20: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 61
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1127
|
||||
Top = 44
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1093
|
||||
Top = 49
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 432
|
||||
Top = 184
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 451
|
||||
Top = 155
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 493
|
||||
Top = 193
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 392
|
||||
Top = 184
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 392
|
||||
Top = 152
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Main
|
||||
Left = 424
|
||||
Top = 152
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 484
|
||||
Top = 157
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 461
|
||||
Top = 188
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 513
|
||||
Top = 157
|
||||
end
|
||||
object DSCYNO: TDataSource
|
||||
DataSet = CDS_CYNO
|
||||
Left = 771
|
||||
Top = 235
|
||||
end
|
||||
object CDS_CYNO: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 712
|
||||
Top = 264
|
||||
end
|
||||
object ADOQueryTree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 32
|
||||
Top = 144
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_YPGL.ADOLink
|
||||
Parameters = <>
|
||||
Left = 523
|
||||
Top = 192
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Left = 474
|
||||
Top = 258
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 516
|
||||
Top = 264
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
end
|
||||
1121
BI(BIView.dll)/U_CPManage.pas
Normal file
1121
BI(BIView.dll)/U_CPManage.pas
Normal file
File diff suppressed because it is too large
Load Diff
577
BI(BIView.dll)/U_CarTKHZTop.dfm
Normal file
577
BI(BIView.dll)/U_CarTKHZTop.dfm
Normal file
|
|
@ -0,0 +1,577 @@
|
|||
object frmCarTKHZTop: TfrmCarTKHZTop
|
||||
Left = 137
|
||||
Top = 97
|
||||
Width = 1580
|
||||
Height = 858
|
||||
Caption = #24320#20572#26426#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1562
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 320
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 324
|
||||
Top = 9
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #21697#21517
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 185
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 5
|
||||
Width = 89
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 69
|
||||
Top = 5
|
||||
Width = 114
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 205
|
||||
Top = 5
|
||||
Width = 111
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 320
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 389
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 458
|
||||
Top = 0
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 563
|
||||
Top = 3
|
||||
Width = 198
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 1
|
||||
Items.Strings = (
|
||||
#20572#26426#22825#25968'Top60'
|
||||
#24320#26426#22825#25968'Top30'
|
||||
'')
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 761
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 802
|
||||
Top = 31
|
||||
Width = 760
|
||||
Height = 780
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 756
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #32452#21035#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 756
|
||||
Height = 753
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
OnDblClick = Tv3DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv3Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv3Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv3Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv3Column6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #32452#21035
|
||||
DataBinding.FieldName = 'MCClass'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 39
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'MCType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 63
|
||||
end
|
||||
object Tv3Column2: TcxGridDBColumn
|
||||
Caption = #23544
|
||||
DataBinding.FieldName = 'MCZX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 46
|
||||
end
|
||||
object Tv3Column3: TcxGridDBColumn
|
||||
Caption = #36335#25968
|
||||
DataBinding.FieldName = 'MCLS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 46
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #24320#21488
|
||||
DataBinding.FieldName = 'KJTai'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 37
|
||||
end
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #20572#21488
|
||||
DataBinding.FieldName = 'TJTai'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 34
|
||||
end
|
||||
object Tv3Column4: TcxGridDBColumn
|
||||
Caption = #24320#22825
|
||||
DataBinding.FieldName = 'KJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 36
|
||||
end
|
||||
object Tv3Column5: TcxGridDBColumn
|
||||
Caption = #20572#22825
|
||||
DataBinding.FieldName = 'TJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 35
|
||||
end
|
||||
object v3Column1: TcxGridDBColumn
|
||||
Caption = #24320#26426#29575'%'
|
||||
DataBinding.FieldName = 'KJLv'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 55
|
||||
end
|
||||
object Tv3Column6: TcxGridDBColumn
|
||||
Caption = #24635#20135#20540
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 50
|
||||
end
|
||||
object Tv3Column7: TcxGridDBColumn
|
||||
Caption = #22343#20540
|
||||
DataBinding.FieldName = 'AvgMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 36
|
||||
end
|
||||
object v3Column2: TcxGridDBColumn
|
||||
Caption = #20572#26426#29575'%'
|
||||
DataBinding.FieldName = 'TJLv'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 802
|
||||
Height = 780
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 798
|
||||
Height = 753
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column15
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column4
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v2Column12
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1XH: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 30
|
||||
end
|
||||
object v1FXH: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'FXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 30
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'MCType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #23544
|
||||
DataBinding.FieldName = 'MCZX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 38
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #36335#25968
|
||||
DataBinding.FieldName = 'MCLS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 38
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #20572
|
||||
DataBinding.FieldName = 'TJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 36
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #24320
|
||||
DataBinding.FieldName = 'KJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #26085#20135
|
||||
DataBinding.FieldName = 'AvgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 52
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #24635#21305#25968
|
||||
DataBinding.FieldName = 'HZPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 52
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #24635#20844#26020#25968
|
||||
DataBinding.FieldName = 'HZKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #24635#20135#20540
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 55
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #22343#20540
|
||||
DataBinding.FieldName = 'AvgMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 39
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #21697#31181
|
||||
DataBinding.FieldName = 'SPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 237
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 798
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #24320#26426#22825#25968#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Button1: TButton
|
||||
Left = 48
|
||||
Top = 0
|
||||
Width = 75
|
||||
Height = 23
|
||||
Caption = #24320#26426
|
||||
TabOrder = 0
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 164
|
||||
Top = 0
|
||||
Width = 75
|
||||
Height = 23
|
||||
Caption = #20572#26426
|
||||
TabOrder = 1
|
||||
OnClick = Button2Click
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 650
|
||||
Top = 270
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 827
|
||||
Top = 215
|
||||
end
|
||||
end
|
||||
298
BI(BIView.dll)/U_CarTKHZTop.pas
Normal file
298
BI(BIView.dll)/U_CarTKHZTop.pas
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
unit U_CarTKHZTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator,dxCore,ActiveX;
|
||||
|
||||
type
|
||||
TfrmCarTKHZTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
C_Code: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
DataSource3: TDataSource;
|
||||
Panel5: TPanel;
|
||||
Panel7: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
Tv3Column2: TcxGridDBColumn;
|
||||
Tv3Column3: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
Tv3Column4: TcxGridDBColumn;
|
||||
Tv3Column5: TcxGridDBColumn;
|
||||
v3Column1: TcxGridDBColumn;
|
||||
Tv3Column6: TcxGridDBColumn;
|
||||
Tv3Column7: TcxGridDBColumn;
|
||||
v3Column2: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1XH: TcxGridDBColumn;
|
||||
v1FXH: TcxGridDBColumn;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Panel10: TPanel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv3DblClick(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmCarTKHZTop: TfrmCarTKHZTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_PBCarCPTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmCarTKHZTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible:=True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_TKJView :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_TKJView_Zu :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCarTKHZTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
v1FXH.Visible:=False;
|
||||
v1FXH.SortOrder:=soNone;
|
||||
v1XH.Visible:=True;
|
||||
v1XH.SortOrder:=soAscending;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
v1FXH.Visible:=False;
|
||||
v1FXH.SortOrder:=soNone;
|
||||
v1XH.Visible:=True;
|
||||
v1XH.SortOrder:=soAscending;
|
||||
ClientDataSet1.Locate('XH',1,[]);
|
||||
SH1.Caption:='开机天数排行榜';
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear:string;
|
||||
FMonth:string;
|
||||
FDate:TDate;
|
||||
begin
|
||||
FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
//EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
//EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end;
|
||||
EndDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ComboBox1.Text='' then Exit;
|
||||
if ComboBox1.ItemIndex=0 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text,cxGrid1);
|
||||
end else
|
||||
if ComboBox1.ItemIndex=1 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text,cxGrid3);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
try
|
||||
frmPBCarCPTopMX:=TfrmPBCarCPTopMX.Create(Application);
|
||||
with frmPBCarCPTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FCarNo:=Trim(Self.ClientDataSet1.fieldbyname('CarNo').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmPBCarCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.Tv3DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet3.IsEmpty then Exit;
|
||||
try
|
||||
frmPBCarCPTopMX:=TfrmPBCarCPTopMX.Create(Application);
|
||||
with frmPBCarCPTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FCarNo:=Trim(Self.ClientDataSet3.fieldbyname('CarNo').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmPBCarCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.Button1Click(Sender: TObject);
|
||||
begin
|
||||
v1FXH.Visible:=False;
|
||||
v1FXH.SortOrder:=soNone;
|
||||
v1XH.Visible:=True;
|
||||
v1XH.SortOrder:=soAscending;
|
||||
ClientDataSet1.Locate('XH',1,[]);
|
||||
SH1.Caption:='开机天数排行榜';
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKHZTop.Button2Click(Sender: TObject);
|
||||
begin
|
||||
v1FXH.Visible:=True;
|
||||
v1XH.Visible:=false;
|
||||
v1XH.SortOrder:=soNone;
|
||||
v1FXH.SortOrder:=soAscending;
|
||||
ClientDataSet1.Locate('FXH',1,[]);
|
||||
SH1.Caption:='停机天数排行榜';
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
492
BI(BIView.dll)/U_CarTKTop.dfm
Normal file
492
BI(BIView.dll)/U_CarTKTop.dfm
Normal file
|
|
@ -0,0 +1,492 @@
|
|||
object frmCarTKTop: TfrmCarTKTop
|
||||
Left = 195
|
||||
Top = 35
|
||||
Width = 1582
|
||||
Height = 858
|
||||
Caption = #22383#24067#30334#22823#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1564
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 320
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 324
|
||||
Top = 9
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #21697#21517
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 185
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 5
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 69
|
||||
Top = 5
|
||||
Width = 114
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 205
|
||||
Top = 5
|
||||
Width = 111
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 320
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 389
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 458
|
||||
Top = 0
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 563
|
||||
Top = 3
|
||||
Width = 198
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 1
|
||||
Items.Strings = (
|
||||
#20572#26426#22825#25968'Top60'
|
||||
#24320#26426#22825#25968'Top30'
|
||||
'')
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 761
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1564
|
||||
Height = 780
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 723
|
||||
Height = 776
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 719
|
||||
Height = 749
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'MCType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #23544
|
||||
DataBinding.FieldName = 'MCZX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 38
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #36335#25968
|
||||
DataBinding.FieldName = 'MCLS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 38
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #20572
|
||||
DataBinding.FieldName = 'TJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 36
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #24320
|
||||
DataBinding.FieldName = 'KJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 31
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #26085#20135
|
||||
DataBinding.FieldName = 'AvgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 42
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #24635#21305#25968
|
||||
DataBinding.FieldName = 'HZPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 52
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #24635#20844#26020#25968
|
||||
DataBinding.FieldName = 'HZKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 58
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #21697#31181
|
||||
DataBinding.FieldName = 'SPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 246
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 719
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #20572#26426#22825#25968'Top100'#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 725
|
||||
Top = 2
|
||||
Width = 837
|
||||
Height = 776
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 833
|
||||
Height = 749
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
OnDblClick = Tv3DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 37
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'MCType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv3Column2: TcxGridDBColumn
|
||||
Caption = #23544
|
||||
DataBinding.FieldName = 'MCZX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 38
|
||||
end
|
||||
object Tv3Column3: TcxGridDBColumn
|
||||
Caption = #36335#25968
|
||||
DataBinding.FieldName = 'MCLS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 38
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #24320
|
||||
DataBinding.FieldName = 'KJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 36
|
||||
end
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #20572
|
||||
DataBinding.FieldName = 'TJDay'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 31
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #26085#20135
|
||||
DataBinding.FieldName = 'AvgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 55
|
||||
end
|
||||
object v3Column1: TcxGridDBColumn
|
||||
Caption = #24635#21305#25968
|
||||
DataBinding.FieldName = 'HZPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
object v3Column2: TcxGridDBColumn
|
||||
Caption = #24635#20844#26020#25968
|
||||
DataBinding.FieldName = 'HZKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #21697#31181
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 250
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 833
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #24320#26426#22825#25968'Top100'#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 650
|
||||
Top = 270
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
258
BI(BIView.dll)/U_CarTKTop.pas
Normal file
258
BI(BIView.dll)/U_CarTKTop.pas
Normal file
|
|
@ -0,0 +1,258 @@
|
|||
unit U_CarTKTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmCarTKTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
C_Code: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
Panel5: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel7: TPanel;
|
||||
Panel10: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v3Column1: TcxGridDBColumn;
|
||||
v3Column2: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv3Column2: TcxGridDBColumn;
|
||||
Tv3Column3: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv3DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmCarTKTop: TfrmCarTKTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_PBCarCPTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmCarTKTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible:=True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_TJView_A :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_KJView :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCarTKTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear:string;
|
||||
FMonth:string;
|
||||
FDate:TDate;
|
||||
begin
|
||||
FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
//EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
//EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end;
|
||||
EndDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ComboBox1.Text='' then Exit;
|
||||
if ComboBox1.ItemIndex=0 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text,cxGrid1);
|
||||
end else
|
||||
if ComboBox1.ItemIndex=1 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text,cxGrid3);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
try
|
||||
frmPBCarCPTopMX:=TfrmPBCarCPTopMX.Create(Application);
|
||||
with frmPBCarCPTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FCarNo:=Trim(Self.ClientDataSet1.fieldbyname('CarNo').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmPBCarCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCarTKTop.Tv3DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet3.IsEmpty then Exit;
|
||||
try
|
||||
frmPBCarCPTopMX:=TfrmPBCarCPTopMX.Create(Application);
|
||||
with frmPBCarCPTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FCarNo:=Trim(Self.ClientDataSet3.fieldbyname('CarNo').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmPBCarCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
390
BI(BIView.dll)/U_ContractListSel.dfm
Normal file
390
BI(BIView.dll)/U_ContractListSel.dfm
Normal file
|
|
@ -0,0 +1,390 @@
|
|||
object frmContractListSel: TfrmContractListSel
|
||||
Left = 96
|
||||
Top = 66
|
||||
Width = 1464
|
||||
Height = 737
|
||||
Align = alClient
|
||||
Caption = #35746#21333#36873#25321
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1446
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1446
|
||||
Height = 50
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 29
|
||||
Top = 19
|
||||
Width = 64
|
||||
Height = 15
|
||||
Caption = #30331#35760#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 716
|
||||
Top = 19
|
||||
Width = 32
|
||||
Height = 15
|
||||
Caption = #23458#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 904
|
||||
Top = 19
|
||||
Width = 48
|
||||
Height = 15
|
||||
Caption = #19994#21153#21592
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 345
|
||||
Top = 19
|
||||
Width = 48
|
||||
Height = 15
|
||||
Caption = #35746#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 210
|
||||
Top = 20
|
||||
Width = 8
|
||||
Height = 15
|
||||
Caption = '-'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 530
|
||||
Top = 19
|
||||
Width = 32
|
||||
Height = 15
|
||||
Caption = #21697#21517
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 95
|
||||
Top = 14
|
||||
Width = 114
|
||||
Height = 23
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 220
|
||||
Top = 14
|
||||
Width = 115
|
||||
Height = 23
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object BuyName: TEdit
|
||||
Tag = 2
|
||||
Left = 750
|
||||
Top = 14
|
||||
Width = 128
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = BuyNameChange
|
||||
end
|
||||
object Salesman: TEdit
|
||||
Tag = 2
|
||||
Left = 955
|
||||
Top = 14
|
||||
Width = 108
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = BuyNameChange
|
||||
end
|
||||
object OrderNO: TEdit
|
||||
Tag = 2
|
||||
Left = 396
|
||||
Top = 14
|
||||
Width = 102
|
||||
Height = 23
|
||||
TabOrder = 4
|
||||
OnChange = BuyNameChange
|
||||
OnKeyPress = OrderNOKeyPress
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 1103
|
||||
Top = 15
|
||||
Width = 106
|
||||
Height = 21
|
||||
Caption = #33258#24049#30340#35746#21333
|
||||
Checked = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
State = cbChecked
|
||||
TabOrder = 5
|
||||
OnClick = CheckBox1Click
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 564
|
||||
Top = 14
|
||||
Width = 111
|
||||
Height = 23
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnChange = BuyNameChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 82
|
||||
Width = 1446
|
||||
Height = 608
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object TV1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.Default
|
||||
object V1Column2: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'ssel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 50
|
||||
end
|
||||
object V2Column2: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 165
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'MPRTCodeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 213
|
||||
end
|
||||
object V2Column5: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'BuyName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 108
|
||||
end
|
||||
object V1Column1: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'Salesman'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object TV1Column1: TcxGridDBColumn
|
||||
Caption = #29702#21333
|
||||
DataBinding.FieldName = 'LiDan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 112
|
||||
end
|
||||
object V1Column3: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 111
|
||||
end
|
||||
object V1Column4: TcxGridDBColumn
|
||||
Caption = #30331#35760#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 168
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 768
|
||||
Top = 168
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 248
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 272
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 216
|
||||
Top = 192
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 840
|
||||
Top = 168
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 808
|
||||
Top = 168
|
||||
end
|
||||
end
|
||||
237
BI(BIView.dll)/U_ContractListSel.pas
Normal file
237
BI(BIView.dll)/U_ContractListSel.pas
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
unit U_ContractListSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxPC, cxButtonEdit,
|
||||
cxDropDownEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||
dxBarBuiltInMenu;
|
||||
|
||||
type
|
||||
TfrmContractListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Main: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label9: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
BuyName: TEdit;
|
||||
Salesman: TEdit;
|
||||
OrderNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Label2: TLabel;
|
||||
V2Column2: TcxGridDBColumn;
|
||||
V2Column5: TcxGridDBColumn;
|
||||
V1Column1: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
V1Column2: TcxGridDBColumn;
|
||||
V1Column3: TcxGridDBColumn;
|
||||
V1Column4: TcxGridDBColumn;
|
||||
CheckBox1: TCheckBox;
|
||||
Label3: TLabel;
|
||||
MPRTCodeName: TEdit;
|
||||
TV1Column1: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure BuyNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure OrderNOKeyPress(Sender: TObject; var Key: Char);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmContractListSel: TfrmContractListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmContractListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmContractListSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
writeCxGrid(self.Caption +'1122', Tv1, '合同管理');
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select PM.OrderNo,PM.MPRTCodeName,PM.Filler,PM.FillTime,A.MainId,Salesman=A.YWY,BuyName=A.CustomerNoName,A.LiDan');
|
||||
sql.Add(' from PBOrder_Main PM ');
|
||||
sql.Add(' left join CP_Info CP on PM.MPRTCodeName=CP.SPName');
|
||||
sql.Add(' inner join JYOrder_Main A on PM.OrderNo=A.ConNo');
|
||||
SQL.Add('where PM.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + '''');
|
||||
SQL.Add(' and PM.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + '''');
|
||||
SQL.Add(' and isnull(PM.Valid,'''')=''Y'' ');
|
||||
sql.Add(' and not exists(select * from Order_HS_OrderNo OO inner join Order_HS HS on OO.HSID=HS.HSID where HS.Valid=''Y'' and OO.orderNo=PM.OrderNo)');
|
||||
if CheckBox1.Checked then
|
||||
begin
|
||||
sql.Add(' and A.YWY='''+Trim(DName)+'''');
|
||||
end;
|
||||
sql.Add(' order by PM.OrderNo');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.InitForm();
|
||||
begin
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 90;
|
||||
ReadCxGrid(self.Caption +'1122', Tv1, '合同管理');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmContractListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.BuyNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.OrderNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select PM.OrderNo,PM.MPRTCodeName,PM.Filler,PM.FillTime,A.MainId,Salesman=A.YWY,BuyName=A.CustomerNoName,A.LiDan');
|
||||
sql.Add(' from PBOrder_Main PM ');
|
||||
sql.Add(' left join CP_Info CP on PM.MPRTCodeName=CP.SPName');
|
||||
sql.Add(' inner join JYOrder_Main A on PM.OrderNo=A.ConNo');
|
||||
SQL.Add('where PM.OrderNo like'''+'%'+Trim(OrderNO.Text)+'%'+'''');
|
||||
SQL.Add(' and isnull(PM.Valid,'''')=''Y'' ');
|
||||
sql.Add(' and not exists(select * from Order_HS_OrderNo OO inner join Order_HS OS on OO.HSID=OS.HSID where OO.OrderNo=A.ConNo and OS.Valid=''Y'')');
|
||||
if CheckBox1.Checked then
|
||||
begin
|
||||
sql.Add(' and A.YWY='''+Trim(DName)+'''');
|
||||
end;
|
||||
sql.Add(' order by PM.OrderNo');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
482
BI(BIView.dll)/U_DCC_CodeNameMX.dfm
Normal file
482
BI(BIView.dll)/U_DCC_CodeNameMX.dfm
Normal file
|
|
@ -0,0 +1,482 @@
|
|||
object frmDCC_CodeNameMX: TfrmDCC_CodeNameMX
|
||||
Left = 196
|
||||
Top = 69
|
||||
Width = 1481
|
||||
Height = 967
|
||||
Caption = #21697#21517#26126#32454#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1463
|
||||
Height = 920
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel4: TPanel
|
||||
Left = 984
|
||||
Top = 2
|
||||
Width = 477
|
||||
Height = 916
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 473
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26085#26399#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 473
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn17
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn20
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn21
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'JSDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 86
|
||||
end
|
||||
object cxGridDBColumn21: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn19: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn20: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object cxGridDBColumn18: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 44
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 491
|
||||
Height = 916
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 487
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 73
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 53
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 487
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26426#21488#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 493
|
||||
Top = 2
|
||||
Width = 491
|
||||
Height = 916
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 487
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn13
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn14
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #25377#36710#24037
|
||||
DataBinding.FieldName = 'Worker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 73
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 47
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 487
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25377#36710#24037#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1193
|
||||
Top = 109
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1105
|
||||
Top = 77
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1137
|
||||
Top = 89
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 80
|
||||
Top = 168
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 84
|
||||
Top = 272
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 83
|
||||
Top = 223
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 604
|
||||
Top = 232
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 651
|
||||
Top = 207
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 776
|
||||
Top = 336
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 968
|
||||
Top = 300
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 971
|
||||
Top = 355
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 972
|
||||
Top = 404
|
||||
end
|
||||
end
|
||||
184
BI(BIView.dll)/U_DCC_CodeNameMX.pas
Normal file
184
BI(BIView.dll)/U_DCC_CodeNameMX.pas
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
unit U_DCC_CodeNameMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDCC_CodeNameMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
Panel2: TPanel;
|
||||
Panel4: TPanel;
|
||||
Panel5: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel6: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel8: TPanel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel3: TPanel;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FC_CodeName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDCC_CodeNameMX: TfrmDCC_CodeNameMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_DCCarMX_Worker;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDCC_CodeNameMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_C_CodeName_MX :begdate,:enddate,:FC_CodeName,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('FC_CodeName').Value:=FC_CodeName;
|
||||
Parameters.ParamByName('Type').Value:='CarNo';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_C_CodeName_MX :begdate,:enddate,:FC_CodeName,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('FC_CodeName').Value:=FC_CodeName;
|
||||
Parameters.ParamByName('Type').Value:='Worker';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_C_CodeName_MX :begdate,:enddate,:FC_CodeName,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('FC_CodeName').Value:=FC_CodeName;
|
||||
Parameters.ParamByName('Type').Value:='JSDate';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCC_CodeNameMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmDCC_CodeNameMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDCC_CodeNameMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDCC_CodeNameMX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDCC_CodeNameMX.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
{ try
|
||||
frmDCCarMX_Worker := TfrmDCCarMX_Worker.Create(Application);
|
||||
with frmDCCarMX_Worker do
|
||||
begin
|
||||
FBegdate := Self.FBegdate;
|
||||
FEnddate := Self.FEnddate;
|
||||
FCarNo := Trim(Self.FCarNo);
|
||||
FWorker := Trim(Self.ClientDataSet1.fieldbyname('Worker').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCCarMX_Worker.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
490
BI(BIView.dll)/U_DCCarMX.dfm
Normal file
490
BI(BIView.dll)/U_DCCarMX.dfm
Normal file
|
|
@ -0,0 +1,490 @@
|
|||
object frmDCCarMX: TfrmDCCarMX
|
||||
Left = 299
|
||||
Top = 60
|
||||
Width = 1346
|
||||
Height = 967
|
||||
Caption = #26426#21488#26126#32454#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1328
|
||||
Height = 920
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel4: TPanel
|
||||
Left = 625
|
||||
Top = 2
|
||||
Width = 701
|
||||
Height = 916
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 697
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26085#26399#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 697
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn17
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn20
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn21
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'JSDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 86
|
||||
end
|
||||
object cxGridDBColumn21: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn19: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 55
|
||||
end
|
||||
object cxGridDBColumn20: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn18: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 47
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 623
|
||||
Height = 916
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 613
|
||||
Width = 619
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #21697#21517#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 619
|
||||
Height = 588
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #25377#36710#24037
|
||||
DataBinding.FieldName = 'Worker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 78
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
OnCustomDrawCell = cxGridDBColumn10CustomDrawCell
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 52
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty0'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty1'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty11'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty21'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 619
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25377#36710#24037#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 636
|
||||
Width = 619
|
||||
Height = 278
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn13
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn14
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 74
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 71
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 52
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1113
|
||||
Top = 13
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1053
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1081
|
||||
Top = 9
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 80
|
||||
Top = 168
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 84
|
||||
Top = 272
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 83
|
||||
Top = 223
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 192
|
||||
Top = 704
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 195
|
||||
Top = 759
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 196
|
||||
Top = 808
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 968
|
||||
Top = 300
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 971
|
||||
Top = 355
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 972
|
||||
Top = 404
|
||||
end
|
||||
end
|
||||
219
BI(BIView.dll)/U_DCCarMX.pas
Normal file
219
BI(BIView.dll)/U_DCCarMX.pas
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
unit U_DCCarMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDCCarMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
Panel2: TPanel;
|
||||
Panel4: TPanel;
|
||||
Panel5: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel6: TPanel;
|
||||
Panel7: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel8: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure cxGridDBColumn10CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FCarNo:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDCCarMX: TfrmDCCarMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_DCCarMX_Worker;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDCCarMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_CarNo_MX :begdate,:enddate,:CarNo,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('CarNo').Value:=FCarNo;
|
||||
Parameters.ParamByName('Type').Value:='Worker';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_CarNo_MX :begdate,:enddate,:CarNo,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('CarNo').Value:=FCarNo;
|
||||
Parameters.ParamByName('Type').Value:='C_CodeName';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_CarNo_MX :begdate,:enddate,:CarNo,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('CarNo').Value:=FCarNo;
|
||||
Parameters.ParamByName('Type').Value:='JSDate';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDCCarMX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmDCCarMX_Worker := TfrmDCCarMX_Worker.Create(Application);
|
||||
with frmDCCarMX_Worker do
|
||||
begin
|
||||
FBegdate := Self.FBegdate;
|
||||
FEnddate := Self.FEnddate;
|
||||
FCarNo := Trim(Self.FCarNo);
|
||||
FWorker := Trim(Self.ClientDataSet1.fieldbyname('Worker').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCCarMX_Worker.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX.cxGridDBColumn10CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
var
|
||||
Id0,Id1,Id11,Id21:Integer;
|
||||
begin
|
||||
Id0:=TV1.GetColumnByFieldName('Qty0').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>15000 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id1:=TV1.GetColumnByFieldName('Qty1').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id11:=TV1.GetColumnByFieldName('Qty11').Index;
|
||||
if AViewInfo.GridRecord.Values[Id11]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id21:=TV1.GetColumnByFieldName('Qty21').Index;
|
||||
if AViewInfo.GridRecord.Values[Id21]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
356
BI(BIView.dll)/U_DCCarMX_Worker.dfm
Normal file
356
BI(BIView.dll)/U_DCCarMX_Worker.dfm
Normal file
|
|
@ -0,0 +1,356 @@
|
|||
object frmDCCarMX_Worker: TfrmDCCarMX_Worker
|
||||
Left = 425
|
||||
Top = 119
|
||||
Width = 1346
|
||||
Height = 967
|
||||
Caption = #26426#21488#25377#36710#24037#26126#32454#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1328
|
||||
Height = 920
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel4: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 547
|
||||
Height = 916
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 543
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26085#26399#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 543
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn17
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn20
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn21
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'JSDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 86
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn21: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
OnCustomDrawCell = cxGridDBColumn21CustomDrawCell
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn19: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn20: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object cxGridDBColumn18: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 50
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'DayStr'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 549
|
||||
Top = 2
|
||||
Width = 777
|
||||
Height = 916
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 773
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn13
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn14
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 74
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 78
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #24179#22343#21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 773
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #21697#21517#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1113
|
||||
Top = 13
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1053
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1081
|
||||
Top = 9
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 80
|
||||
Top = 168
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 84
|
||||
Top = 272
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 83
|
||||
Top = 223
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 896
|
||||
Top = 72
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 951
|
||||
Top = 75
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1004
|
||||
Top = 68
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 1212
|
||||
Top = 280
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 1275
|
||||
Top = 275
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1244
|
||||
Top = 280
|
||||
end
|
||||
end
|
||||
173
BI(BIView.dll)/U_DCCarMX_Worker.pas
Normal file
173
BI(BIView.dll)/U_DCCarMX_Worker.pas
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
unit U_DCCarMX_Worker;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDCCarMX_Worker = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
Panel2: TPanel;
|
||||
Panel4: TPanel;
|
||||
Panel5: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel6: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure cxGridDBColumn21CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FCarNo,FWorker:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDCCarMX_Worker: TfrmDCCarMX_Worker;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDCCarMX_Worker.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_CarNo_MX_Worker :begdate,:enddate,:CarNo,:Worker,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('CarNo').Value:=FCarNo;
|
||||
Parameters.ParamByName('Worker').Value:=FWorker;
|
||||
Parameters.ParamByName('Type').Value:='JSDate';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_CarNo_MX_Worker :begdate,:enddate,:CarNo,:Worker,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('CarNo').Value:=FCarNo;
|
||||
Parameters.ParamByName('Worker').Value:=FWorker;
|
||||
Parameters.ParamByName('Type').Value:='C_CodeName';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX_Worker.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX_Worker.FormShow(Sender: TObject);
|
||||
begin
|
||||
Panel5.Caption:=FCarNo+'¡ú'+FWorker+'¡ú'+'ÈÕÆÚ²úÁ¿Ã÷ϸ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX_Worker.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDCCarMX_Worker:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDCCarMX_Worker.cxGridDBColumn21CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
var
|
||||
Id0,Id1,Id11,Id21:Integer;
|
||||
begin
|
||||
Id0:=TV1.GetColumnByFieldName('Qty').Index;
|
||||
Id1:=TV1.GetColumnByFieldName('DayStr').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>15000 then
|
||||
begin
|
||||
if AViewInfo.GridRecord.Values[Id0]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end else
|
||||
begin
|
||||
if (AViewInfo.GridRecord.Values[Id1]<>'01') and (AViewInfo.GridRecord.Values[Id1]<>'11')
|
||||
and (AViewInfo.GridRecord.Values[Id1]<>'21') then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
476
BI(BIView.dll)/U_DCJSDateMX.dfm
Normal file
476
BI(BIView.dll)/U_DCJSDateMX.dfm
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
object frmDCJSDateMX: TfrmDCJSDateMX
|
||||
Left = 309
|
||||
Top = 156
|
||||
Width = 1346
|
||||
Height = 967
|
||||
Caption = #26085#26399#26126#32454#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1328
|
||||
Height = 920
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel4: TPanel
|
||||
Left = 625
|
||||
Top = 2
|
||||
Width = 701
|
||||
Height = 916
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 697
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26426#21488#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 697
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn17
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn20
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn21
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 86
|
||||
end
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn21: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn19: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn20: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object cxGridDBColumn18: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 623
|
||||
Height = 916
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 613
|
||||
Width = 619
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #21697#21517#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 619
|
||||
Height = 588
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #25377#36710#24037
|
||||
DataBinding.FieldName = 'Worker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 78
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 63
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 64
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 619
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25377#36710#24037#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 636
|
||||
Width = 619
|
||||
Height = 278
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn13
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn14
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 74
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 78
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 58
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 64
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1113
|
||||
Top = 13
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1053
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1081
|
||||
Top = 9
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 80
|
||||
Top = 168
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 84
|
||||
Top = 272
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 83
|
||||
Top = 223
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 192
|
||||
Top = 704
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 195
|
||||
Top = 759
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 196
|
||||
Top = 808
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 968
|
||||
Top = 300
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 971
|
||||
Top = 355
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 972
|
||||
Top = 404
|
||||
end
|
||||
end
|
||||
177
BI(BIView.dll)/U_DCJSDateMX.pas
Normal file
177
BI(BIView.dll)/U_DCJSDateMX.pas
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
unit U_DCJSDateMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDCJSDateMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
Panel2: TPanel;
|
||||
Panel4: TPanel;
|
||||
Panel5: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel6: TPanel;
|
||||
Panel7: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel8: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FJSdate:TDate;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDCJSDateMX: TfrmDCJSDateMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_DCCarMX_Worker;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDCJSDateMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_JSDate_MX :JSdate,:Type');
|
||||
Parameters.ParamByName('JSdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FJSdate));
|
||||
Parameters.ParamByName('Type').Value:='CarNo';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_JSDate_MX :JSdate,:Type');
|
||||
Parameters.ParamByName('JSdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FJSdate));
|
||||
Parameters.ParamByName('Type').Value:='C_CodeName';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_JSDate_MX :JSdate,:Type');
|
||||
Parameters.ParamByName('JSdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FJSdate));
|
||||
Parameters.ParamByName('Type').Value:='Worker';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCJSDateMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmDCJSDateMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDCJSDateMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDCJSDateMX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDCJSDateMX.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
{try
|
||||
frmDCCarMX_Worker := TfrmDCCarMX_Worker.Create(Application);
|
||||
with frmDCCarMX_Worker do
|
||||
begin
|
||||
FBegdate := Self.FBegdate;
|
||||
FEnddate := Self.FEnddate;
|
||||
FCarNo := Trim(Self.FCarNo);
|
||||
FWorker := Trim(Self.ClientDataSet1.fieldbyname('Worker').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCCarMX_Worker.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
519
BI(BIView.dll)/U_DCMoneyTop.dfm
Normal file
519
BI(BIView.dll)/U_DCMoneyTop.dfm
Normal file
|
|
@ -0,0 +1,519 @@
|
|||
object frmDCMoneyTop: TfrmDCMoneyTop
|
||||
Left = 300
|
||||
Top = 79
|
||||
Width = 1575
|
||||
Height = 859
|
||||
Caption = #22383#24067#39564#24067#24037#20135#37327#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1557
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 328
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 188
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 71
|
||||
Top = 5
|
||||
Width = 113
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 209
|
||||
Top = 5
|
||||
Width = 111
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 328
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 397
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 466
|
||||
Top = 0
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 571
|
||||
Top = 3
|
||||
Width = 196
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 1
|
||||
Items.Strings = (
|
||||
#39564#24067#24037#20135#37327#27719#24635
|
||||
#39564#24067#24037#20135#37327#26126#32454#65288#21697#21517#65289
|
||||
#39564#24067#24037#20135#37327#26126#32454#65288#26085#26399#65289)
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 767
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1557
|
||||
Height = 781
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 356
|
||||
Height = 777
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 352
|
||||
Height = 750
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #39564#24067#24037
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 98
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 89
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 352
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #39564#24067#24037#20135#37327#27719#24635
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 776
|
||||
Top = 2
|
||||
Width = 779
|
||||
Height = 777
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 775
|
||||
Height = 750
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 136
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 75
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 775
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #39564#24067#20135#37327#26126#32454#65288#26085#26399#65289
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 358
|
||||
Top = 2
|
||||
Width = 418
|
||||
Height = 777
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 414
|
||||
Height = 750
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
OnDblClick = Tv3DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellDblClick = Tv3CellDblClick
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 166
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 71
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 100
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 414
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #39564#24067#24037#20135#37327#26126#32454#65288#21697#21517#65289
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 618
|
||||
Top = 270
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 97
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 825
|
||||
Top = 125
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 925
|
||||
Top = 113
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 667
|
||||
Top = 399
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 736
|
||||
Top = 408
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 1371
|
||||
Top = 579
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1444
|
||||
Top = 628
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 616
|
||||
Top = 204
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 1448
|
||||
Top = 248
|
||||
end
|
||||
end
|
||||
295
BI(BIView.dll)/U_DCMoneyTop.pas
Normal file
295
BI(BIView.dll)/U_DCMoneyTop.pas
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
unit U_DCMoneyTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDCMoneyTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Panel10: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel4: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel5: TPanel;
|
||||
Panel6: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel7: TPanel;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv3DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
frmDCMoneyTop: TfrmDCMoneyTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_DJCPTopMX, U_ZJCPTopMX, U_DJGGZPMORDMX, U_DDDJJHMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDCMoneyTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DCMoneyAll :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDCMoneyTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('1', Tv1, 'P´ò¾í¹¤¹¤×Ê');
|
||||
WriteCxGrid('2', Tv2, 'P´ò¾í¹¤¹¤×Ê');
|
||||
WriteCxGrid('3', Tv3, 'P´ò¾í¹¤¹¤×Ê');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('1', Tv1, 'P´ò¾í¹¤¹¤×Ê');
|
||||
ReadCxGrid('2', Tv2, 'P´ò¾í¹¤¹¤×Ê');
|
||||
ReadCxGrid('3', Tv3, 'P´ò¾í¹¤¹¤×Ê');
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear: string;
|
||||
FMonth: string;
|
||||
FDate: TDate;
|
||||
begin
|
||||
{ FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
|
||||
end;}
|
||||
BegDate.Date := SGetServerDateMBeg(ADOQueryTemp);
|
||||
EndDate.Date := SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ComboBox1.Text = '' then
|
||||
Exit;
|
||||
if ComboBox1.ItemIndex = 0 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid1);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 1 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid3);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 2 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid2);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DCMoneyAll_MX_PM :begdate,:enddate,:KHName');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('KHName').Value := Trim(ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DCMoneyAll_MX_RQ :begdate,:enddate,:KHName');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('KHName').Value := Trim(ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
|
||||
|
||||
// try
|
||||
// frmDJGGZPMORDMX := TfrmDJGGZPMORDMX.Create(Application);
|
||||
// with frmDJGGZPMORDMX do
|
||||
// begin
|
||||
// FBegdate := Self.BegDate.Date;
|
||||
// FEnddate := Self.enddate.Date + 1;
|
||||
// FKHName := Trim(Self.ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
// FSPName := Trim(Self.ClientDataSet3.fieldbyname('SPName').AsString);
|
||||
// if ShowModal = 1 then
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// end;
|
||||
// finally
|
||||
// frmDJGGZPMORDMX.Free;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCMoneyTop.Tv3DblClick(Sender: TObject);
|
||||
begin
|
||||
{if ClientDataSet3.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmDDDJJHMX := TfrmDDDJJHMX.Create(Application);
|
||||
with frmDDDJJHMX do
|
||||
begin
|
||||
FBegdate := Self.BegDate.Date;
|
||||
FEnddate := Self.enddate.Date + 1;
|
||||
FKHName := Trim(Self.ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
FSPName := Trim(Self.ClientDataSet3.fieldbyname('SPName').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDDDJJHMX.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
791
BI(BIView.dll)/U_DCTimeZhou.dfm
Normal file
791
BI(BIView.dll)/U_DCTimeZhou.dfm
Normal file
|
|
@ -0,0 +1,791 @@
|
|||
object frmDCTimeZhou: TfrmDCTimeZhou
|
||||
Left = 81
|
||||
Top = 32
|
||||
Width = 1666
|
||||
Height = 971
|
||||
Caption = #22278#26426#20135#37327#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1648
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 328
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 188
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 71
|
||||
Top = 5
|
||||
Width = 113
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 209
|
||||
Top = 5
|
||||
Width = 111
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 328
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 397
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 466
|
||||
Top = 0
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 571
|
||||
Top = 3
|
||||
Width = 196
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 1
|
||||
Items.Strings = (
|
||||
#26426#21488#20135#37327#27719#24635
|
||||
#25377#36710#24037#20135#37327#27719#24635
|
||||
#21697#21517#20135#37327#27719#24635
|
||||
#26085#26399#20135#37327#27719#24635)
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 767
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1648
|
||||
Height = 893
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 453
|
||||
Height = 889
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 449
|
||||
Height = 862
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column3
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 62
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
OnCustomDrawCell = Tv1Column3CustomDrawCell
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 45
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 47
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty0'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty1'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty11'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty21'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 449
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26426#21488#20135#37327#27719#24635
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 947
|
||||
Top = 2
|
||||
Width = 699
|
||||
Height = 889
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 695
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26085#26399#20135#37327#27719#24635
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid5: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 695
|
||||
Height = 862
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv5: TcxGridDBTableView
|
||||
OnDblClick = Tv5DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource5
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn17
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn20
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn21
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'JSDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 68
|
||||
end
|
||||
object Tv5Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn21: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn19: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object cxGridDBColumn20: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 45
|
||||
end
|
||||
object cxGridDBColumn18: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 53
|
||||
end
|
||||
end
|
||||
object cxGridLevel4: TcxGridLevel
|
||||
GridView = Tv5
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 455
|
||||
Top = 2
|
||||
Width = 492
|
||||
Height = 889
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 613
|
||||
Width = 488
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #21697#21517#20135#37327#27719#24635
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 488
|
||||
Height = 588
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
OnDblClick = Tv3DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #25377#36710#24037
|
||||
DataBinding.FieldName = 'Worker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 64
|
||||
end
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
OnCustomDrawCell = cxGridDBColumn10CustomDrawCell
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 47
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 54
|
||||
end
|
||||
object Tv3Column2: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty0'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv3Column3: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty1'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv3Column4: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty11'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv3Column5: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty21'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 488
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25377#36710#24037#20135#37327#27719#24635
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 636
|
||||
Width = 488
|
||||
Height = 251
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv2: TcxGridDBTableView
|
||||
OnDblClick = Tv2DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn13
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn14
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 74
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 75
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 45
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 618
|
||||
Top = 270
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 97
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 825
|
||||
Top = 125
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 925
|
||||
Top = 113
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 647
|
||||
Top = 399
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 684
|
||||
Top = 404
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 939
|
||||
Top = 639
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 904
|
||||
Top = 636
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 616
|
||||
Top = 396
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 868
|
||||
Top = 636
|
||||
end
|
||||
object cxGridPopupMenu5: TcxGridPopupMenu
|
||||
Grid = cxGrid5
|
||||
PopupMenus = <>
|
||||
Left = 1192
|
||||
Top = 448
|
||||
end
|
||||
object DataSource5: TDataSource
|
||||
DataSet = ClientDataSet5
|
||||
Left = 1223
|
||||
Top = 451
|
||||
end
|
||||
object ClientDataSet5: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1260
|
||||
Top = 456
|
||||
end
|
||||
end
|
||||
478
BI(BIView.dll)/U_DCTimeZhou.pas
Normal file
478
BI(BIView.dll)/U_DCTimeZhou.pas
Normal file
|
|
@ -0,0 +1,478 @@
|
|||
unit U_DCTimeZhou;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDCTimeZhou = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Panel10: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel4: TPanel;
|
||||
Panel5: TPanel;
|
||||
Panel6: TPanel;
|
||||
Panel7: TPanel;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel8: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxGrid5: TcxGrid;
|
||||
Tv5: TcxGridDBTableView;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridLevel4: TcxGridLevel;
|
||||
cxGridPopupMenu5: TcxGridPopupMenu;
|
||||
DataSource5: TDataSource;
|
||||
ClientDataSet5: TClientDataSet;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
Tv5Column1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv3Column2: TcxGridDBColumn;
|
||||
Tv3Column3: TcxGridDBColumn;
|
||||
Tv3Column4: TcxGridDBColumn;
|
||||
Tv3Column5: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv3DblClick(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv5DblClick(Sender: TObject);
|
||||
procedure Tv2DblClick(Sender: TObject);
|
||||
procedure Tv1Column3CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
procedure cxGridDBColumn10CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
frmDCTimeZhou: TfrmDCTimeZhou;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_DCCarMX,U_DCWorkerMX,U_DCJSDateMX,U_DCC_CodeNameMX, U_DJCPTopMX, U_ZJCPTopMX, U_DJGGZPMORDMX, U_DDDJJHMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDCTimeZhou.InitGrid();
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_CarNo :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_Worker :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_C_CodeName :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_JSDate :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet5);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet5);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDCTimeZhou := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('11', Tv1, 'P圆机产量查询');
|
||||
WriteCxGrid('21', Tv2, 'P圆机产量查询');
|
||||
WriteCxGrid('31', Tv3, 'P圆机产量查询');
|
||||
WriteCxGrid('51', Tv5, 'P圆机产量查询');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('11', Tv1, 'P圆机产量查询');
|
||||
ReadCxGrid('21', Tv2, 'P圆机产量查询');
|
||||
ReadCxGrid('31', Tv3, 'P圆机产量查询');
|
||||
ReadCxGrid('51', Tv5, 'P圆机产量查询');
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear: string;
|
||||
FMonth: string;
|
||||
FDate: TDate;
|
||||
begin
|
||||
{ FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
|
||||
end;}
|
||||
BegDate.Date := SGetServerDateMBeg(ADOQueryTemp);
|
||||
EndDate.Date := SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ComboBox1.Text = '' then
|
||||
Exit;
|
||||
if ComboBox1.ItemIndex = 0 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid1);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 1 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid3);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 2 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid2);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 3 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid5);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
{Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DCMoneyAll_MX_PM :begdate,:enddate,:KHName');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('KHName').Value := Trim(ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DCMoneyAll_MX_RQ :begdate,:enddate,:KHName');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('KHName').Value := Trim(ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;}
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.Tv3DblClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmDCWorkerMX := TfrmDCWorkerMX.Create(Application);
|
||||
with frmDCWorkerMX do
|
||||
begin
|
||||
FBegdate := Self.BegDate.Date;
|
||||
FEnddate := Self.enddate.Date + 1;
|
||||
FWorker := Trim(Self.ClientDataSet3.fieldbyname('Worker').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCWorkerMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmDCCarMX := TfrmDCCarMX.Create(Application);
|
||||
with frmDCCarMX do
|
||||
begin
|
||||
FBegdate := Self.BegDate.Date;
|
||||
FEnddate := Self.enddate.Date + 1;
|
||||
FCarNo := Trim(Self.ClientDataSet1.fieldbyname('CarNo').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCCarMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.Tv5DblClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmDCJSDateMX := TfrmDCJSDateMX.Create(Application);
|
||||
with frmDCJSDateMX do
|
||||
begin
|
||||
FJSdate :=Self.ClientDataSet5.fieldbyname('JSDate').AsDateTime;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCJSDateMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.Tv2DblClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmDCC_CodeNameMX := TfrmDCC_CodeNameMX.Create(Application);
|
||||
with frmDCC_CodeNameMX do
|
||||
begin
|
||||
FBegdate := Self.BegDate.Date;
|
||||
FEnddate := Self.enddate.Date + 1;
|
||||
FC_CodeName := Trim(Self.ClientDataSet2.fieldbyname('C_CodeName').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCC_CodeNameMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.Tv1Column3CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
var
|
||||
Id0,Id1,Id11,Id21:Integer;
|
||||
begin
|
||||
Id0:=TV1.GetColumnByFieldName('Qty0').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>15000 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id1:=TV1.GetColumnByFieldName('Qty1').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id11:=TV1.GetColumnByFieldName('Qty11').Index;
|
||||
if AViewInfo.GridRecord.Values[Id11]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id21:=TV1.GetColumnByFieldName('Qty21').Index;
|
||||
if AViewInfo.GridRecord.Values[Id21]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmDCTimeZhou.cxGridDBColumn10CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
var
|
||||
Id0,Id1,Id11,Id21:Integer;
|
||||
begin
|
||||
Id0:=TV1.GetColumnByFieldName('Qty0').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>15000 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id1:=TV1.GetColumnByFieldName('Qty1').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id11:=TV1.GetColumnByFieldName('Qty11').Index;
|
||||
if AViewInfo.GridRecord.Values[Id11]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id21:=TV1.GetColumnByFieldName('Qty21').Index;
|
||||
if AViewInfo.GridRecord.Values[Id21]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
491
BI(BIView.dll)/U_DCWorkerMX.dfm
Normal file
491
BI(BIView.dll)/U_DCWorkerMX.dfm
Normal file
|
|
@ -0,0 +1,491 @@
|
|||
object frmDCWorkerMX: TfrmDCWorkerMX
|
||||
Left = 313
|
||||
Top = 52
|
||||
Width = 1346
|
||||
Height = 967
|
||||
Caption = #25377#36710#24037#26126#32454#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1328
|
||||
Height = 920
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel4: TPanel
|
||||
Left = 625
|
||||
Top = 2
|
||||
Width = 701
|
||||
Height = 916
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 697
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26085#26399#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 697
|
||||
Height = 889
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn17
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn20
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn21
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'JSDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 86
|
||||
end
|
||||
object cxGridDBColumn21: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn19: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn20: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object cxGridDBColumn18: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 623
|
||||
Height = 916
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 613
|
||||
Width = 619
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #21697#21517#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 619
|
||||
Height = 588
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 78
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
OnCustomDrawCell = cxGridDBColumn10CustomDrawCell
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 56
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty0'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty1'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty11'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'Qty21'
|
||||
Visible = False
|
||||
Width = 20
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 619
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26426#21488#20135#37327#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 636
|
||||
Width = 619
|
||||
Height = 278
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn12
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn13
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn14
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 74
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 78
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #26085#22343#24037#36164
|
||||
DataBinding.FieldName = 'AvgDayMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'HZMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #24453#30830#35748
|
||||
DataBinding.FieldName = 'WQRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'QRMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 64
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1205
|
||||
Top = 13
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1053
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1081
|
||||
Top = 9
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 80
|
||||
Top = 168
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 84
|
||||
Top = 272
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 83
|
||||
Top = 223
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 192
|
||||
Top = 704
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 195
|
||||
Top = 759
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 196
|
||||
Top = 808
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 968
|
||||
Top = 300
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 971
|
||||
Top = 355
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 972
|
||||
Top = 404
|
||||
end
|
||||
end
|
||||
219
BI(BIView.dll)/U_DCWorkerMX.pas
Normal file
219
BI(BIView.dll)/U_DCWorkerMX.pas
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
unit U_DCWorkerMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDCWorkerMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
Panel2: TPanel;
|
||||
Panel4: TPanel;
|
||||
Panel5: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel6: TPanel;
|
||||
Panel7: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel8: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure cxGridDBColumn10CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FWorker:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDCWorkerMX: TfrmDCWorkerMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_DCCarMX_Worker;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDCWorkerMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_Worker_MX :begdate,:enddate,:Worker,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('Worker').Value:=FWorker;
|
||||
Parameters.ParamByName('Type').Value:='CarNo';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_Worker_MX :begdate,:enddate,:Worker,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('Worker').Value:=FWorker;
|
||||
Parameters.ParamByName('Type').Value:='C_CodeName';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DC_Worker_MX :begdate,:enddate,:Worker,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('Worker').Value:=FWorker;
|
||||
Parameters.ParamByName('Type').Value:='JSDate';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDCWorkerMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmDCWorkerMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDCWorkerMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDCWorkerMX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDCWorkerMX.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
{try
|
||||
frmDCCarMX_Worker := TfrmDCCarMX_Worker.Create(Application);
|
||||
with frmDCCarMX_Worker do
|
||||
begin
|
||||
FBegdate := Self.FBegdate;
|
||||
FEnddate := Self.FEnddate;
|
||||
FCarNo := Trim(Self.FCarNo);
|
||||
FWorker := Trim(Self.ClientDataSet1.fieldbyname('Worker').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDCCarMX_Worker.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmDCWorkerMX.cxGridDBColumn10CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
var
|
||||
Id0,Id1,Id11,Id21:Integer;
|
||||
begin
|
||||
Id0:=TV1.GetColumnByFieldName('Qty0').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>15000 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id1:=TV1.GetColumnByFieldName('Qty1').Index;
|
||||
if AViewInfo.GridRecord.Values[Id0]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id11:=TV1.GetColumnByFieldName('Qty11').Index;
|
||||
if AViewInfo.GridRecord.Values[Id11]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
Id21:=TV1.GetColumnByFieldName('Qty21').Index;
|
||||
if AViewInfo.GridRecord.Values[Id21]>22500 then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
203
BI(BIView.dll)/U_DDDJJHMX.dfm
Normal file
203
BI(BIView.dll)/U_DDDJJHMX.dfm
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
object frmDDDJJHMX: TfrmDDDJJHMX
|
||||
Left = 462
|
||||
Top = 223
|
||||
Width = 695
|
||||
Height = 687
|
||||
Caption = #35746#21333#21495#26126#32454
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 677
|
||||
Height = 640
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 673
|
||||
Height = 636
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 669
|
||||
Height = 27
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26700#26816#20135#21697#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 29
|
||||
Width = 669
|
||||
Height = 605
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
OnDblClick = Tv3DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 127
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 54
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #22343#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
121
BI(BIView.dll)/U_DDDJJHMX.pas
Normal file
121
BI(BIView.dll)/U_DDDJJHMX.pas
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
unit U_DDDJJHMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDDDJJHMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Tv3DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate, FEnddate: TDate;
|
||||
FKHName, FSPName: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmDDDJJHMX: TfrmDDDJJHMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_DDDJJHMXGang;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDDDJJHMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJMoneyAll_MX_PM_Ord :begdate,:enddate,:KHName,:SPName');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', FBegdate));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', FEnddate));
|
||||
Parameters.ParamByName('KHName').Value := FKHName;
|
||||
Parameters.ParamByName('SPName').Value := FSPName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDDDJJHMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDDDJJHMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption := '' + ' ( ' + FKHName + ' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDDDJJHMX.Tv3DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmDDDJJHMXGang := TfrmDDDJJHMXGang.Create(Application);
|
||||
with frmDDDJJHMXGang do
|
||||
begin
|
||||
FBegdate := Self.FBegdate;
|
||||
FEnddate := Self.FEnddate;
|
||||
FOrderNo := Trim(Self.ClientDataSet1.fieldbyname('OrderNO').AsString);
|
||||
FCarNo := Trim(FKHName);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDDDJJHMXGang.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
202
BI(BIView.dll)/U_DDDJJHMXGang.dfm
Normal file
202
BI(BIView.dll)/U_DDDJJHMXGang.dfm
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
object frmDDDJJHMXGang: TfrmDDDJJHMXGang
|
||||
Left = 462
|
||||
Top = 223
|
||||
Width = 695
|
||||
Height = 687
|
||||
Caption = #25171#21367#32568#26126#32454#25968#25454
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 677
|
||||
Height = 640
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 673
|
||||
Height = 636
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 669
|
||||
Height = 27
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26700#26816#20135#21697#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 29
|
||||
Width = 669
|
||||
Height = 605
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'OrderNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 127
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 54
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #22343#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
98
BI(BIView.dll)/U_DDDJJHMXGang.pas
Normal file
98
BI(BIView.dll)/U_DDDJJHMXGang.pas
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
unit U_DDDJJHMXGang;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDDDJJHMXGang = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate, FEnddate: TDate;
|
||||
FOrderNo, FCarNo: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmDDDJJHMXGang: TfrmDDDJJHMXGang;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDDDJJHMXGang.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJMoneyAll_MX_PM_Ord_Gang :begdate,:enddate,:OrderNo,:CarNo');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', FBegdate));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', FEnddate));
|
||||
Parameters.ParamByName('OrderNo').Value := FOrderNo;
|
||||
Parameters.ParamByName('CarNo').Value := FCarNo;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDDDJJHMXGang.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDDDJJHMXGang.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption := '' + ' ( ' + FOrderNo +'¡ú'+FCarNo+ ' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
355
BI(BIView.dll)/U_DJCPMoneyTopMX.dfm
Normal file
355
BI(BIView.dll)/U_DJCPMoneyTopMX.dfm
Normal file
|
|
@ -0,0 +1,355 @@
|
|||
object frmDJCPMoneyTopMX: TfrmDJCPMoneyTopMX
|
||||
Left = 211
|
||||
Top = 96
|
||||
Width = 1498
|
||||
Height = 883
|
||||
Caption = #25171#21367#20135#21697#26126#32454#25968#25454
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1480
|
||||
Height = 836
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 659
|
||||
Height = 832
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 29
|
||||
Width = 655
|
||||
Height = 801
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 42
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 148
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 63
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #24179#22343#21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 655
|
||||
Height = 27
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #35746#21333#21495#25968#25454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Panel1: TPanel
|
||||
Left = 582
|
||||
Top = 0
|
||||
Width = 73
|
||||
Height = 27
|
||||
Align = alRight
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #23548#20986
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
OnClick = Panel1Click
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 661
|
||||
Top = 2
|
||||
Width = 817
|
||||
Height = 832
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 29
|
||||
Width = 813
|
||||
Height = 801
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 42
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
GroupSummaryAlignment = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 85
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 92
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 57
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #24179#22343#21333#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 813
|
||||
Height = 27
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #32568#21495#25968#25454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Panel6: TPanel
|
||||
Left = 740
|
||||
Top = 0
|
||||
Width = 73
|
||||
Height = 27
|
||||
Align = alRight
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #23548#20986
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
OnClick = Panel1Click
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 777
|
||||
Top = 65533
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
121
BI(BIView.dll)/U_DJCPMoneyTopMX.pas
Normal file
121
BI(BIView.dll)/U_DJCPMoneyTopMX.pas
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
unit U_DJCPMoneyTopMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDJCPMoneyTopMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Panel4: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel5: TPanel;
|
||||
Panel6: TPanel;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Panel1Click(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FKHName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDJCPMoneyTopMX: TfrmDJCPMoneyTopMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDJCPMoneyTopMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJAll_MX :begdate,:enddate,:Type,:KHName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));
|
||||
Parameters.ParamByName('Type').Value:='打卷';
|
||||
Parameters.ParamByName('KHName').Value:=FKHName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJCPMoneyTopMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDJCPMoneyTopMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption:='打卷产品排行榜'+' ( '+FKHName+' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDJCPMoneyTopMX.Panel1Click(Sender: TObject);
|
||||
begin
|
||||
TcxGridToExcel('打卷产品排行榜'+'('+FKHName+')',cxGrid1);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
213
BI(BIView.dll)/U_DJCPTopMX.dfm
Normal file
213
BI(BIView.dll)/U_DJCPTopMX.dfm
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
object frmDJCPTopMX: TfrmDJCPTopMX
|
||||
Left = 276
|
||||
Top = 86
|
||||
Width = 737
|
||||
Height = 666
|
||||
Caption = #25171#21367#20135#21697#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 721
|
||||
Height = 628
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 717
|
||||
Height = 624
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 713
|
||||
Height = 598
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #20135#21697
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 175
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 105
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 108
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #29305#27530#21253#35013
|
||||
DataBinding.FieldName = 'BaoZType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 713
|
||||
Height = 22
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#20135#21697#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Panel1: TPanel
|
||||
Left = 654
|
||||
Top = 0
|
||||
Width = 59
|
||||
Height = 22
|
||||
Align = alRight
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #23548#20986
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
OnClick = Panel1Click
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
106
BI(BIView.dll)/U_DJCPTopMX.pas
Normal file
106
BI(BIView.dll)/U_DJCPTopMX.pas
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
unit U_DJCPTopMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh;
|
||||
|
||||
type
|
||||
TfrmDJCPTopMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Panel1Click(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FKHName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDJCPTopMX: TfrmDJCPTopMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDJCPTopMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJAll_MX :begdate,:enddate,:Type,:KHName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));
|
||||
Parameters.ParamByName('Type').Value:='打卷';
|
||||
Parameters.ParamByName('KHName').Value:=FKHName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJCPTopMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDJCPTopMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption:='打卷产品排行榜'+' ( '+FKHName+' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDJCPTopMX.Panel1Click(Sender: TObject);
|
||||
begin
|
||||
TcxGridToExcel('打卷产品排行榜'+'('+FKHName+')',cxGrid1);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
204
BI(BIView.dll)/U_DJGGZPMORDMX.dfm
Normal file
204
BI(BIView.dll)/U_DJGGZPMORDMX.dfm
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
object frmDJGGZPMORDMX: TfrmDJGGZPMORDMX
|
||||
Left = 663
|
||||
Top = 257
|
||||
Width = 601
|
||||
Height = 666
|
||||
Caption = #23458#25143#20135#21697#39068#33394#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 583
|
||||
Height = 619
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 579
|
||||
Height = 615
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 575
|
||||
Height = 27
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#35746#21333#26126#32454
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 29
|
||||
Width = 575
|
||||
Height = 584
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 127
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 54
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #22343#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 80
|
||||
Top = 168
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 84
|
||||
Top = 272
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 83
|
||||
Top = 223
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
106
BI(BIView.dll)/U_DJGGZPMORDMX.pas
Normal file
106
BI(BIView.dll)/U_DJGGZPMORDMX.pas
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
unit U_DJGGZPMORDMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDJGGZPMORDMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FKHName,FSPName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDJGGZPMORDMX: TfrmDJGGZPMORDMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDJGGZPMORDMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJMoneyAll_MX_PM_Ord :begdate,:enddate,:KHName,:SPName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('KHName').Value:=FKHName;
|
||||
Parameters.ParamByName('SPName').Value:=FSPName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJGGZPMORDMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmDJGGZPMORDMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption:='´ò¾í¹¤ÅÅÐаñ'+' ( '+FKHName+' ) '+' ( '+FSPName+' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDJGGZPMORDMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDJGGZPMORDMX:=nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
586
BI(BIView.dll)/U_DJMoneyTop.dfm
Normal file
586
BI(BIView.dll)/U_DJMoneyTop.dfm
Normal file
|
|
@ -0,0 +1,586 @@
|
|||
object frmDJMoneyTop: TfrmDJMoneyTop
|
||||
Left = 185
|
||||
Top = 78
|
||||
Width = 1575
|
||||
Height = 859
|
||||
Caption = #25171#21367#24037#36164#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1557
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 328
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 188
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 71
|
||||
Top = 5
|
||||
Width = 113
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 209
|
||||
Top = 5
|
||||
Width = 111
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 328
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 397
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 466
|
||||
Top = 0
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 571
|
||||
Top = 3
|
||||
Width = 196
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 1
|
||||
Items.Strings = (
|
||||
#25171#21367#24037#36164#27719#24635
|
||||
#25171#21367#24037#36164#26126#32454#65288#21697#21517#65289
|
||||
#25171#21367#24037#36164#26126#32454#65288#26085#26399#65289)
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 767
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1557
|
||||
Height = 781
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 488
|
||||
Height = 777
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 484
|
||||
Height = 750
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv1Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 33
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #25171#21367#24037
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 85
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 50
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #22343#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 46
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 484
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#24037#36164#27719#24635
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 992
|
||||
Top = 2
|
||||
Width = 563
|
||||
Height = 777
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 559
|
||||
Height = 750
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 119
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 53
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #22343#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 40
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 559
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#24037#36164#26126#32454#65288#26085#26399#65289
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 490
|
||||
Top = 2
|
||||
Width = 502
|
||||
Height = 777
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 498
|
||||
Height = 750
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
OnDblClick = Tv3DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
OnCellDblClick = Tv3CellDblClick
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 127
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 54
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #22343#20215
|
||||
DataBinding.FieldName = 'AvgPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'DJMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 498
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#24037#36164#26126#32454#65288#21697#21517#65289
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 618
|
||||
Top = 270
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 97
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 825
|
||||
Top = 125
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 925
|
||||
Top = 113
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 667
|
||||
Top = 399
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 736
|
||||
Top = 408
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 1371
|
||||
Top = 579
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1444
|
||||
Top = 628
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 616
|
||||
Top = 204
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 1448
|
||||
Top = 248
|
||||
end
|
||||
end
|
||||
304
BI(BIView.dll)/U_DJMoneyTop.pas
Normal file
304
BI(BIView.dll)/U_DJMoneyTop.pas
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
unit U_DJMoneyTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDJMoneyTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Panel10: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
Panel4: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel5: TPanel;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Panel6: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel7: TPanel;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv3DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
frmDJMoneyTop: TfrmDJMoneyTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_DJCPTopMX, U_ZJCPTopMX, U_DJGGZPMORDMX, U_DDDJJHMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDJMoneyTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJMoneyAll :begdate,:enddate');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDJMoneyTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('1', Tv1, '´ò¾í¹¤¹¤×Ê');
|
||||
WriteCxGrid('2', Tv2, '´ò¾í¹¤¹¤×Ê');
|
||||
WriteCxGrid('3', Tv3, '´ò¾í¹¤¹¤×Ê');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('1', Tv1, '´ò¾í¹¤¹¤×Ê');
|
||||
ReadCxGrid('2', Tv2, '´ò¾í¹¤¹¤×Ê');
|
||||
ReadCxGrid('3', Tv3, '´ò¾í¹¤¹¤×Ê');
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear: string;
|
||||
FMonth: string;
|
||||
FDate: TDate;
|
||||
begin
|
||||
{ FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
|
||||
end;}
|
||||
BegDate.Date := SGetServerDateMBeg(ADOQueryTemp);
|
||||
EndDate.Date := SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ComboBox1.Text = '' then
|
||||
Exit;
|
||||
if ComboBox1.ItemIndex = 0 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid1);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 1 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid3);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 2 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid2);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJMoneyAll_MX_PM :begdate,:enddate,:KHName');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('KHName').Value := Trim(ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJMoneyAll_MX_RQ :begdate,:enddate,:KHName');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('KHName').Value := Trim(ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.Tv3CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
|
||||
|
||||
// try
|
||||
// frmDJGGZPMORDMX := TfrmDJGGZPMORDMX.Create(Application);
|
||||
// with frmDJGGZPMORDMX do
|
||||
// begin
|
||||
// FBegdate := Self.BegDate.Date;
|
||||
// FEnddate := Self.enddate.Date + 1;
|
||||
// FKHName := Trim(Self.ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
// FSPName := Trim(Self.ClientDataSet3.fieldbyname('SPName').AsString);
|
||||
// if ShowModal = 1 then
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// end;
|
||||
// finally
|
||||
// frmDJGGZPMORDMX.Free;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJMoneyTop.Tv3DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet3.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmDDDJJHMX := TfrmDDDJJHMX.Create(Application);
|
||||
with frmDDDJJHMX do
|
||||
begin
|
||||
FBegdate := Self.BegDate.Date;
|
||||
FEnddate := Self.enddate.Date + 1;
|
||||
FKHName := Trim(Self.ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
FSPName := Trim(Self.ClientDataSet3.fieldbyname('SPName').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDDDJJHMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
453
BI(BIView.dll)/U_DJTop.dfm
Normal file
453
BI(BIView.dll)/U_DJTop.dfm
Normal file
|
|
@ -0,0 +1,453 @@
|
|||
object frmDJTop: TfrmDJTop
|
||||
Left = 110
|
||||
Top = 67
|
||||
Width = 1501
|
||||
Height = 821
|
||||
Caption = #20179#24211#24037#20154#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1483
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 284
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 307
|
||||
Top = 9
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #21697#21517
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 164
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 5
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 58
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 178
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 353
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 422
|
||||
Top = 0
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 527
|
||||
Top = 3
|
||||
Width = 196
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 1
|
||||
Items.Strings = (
|
||||
#25171#21367#25490#34892#27036
|
||||
#26700#26816#25490#34892#27036
|
||||
'')
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 723
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1483
|
||||
Height = 743
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 735
|
||||
Height = 739
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 731
|
||||
Height = 712
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #25171#21367#24037
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 159
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 86
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 731
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #25171#21367#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 737
|
||||
Top = 2
|
||||
Width = 736
|
||||
Height = 739
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 732
|
||||
Height = 712
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
OnDblClick = Tv2DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #22899#24037
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 159
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 81
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 99
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 732
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #26700#26816#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 650
|
||||
Top = 270
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
249
BI(BIView.dll)/U_DJTop.pas
Normal file
249
BI(BIView.dll)/U_DJTop.pas
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
unit U_DJTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDJTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
C_Code: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Panel10: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
Panel4: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel5: TPanel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv2DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDJTop: TfrmDJTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_DJCPTopMX,U_ZJCPTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmDJTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible:=True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='打卷';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_DJAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='桌检';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDJTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear:string;
|
||||
FMonth:string;
|
||||
FDate:TDate;
|
||||
begin
|
||||
FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ComboBox1.Text='' then Exit;
|
||||
if ComboBox1.ItemIndex=0 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text,cxGrid1);
|
||||
end else
|
||||
if ComboBox1.ItemIndex=1 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text,cxGrid2);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
try
|
||||
frmDJCPTopMX:=TfrmDJCPTopMX.Create(Application);
|
||||
with frmDJCPTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FKHName:=Trim(Self.ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDJCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDJTop.Tv2DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet3.IsEmpty then Exit;
|
||||
try
|
||||
frmZJCPTopMX:=TfrmZJCPTopMX.Create(Application);
|
||||
with frmZJCPTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FKHName:=Trim(Self.ClientDataSet3.fieldbyname('KHName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZJCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
17985
BI(BIView.dll)/U_DataLink.dfm
Normal file
17985
BI(BIView.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
135
BI(BIView.dll)/U_DataLink.pas
Normal file
135
BI(BIView.dll)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
unit U_DataLink;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, ExtCtrls, SyncObjs,
|
||||
cxClasses, 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;
|
||||
|
||||
type
|
||||
TMyThread = class(TThread)
|
||||
protected
|
||||
procedure Execute; override;
|
||||
end;
|
||||
|
||||
var
|
||||
DConString: string; {全局连接字符串}
|
||||
server, dtbase, user, pswd,UserDataFlag: string; {数据库连接参数}
|
||||
DCurHandle: hwnd; //当前窗体句柄
|
||||
DName: string; //#用户名#//
|
||||
DCode: string; //#用户编号#//
|
||||
Ddatabase: string; //#数据库名称#//
|
||||
DTitCaption: string; //#主窗体名称#//
|
||||
DParameters1, DParameters2, DParameters3, DParameters4, DParameters5: string; // 外部参数;
|
||||
DParameters6, DParameters7, DParameters8, DParameters9, DParameters10: string; //外部参数;
|
||||
OldDllApp: Tapplication; //保存原有句柄
|
||||
NewDllApp: Tapplication; //当前句柄
|
||||
MainApplication: Tapplication;
|
||||
DFormCode: integer; //当前窗口号
|
||||
IsDelphiLanguage: integer;
|
||||
DServerDate: TdateTime; //服务器时间
|
||||
DCompany: string; //公司
|
||||
PicSvr: string;
|
||||
type
|
||||
TDataLink_BIView = class(TDataModule)
|
||||
AdoDataLink: TADOQuery;
|
||||
ADOLink: TADOConnection;
|
||||
ThreeImgList: TImageList;
|
||||
ThreeLookAndFeelCol: TcxLookAndFeelController;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
procedure Timer_linkTimer(Sender: TObject);
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
TMakebar = procedure(ucData: pchar; nDataLen: integer; nErrLevel: integer; nMask: integer; nBarEdition: integer; szBmpFileName: pchar; nScale: integer); stdcall;
|
||||
|
||||
TMixtext = procedure(szSrcBmpFileName: PChar; szDstBmpFileName: PChar; sztext: PChar; fontsize, txtheight, hmargin, vmargin, txtcntoneline: integer); stdcall;
|
||||
var
|
||||
DataLink_BIView: TDataLink_BIView;
|
||||
CriticalSection: TCriticalSection; {声明临界}
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TMyThread.Execute;
|
||||
begin
|
||||
FreeOnTerminate := True;
|
||||
CriticalSection.Enter;
|
||||
try
|
||||
with DataLink_BIView.AdoDataLink do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select getdate()');
|
||||
open;
|
||||
end;
|
||||
except
|
||||
try
|
||||
with DataLink_BIView.ADOLink do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
except
|
||||
|
||||
end;
|
||||
end;
|
||||
CriticalSection.Leave;
|
||||
end;
|
||||
|
||||
procedure TDataLink_BIView.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
CriticalSection.Free;
|
||||
DataLink_BIView:=nil;
|
||||
end;
|
||||
|
||||
procedure TDataLink_BIView.Timer_linkTimer(Sender: TObject);
|
||||
begin
|
||||
TMyThread.Create(False);
|
||||
end;
|
||||
|
||||
procedure TDataLink_BIView.DataModuleCreate(Sender: TObject);
|
||||
begin
|
||||
CriticalSection := TCriticalSection.Create;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
||||
|
||||
490
BI(BIView.dll)/U_DeptType.dfm
Normal file
490
BI(BIView.dll)/U_DeptType.dfm
Normal file
|
|
@ -0,0 +1,490 @@
|
|||
object frmDeptType: TfrmDeptType
|
||||
Left = 127
|
||||
Top = 7
|
||||
Width = 1645
|
||||
Height = 778
|
||||
Caption = #25253#38144#21518#21488#35774#32622
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1627
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 125
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 69
|
||||
Top = 0
|
||||
Caption = #23545#26041#21333#20301#35774#32622
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 194
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1627
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 68
|
||||
Width = 417
|
||||
Height = 663
|
||||
Align = alLeft
|
||||
Caption = 'Panel2'
|
||||
TabOrder = 2
|
||||
object ToolBar2: TToolBar
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 415
|
||||
Height = 36
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 155
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton10: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#21152#37096#38376#36153#29992#31867#22411
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 159
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#37096#38376#36153#29992#31867#22411
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 1
|
||||
Top = 37
|
||||
Width = 415
|
||||
Height = 625
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv2: TcxGridDBTableView
|
||||
OnMouseDown = Tv2MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_HZ
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.Default
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'DeptName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = v2Column6PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 192
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #36153#29992#31867#22411
|
||||
DataBinding.FieldName = 'FeeType'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = cxGridDBColumn3PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_BIView.Default
|
||||
Width = 193
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 417
|
||||
Top = 68
|
||||
Width = 1210
|
||||
Height = 663
|
||||
Align = alClient
|
||||
Caption = 'Panel2'
|
||||
TabOrder = 3
|
||||
object Panel4: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1208
|
||||
Height = 324
|
||||
Align = alTop
|
||||
Caption = 'Panel4'
|
||||
TabOrder = 0
|
||||
object ToolBar3: TToolBar
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1206
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 125
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton7: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#21152#36153#29992#21517#31216
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 129
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#36153#29992#21517#31216
|
||||
ImageIndex = 13
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 32
|
||||
Width = 1206
|
||||
Height = 281
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object Tv21: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_21
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #36153#29992#21517#31216
|
||||
DataBinding.FieldName = 'FeeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = cxGridDBColumn1PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 294
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv21
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 1
|
||||
Top = 325
|
||||
Width = 1208
|
||||
Height = 337
|
||||
Align = alClient
|
||||
Caption = 'Panel5'
|
||||
TabOrder = 1
|
||||
object ToolBar4: TToolBar
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1206
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 125
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton13: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#23457#25209#27969#31243
|
||||
ImageIndex = 1
|
||||
OnClick = ToolButton13Click
|
||||
end
|
||||
object ToolButton14: TToolButton
|
||||
Left = 129
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#23457#25209#27969#31243
|
||||
ImageIndex = 3
|
||||
OnClick = ToolButton14Click
|
||||
end
|
||||
object ToolButton15: TToolButton
|
||||
Left = 258
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#23457#26680#20154
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton15Click
|
||||
end
|
||||
object ToolButton16: TToolButton
|
||||
Left = 372
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#23457#26680#20154
|
||||
ImageIndex = 13
|
||||
OnClick = ToolButton16Click
|
||||
end
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 561
|
||||
Top = 32
|
||||
Width = 646
|
||||
Height = 304
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv23: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_23
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.Default
|
||||
object Tv23Column1: TcxGridDBColumn
|
||||
Caption = #39034#24207
|
||||
DataBinding.FieldName = 'ChkInt'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = Tv23Column1PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 63
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #23457#26680#20154
|
||||
DataBinding.FieldName = 'Chker'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = cxGridDBColumn2PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 258
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv23
|
||||
end
|
||||
end
|
||||
object cxGrid4: TcxGrid
|
||||
Left = 1
|
||||
Top = 32
|
||||
Width = 560
|
||||
Height = 304
|
||||
Align = alLeft
|
||||
TabOrder = 2
|
||||
object Tv22: TcxGridDBTableView
|
||||
OnMouseDown = Tv22MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_22
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BIView.Default
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #23457#26680#27969#31243
|
||||
DataBinding.FieldName = 'ChkerHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 515
|
||||
end
|
||||
end
|
||||
object cxGridLevel4: TcxGridLevel
|
||||
GridView = Tv22
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 877
|
||||
Top = 5
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 929
|
||||
Top = 5
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 757
|
||||
Top = 9
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 836
|
||||
Top = 4
|
||||
end
|
||||
object DS_HZ: TDataSource
|
||||
DataSet = CDS_HZ
|
||||
Left = 655
|
||||
Top = 3
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 620
|
||||
Top = 4
|
||||
end
|
||||
object CDS_21: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1396
|
||||
Top = 216
|
||||
end
|
||||
object DS_21: TDataSource
|
||||
DataSet = CDS_21
|
||||
Left = 1431
|
||||
Top = 215
|
||||
end
|
||||
object CDS_22: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 724
|
||||
Top = 596
|
||||
end
|
||||
object DS_22: TDataSource
|
||||
DataSet = CDS_22
|
||||
Left = 771
|
||||
Top = 591
|
||||
end
|
||||
object CDS_23: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1200
|
||||
Top = 600
|
||||
end
|
||||
object DS_23: TDataSource
|
||||
DataSet = CDS_23
|
||||
Left = 1235
|
||||
Top = 599
|
||||
end
|
||||
end
|
||||
873
BI(BIView.dll)/U_DeptType.pas
Normal file
873
BI(BIView.dll)/U_DeptType.pas
Normal file
|
|
@ -0,0 +1,873 @@
|
|||
unit U_DeptType;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||
cxButtonEdit, cxTextEdit, cxPC, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDeptType = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
Panel2: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Panel3: TPanel;
|
||||
Panel4: TPanel;
|
||||
ToolBar3: TToolBar;
|
||||
ToolButton7: TToolButton;
|
||||
ToolButton8: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv21: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel5: TPanel;
|
||||
ToolBar4: TToolBar;
|
||||
ToolButton13: TToolButton;
|
||||
ToolButton14: TToolButton;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv23: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
cxGrid4: TcxGrid;
|
||||
Tv22: TcxGridDBTableView;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridLevel4: TcxGridLevel;
|
||||
Tv23Column1: TcxGridDBColumn;
|
||||
ToolButton15: TToolButton;
|
||||
ToolButton16: TToolButton;
|
||||
CDS_21: TClientDataSet;
|
||||
DS_21: TDataSource;
|
||||
CDS_22: TClientDataSet;
|
||||
DS_22: TDataSource;
|
||||
CDS_23: TClientDataSet;
|
||||
DS_23: TDataSource;
|
||||
ToolButton1: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure v2Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure v2Column6PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure cxGridDBColumn3PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure ToolButton13Click(Sender: TObject);
|
||||
procedure ToolButton14Click(Sender: TObject);
|
||||
procedure ToolButton15Click(Sender: TObject);
|
||||
procedure cxGridDBColumn2PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure Tv23Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure ToolButton16Click(Sender: TObject);
|
||||
procedure Tv22MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
|
||||
procedure InitGrid();
|
||||
procedure InitGrid21();
|
||||
procedure InitGrid22();
|
||||
procedure InitGrid23();
|
||||
function SaveData():Boolean;
|
||||
function SaveData21():Boolean;
|
||||
function SaveData22():Boolean;
|
||||
function SaveData23():Boolean;
|
||||
|
||||
public
|
||||
canshu1:string;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDeptType: TfrmDeptType;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
|
||||
procedure TfrmDeptType.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BX_FeeType A');
|
||||
sql.Add(' where A.Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmDeptType.InitGrid21();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BX_FeeName A');
|
||||
sql.Add(' where A.Valid=''Y'' and A.BTID='''+Trim(CDS_HZ.fieldbyname('BTID').asstring)+'''');
|
||||
if CDS_HZ.IsEmpty then
|
||||
begin
|
||||
sql.Add(' and 1=2');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and A.BTID='''+Trim(CDS_HZ.fieldbyname('BTID').asstring)+'''');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_21);
|
||||
SInitCDSData20(ADOQueryMain,CDS_21);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
|
||||
end;
|
||||
end;
|
||||
procedure TfrmDeptType.InitGrid22();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BX_ChkLiu_Main A');
|
||||
sql.Add(' where A.Valid=''Y'' ');
|
||||
if CDS_HZ.IsEmpty then
|
||||
begin
|
||||
sql.Add(' and 1=2');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and A.BTID='''+Trim(CDS_HZ.fieldbyname('BTID').asstring)+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_22);
|
||||
SInitCDSData20(ADOQueryMain,CDS_22);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmDeptType.InitGrid23();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from BX_ChkLiu_Sub A');
|
||||
sql.Add(' where A.Valid=''Y'' ');
|
||||
if CDS_22.IsEmpty then
|
||||
begin
|
||||
sql.Add(' and 1=2');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and A.BMID='''+Trim(CDS_22.fieldbyname('BMID').asstring)+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_23);
|
||||
SInitCDSData20(ADOQueryMain,CDS_23);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmDeptType.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmDeptType:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
procedure TfrmDeptType.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' Update BX_FeeType Set DelTime=getdate(),Deler='''+Trim(DName)+''',Valid=''N'' ');
|
||||
sql.Add(' where BTID='''+Trim(CDS_HZ.fieldbyname('BTID').AsString)+'''');
|
||||
execsql;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
CDS_HZ.Delete;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('删除失败!','提示',0);
|
||||
end;
|
||||
InitGrid21();
|
||||
InitGrid22();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
function TfrmDeptType.SaveData():Boolean;
|
||||
var
|
||||
maxId,CRID:String;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if GetLSNo(ADOQueryCmd,maxId,'BT','BX_FeeType',4,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BX_FeeType where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BTID').Value:=Trim(maxId);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('Valid').Value:='Y';
|
||||
Post;
|
||||
end;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BTID').Value:=Trim(maxId);
|
||||
Post;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=True;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
function TfrmDeptType.SaveData21():Boolean;
|
||||
var
|
||||
maxId,CRID:String;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if GetLSNo(ADOQueryCmd,maxId,'BF','BX_FeeName',4,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BX_FeeName where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BTID').Value:=Trim(CDS_HZ.fieldbyname('BTID').AsString);
|
||||
FieldByName('BFID').Value:=Trim(maxId);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('Valid').Value:='Y';
|
||||
Post;
|
||||
end;
|
||||
with CDS_21 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BFID').Value:=Trim(maxId);
|
||||
Post;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=True;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmDeptType.SaveData22():Boolean;
|
||||
var
|
||||
maxId,CRID:String;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if GetLSNo(ADOQueryCmd,maxId,'BM','BX_ChkLiu_Main',4,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BX_ChkLiu_Main where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BTID').Value:=Trim(CDS_HZ.fieldbyname('BTID').AsString);
|
||||
FieldByName('BMID').Value:=Trim(maxId);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('Valid').Value:='Y';
|
||||
Post;
|
||||
end;
|
||||
with CDS_22 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BMID').Value:=Trim(maxId);
|
||||
Post;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=True;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
function TfrmDeptType.SaveData23():Boolean;
|
||||
var
|
||||
maxId,CRID:String;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if GetLSNo(ADOQueryCmd,maxId,'BS','BX_ChkLiu_Sub',4,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BX_ChkLiu_Sub where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BMID').Value:=Trim(CDS_22.fieldbyname('BMID').AsString);
|
||||
FieldByName('BSID').Value:=Trim(maxId);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('Valid').Value:='Y';
|
||||
|
||||
Post;
|
||||
end;
|
||||
with CDS_23 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BSID').Value:=Trim(maxId);
|
||||
Post;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=True;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
with Self.CDS_HZ do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
Post;
|
||||
end;
|
||||
Self.SaveData();
|
||||
InitGrid21();
|
||||
InitGrid22();
|
||||
InitGrid23();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.v2Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue,FFieldName:String;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
FFieldName:=Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value:=Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.v2Column6PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='BXDeptName';
|
||||
flagname:='部门';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with CDS_HZ do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('DeptName').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
Post;
|
||||
end;
|
||||
with Self.ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_FeeType Set DeptName='''+Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||
sql.Add(' where BTID='''+Trim(Self.CDS_HZ.fieldbyname('BTID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.cxGridDBColumn3PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='BXFeeType';
|
||||
flagname:='费用类型';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with CDS_HZ do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('FeeType').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
Post;
|
||||
end;
|
||||
with Self.ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_FeeType Set FeeType='''+Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||
sql.Add(' where BTID='''+Trim(Self.CDS_HZ.fieldbyname('BTID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton7Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
with Self.CDS_21 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
Post;
|
||||
end;
|
||||
Self.SaveData21();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton8Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_21.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' Update BX_FeeName Set DelTime=getdate(),Deler='''+Trim(DName)+''',Valid=''N'' ');
|
||||
sql.Add(' where BFID='''+Trim(CDS_21.fieldbyname('BFID').AsString)+'''');
|
||||
execsql;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
CDS_21.Delete;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('删除失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.cxGridDBColumn1PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='BXFeeName';
|
||||
flagname:='费用名称';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with CDS_21 do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('FeeName').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
Post;
|
||||
end;
|
||||
with Self.ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_FeeName Set FeeName='''+Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||
sql.Add(' where BFID='''+Trim(Self.CDS_21.fieldbyname('BFID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton13Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
with Self.CDS_22 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
Post;
|
||||
end;
|
||||
Self.SaveData22();
|
||||
InitGrid23();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton14Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_22.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' Update BX_ChkLiu_Main Set DelTime=getdate(),Deler='''+Trim(DName)+''',Valid=''N'' ');
|
||||
sql.Add(' where BMID='''+Trim(CDS_22.fieldbyname('BMID').AsString)+'''');
|
||||
execsql;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
CDS_22.Delete;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('删除失败!','提示',0);
|
||||
end;
|
||||
InitGrid23();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton15Click(Sender: TObject);
|
||||
var
|
||||
FChkInt:Integer;
|
||||
begin
|
||||
FChkInt:=CDS_23.RecordCount;
|
||||
if CDS_22.IsEmpty then Exit;
|
||||
with Self.CDS_23 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('ChkInt').Value:=FChkInt+1;
|
||||
Post;
|
||||
end;
|
||||
Self.SaveData23();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.cxGridDBColumn2PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='BXChker';
|
||||
flagname:='费用名称';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with CDS_23 do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('Chker').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
Post;
|
||||
end;
|
||||
with Self.ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_ChkLiu_Sub Set Chker='''+Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||
if Trim(Self.CDS_23.fieldbyname('ChkInt').AsString)<>'' then
|
||||
begin
|
||||
sql.Add(',ChkInt='+Self.CDS_23.fieldbyname('ChkInt').AsString);
|
||||
end else
|
||||
begin
|
||||
sql.Add(',ChkInt=Null');
|
||||
end;
|
||||
|
||||
sql.Add(' where BSID='''+Trim(Self.CDS_23.fieldbyname('BSID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with Self.ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_ChkLiu_Main Set ');
|
||||
|
||||
Sql.Add(' ChkerHZ=[dbo].[F_Get_Order_SubStr_PB](BX_ChkLiu_Main.BMID,''ChkerHZ'')');
|
||||
|
||||
sql.Add(' where BMID='''+Trim(Self.CDS_22.fieldbyname('BMID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with Self.ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BX_ChkLiu_Main');
|
||||
sql.Add(' where BMID='''+Trim(Self.CDS_22.fieldbyname('BMID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with CDS_22 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ChkerHZ').Value:=Trim(Self.ADOQueryTemp.fieldbyname('ChkerHZ').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.Tv23Column1PropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
var
|
||||
mvalue:String;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
with CDS_23 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ChkInt').Value:=null;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_ChkLiu_Sub Set ChkInt=Null where BSID='''+Trim(CDS_23.fieldbyname('BSID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with CDS_23 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ChkInt').Value:=mvalue;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_ChkLiu_Sub Set ChkInt='+mvalue+' where BSID='''+Trim(CDS_23.fieldbyname('BSID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with Self.ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_ChkLiu_Main Set ');
|
||||
|
||||
Sql.Add(' ChkerHZ=[dbo].[F_Get_Order_SubStr_PB](BX_ChkLiu_Main.BMID,''ChkerHZ'')');
|
||||
|
||||
sql.Add(' where BMID='''+Trim(Self.CDS_22.fieldbyname('BMID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with Self.ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BX_ChkLiu_Main');
|
||||
sql.Add(' where BMID='''+Trim(Self.CDS_22.fieldbyname('BMID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with CDS_22 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ChkerHZ').Value:=Trim(Self.ADOQueryTemp.fieldbyname('ChkerHZ').AsString);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton16Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_23.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' Update BX_ChkLiu_Sub Set DelTime=getdate(),Deler='''+Trim(DName)+''',Valid=''N'' ');
|
||||
sql.Add(' where BSID='''+Trim(CDS_23.fieldbyname('BSID').AsString)+'''');
|
||||
execsql;
|
||||
end;
|
||||
|
||||
CDS_23.Delete;
|
||||
with Self.ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update BX_ChkLiu_Main Set ');
|
||||
|
||||
Sql.Add(' ChkerHZ=[dbo].[F_Get_Order_SubStr_PB](BX_ChkLiu_Main.BMID,''ChkerHZ'')');
|
||||
|
||||
sql.Add(' where BMID='''+Trim(Self.CDS_22.fieldbyname('BMID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with Self.ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BX_ChkLiu_Main');
|
||||
sql.Add(' where BMID='''+Trim(Self.CDS_22.fieldbyname('BMID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with CDS_22 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ChkerHZ').Value:=Trim(Self.ADOQueryTemp.fieldbyname('ChkerHZ').AsString);
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('删除失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.Tv22MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
InitGrid23();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
InitGrid21();
|
||||
InitGrid22();
|
||||
end;
|
||||
|
||||
procedure TfrmDeptType.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='BXName';
|
||||
flagname:='对方单位';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
188
BI(BIView.dll)/U_FileUp.dfm
Normal file
188
BI(BIView.dll)/U_FileUp.dfm
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
object frmFileUp: TfrmFileUp
|
||||
Left = 247
|
||||
Top = 162
|
||||
Width = 634
|
||||
Height = 447
|
||||
Caption = #19978#20256#25991#20214
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid7: TcxGrid
|
||||
Left = 0
|
||||
Top = 41
|
||||
Width = 555
|
||||
Height = 367
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV7: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object FileName: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 121
|
||||
end
|
||||
object FileDate: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #19978#20256#26085#26399
|
||||
DataBinding.FieldName = 'FileDate'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 104
|
||||
end
|
||||
end
|
||||
object cxGridLevel6: TcxGridLevel
|
||||
GridView = TV7
|
||||
end
|
||||
end
|
||||
object Panel16: TPanel
|
||||
Left = 190
|
||||
Top = 126
|
||||
Width = 138
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
Caption = #27491#22312#19978#20256#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ToolBar6: TToolBar
|
||||
Left = 555
|
||||
Top = 41
|
||||
Width = 63
|
||||
Height = 367
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object FileUp: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19978#20256
|
||||
ImageIndex = 109
|
||||
Wrap = True
|
||||
OnClick = FileUpClick
|
||||
end
|
||||
object FileDel: TToolButton
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 17
|
||||
Wrap = True
|
||||
OnClick = FileDelClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 618
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 14
|
||||
Width = 68
|
||||
Height = 16
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Image2: TImage
|
||||
Left = 537
|
||||
Top = 17
|
||||
Width = 23
|
||||
Height = 16
|
||||
end
|
||||
object Code: TEdit
|
||||
Left = 78
|
||||
Top = 9
|
||||
Width = 211
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 404
|
||||
Top = 197
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 405
|
||||
Top = 236
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 409
|
||||
Top = 285
|
||||
end
|
||||
object ADOQueryFile: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 144
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryFile
|
||||
Left = 392
|
||||
Top = 168
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 216
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 264
|
||||
end
|
||||
end
|
||||
357
BI(BIView.dll)/U_FileUp.pas
Normal file
357
BI(BIView.dll)/U_FileUp.pas
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
unit U_FileUp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, IdBaseComponent,
|
||||
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB,jpeg,
|
||||
BtnEdit,IniFiles;
|
||||
|
||||
type
|
||||
TfrmFileUp = class(TForm)
|
||||
cxGrid7: TcxGrid;
|
||||
TV7: TcxGridDBTableView;
|
||||
FileName: TcxGridDBColumn;
|
||||
FileDate: TcxGridDBColumn;
|
||||
cxGridLevel6: TcxGridLevel;
|
||||
Panel16: TPanel;
|
||||
ToolBar6: TToolBar;
|
||||
FileUp: TToolButton;
|
||||
FileDel: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Code: TEdit;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
ADOQueryFile: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
Image2: TImage;
|
||||
procedure FileUpClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FileDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
lstPat: TStringList;
|
||||
AJpeg: TJPEGImage;
|
||||
procedure CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
procedure SaveImageOther();
|
||||
procedure ReadINIFile10();
|
||||
{ Private declarations }
|
||||
public
|
||||
CYID:String;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFileUp: TfrmFileUp;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFileUp.ReadINIFile10();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
FileName:string;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||
programIni.Free;
|
||||
end;
|
||||
procedure TfrmFileUp.FileUpClick(Sender: TObject);
|
||||
var
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo:string;
|
||||
AJpeg: TJPEGImage;
|
||||
begin
|
||||
if Trim(Code.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('编号不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
lstPat.Clear;
|
||||
if ODPat.Execute then
|
||||
begin
|
||||
lstPat.AddStrings(ODPat.Files);
|
||||
end;
|
||||
|
||||
if lstPat.Count > 0 then
|
||||
begin
|
||||
try
|
||||
ReadINIFile10();
|
||||
server:=ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Host :=server;//PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Panel16.Visible:=True;
|
||||
Panel16.Refresh;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select Count(*) MM from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add('and filetype=''YP''');
|
||||
Open;
|
||||
j:=fieldbyname('MM').AsInteger;
|
||||
end;
|
||||
Image2.Picture.LoadFromFile(ODPat.FileName);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
CreThumb(AJpeg,Image2,216, 187);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
for i := 0 to lstPat.Count - 1 do
|
||||
begin
|
||||
PatFile := ExtractFileName(lstPat[i]);
|
||||
PatFile:=Copy(PatFile,(Pos('.',PatFile)+1),(Length(PatFile)-Pos('.',PatFile)) ) ;
|
||||
FConNo:=Trim(Code.Text);
|
||||
while Pos('/',FConNo)>0 do
|
||||
begin
|
||||
Delete(FConNo,Pos('/',FConNo),1);
|
||||
end;
|
||||
PatFile:=Trim(FConNo)+'-'+Inttostr(j+i+1)+'.'+PatFile;
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
{if not DirectoryExists('D:\图片\'+Trim(gDef1)) then
|
||||
ForceDirectories('D:\图片\'+Trim(gDef1)); }
|
||||
IdFTP1.Put(lstPat[i], Trim('\YP')+'\'+Trim(PatFile));
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and filename='''+Trim(PatFile)+'''');
|
||||
SQL.Add(' and filetype=''YP''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Panel16.Visible:=False;
|
||||
Application.MessageBox(PChar('文件<'+Trim(PatFile)+'>重复,'+inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if GetLSNo(ADOQueryCmd,MaxNo,'YP','XD_File',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('XFID').Value:=Trim(MaxNo);
|
||||
FieldByName('CYID').Value:=Trim(CYID);
|
||||
FieldByName('CYNO').Value:=Trim(Code.Text);
|
||||
FieldByName('filename').Value:=Trim(PatFile);
|
||||
FieldByName('FileDate').Value:=SGetServerDate(ADOQueryTemp);
|
||||
fieldbyname('FileType').value:=Trim('YP');
|
||||
Post;
|
||||
end;
|
||||
except
|
||||
//ADOQueryCmd.Connection.RollbackTrans;
|
||||
//Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=1 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
SaveImageOther();
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
open;
|
||||
end;
|
||||
Panel16.Visible:=False;
|
||||
if i>0 then
|
||||
Application.MessageBox(PChar(inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
procedure TfrmFileUp.CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
Ratio: Double;
|
||||
ARect: TRect;
|
||||
AHeight, AHeightOffset: Integer;
|
||||
AWidth, AWidthOffset: Integer;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Ratio := AJPeg.Width /AJPeg.Height;
|
||||
if Ratio > 1.333 then
|
||||
begin
|
||||
AHeight := Round(Width / Ratio);
|
||||
AHeightOffset := (Height - AHeight) div 2;
|
||||
AWidth := Width;
|
||||
AWidthOffset := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
AWidth := Round(Height * Ratio);
|
||||
AWidthOffset := (Width - AWidth) div 2;
|
||||
AHeight := Height;
|
||||
AHeightOffset := 0;
|
||||
end;
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||
Bitmap.Canvas.StretchDraw(ARect, AJPeg);
|
||||
Image1.Picture.Assign(BitMap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmFileUp.SaveImageOther();
|
||||
var
|
||||
AJpeg: TJPEGImage;
|
||||
myStream: TADOBlobStream;
|
||||
ImgMaxNo:String;
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo,FTFID:string;
|
||||
begin
|
||||
if Image2.Picture=nil then Exit;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID='''+Trim(CYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
FTFID:=Trim(ADOQueryTemp.fieldbyname('TFID').AsString);
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,ImgMaxNo,'TF','TP_File',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片表最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
ImgMaxNo:=Trim(FTFID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add( ' select * from TP_File where TFID='''+Trim(FTFID)+'''');
|
||||
open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('TFID').Value:=Trim(ImgMaxNo);
|
||||
FieldByName('WBID').Value:=Trim(CYID);
|
||||
//FieldByName('TFIdx').Value:=cxTabControl2.TabIndex;
|
||||
FieldByName('TFType').Value:='样品';
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
//CreThumb(AJpeg,Image1,160, 120);
|
||||
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
AJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
lstPat := TStringList.Create;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FileDelClick(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add(' Delete XD_File where XFID='''+Trim(ADOQueryFile.fieldbyname('XFID').AsString)+'''');
|
||||
SQL.Add(' Delete TP_File where WBID='''+Trim(CYID)+''' and TFType=''样品'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryFile.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=0 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
269
BI(BIView.dll)/U_FjList.dfm
Normal file
269
BI(BIView.dll)/U_FjList.dfm
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
object frmFjList: TfrmFjList
|
||||
Left = 503
|
||||
Top = 263
|
||||
Width = 822
|
||||
Height = 517
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = #38468#20214#20449#24687
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ListView1: TListView
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 804
|
||||
Height = 470
|
||||
Align = alClient
|
||||
Columns = <>
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
LargeImages = ImageList1
|
||||
ParentFont = False
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 0
|
||||
OnDblClick = ListView1DblClick
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 220
|
||||
Top = 175
|
||||
Width = 242
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel2'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
OnDblClick = Panel2DblClick
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 108
|
||||
Top = 101
|
||||
Width = 521
|
||||
Height = 211
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object Label10: TLabel
|
||||
Left = 16
|
||||
Top = 75
|
||||
Width = 104
|
||||
Height = 25
|
||||
Caption = #25991#20214#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 89
|
||||
Top = 140
|
||||
Width = 112
|
||||
Height = 41
|
||||
Caption = #26159
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 519
|
||||
Height = 29
|
||||
Align = alTop
|
||||
Alignment = taLeftJustify
|
||||
BevelOuter = bvNone
|
||||
Caption = ' '#26159#21542#26356#25913#25991#20214#21517#31216'?'
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -22
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnMouseMove = Panel10MouseMove
|
||||
object Image2: TImage
|
||||
Left = 488
|
||||
Top = 3
|
||||
Width = 28
|
||||
Height = 21
|
||||
ParentShowHint = False
|
||||
Picture.Data = {
|
||||
07544269746D617076040000424D760400000000000036000000280000001500
|
||||
0000110000000100180000000000400400000000000000000000000000000000
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFF0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6
|
||||
F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFF404040404040404040404040404040404040404040404040
|
||||
404040404040404040404040404040404040404040404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFF808080808080808080808080808080808080808080
|
||||
808080808080808080808080808080808080808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4000000000000C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4000000000000C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4000000000000C8D0D4
|
||||
C8D0D4000000000000C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4000000000000
|
||||
000000000000C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4000000
|
||||
000000C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4000000000000
|
||||
000000000000C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4000000000000C8D0D4
|
||||
C8D0D4000000000000C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4000000000000C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4000000000000C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FF00}
|
||||
ShowHint = True
|
||||
Transparent = True
|
||||
OnClick = Image2Click
|
||||
end
|
||||
end
|
||||
object WJName: TEdit
|
||||
Left = 119
|
||||
Top = 70
|
||||
Width = 373
|
||||
Height = 33
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 369
|
||||
Top = 140
|
||||
Width = 112
|
||||
Height = 41
|
||||
Caption = #21542
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object WJPach: TEdit
|
||||
Left = 108
|
||||
Top = 240
|
||||
Width = 373
|
||||
Height = 33
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 228
|
||||
Top = 140
|
||||
Width = 114
|
||||
Height = 41
|
||||
Caption = #30830#23450
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
OnClick = Button3Click
|
||||
end
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 288
|
||||
Top = 12
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 8
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Height = 32
|
||||
ShareImages = True
|
||||
Width = 32
|
||||
Left = 64
|
||||
Top = 12
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 148
|
||||
Top = 6
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 244
|
||||
Top = 8
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 76
|
||||
Top = 49
|
||||
object N2: TMenuItem
|
||||
Caption = #19978#20256
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N3: TMenuItem
|
||||
Caption = #21024#38500
|
||||
OnClick = N3Click
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = #37325#21629#21517
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N4: TMenuItem
|
||||
Caption = #21478#23384#20026
|
||||
OnClick = N4Click
|
||||
end
|
||||
end
|
||||
end
|
||||
526
BI(BIView.dll)/U_FjList.pas
Normal file
526
BI(BIView.dll)/U_FjList.pas
Normal file
|
|
@ -0,0 +1,526 @@
|
|||
unit U_FjList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, ComCtrls, Menus, cxLookAndFeelPainters, StdCtrls,
|
||||
cxButtons, DB, ADODB, ImgList,shellapi, IdBaseComponent, IdComponent,
|
||||
IdTCPConnection, IdTCPClient, IdFTP,strutils;
|
||||
|
||||
type
|
||||
TfrmFjList = class(TForm)
|
||||
ListView1: TListView;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ImageList1: TImageList;
|
||||
Panel2: TPanel;
|
||||
IdFTP1: TIdFTP;
|
||||
ADOConnection1: TADOConnection;
|
||||
Panel3: TPanel;
|
||||
Label10: TLabel;
|
||||
Button1: TButton;
|
||||
Panel10: TPanel;
|
||||
Image2: TImage;
|
||||
WJName: TEdit;
|
||||
Button2: TButton;
|
||||
WJPach: TEdit;
|
||||
Button3: TButton;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
N3: TMenuItem;
|
||||
N4: TMenuItem;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ListView1DblClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure Panel2DblClick(Sender: TObject);
|
||||
procedure Panel10MouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
procedure Image2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure N3Click(Sender: TObject);
|
||||
procedure N4Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
private
|
||||
procedure InitData();
|
||||
{ Private declarations }
|
||||
public
|
||||
fkeyNO:string;
|
||||
fType:string;
|
||||
fId:integer;
|
||||
fstatus:integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFjList: TfrmFjList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
{$R *.dfm}
|
||||
procedure TfrmFjList.InitData();
|
||||
var
|
||||
ListItem: TListItem;
|
||||
Flag: Cardinal;
|
||||
info: SHFILEINFOA;
|
||||
Icon: TIcon;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
try
|
||||
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select fileName from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
while not eof do
|
||||
begin
|
||||
with ListView1 do
|
||||
begin
|
||||
LargeImages := ImageList1;
|
||||
Icon := TIcon.Create;
|
||||
ListItem := Items.Add;
|
||||
Listitem.Caption := trim(fieldbyname('fileName').AsString);
|
||||
Flag := (SHGFI_LARGEICON or SHGFI_ICON or SHGFI_USEFILEATTRIBUTES);
|
||||
SHGetFileInfo(Pchar(trim(fieldbyname('fileName').AsString)), 0, info, Sizeof(info), Flag);
|
||||
Icon.Handle := info.hIcon;
|
||||
ImageList1.AddIcon(Icon);
|
||||
ListItem.ImageIndex := ImageList1.Count - 1;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmFjList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='';
|
||||
Connected:=true;
|
||||
end;
|
||||
ListView1.Align:=alclient;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormShow(Sender: TObject);
|
||||
begin
|
||||
IF fstatus<>0 then
|
||||
begin
|
||||
N1.Visible:=False;
|
||||
N2.Visible:=False;
|
||||
N3.Visible:=False;
|
||||
end;
|
||||
initdata();
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.ListView1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName:string;
|
||||
fileName:string;
|
||||
begin
|
||||
if ListView1.Items.Count<1 THEN EXIT;
|
||||
|
||||
if listView1.SelCount<1 then exit;
|
||||
sFieldName:=leftbstr(ExtractFilePath(Application.ExeName),1)+':\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName),nil);
|
||||
|
||||
fileName:=ListView1.Selected.Caption;
|
||||
|
||||
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
|
||||
Panel2.Caption:='正在下载数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get('FJ\'+ Trim(fileName), sFieldName,true, false);
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible:=false;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
if fId=10 then Action:=cafree
|
||||
else
|
||||
Action:=cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.Panel2DblClick(Sender: TObject);
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.Panel10MouseMove(Sender: TObject; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
begin
|
||||
ReleaseCapture;
|
||||
TWinControl(Panel3).Perform(WM_SYSCOMMAND,$F012,0);
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.Image2Click(Sender: TObject);
|
||||
begin
|
||||
Panel3.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.Button1Click(Sender: TObject);
|
||||
var
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
maxNo:string;
|
||||
begin
|
||||
try
|
||||
adoqueryCmd.Connection.BeginTrans;
|
||||
begin
|
||||
fFilePath:=WJPach.Text;
|
||||
fFileName:=WJName.Text;
|
||||
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select TFId from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
|
||||
end;
|
||||
IF ADOQueryCmd.IsEmpty=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('此附件名称已存在,请修改文件名,继续上传!','提示信息',MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
Panel3.Visible:=False;
|
||||
Panel2.Caption:='正在上传数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
|
||||
if GetLSNo(ADOQueryCmd,maxNo,'FJ','FJ_File',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
append;
|
||||
fieldbyname('TFID').Value:=trim(maxNO);
|
||||
fieldbyname('WBID').Value:=trim(fkeyNO);
|
||||
fieldbyname('TFType').Value:=trim(fType);
|
||||
fieldbyname('FileName').Value:=trim(fFileName);
|
||||
post;
|
||||
end;
|
||||
if fFilePath <> '' then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
IdFTP1.Put(fFilePath, 'FJ\' + Trim(fFileName));
|
||||
IdFTP1.Quit;
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('上传文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||
end;
|
||||
end;
|
||||
IdFTP1.Quit;
|
||||
Panel2.Visible:=false;
|
||||
initdata();
|
||||
end;
|
||||
adoqueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('文件保存失败!','提示信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.Button2Click(Sender: TObject);
|
||||
var
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
maxNo:string;
|
||||
begin
|
||||
try
|
||||
adoqueryCmd.Connection.BeginTrans;
|
||||
fFilePath:=WJPach.Text;
|
||||
fFileName:=WJName.Hint;
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select TFId from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
IF not adoqueryCmd.IsEmpty then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('此附件名称已存在,请修改文件名,继续上传!','提示信息',MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
Panel3.Visible:=False;
|
||||
Panel2.Caption:='正在上传数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
|
||||
if GetLSNo(ADOQueryCmd,maxNo,'FJ','FJ_File',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
append;
|
||||
fieldbyname('TFID').Value:=trim(maxNO);
|
||||
fieldbyname('WBID').Value:=trim(fkeyNO);
|
||||
fieldbyname('TFType').Value:=trim(fType);
|
||||
fieldbyname('FileName').Value:=trim(fFileName);
|
||||
post;
|
||||
end;
|
||||
if fFilePath <> '' then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
IdFTP1.Put(fFilePath, 'FJ\' + Trim(fFileName));
|
||||
IdFTP1.Quit;
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('上传文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||
end;
|
||||
end;
|
||||
IdFTP1.Quit;
|
||||
Panel2.Visible:=false;
|
||||
initdata();
|
||||
adoqueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('文件保存失败!','提示信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.N2Click(Sender: TObject);
|
||||
var
|
||||
OpenDiaLog: TOpenDialog;
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
begin
|
||||
OpenDiaLog := TOpenDialog.Create(Self);
|
||||
if OpenDiaLog.Execute then
|
||||
begin
|
||||
fFilePath:=OpenDiaLog.FileName;
|
||||
fFileName:=ExtractFileName(OpenDiaLog.FileName);
|
||||
Panel3.Visible:=True;
|
||||
WJName.Text:=Trim(fFileName);
|
||||
WJName.Hint:=Trim(fFileName);
|
||||
WJPach.Text:=fFilePath;
|
||||
Button3.Visible:=False;
|
||||
Button1.Visible:=True;
|
||||
Button2.Visible:=True;
|
||||
Panel3.Refresh;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.N3Click(Sender: TObject);
|
||||
var
|
||||
fFileName:string;
|
||||
begin
|
||||
if listView1.SelCount<1 then exit;
|
||||
try
|
||||
fFileName:=ListView1.Selected.Caption;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from FJ_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
initData();
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.N4Click(Sender: TObject);
|
||||
var
|
||||
SaveDialog: TSaveDialog;
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
begin
|
||||
if listView1.SelCount<1 then exit;
|
||||
try
|
||||
fFileName:=ListView1.Selected.Caption;
|
||||
SaveDialog := TSaveDialog.Create(Self);
|
||||
SaveDialog.FileName:=fFileName;
|
||||
if SaveDialog.Execute then
|
||||
begin
|
||||
Panel2.Caption:='正在保存数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
fFilePath:=SaveDialog.FileName;
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI','SERVER','FTP地址','127.0.0.1');;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
Panel2.Caption:='正在下载数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get('FJ\'+ Trim(fFileName), fFilePath,false, true);
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible:=false;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
end;
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.N1Click(Sender: TObject);
|
||||
begin
|
||||
if listView1.SelCount<1 then exit;
|
||||
Panel3.Visible:=True;
|
||||
Button1.Visible:=False;
|
||||
Button2.Visible:=False;
|
||||
Button3.Visible:=True;
|
||||
Panel3.Refresh;
|
||||
WJName.Text:=Trim(ListView1.Selected.Caption);
|
||||
WJName.Hint:=Trim(ListView1.Selected.Caption);
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.Button3Click(Sender: TObject);
|
||||
var
|
||||
fFileName:String;
|
||||
begin
|
||||
fFileName:=WJName.Hint;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate FJ_File Set FileName='''+Trim(WJName.Text)+'''');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
Panel3.Visible:=False;
|
||||
initData();
|
||||
end;
|
||||
|
||||
end.
|
||||
1485
BI(BIView.dll)/U_GZHJList.dfm
Normal file
1485
BI(BIView.dll)/U_GZHJList.dfm
Normal file
File diff suppressed because it is too large
Load Diff
326
BI(BIView.dll)/U_GZHJList.pas
Normal file
326
BI(BIView.dll)/U_GZHJList.pas
Normal file
|
|
@ -0,0 +1,326 @@
|
|||
unit U_GZHJList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||
cxDropDownEdit, MovePanel, Menus, cxCheckBox, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, RM_e_Xls, cxPC, cxCalendar, cxButtonEdit, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmGZHJList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
CDS_Main: TClientDataSet;
|
||||
Label1: TLabel;
|
||||
DCGName: TEdit;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
MovePanel2: TMovePanel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
cxPageControl1: TcxPageControl;
|
||||
cxTabSheet1: TcxTabSheet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBBandedTableView;
|
||||
v1Column1: TcxGridDBBandedColumn;
|
||||
v1Column3: TcxGridDBBandedColumn;
|
||||
v1Column7: TcxGridDBBandedColumn;
|
||||
v1Column11: TcxGridDBBandedColumn;
|
||||
v1Column15: TcxGridDBBandedColumn;
|
||||
v1Column19: TcxGridDBBandedColumn;
|
||||
v1Column23: TcxGridDBBandedColumn;
|
||||
v1Column24: TcxGridDBBandedColumn;
|
||||
v1Column27: TcxGridDBBandedColumn;
|
||||
v1Column30: TcxGridDBBandedColumn;
|
||||
v1Column31: TcxGridDBBandedColumn;
|
||||
v1Column32: TcxGridDBBandedColumn;
|
||||
v1Column33: TcxGridDBBandedColumn;
|
||||
v1Column34: TcxGridDBBandedColumn;
|
||||
v1Column35: TcxGridDBBandedColumn;
|
||||
v1Column36: TcxGridDBBandedColumn;
|
||||
v1Column37: TcxGridDBBandedColumn;
|
||||
v1Column38: TcxGridDBBandedColumn;
|
||||
v1Column39: TcxGridDBBandedColumn;
|
||||
v1Column40: TcxGridDBBandedColumn;
|
||||
v1Column41: TcxGridDBBandedColumn;
|
||||
v1Column42: TcxGridDBBandedColumn;
|
||||
v1Column43: TcxGridDBBandedColumn;
|
||||
v1Column44: TcxGridDBBandedColumn;
|
||||
v1Column45: TcxGridDBBandedColumn;
|
||||
v1Column46: TcxGridDBBandedColumn;
|
||||
v1Column47: TcxGridDBBandedColumn;
|
||||
v1Column48: TcxGridDBBandedColumn;
|
||||
v1Column49: TcxGridDBBandedColumn;
|
||||
v1Column50: TcxGridDBBandedColumn;
|
||||
v1Column51: TcxGridDBBandedColumn;
|
||||
v1Column52: TcxGridDBBandedColumn;
|
||||
v1Column53: TcxGridDBBandedColumn;
|
||||
v1Column2: TcxGridDBBandedColumn;
|
||||
v1Column4: TcxGridDBBandedColumn;
|
||||
v1Column5: TcxGridDBBandedColumn;
|
||||
v1Column6: TcxGridDBBandedColumn;
|
||||
v1Column8: TcxGridDBBandedColumn;
|
||||
v1Column9: TcxGridDBBandedColumn;
|
||||
v1Column10: TcxGridDBBandedColumn;
|
||||
v1Column12: TcxGridDBBandedColumn;
|
||||
v1Column13: TcxGridDBBandedColumn;
|
||||
v1Column14: TcxGridDBBandedColumn;
|
||||
v1Column16: TcxGridDBBandedColumn;
|
||||
v1Column17: TcxGridDBBandedColumn;
|
||||
v1Column18: TcxGridDBBandedColumn;
|
||||
v1Column20: TcxGridDBBandedColumn;
|
||||
v1Column21: TcxGridDBBandedColumn;
|
||||
v1Column22: TcxGridDBBandedColumn;
|
||||
v1Column25: TcxGridDBBandedColumn;
|
||||
v1Column26: TcxGridDBBandedColumn;
|
||||
v1Column28: TcxGridDBBandedColumn;
|
||||
v1Column29: TcxGridDBBandedColumn;
|
||||
v1Column54: TcxGridDBBandedColumn;
|
||||
v1Column55: TcxGridDBBandedColumn;
|
||||
v1Column56: TcxGridDBBandedColumn;
|
||||
v1Column57: TcxGridDBBandedColumn;
|
||||
v1Column58: TcxGridDBBandedColumn;
|
||||
v1Column59: TcxGridDBBandedColumn;
|
||||
v1Column60: TcxGridDBBandedColumn;
|
||||
v1Column61: TcxGridDBBandedColumn;
|
||||
v1Column62: TcxGridDBBandedColumn;
|
||||
v1Column63: TcxGridDBBandedColumn;
|
||||
v1Column64: TcxGridDBBandedColumn;
|
||||
v1Column65: TcxGridDBBandedColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxTabSheet2: TcxTabSheet;
|
||||
ToolButton1: TToolButton;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ADOPrint: TADOQuery;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column19: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
v2Column17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure DCGNameChange(Sender: TObject);
|
||||
procedure cxPageControl1Change(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
FLeft, FTop: Integer;
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
FMainid, FSubId, FConNo, FColor, FCodeName: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmGZHJList: TfrmGZHJList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmGZHJList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmGZHJList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.InitGrid();
|
||||
begin
|
||||
MovePanel2.Visible := True;
|
||||
MovePanel2.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
if cxPageControl1.ActivePageIndex = 0 then
|
||||
begin
|
||||
SQL.Add('exec P_View_DAY_GZCL' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', Begdate.DateTime))));
|
||||
end
|
||||
else
|
||||
begin
|
||||
SQL.Add('select GZDate,DName,sum(GZMoney) GZMoney,sum(ZhongZS) ZhongZS, CarNo ');
|
||||
SQL.Add('from DCGMoney where GZDate= ' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', Begdate.DateTime))));
|
||||
SQL.Add('group by GZDate,GZDate,DName,CarNo ');
|
||||
SQL.Add('order by DName ,cast(CarNo as int) ');
|
||||
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
MovePanel2.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxBandedGrid('Tv1', Tv1, '产品排行');
|
||||
WriteCxGrid('Tv2', Tv2, '产品排行');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.FormShow(Sender: TObject);
|
||||
begin
|
||||
BegDate.Date := SGetServerDate(ADOQueryTemp);
|
||||
ReadCxBandedGrid('Tv1', Tv1, '产品排行');
|
||||
ReadCxGrid('Tv2', Tv2, '产品排行');
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.DCGNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.cxPageControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
filepath: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
with AdoPrint do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
SQL.Add('select GZDate,DName,sum(GZMoney) GZMoney,sum(ZhongZS) ZhongZS, CarNo ');
|
||||
SQL.Add('from DCGMoney where GZDate= ' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', Begdate.DateTime))));
|
||||
SQL.Add('group by GZDate,GZDate,DName,CarNo ');
|
||||
SQL.Add('order by DName ,cast(CarNo as int) ');
|
||||
open;
|
||||
end;
|
||||
|
||||
try
|
||||
filepath := ExtractFilePath(Application.ExeName) + 'report\每日机台产量表.rmf';
|
||||
if not FileExists(Pchar(filepath)) then
|
||||
begin
|
||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||
exit;
|
||||
end;
|
||||
RM1.LoadFromFile(filepath);
|
||||
RM1.ShowReport;
|
||||
finally
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
filepath: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
with AdoPrint do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
SQL.Add('exec P_View_DAY_GZCL' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', Begdate.DateTime))));
|
||||
open;
|
||||
end;
|
||||
|
||||
try
|
||||
filepath := ExtractFilePath(Application.ExeName) + 'report\产量统计表.rmf';
|
||||
if not FileExists(Pchar(filepath)) then
|
||||
begin
|
||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||
exit;
|
||||
end;
|
||||
RM1.LoadFromFile(filepath);
|
||||
RM1.ShowReport;
|
||||
finally
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmGZHJList.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
filepath: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
with AdoPrint do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
SQL.Add('exec P_View_DAY_GZCL' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', Begdate.DateTime))));
|
||||
open;
|
||||
end;
|
||||
|
||||
try
|
||||
|
||||
filepath := ExtractFilePath(Application.ExeName) + 'report\机台统计表.rmf';
|
||||
|
||||
if not FileExists(Pchar(filepath)) then
|
||||
begin
|
||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||
exit;
|
||||
end;
|
||||
RM1.LoadFromFile(filepath);
|
||||
RM1.ShowReport;
|
||||
finally
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
722
BI(BIView.dll)/U_GetDllForm.pas
Normal file
722
BI(BIView.dll)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,722 @@
|
|||
unit U_GetDllForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, dxCore,
|
||||
ActiveX, IniFiles;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
||||
|
||||
function ConnData(): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_CPAllTop, U_PBAllTop, U_PBAllTopQ30, U_CPAllTopQ30, U_CarTKTop,
|
||||
U_KHTop, U_DJTop, U_JYFTop, U_BIHZList, U_PBNameDayQtyList, U_CarTKHZTop,
|
||||
U_OrderHSList, U_DeptType, U_BXList,U_DJMoneyTop,U_DCMoneyTop,U_BXListChk,U_DCTimeZhou,U_purview;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
// 参数说明:App>>调用应用程序; //
|
||||
// FormH>>调用窗口句柄 ; //
|
||||
// FormID>>窗口号; //
|
||||
// Language>>语言种类; //
|
||||
// WinStyle>>窗口类型; //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
var
|
||||
frmOrderHSListDJ, frmOrderHSListDJTS, frmOrderHSListchk, frmOrderHSListHD, frmOrderHSListGL, frmOrderHSListCX: TfrmOrderHSList;
|
||||
frmBXListGL, frmBXListCX: TfrmBXList;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd;
|
||||
var
|
||||
i: Integer;
|
||||
bFound: Boolean;
|
||||
mnewHandle: hwnd;
|
||||
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||||
mstate: TWindowState;
|
||||
mborderstyle: TFormBorderStyle;
|
||||
begin
|
||||
mnewHandle := 0;
|
||||
DName := PChar(GName);
|
||||
DCode := PChar(GCode);
|
||||
DdataBase := DataBase;
|
||||
DTitCaption := Title;
|
||||
DParameters1 := Parameters1;
|
||||
DParameters2 := Parameters2;
|
||||
DParameters3 := Parameters3;
|
||||
DParameters4 := Parameters4;
|
||||
DParameters5 := Parameters5;
|
||||
DParameters6 := Parameters6;
|
||||
DParameters7 := Parameters7;
|
||||
DParameters8 := Parameters8;
|
||||
DParameters9 := Parameters9;
|
||||
DParameters10 := Parameters10;
|
||||
|
||||
MainApplication := App;
|
||||
DCurHandle := FormH;
|
||||
IsDelphiLanguage := Language;
|
||||
|
||||
Application := TApplication(App);
|
||||
DCurHandle := 0;
|
||||
|
||||
|
||||
//赋值链接字符串
|
||||
SetLength(server, 255);
|
||||
SetLength(dtbase, 255);
|
||||
SetLength(user, 255);
|
||||
SetLength(pswd, 255);
|
||||
|
||||
if trim(DataBaseStr) = '' then
|
||||
begin
|
||||
server := '139.196.189.214,7781';
|
||||
//server:='.';
|
||||
dtbase := 'yongjindata';
|
||||
user := 'yifusa';
|
||||
// user := 'sa';
|
||||
//dtbase := 'yifudata';
|
||||
pswd := 'rightsoft@123';
|
||||
// pswd:='rightsoft';
|
||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
//
|
||||
// DCode:='ADMIN';
|
||||
//Dname:='李静';
|
||||
//DParameters1:='高权限';
|
||||
//DParameters3:='1';
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
DConString := DataBaseStr;
|
||||
end;
|
||||
|
||||
if not ConnData() then
|
||||
begin
|
||||
result := 0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// 定义窗口类型 、状态
|
||||
if WinStyle = 0 then
|
||||
begin
|
||||
mstyle := fsMDIChild;
|
||||
mstate := wsMaximized;
|
||||
mborderstyle := bsSizeable;
|
||||
end
|
||||
else
|
||||
begin
|
||||
mstyle := fsNormal;
|
||||
mstate := wsNormal;
|
||||
mborderstyle := bsSizeable;
|
||||
end;
|
||||
/////////////////////
|
||||
//调用子模块窗口
|
||||
case FormID of
|
||||
0: //权限控制
|
||||
begin
|
||||
if frmpurviewDL = nil then
|
||||
begin
|
||||
frmpurviewDL := TfrmpurviewDL.Create(application.MainForm);
|
||||
with frmpurviewDL do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmpurviewDL.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmpurviewDL.Handle;
|
||||
end;
|
||||
100: //费用报销后台设置
|
||||
begin
|
||||
if frmDeptType = nil then
|
||||
begin
|
||||
frmDeptType := TfrmDeptType.Create(application.MainForm);
|
||||
with frmDeptType do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDeptType.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDeptType.Handle;
|
||||
end;
|
||||
1001: //费用报销查询
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '费用报销查询' then
|
||||
begin
|
||||
BringWindowToTop(frmBXListCX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmBXListCX := TfrmBXList.Create(application.MainForm);
|
||||
with frmBXListCX do
|
||||
begin
|
||||
canshu1 := '查询';
|
||||
Title := '费用报销查询';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBXListCX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBXListCX.Handle;
|
||||
end;
|
||||
1002: //费用报销管理
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '费用报销管理' then
|
||||
begin
|
||||
BringWindowToTop(frmBXListGL.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmBXListGL := TfrmBXList.Create(application.MainForm);
|
||||
with frmBXListGL do
|
||||
begin
|
||||
canshu1 := '管理';
|
||||
Title := '费用报销管理';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBXListGL.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBXListGL.Handle;
|
||||
end;
|
||||
1003: //费用报销审核
|
||||
begin
|
||||
if frmBXListChk = nil then
|
||||
begin
|
||||
frmBXListChk := TfrmBXListChk.Create(application.MainForm);
|
||||
with frmBXListChk do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBXListChk.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBXListChk.Handle;
|
||||
end;
|
||||
101: //产品20排行榜
|
||||
begin
|
||||
if frmCPAllTop = nil then
|
||||
begin
|
||||
frmCPAllTop := TfrmCPAllTop.Create(application.MainForm);
|
||||
with frmCPAllTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmCPAllTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmCPAllTop.Handle;
|
||||
end;
|
||||
102: //产品百大排行榜
|
||||
begin
|
||||
if frmCPAllTopQ30 = nil then
|
||||
begin
|
||||
frmCPAllTopQ30 := TfrmCPAllTopQ30.Create(application.MainForm);
|
||||
with frmCPAllTopQ30 do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmCPAllTopQ30.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmCPAllTopQ30.Handle;
|
||||
end;
|
||||
103: //坯布Top20排行榜
|
||||
begin
|
||||
if frmPBAllTop = nil then
|
||||
begin
|
||||
frmPBAllTop := TfrmPBAllTop.Create(application.MainForm);
|
||||
with frmPBAllTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmPBAllTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmPBAllTop.Handle;
|
||||
end;
|
||||
104: //坯布百大排行榜
|
||||
begin
|
||||
if frmPBAllTopQ30 = nil then
|
||||
begin
|
||||
frmPBAllTopQ30 := TfrmPBAllTopQ30.Create(application.MainForm);
|
||||
with frmPBAllTopQ30 do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmPBAllTopQ30.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmPBAllTopQ30.Handle;
|
||||
end;
|
||||
105: //开/停机天数排行榜
|
||||
begin
|
||||
if frmCarTKHZTop = nil then
|
||||
begin
|
||||
frmCarTKHZTop := TfrmCarTKHZTop.Create(application.MainForm);
|
||||
with frmCarTKHZTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmCarTKHZTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmCarTKHZTop.Handle;
|
||||
end;
|
||||
106: //客户销量排行榜
|
||||
begin
|
||||
if frmKHTop = nil then
|
||||
begin
|
||||
frmKHTop := TfrmKHTop.Create(application.MainForm);
|
||||
with frmKHTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmKHTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmKHTop.Handle;
|
||||
end;
|
||||
107: //仓库工人排行榜
|
||||
begin
|
||||
if frmDJTop = nil then
|
||||
begin
|
||||
frmDJTop := TfrmDJTop.Create(application.MainForm);
|
||||
with frmDJTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDJTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDJTop.Handle;
|
||||
end;
|
||||
108: //检验分排行榜
|
||||
begin
|
||||
if frmJYFTop = nil then
|
||||
begin
|
||||
frmJYFTop := TfrmJYFTop.Create(application.MainForm);
|
||||
with frmJYFTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmJYFTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmJYFTop.Handle;
|
||||
end;
|
||||
109: //数据大集
|
||||
begin
|
||||
if frmBIHZList = nil then
|
||||
begin
|
||||
frmBIHZList := TfrmBIHZList.Create(application.MainForm);
|
||||
with frmBIHZList do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBIHZList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBIHZList.Handle;
|
||||
end;
|
||||
110: //品名日产量分析表
|
||||
begin
|
||||
if frmPBNameDayQtyList = nil then
|
||||
begin
|
||||
frmPBNameDayQtyList := TfrmPBNameDayQtyList.Create(application.MainForm);
|
||||
with frmPBNameDayQtyList do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmPBNameDayQtyList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmPBNameDayQtyList.Handle;
|
||||
end;
|
||||
111: //订单核算登记
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '订单核算登记' then
|
||||
begin
|
||||
BringWindowToTop(frmOrderHSListDJ.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmOrderHSListDJ := TfrmOrderHSList.Create(application.MainForm);
|
||||
with frmOrderHSListDJ do
|
||||
begin
|
||||
canshu1 := '登记';
|
||||
Title := '订单核算登记';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmOrderHSListDJ.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmOrderHSListDJ.Handle;
|
||||
end;
|
||||
1112: //订单核算登记(统算)
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '订单核算登记(统算)' then
|
||||
begin
|
||||
BringWindowToTop(frmOrderHSListDJTS.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmOrderHSListDJTS := TfrmOrderHSList.Create(application.MainForm);
|
||||
with frmOrderHSListDJTS do
|
||||
begin
|
||||
canshu1 := '统算';
|
||||
Title := '订单核算登记(统算)';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmOrderHSListDJTS.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmOrderHSListDJTS.Handle;
|
||||
end;
|
||||
112: //订单核算管理
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '订单核算管理' then
|
||||
begin
|
||||
BringWindowToTop(frmOrderHSListGL.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmOrderHSListGL := TfrmOrderHSList.Create(application.MainForm);
|
||||
with frmOrderHSListGL do
|
||||
begin
|
||||
canshu1 := '管理';
|
||||
Title := '订单核算管理';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmOrderHSListGL.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmOrderHSListGL.Handle;
|
||||
end;
|
||||
113: //订单核算查询
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '订单核算查询' then
|
||||
begin
|
||||
BringWindowToTop(frmOrderHSListCX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmOrderHSListCX := TfrmOrderHSList.Create(application.MainForm);
|
||||
with frmOrderHSListCX do
|
||||
begin
|
||||
canshu1 := '查询';
|
||||
Title := '订单核算查询';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmOrderHSListCX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmOrderHSListCX.Handle;
|
||||
end;
|
||||
115: //订单核算审核
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '订单核算审核' then
|
||||
begin
|
||||
BringWindowToTop(frmOrderHSListchk.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmOrderHSListchk := TfrmOrderHSList.Create(application.MainForm);
|
||||
with frmOrderHSListchk do
|
||||
begin
|
||||
canshu1 := '审核';
|
||||
Title := '订单核算审核';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmOrderHSListchk.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmOrderHSListchk.Handle;
|
||||
end;
|
||||
116: //订单核算核对
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '订单核算核对' then
|
||||
begin
|
||||
BringWindowToTop(frmOrderHSListHD.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmOrderHSListHD := TfrmOrderHSList.Create(application.MainForm);
|
||||
with frmOrderHSListHD do
|
||||
begin
|
||||
canshu1 := '核对';
|
||||
Title := '订单核算核对';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmOrderHSListHD.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmOrderHSListHD.Handle;
|
||||
end;
|
||||
|
||||
117: //打卷工工资排行榜
|
||||
begin
|
||||
if frmDJMoneyTop = nil then
|
||||
begin
|
||||
frmDJMoneyTop := TfrmDJMoneyTop.Create(application.MainForm);
|
||||
with frmDJMoneyTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDJMoneyTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDJMoneyTop.Handle;
|
||||
end;
|
||||
118: //打卷工工资排行榜
|
||||
begin
|
||||
if frmDCMoneyTop = nil then
|
||||
begin
|
||||
frmDCMoneyTop := TfrmDCMoneyTop.Create(application.MainForm);
|
||||
with frmDCMoneyTop do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDCMoneyTop.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDCMoneyTop.Handle;
|
||||
end;
|
||||
119: //圆机产量查询
|
||||
begin
|
||||
if frmDCTimeZhou = nil then
|
||||
begin
|
||||
frmDCTimeZhou := TfrmDCTimeZhou.Create(application.MainForm);
|
||||
with frmDCTimeZhou do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDCTimeZhou.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDCTimeZhou.Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := mnewHandle;
|
||||
|
||||
end;
|
||||
//===========================================================
|
||||
//建立数据库连接池
|
||||
//===========================================================
|
||||
|
||||
function ConnData(): Boolean;
|
||||
var
|
||||
IniFile: TIniFile;
|
||||
begin
|
||||
try
|
||||
IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'SYSTEMSET.INI');
|
||||
PicSvr := IniFile.ReadString('SERVER', '服务器地址', '127.0.0.1');
|
||||
UserDataFlag := IniFile.ReadString('SERVER', '服务器地址类型', '-1');
|
||||
finally
|
||||
IniFile.Free;
|
||||
end;
|
||||
if not Assigned(DataLink_BIView) then
|
||||
DataLink_BIView := TDataLink_BIView.Create(Application);
|
||||
try
|
||||
with DataLink_BIView.ADOLink do
|
||||
begin
|
||||
//if not Connected then
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
end;
|
||||
Result := true;
|
||||
except
|
||||
Result := false;
|
||||
application.MessageBox('数据库连接失败!', '错误', mb_Ok + MB_ICONERROR);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
initialization
|
||||
CoInitialize(nil);
|
||||
dxUnitsLoader.Initialize;
|
||||
|
||||
|
||||
finalization
|
||||
DataLink_BIView.Free;
|
||||
application := NewDllApp;
|
||||
dxUnitsLoader.Finalize;
|
||||
|
||||
end.
|
||||
|
||||
606
BI(BIView.dll)/U_InspectionInfo.dfm
Normal file
606
BI(BIView.dll)/U_InspectionInfo.dfm
Normal file
|
|
@ -0,0 +1,606 @@
|
|||
object frmInspectionInfo: TfrmInspectionInfo
|
||||
Left = 238
|
||||
Top = 107
|
||||
Width = 1283
|
||||
Height = 573
|
||||
Caption = #26816#39564#20449#24687
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1267
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_Wage.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_Wage.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1267
|
||||
Height = 39
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 314
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21697#21517
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 170
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #32534#21495
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 459
|
||||
Top = 13
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #25377#36710#24037
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 22
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #26085#26399
|
||||
end
|
||||
object C_CodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 340
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 194
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object DEFstr5: TEdit
|
||||
Tag = 2
|
||||
Left = 497
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 50
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1267
|
||||
Height = 465
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Position = spFooter
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column31
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column32
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column16
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column24
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column31
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column32
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column16
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column24
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_Wage.SHuangSe
|
||||
Styles.IncSearch = DataLink_Wage.SHuangSe
|
||||
Styles.Selection = DataLink_Wage.SHuangSe
|
||||
Styles.Header = DataLink_Wage.Default
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #36873#20013
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 103
|
||||
end
|
||||
object v1Column33: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #38024#23544
|
||||
DataBinding.FieldName = 'ZhenCun'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column40: TcxGridDBColumn
|
||||
Caption = #32433#32447#25209#21495
|
||||
DataBinding.FieldName = 'SXBatchNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25377#36710#24037
|
||||
DataBinding.FieldName = 'SCPersonName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #36710#21495
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 58
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #26816#39564#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column36: TcxGridDBColumn
|
||||
Caption = #33853#24067#26102#38388
|
||||
DataBinding.FieldName = 'LBDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #26816#39564#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 94
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21367#26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'APXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #35843#35797#26426#20462
|
||||
DataBinding.FieldName = 'JXPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object v1Column35: TcxGridDBColumn
|
||||
Caption = #21305#37325
|
||||
DataBinding.FieldName = 'PiKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 58
|
||||
end
|
||||
object v1Column31: TcxGridDBColumn
|
||||
Caption = #20928#37325
|
||||
DataBinding.FieldName = 'MJJingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column32: TcxGridDBColumn
|
||||
Caption = #30382#37325
|
||||
DataBinding.FieldName = 'MJPiZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #27611#37325
|
||||
DataBinding.FieldName = 'MJMaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 54
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #30133#28857#20010#25968
|
||||
DataBinding.FieldName = 'CDGS'
|
||||
Width = 61
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #30133#28857#31859#25968
|
||||
DataBinding.FieldName = 'CDHZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 63
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #30133#28857#20844#26020#25968
|
||||
DataBinding.FieldName = 'CDHZKgQty'
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #36131#20219#20154
|
||||
DataBinding.FieldName = 'ZZPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #30133#28857#24773#20917
|
||||
DataBinding.FieldName = 'CDQK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column34: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'KuWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #20837#24211#29366#24577
|
||||
DataBinding.FieldName = 'MJStr2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #20986#24211#29366#24577
|
||||
DataBinding.FieldName = 'MJStr4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'ClothType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #33394#21035
|
||||
DataBinding.FieldName = 'MJStr3'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'ZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 50
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #22870#21169
|
||||
DataBinding.FieldName = 'AddMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #22788#32602
|
||||
DataBinding.FieldName = 'DelMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #20132#29677
|
||||
DataBinding.FieldName = 'JBStr'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #20132#29677#20154
|
||||
DataBinding.FieldName = 'JBSCPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #20132#29677#36716#25968
|
||||
DataBinding.FieldName = 'JBZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #20132#29677#20154'2'
|
||||
DataBinding.FieldName = 'JBSCPerson2'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Options.Editing = False
|
||||
Width = 56
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #20132#29677#36716#25968'2'
|
||||
DataBinding.FieldName = 'JBZhuanQty2'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column37: TcxGridDBColumn
|
||||
Caption = #24050#21098#20844#26020#25968
|
||||
DataBinding.FieldName = 'YJQtyKg'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object v1Column38: TcxGridDBColumn
|
||||
Caption = #24050#21098#31859#25968
|
||||
DataBinding.FieldName = 'YJQtyM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27599#20844#26020#36716#25968
|
||||
DataBinding.FieldName = 'OneKgZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object v1Column39: TcxGridDBColumn
|
||||
Caption = #26680#31639#36716#25968
|
||||
DataBinding.FieldName = 'PZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object v1Column41: TcxGridDBColumn
|
||||
Caption = #26816#39564#26426#21488
|
||||
DataBinding.FieldName = 'JTType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Wage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Wage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Wage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 949
|
||||
Top = 225
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 864
|
||||
Top = 224
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
Left = 928
|
||||
Top = 216
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 224
|
||||
end
|
||||
object DS_HZ: TDataSource
|
||||
DataSet = CDS_HZ
|
||||
Left = 899
|
||||
Top = 235
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 872
|
||||
Top = 224
|
||||
end
|
||||
end
|
||||
197
BI(BIView.dll)/U_InspectionInfo.pas
Normal file
197
BI(BIView.dll)/U_InspectionInfo.pas
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
unit U_InspectionInfo;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox;
|
||||
|
||||
type
|
||||
TfrmInspectionInfo = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
Label3: TLabel;
|
||||
C_CodeName: TEdit;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
Label1: TLabel;
|
||||
C_Code: TEdit;
|
||||
Label2: TLabel;
|
||||
DEFstr5: TEdit;
|
||||
EndDate: TDateTimePicker;
|
||||
Label4: TLabel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column33: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column40: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column36: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column35: TcxGridDBColumn;
|
||||
v1Column31: TcxGridDBColumn;
|
||||
v1Column32: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column34: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column37: TcxGridDBColumn;
|
||||
v1Column38: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column39: TcxGridDBColumn;
|
||||
v1Column41: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
canshu1: string;
|
||||
procedure InitGrid();
|
||||
public
|
||||
fkhType: string;
|
||||
Fmanage: string;
|
||||
FEnddate, FMainId, FSubId, FDName, FCarNo: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmInspectionInfo: TfrmInspectionInfo;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp, U_WageListInput;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmInspectionInfo.InitGrid();
|
||||
begin
|
||||
try
|
||||
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' exec P_Viwe_InspectionInfo' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime))));
|
||||
sql.Add(',' + quotedstr(trim(FDName)));
|
||||
sql.Add(',' + quotedstr(trim(FMainId)));
|
||||
sql.Add(',' + quotedstr(trim(FSubId)));
|
||||
sql.Add(',' + quotedstr(trim(FCarNo)));
|
||||
// showmessage(sql.Text) ;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||
CDS_HZ.Last;
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmInspectionInfo := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption, Tv1, 'Ñé²¼±¨¸æ');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(self.Caption, Tv1, 'Ñé²¼±¨¸æ');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxgrid1);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmInspectionInfo.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1 := Trim(DParameters1);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
274
BI(BIView.dll)/U_JTList.dfm
Normal file
274
BI(BIView.dll)/U_JTList.dfm
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
object frmJTList: TfrmJTList
|
||||
Left = 274
|
||||
Top = 116
|
||||
Width = 1123
|
||||
Height = 706
|
||||
Caption = #26426#21488#31649#29702
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
KeyPreview = True
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1107
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Images = DataLink_Wage.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 189
|
||||
Top = 0
|
||||
Width = 38
|
||||
Height = 30
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Text = '1'
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 227
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 80
|
||||
Width = 1107
|
||||
Height = 588
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DS_HZ
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_Wage.Default
|
||||
object v2ssel: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'ssel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 50
|
||||
end
|
||||
object v2Column8: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'ZdyName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Focusing = False
|
||||
Width = 206
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1107
|
||||
Height = 49
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label5: TLabel
|
||||
Left = 78
|
||||
Top = 18
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #24211#20301
|
||||
end
|
||||
object ZdyName: TEdit
|
||||
Tag = 2
|
||||
Left = 106
|
||||
Top = 14
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
OnChange = CustomerChange
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Wage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 301
|
||||
Top = 209
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Wage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 261
|
||||
Top = 217
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Wage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 229
|
||||
Top = 209
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDBMain
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 387
|
||||
Top = 382
|
||||
ReportData = {}
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 544
|
||||
Top = 240
|
||||
end
|
||||
object DS_HZ: TDataSource
|
||||
DataSet = CDS_HZ
|
||||
Left = 323
|
||||
Top = 307
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 424
|
||||
Top = 216
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 248
|
||||
Top = 296
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object RMXLSExport2: TRMXLSExport
|
||||
ShowAfterExport = False
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 431
|
||||
Top = 381
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrt
|
||||
Left = 356
|
||||
Top = 377
|
||||
end
|
||||
object ADOQueryPrt: TADOQuery
|
||||
Connection = DataLink_Wage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 308
|
||||
Top = 378
|
||||
end
|
||||
end
|
||||
365
BI(BIView.dll)/U_JTList.pas
Normal file
365
BI(BIView.dll)/U_JTList.pas
Normal file
|
|
@ -0,0 +1,365 @@
|
|||
unit U_JTList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||
cxButtonEdit, cxTextEdit, cxPC, cxCheckComboBox, cxDropDownEdit, Menus,
|
||||
RM_e_Xls, TeEngine, Series, TeeProcs, Chart, DbChart;
|
||||
|
||||
type
|
||||
TfrmJTList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
RM1: TRMGridReport;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
v2ssel: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
Label5: TLabel;
|
||||
ZdyName: TEdit;
|
||||
RMXLSExport2: TRMXLSExport;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
v2Column8: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
Edit1: TEdit;
|
||||
ADOQueryPrt: TADOQuery;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure CustomerChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
|
||||
procedure InitGrid();
|
||||
procedure PrintReport(FZDYNo:string);
|
||||
function SaveData():Boolean;
|
||||
public
|
||||
fFlag:integer;
|
||||
{ Public declarations }
|
||||
RKFlag,FCYID,fmanage:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmJTList: TfrmJTList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmJTList.PrintReport(FZDYNo:string);
|
||||
var
|
||||
fPrintFile,FFCYID:string;
|
||||
i,j:Integer;
|
||||
Txt,fImagePath:string;
|
||||
Moudle: THandle;
|
||||
Makebar:TMakebar;
|
||||
Mixtext:TMixtext;
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
|
||||
if Trim(Edit1.Text)<>'' then
|
||||
begin
|
||||
if TryStrToInt(Edit1.Text,j)=False then
|
||||
begin
|
||||
Application.MessageBox('份数录入错误!','提示',0);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\机台标签.rmf';
|
||||
with ADOQueryPrt do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select top 1 * from KH_ZDY where ZdyName='''+Trim(FZDYNo)+'''');
|
||||
open;
|
||||
end;
|
||||
try
|
||||
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||
Txt:=Trim(FZDYNo);
|
||||
fImagePath:=ExtractFilePath(Application.ExeName)+'image\temp.bmp';
|
||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName)+'image')) then
|
||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName)+'image'),nil);
|
||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
||||
Makebar(pchar(Txt),Length(Txt),3,3,0,PChar(fImagePath),3);
|
||||
except
|
||||
CDS_HZ.EnableControls;
|
||||
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['QRBARCODE']:=fImagePath;
|
||||
for i:=1 to j do
|
||||
begin
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.PrintReport;
|
||||
// RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+fPrintFile+'!'),'提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmJTList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*,ZJM=dbo.getPinYin(A.ZdyName) from KH_ZDY A where A.Type=''CarNo''');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmJTList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.caption),Tv2,'库位管理');
|
||||
Close;
|
||||
end;
|
||||
procedure TfrmJTList.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(trim(self.caption),Tv2,'库位管理');
|
||||
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
ZdyName.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
sql:string;
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
sql:=SGetFilters(Panel1,1,2);
|
||||
SDofilter(ADOQueryMain,sql);
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
if fmanage='查询' then
|
||||
begin
|
||||
with CDS_HZ do
|
||||
begin
|
||||
DisableControls;
|
||||
while not Eof do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('FactoryName').Value:='';
|
||||
Post;
|
||||
Next;
|
||||
end;
|
||||
EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmJTList.SaveData():Boolean;
|
||||
var
|
||||
maxId,CRID:String;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if GetLSNo(ADOQueryCmd,maxId,'SY','KH_ZDY',3,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('insert into KH_ZDY(ZDYNo,Type)');
|
||||
sql.Add('values('
|
||||
+quotedstr(Trim(maxId))
|
||||
+',''KuWei'')');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=True;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('增行失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.N1Click(Sender: TObject);
|
||||
begin
|
||||
IF CDS_HZ.IsEmpty then exit;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
DisableControls;
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
edit;
|
||||
fieldbyname('ssel').Value:=true;
|
||||
post;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.N2Click(Sender: TObject);
|
||||
begin
|
||||
IF CDS_HZ.IsEmpty then exit;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
DisableControls;
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
edit;
|
||||
fieldbyname('ssel').Value:=false;
|
||||
post;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.CustomerChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
fmanage:=Trim(DParameters1);
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.ToolButton3Click(Sender: TObject);
|
||||
|
||||
begin
|
||||
while CDS_HZ.Locate('SSel',true,[]) do
|
||||
begin
|
||||
PrintReport(Trim(CDS_HZ.fieldbyname('ZdyName').AsString));
|
||||
CDS_HZ.Edit;
|
||||
CDS_HZ.FieldByName('SSel').Value:=false;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmJTList.v2Column8PropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
var
|
||||
mvalue,FFieldName:String;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
FFieldName:=Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value:=Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate KH_Zdy ');
|
||||
sql.Add(' Set '+FFieldName+'='''+Trim(mvalue)+'''');
|
||||
SQL.Add(' where ZDYNo='''+Trim(CDS_HZ.fieldbyname('ZDYNo').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from KH_Zdy where Type=''KuWei''');
|
||||
sql.Add(' and ZdyName='''+Trim(CDS_HZ.fieldbyname('ZdyName').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
if ADOQueryTemp.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
CDS_HZ.EnableControls;
|
||||
Application.MessageBox('名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
except
|
||||
tv2.Controller.EditingController.ShowEdit();
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end
|
||||
end;
|
||||
|
||||
end.
|
||||
607
BI(BIView.dll)/U_JYFTop.dfm
Normal file
607
BI(BIView.dll)/U_JYFTop.dfm
Normal file
|
|
@ -0,0 +1,607 @@
|
|||
object frmJYFTop: TfrmJYFTop
|
||||
Left = 167
|
||||
Top = 169
|
||||
Width = 1410
|
||||
Height = 801
|
||||
Caption = #26816#39564#20998#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1392
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 65
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 284
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 307
|
||||
Top = 9
|
||||
Width = 30
|
||||
Height = 15
|
||||
Caption = #21697#21517
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 164
|
||||
Top = 9
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 5
|
||||
Width = 89
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 58
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 178
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 23
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 353
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 422
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
object HZ: TPanel
|
||||
Left = 491
|
||||
Top = 0
|
||||
Width = 568
|
||||
Height = 30
|
||||
BevelOuter = bvNone
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -14
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1392
|
||||
Height = 725
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 498
|
||||
Height = 721
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 494
|
||||
Height = 694
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column15
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 156
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #25171#20998#21305#25968
|
||||
DataBinding.FieldName = 'JYFenShuPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 62
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #25171#20998#24635#20998
|
||||
DataBinding.FieldName = 'JYFenShuHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #24179#22343#20998
|
||||
DataBinding.FieldName = 'JYFenShuAvg'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 494
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #21697#31181#26816#39564#20998#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 928
|
||||
Top = 2
|
||||
Width = 462
|
||||
Height = 721
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object DJ1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 458
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #35746#21333#26816#39564#20998#25490#34892#27036#8593#8593#8593
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 458
|
||||
Height = 694
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 97
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #25171#20998#21305#25968
|
||||
DataBinding.FieldName = 'JYFenShuPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #25171#20998#24635#20998
|
||||
DataBinding.FieldName = 'JYFenShuHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #24179#22343#20998
|
||||
DataBinding.FieldName = 'JYFenShuAvg'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
end
|
||||
object cxGridLevel3: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel9: TPanel
|
||||
Left = 500
|
||||
Top = 2
|
||||
Width = 428
|
||||
Height = 721
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 2
|
||||
object CH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 424
|
||||
Height = 23
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #35746#21333#26816#39564#20998#25490#34892#27036#8595#8595#8595
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -17
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 25
|
||||
Width = 424
|
||||
Height = 694
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 97
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #25171#20998#21305#25968
|
||||
DataBinding.FieldName = 'JYFenShuPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 61
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #25171#20998#24635#20998
|
||||
DataBinding.FieldName = 'JYFenShuHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #24179#22343#20998
|
||||
DataBinding.FieldName = 'JYFenShuAvg'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 48
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 600
|
||||
Top = 260
|
||||
Width = 311
|
||||
Height = 51
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1029
|
||||
Top = 97
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1005
|
||||
Top = 129
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 229
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 467
|
||||
Top = 163
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 468
|
||||
Top = 200
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
object ClientDataSet4: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 956
|
||||
Top = 224
|
||||
end
|
||||
object ClientDataSet11: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 84
|
||||
Top = 304
|
||||
end
|
||||
object ClientDataSet21: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 436
|
||||
Top = 288
|
||||
end
|
||||
object ClientDataSet31: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 796
|
||||
Top = 280
|
||||
end
|
||||
end
|
||||
245
BI(BIView.dll)/U_JYFTop.pas
Normal file
245
BI(BIView.dll)/U_JYFTop.pas
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
unit U_JYFTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmJYFTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
Panel8: TPanel;
|
||||
DJ1: TPanel;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel9: TPanel;
|
||||
CH1: TPanel;
|
||||
ClientDataSet4: TClientDataSet;
|
||||
Panel10: TPanel;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
C_Code: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
ClientDataSet11: TClientDataSet;
|
||||
ClientDataSet21: TClientDataSet;
|
||||
ClientDataSet31: TClientDataSet;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
HZ: TPanel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmJYFTop: TfrmJYFTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_JYFTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmJYFTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible:=True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_JYFAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='品名';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_JYFAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='订单高';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet2);
|
||||
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_JYFAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.Date+1));
|
||||
Parameters.ParamByName('Type').Value:='订单低';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
HZ.Caption:='打分总匹数:'+Trim(ClientDataSet3.fieldbyname('JYFenShuPSAll').AsString)+
|
||||
' 打分总分数:'+Trim(ClientDataSet3.fieldbyname('JYFenShuHZAll').AsString)+
|
||||
' 平均分数:'+Trim(ClientDataSet3.fieldbyname('JYFenShuAvgAll').AsString);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmJYFTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear:string;
|
||||
FMonth:string;
|
||||
FDate:TDate;
|
||||
begin
|
||||
FDate:=SGetServerDate10(ADOQueryTemp);
|
||||
FYear:=FormatDateTime('yyyy',FDate);
|
||||
FMonth:=FormatDateTime('MM',FDate);
|
||||
if StrToInt(FMonth)<2 then
|
||||
begin
|
||||
BegDate.Date:=StrToDate(IntToStr(strtoint(FYear)-1)+'-02-01');
|
||||
EndDate.Date:=StrToDate(FYear+'-01-31');
|
||||
end else
|
||||
begin
|
||||
BegDate.Date:=StrToDate(FYear+'-02-01');
|
||||
EndDate.Date:=StrToDate(IntToStr(strtoint(FYear)+1)+'-01-31');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTop.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
try
|
||||
frmJYFTopMX:=TfrmJYFTopMX.Create(Application);
|
||||
with frmJYFTopMX do
|
||||
begin
|
||||
FBegdate:=Self.BegDate.Date;
|
||||
FEnddate:=Self.EndDate.Date;
|
||||
FMXName:=Trim(Self.ClientDataSet1.fieldbyname('SPName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmJYFTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
316
BI(BIView.dll)/U_JYFTopMX.dfm
Normal file
316
BI(BIView.dll)/U_JYFTopMX.dfm
Normal file
|
|
@ -0,0 +1,316 @@
|
|||
object frmJYFTopMX: TfrmJYFTopMX
|
||||
Left = 216
|
||||
Top = 43
|
||||
Width = 911
|
||||
Height = 666
|
||||
Caption = #26816#39564#20998#20135#21697#26126#32454#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 895
|
||||
Height = 628
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 464
|
||||
Height = 624
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 460
|
||||
Height = 22
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #35746#21333#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 460
|
||||
Height = 598
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column15
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 166
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #25171#20998#21305#25968
|
||||
DataBinding.FieldName = 'JYFenShuPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 76
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #25171#20998#24635#20998
|
||||
DataBinding.FieldName = 'JYFenShuHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #24179#22343#20998
|
||||
DataBinding.FieldName = 'JYFenShuAvg'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 466
|
||||
Top = 2
|
||||
Width = 429
|
||||
Height = 624
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object KH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 425
|
||||
Height = 22
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #19994#21153#21592#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 425
|
||||
Height = 598
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 26
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 148
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #25171#20998#21305#25968
|
||||
DataBinding.FieldName = 'JYFenShuPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #25171#20998#24635#20998
|
||||
DataBinding.FieldName = 'JYFenShuHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 75
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #24179#22343#20998
|
||||
DataBinding.FieldName = 'JYFenShuAvg'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 56
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 925
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 989
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 957
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
129
BI(BIView.dll)/U_JYFTopMX.pas
Normal file
129
BI(BIView.dll)/U_JYFTopMX.pas
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
unit U_JYFTopMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh;
|
||||
|
||||
type
|
||||
TfrmJYFTopMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
KH1: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FMXName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmJYFTopMX: TfrmJYFTopMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmJYFTopMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_JYFAll_MX :begdate,:enddate,:Type,:MXName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));
|
||||
Parameters.ParamByName('Type').Value:='订单';
|
||||
Parameters.ParamByName('MXName').Value:=FMXName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_JYFAll_MX :begdate,:enddate,:Type,:MXName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));
|
||||
Parameters.ParamByName('Type').Value:='业务员';
|
||||
Parameters.ParamByName('MXName').Value:=FMXName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTopMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTopMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption:='订单排行榜'+' ( '+FMXName+' ) ';
|
||||
KH1.Caption:='业务员排行榜'+' ( '+FMXName+' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmJYFTopMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmJYFTopMX:=nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
525
BI(BIView.dll)/U_JinDuDJ.dfm
Normal file
525
BI(BIView.dll)/U_JinDuDJ.dfm
Normal file
|
|
@ -0,0 +1,525 @@
|
|||
object frmJinDuDJ: TfrmJinDuDJ
|
||||
Left = 188
|
||||
Top = 183
|
||||
Width = 1772
|
||||
Height = 778
|
||||
Caption = #36827#24230#30331#35760
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1754
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 95
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_YarnTexturing.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_YarnTexturing.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 69
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 138
|
||||
Top = 0
|
||||
Caption = #25209#37327#20445#23384
|
||||
ImageIndex = 5
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 233
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 15
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 302
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 371
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 440
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 509
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 578
|
||||
Top = 0
|
||||
Width = 767
|
||||
Height = 30
|
||||
BevelOuter = bvNone
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1754
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 28
|
||||
Top = 16
|
||||
Width = 60
|
||||
Height = 15
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 205
|
||||
Top = 16
|
||||
Width = 15
|
||||
Height = 15
|
||||
Caption = #33267
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 440
|
||||
Top = 10
|
||||
Width = 84
|
||||
Height = 25
|
||||
Hint = #34013#33394
|
||||
Caption = ' '
|
||||
Color = clBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnDblClick = Label1DblClick
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 551
|
||||
Top = 10
|
||||
Width = 84
|
||||
Height = 25
|
||||
Hint = #32418#33394
|
||||
Caption = ' '
|
||||
Color = clRed
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnDblClick = Label1DblClick
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 662
|
||||
Top = 10
|
||||
Width = 84
|
||||
Height = 25
|
||||
Hint = #40644#33394
|
||||
Caption = ' '
|
||||
Color = clYellow
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnDblClick = Label1DblClick
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 773
|
||||
Top = 10
|
||||
Width = 84
|
||||
Height = 25
|
||||
Hint = #31881#33394
|
||||
Caption = ' '
|
||||
Color = clFuchsia
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnDblClick = Label1DblClick
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 884
|
||||
Top = 10
|
||||
Width = 84
|
||||
Height = 25
|
||||
Caption = ' '
|
||||
Color = clWhite
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -25
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnDblClick = Label1DblClick
|
||||
end
|
||||
object begdate: TDateTimePicker
|
||||
Left = 90
|
||||
Top = 11
|
||||
Width = 109
|
||||
Height = 23
|
||||
Date = 41256.918237847230000000
|
||||
Time = 41256.918237847230000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object Enddate: TDateTimePicker
|
||||
Left = 228
|
||||
Top = 11
|
||||
Width = 108
|
||||
Height = 23
|
||||
Date = 41256.918237847230000000
|
||||
Time = 41256.918237847230000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 336
|
||||
Top = 13
|
||||
Width = 77
|
||||
Height = 21
|
||||
Caption = #25353#26085#26399
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 75
|
||||
Width = 1754
|
||||
Height = 656
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DS_HZ
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_YarnTexturing.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'QDDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_YarnTexturing.Default
|
||||
Width = 115
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #20844#21496#25260#22836
|
||||
DataBinding.FieldName = 'ComTaiTou'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
VisibleForCustomization = False
|
||||
Width = 115
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #38144#21806
|
||||
DataBinding.FieldName = 'XS'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = cxGridDBColumn3PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_YarnTexturing.Default
|
||||
Width = 95
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #23454#26045
|
||||
DataBinding.FieldName = 'SS'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = v2Column3PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
object VYB: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #24320#21457
|
||||
DataBinding.FieldName = 'KF'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = VYBPropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object v2Column4: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'LeiXing'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = v2Column4PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #36827#22330#26085#26399
|
||||
DataBinding.FieldName = 'JCDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object Tv2Column8: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #23454#26045#22521#35757#26085#26399
|
||||
DataBinding.FieldName = 'SSDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object Tv2Column7: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #30830#35748#20070#26085#26399
|
||||
DataBinding.FieldName = 'OKDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
object Tv2Column13: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #25552#28857#26085#26399
|
||||
DataBinding.FieldName = 'TDDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #26426#21488#25968
|
||||
DataBinding.FieldName = 'JTQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv2Column9: TcxGridDBColumn
|
||||
Caption = #30830#35748#20070
|
||||
DataBinding.FieldName = 'OKFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object Tv2Column10: TcxGridDBColumn
|
||||
Caption = #26159#21542#24320#22987
|
||||
DataBinding.FieldName = 'BegFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = #26159#21542#25552#28857
|
||||
DataBinding.FieldName = 'TDFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 99
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #24212#25910#37329#39069
|
||||
DataBinding.FieldName = 'YSMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object Tv2Column11: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #25910#27454#37329#39069
|
||||
DataBinding.FieldName = 'SKMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object Tv2Column12: TcxGridDBColumn
|
||||
Caption = #27424#27454
|
||||
DataBinding.FieldName = 'QKMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 7
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v2Column1PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
object Tv2Column4: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object Tv2Column5: TcxGridDBColumn
|
||||
Caption = #30331#35760#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 87
|
||||
end
|
||||
object Tv2Column6: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'ColorName'
|
||||
OnCustomDrawCell = Tv2Column6CustomDrawCell
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 86
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_YarnTexturing.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 773
|
||||
Top = 233
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_YarnTexturing.ADOLink
|
||||
Parameters = <>
|
||||
Left = 869
|
||||
Top = 249
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_YarnTexturing.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 309
|
||||
Top = 193
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 520
|
||||
Top = 264
|
||||
end
|
||||
object DS_HZ: TDataSource
|
||||
DataSet = CDS_HZ
|
||||
Left = 383
|
||||
Top = 195
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 236
|
||||
end
|
||||
end
|
||||
567
BI(BIView.dll)/U_JinDuDJ.pas
Normal file
567
BI(BIView.dll)/U_JinDuDJ.pas
Normal file
|
|
@ -0,0 +1,567 @@
|
|||
unit U_JinDuDJ;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||
cxButtonEdit, cxTextEdit, cxPC, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator;
|
||||
|
||||
type
|
||||
TfrmJinDuDJ = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Label2: TLabel;
|
||||
Label6: TLabel;
|
||||
begdate: TDateTimePicker;
|
||||
Enddate: TDateTimePicker;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
ToolButton3: TToolButton;
|
||||
VYB: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
ToolButton4: TToolButton;
|
||||
CheckBox1: TCheckBox;
|
||||
ToolButton5: TToolButton;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
Tv2Column4: TcxGridDBColumn;
|
||||
Tv2Column5: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Tv2Column6: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
Tv2Column7: TcxGridDBColumn;
|
||||
Tv2Column8: TcxGridDBColumn;
|
||||
Tv2Column9: TcxGridDBColumn;
|
||||
Tv2Column10: TcxGridDBColumn;
|
||||
Tv2Column11: TcxGridDBColumn;
|
||||
Tv2Column12: TcxGridDBColumn;
|
||||
Tv2Column13: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure FactoryName10Change(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure v2Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure VYBPropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v2Column4PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure Tv2Column6CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
procedure Label1DblClick(Sender: TObject);
|
||||
procedure cxGridDBColumn3PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v2Column3PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
private
|
||||
{ Private declarations }
|
||||
|
||||
procedure InitGrid();
|
||||
function SaveData():Boolean;
|
||||
|
||||
public
|
||||
canshu1:string;
|
||||
|
||||
end;
|
||||
|
||||
//var
|
||||
//frmDiTuiDJ: TfrmDiTuiDJ;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
|
||||
procedure TfrmJinDuDJ.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from JinDu_DJ A');
|
||||
if CheckBox1.Checked then
|
||||
begin
|
||||
sql.Add('where A.QDDate>='''+FormatDateTime('yyyy-MM-dd',begdate.DateTime)+''' ');
|
||||
sql.Add(' and QDDate<'''+FormatDateTime('yyyy-MM-dd',Enddate.DateTime+1)+''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add('where A.QDDate>=''2000-01-01'' ');
|
||||
sql.Add(' and QDDate<''2500-01-01'' ');
|
||||
end;
|
||||
sql.Add(' and A.Valid=''Y'' ');
|
||||
if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
sql.Add(' and A.FillNo='''+Trim(DCode)+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmJinDuDJ.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
//frmDiTuiDJ:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('1',Tv2,'进度');
|
||||
Close;
|
||||
end;
|
||||
procedure TfrmJinDuDJ.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' Update JinDu_DJ Set ValidTime=getdate(),Valider='''+Trim(DName)+''',Valid=''N'' ');
|
||||
sql.Add(' where JDID='''+Trim(CDS_HZ.fieldbyname('JDID').AsString)+'''');
|
||||
execsql;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
CDS_HZ.Delete;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('删除失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('1',Tv2,'进度');
|
||||
Enddate.DateTime:=SGetServerDate(ADOQueryTemp);
|
||||
begdate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
begdate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.FactoryName10Change(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
function TfrmJinDuDJ.SaveData():Boolean;
|
||||
var
|
||||
maxId,CRID:String;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if GetLSNo(ADOQueryCmd,maxId,'JD','JinDu_DJ',4,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from JinDu_DJ where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('JDID').Value:=Trim(maxId);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('FillNo').Value:=Trim(DCode);
|
||||
FieldByName('QDDate').Value:=formatdateTIme('yyyy-MM-dd',CDS_HZ.fieldbyname('QDDate').AsDateTime);
|
||||
FieldByName('Valid').Value:='Y';
|
||||
Post;
|
||||
end;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('JDID').Value:=Trim(maxId);
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=True;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('增行失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
with Self.CDS_HZ do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('QDDate').Value:=SGetServerDate(ADOQueryTemp);
|
||||
Post;
|
||||
end;
|
||||
Self.SaveData();
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.v2Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue,FFieldName:String;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
FFieldName:=Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value:=Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
begdate.SetFocus;
|
||||
if Application.MessageBox('确定要保存当前选中的数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JinDu_DJ where JDID='''+Trim(CDS_HZ.fieldbyname('JDID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Edit;
|
||||
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'JinDu_DJ',7);
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update JinDu_DJ Set ');
|
||||
if Trim(CDS_HZ.fieldbyname('SSDate').AsString)<>'' then
|
||||
begin
|
||||
sql.Add(' BegFlag=1');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' BegFlag=0');
|
||||
end;
|
||||
if Trim(CDS_HZ.fieldbyname('OKDate').AsString)<>'' then
|
||||
begin
|
||||
sql.Add(' ,OKFlag=1');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' ,OKFlag=0');
|
||||
end;
|
||||
if Trim(CDS_HZ.fieldbyname('TDDate').AsString)<>'' then
|
||||
begin
|
||||
sql.Add(' ,TDFlag=1');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' ,TDFlag=0');
|
||||
end;
|
||||
sql.Add(',QKMoney=isnull(YSMoney,0)-isnull(SKMoney,0)');
|
||||
sql.Add(' where JDID='''+Trim(CDS_HZ.fieldbyname('JDID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.ToolButton5Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
begdate.SetFocus;
|
||||
if Application.MessageBox('确定要批量保存当前页面的所有数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_HZ.DisableControls;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JinDu_DJ where JDID='''+Trim(CDS_HZ.fieldbyname('JDID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Edit;
|
||||
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'JinDu_DJ',7);
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update JinDu_DJ Set ');
|
||||
if Trim(CDS_HZ.fieldbyname('SSDate').AsString)<>'' then
|
||||
begin
|
||||
sql.Add(' BegFlag=1');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' BegFlag=0');
|
||||
end;
|
||||
if Trim(CDS_HZ.fieldbyname('OKDate').AsString)<>'' then
|
||||
begin
|
||||
sql.Add(' ,OKFlag=1');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' ,OKFlag=0');
|
||||
end;
|
||||
if Trim(CDS_HZ.fieldbyname('TDDate').AsString)<>'' then
|
||||
begin
|
||||
sql.Add(' ,TDFlag=1');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' ,TDFlag=0');
|
||||
end;
|
||||
sql.Add(',QKMoney=isnull(YSMoney,0)-isnull(SKMoney,0)');
|
||||
sql.Add(' where JDID='''+Trim(CDS_HZ.fieldbyname('JDID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
CDS_HZ.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
except
|
||||
CDS_HZ.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.VYBPropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='KF';
|
||||
flagname:='开发';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('KF').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.v2Column4PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='LeiXing';
|
||||
flagname:='类型';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('LeiXing').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.Tv2Column6CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
var
|
||||
id:Integer;
|
||||
begin
|
||||
Id:=TV2.GetColumnByFieldName('ColorName').Index;//;-TV1.GroupedItemCount;
|
||||
if Id<0 then Exit;
|
||||
if AViewInfo.GridRecord.Values[Id]='蓝色' then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clBlue;
|
||||
end else
|
||||
if AViewInfo.GridRecord.Values[Id]='红色' then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clRed;
|
||||
end else
|
||||
if AViewInfo.GridRecord.Values[Id]='黄色' then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clYellow;
|
||||
end else
|
||||
if AViewInfo.GridRecord.Values[Id]='粉色' then
|
||||
begin
|
||||
ACanvas.Brush.Color:=clFuchsia;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.Label1DblClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update JinDu_DJ Set ColorName='''+Trim(TLabel(Sender).Hint)+'''');
|
||||
sql.Add(' where JDID='''+Trim(CDS_HZ.fieldbyname('JDID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('ColorName').Value:=Trim(TLabel(Sender).Hint);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.cxGridDBColumn3PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='XS';
|
||||
flagname:='销售';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('XS').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJinDuDJ.v2Column3PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='SS';
|
||||
flagname:='实施';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SS').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
194
BI(BIView.dll)/U_KHCPColorTopMX.dfm
Normal file
194
BI(BIView.dll)/U_KHCPColorTopMX.dfm
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
object frmKHCPColorTopMX: TfrmKHCPColorTopMX
|
||||
Left = 289
|
||||
Top = 42
|
||||
Width = 644
|
||||
Height = 666
|
||||
Caption = #23458#25143#20135#21697#39068#33394#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 628
|
||||
Height = 628
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 624
|
||||
Height = 624
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 620
|
||||
Height = 598
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #20135#21697
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 175
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 105
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 108
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 620
|
||||
Height = 22
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #23458#25143#20135#21697#39068#33394#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
104
BI(BIView.dll)/U_KHCPColorTopMX.pas
Normal file
104
BI(BIView.dll)/U_KHCPColorTopMX.pas
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
unit U_KHCPColorTopMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh;
|
||||
|
||||
type
|
||||
TfrmKHCPColorTopMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FKHName,FSPName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmKHCPColorTopMX: TfrmKHCPColorTopMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmKHCPColorTopMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_KHAll_CPColorMX :begdate,:enddate,:KHName,:SPName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('KHName').Value:=FKHName;
|
||||
Parameters.ParamByName('SPName').Value:=FSPName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHCPColorTopMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmKHCPColorTopMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption:='¿Í»§²úÆ·ÑÕÉ«ÅÅÐаñ'+' ( '+FKHName+' ) '+' ( '+FSPName+' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKHCPColorTopMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmKHCPColorTopMX:=nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
195
BI(BIView.dll)/U_KHCPTopMX.dfm
Normal file
195
BI(BIView.dll)/U_KHCPTopMX.dfm
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
object frmKHCPTopMX: TfrmKHCPTopMX
|
||||
Left = 289
|
||||
Top = 42
|
||||
Width = 644
|
||||
Height = 666
|
||||
Caption = #23458#25143#20135#21697#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 628
|
||||
Height = 627
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 624
|
||||
Height = 623
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 24
|
||||
Width = 620
|
||||
Height = 597
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #20135#21697
|
||||
DataBinding.FieldName = 'SPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 175
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 105
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 108
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 620
|
||||
Height = 22
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #23458#25143#20135#21697#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
end
|
||||
126
BI(BIView.dll)/U_KHCPTopMX.pas
Normal file
126
BI(BIView.dll)/U_KHCPTopMX.pas
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
unit U_KHCPTopMX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmKHCPTopMX = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
FBegdate,FEnddate:TDate;
|
||||
FKHName:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmKHCPTopMX: TfrmKHCPTopMX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun,U_KHCPColorTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmKHCPTopMX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_KHAll_CPMX :begdate,:enddate,:KHName');
|
||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FBegdate));
|
||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',FEnddate));;
|
||||
Parameters.ParamByName('KHName').Value:=FKHName;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHCPTopMX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;;
|
||||
end;
|
||||
|
||||
procedure TfrmKHCPTopMX.FormShow(Sender: TObject);
|
||||
begin
|
||||
SH1.Caption:='¿Í»§²úÆ·ÅÅÐаñ'+' ( '+FKHName+' ) ';
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmKHCPTopMX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmKHCPTopMX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmKHCPTopMX.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
try
|
||||
frmKHCPColorTopMX:=TfrmKHCPColorTopMX.Create(Application);
|
||||
with frmKHCPColorTopMX do
|
||||
begin
|
||||
FBegdate:=Self.FBegdate;
|
||||
FEnddate:=Self.FEnddate;
|
||||
FKHName:=Self.FKHName;
|
||||
FSPName:=Trim(Self.ClientDataSet1.fieldbyname('SPName').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmKHCPColorTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
532
BI(BIView.dll)/U_KHTop.dfm
Normal file
532
BI(BIView.dll)/U_KHTop.dfm
Normal file
|
|
@ -0,0 +1,532 @@
|
|||
object frmKHTop: TfrmKHTop
|
||||
Left = 317
|
||||
Top = 198
|
||||
Width = 1482
|
||||
Height = 769
|
||||
Caption = #23458#25143#38144#37327#25490#34892#27036
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1466
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 89
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BIView.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BIView.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 284
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 307
|
||||
Top = 9
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21697#21517
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 8
|
||||
Top = 9
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26085#26399
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 164
|
||||
Top = 9
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 5
|
||||
Width = 89
|
||||
Height = 23
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 58
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 178
|
||||
Top = 5
|
||||
Width = 102
|
||||
Height = 20
|
||||
Date = 40675.000000000000000000
|
||||
Time = 40675.000000000000000000
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 284
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 347
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 410
|
||||
Top = 0
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 72
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 499
|
||||
Top = 5
|
||||
Width = 198
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
Items.Strings = (
|
||||
#20572#26426#22825#25968'Top60'
|
||||
#24320#26426#22825#25968'Top30'
|
||||
'')
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 697
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1466
|
||||
Height = 699
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 588
|
||||
Height = 695
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 20
|
||||
Width = 584
|
||||
Height = 673
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object v2Column12: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 159
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 99
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object SH1: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 584
|
||||
Height = 18
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #23458#25143#38144#37327#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object MovePanel3: TMovePanel
|
||||
Left = 187
|
||||
Top = 184
|
||||
Width = 321
|
||||
Height = 177
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object Label13: TLabel
|
||||
Left = 88
|
||||
Top = 16
|
||||
Width = 132
|
||||
Height = 33
|
||||
Caption = #36755#20837#23494#30721
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -32
|
||||
Font.Name = #26999#20307'_GB2312'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Button9: TButton
|
||||
Left = 32
|
||||
Top = 112
|
||||
Width = 75
|
||||
Height = 49
|
||||
Caption = #30830#23450
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnClick = Button9Click
|
||||
end
|
||||
object Button10: TButton
|
||||
Left = 200
|
||||
Top = 112
|
||||
Width = 75
|
||||
Height = 49
|
||||
Caption = #21462#28040
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
OnClick = Button10Click
|
||||
end
|
||||
object Password: TEdit
|
||||
Tag = 99999
|
||||
Left = 32
|
||||
Top = 56
|
||||
Width = 241
|
||||
Height = 43
|
||||
CharCase = ecUpperCase
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -28
|
||||
Font.Name = #26999#20307'_GB2312'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
PasswordChar = '*'
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 590
|
||||
Top = 2
|
||||
Width = 588
|
||||
Height = 695
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 20
|
||||
Width = 584
|
||||
Height = 673
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
OnDblClick = Tv2DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.Delete.Visible = False
|
||||
DataController.DataSource = DataSource3
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_BIView.SHuangSe
|
||||
Styles.IncSearch = DataLink_BIView.SHuangSe
|
||||
Styles.Selection = DataLink_BIView.SHuangSe
|
||||
Styles.Footer = DataLink_BIView.FontBlue
|
||||
Styles.Header = DataLink_BIView.handBlack
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #24207
|
||||
DataBinding.FieldName = 'XH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 159
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 81
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'KgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 99
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #21344#27604'%'
|
||||
DataBinding.FieldName = 'BL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 584
|
||||
Height = 18
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
Caption = #19994#21153#21592#38144#37327#25490#34892#27036
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 520
|
||||
Top = 216
|
||||
Width = 249
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 893
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BIView.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 861
|
||||
Top = 65533
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 100
|
||||
Top = 184
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 92
|
||||
Top = 264
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 91
|
||||
Top = 227
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 787
|
||||
Top = 179
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 788
|
||||
Top = 216
|
||||
end
|
||||
object Timer1: TTimer
|
||||
Enabled = False
|
||||
Interval = 120000
|
||||
OnTimer = Timer1Timer
|
||||
Left = 458
|
||||
Top = 169
|
||||
end
|
||||
end
|
||||
343
BI(BIView.dll)/U_KHTop.pas
Normal file
343
BI(BIView.dll)/U_KHTop.pas
Normal file
|
|
@ -0,0 +1,343 @@
|
|||
unit U_KHTop;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, cxDBLookupComboBox, cxContainer, cxDropDownEdit, cxPC, Menus,
|
||||
TeEngine, Series, TeeProcs, Chart, DbChart, GanttCh, MovePanel, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmKHTop = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Panel3: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column12: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
SH1: TPanel;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
C_Code: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Panel10: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
Panel4: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel5: TPanel;
|
||||
Timer1: TTimer;
|
||||
MovePanel3: TMovePanel;
|
||||
Label13: TLabel;
|
||||
Button9: TButton;
|
||||
Button10: TButton;
|
||||
Password: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Tv2DblClick(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
procedure Button10Click(Sender: TObject);
|
||||
procedure Button9Click(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
procedure InitGrid10();
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
frmKHTop: TfrmKHTop;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_KHCPTopMX, U_YWYCPTopMX, U_KHCPColorTopMX;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmKHTop.InitGrid();
|
||||
begin
|
||||
Panel10.Visible := True;
|
||||
Panel10.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_KHAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('Type').Value := '客户';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_KHAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date));
|
||||
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.Date + 1));
|
||||
Parameters.ParamByName('Type').Value := '业务员';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel10.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.InitGrid10();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_KHAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value := '2000-01-04';
|
||||
Parameters.ParamByName('enddate').Value := '2000-01-02';
|
||||
Parameters.ParamByName('Type').Value := '客户';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_BI_KHAll :begdate,:enddate,:Type');
|
||||
Parameters.ParamByName('begdate').Value := '2000-01-04';
|
||||
Parameters.ParamByName('enddate').Value := '2000-01-02';
|
||||
Parameters.ParamByName('Type').Value := '业务员';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet3);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmKHTop := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
//WriteCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.FormShow(Sender: TObject);
|
||||
begin
|
||||
//ReadCxGrid('收货', Tv1, '前十大产品排行榜');
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
MovePanel3.Visible := True;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.FormCreate(Sender: TObject);
|
||||
var
|
||||
FYear: string;
|
||||
FMonth: string;
|
||||
FDate: TDate;
|
||||
begin
|
||||
FDate := SGetServerDate10(ADOQueryTemp);
|
||||
FYear := FormatDateTime('yyyy', FDate);
|
||||
FMonth := FormatDateTime('MM', FDate);
|
||||
if StrToInt(FMonth) < 2 then
|
||||
begin
|
||||
BegDate.Date := StrToDate(IntToStr(strtoint(FYear) - 1) + '-02-01');
|
||||
EndDate.Date := StrToDate(FYear + '-01-31');
|
||||
end
|
||||
else
|
||||
begin
|
||||
BegDate.Date := StrToDate(FYear + '-02-01');
|
||||
EndDate.Date := StrToDate(IntToStr(strtoint(FYear) + 1) + '-01-31');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ComboBox1.Text = '' then
|
||||
Exit;
|
||||
if ComboBox1.ItemIndex = 0 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid1);
|
||||
end
|
||||
else if ComboBox1.ItemIndex = 1 then
|
||||
begin
|
||||
TcxGridToExcel(ComboBox1.Text, cxGrid2);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmKHCPTopMX := TfrmKHCPTopMX.Create(Application);
|
||||
with frmKHCPTopMX do
|
||||
begin
|
||||
FBegdate := Self.BegDate.Date;
|
||||
FEnddate := Self.EndDate.Date;
|
||||
FKHName := Trim(Self.ClientDataSet1.fieldbyname('KHName').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmKHCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.Tv2DblClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet3.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmYWYCPTopMX := TfrmYWYCPTopMX.Create(Application);
|
||||
with frmYWYCPTopMX do
|
||||
begin
|
||||
FBegdate := Self.BegDate.Date;
|
||||
FEnddate := Self.EndDate.Date;
|
||||
FKHName := Trim(Self.ClientDataSet3.fieldbyname('KHName').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYWYCPTopMX.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
InitGrid10();
|
||||
Timer1.Enabled := False;
|
||||
MovePanel3.Visible := True;
|
||||
TBRafresh.Visible := False;
|
||||
if frmKHCPTopMX <> nil then
|
||||
begin
|
||||
frmKHCPTopMX.Close;
|
||||
end;
|
||||
if frmYWYCPTopMX <> nil then
|
||||
begin
|
||||
frmYWYCPTopMX.Close;
|
||||
end;
|
||||
if frmKHCPColorTopMX <> nil then
|
||||
begin
|
||||
frmKHCPColorTopMX.Close;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.Button10Click(Sender: TObject);
|
||||
begin
|
||||
MovePanel3.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmKHTop.Button9Click(Sender: TObject);
|
||||
var
|
||||
mm: string;
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
sql.Clear;
|
||||
sql.add('SELECT pw FROM SY_User WHERE userid=' + '''' + trim(DCode) + '''');
|
||||
Open;
|
||||
end;
|
||||
mm := Trim(ADOQueryTemp.fieldbyname('pw').AsString);
|
||||
if mm <> Trim(Password.Text) then
|
||||
begin
|
||||
Application.MessageBox('密码错误!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
Password.Text := '';
|
||||
MovePanel3.Visible := False;
|
||||
InitGrid();
|
||||
Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
313
BI(BIView.dll)/U_LabelAdd.dfm
Normal file
313
BI(BIView.dll)/U_LabelAdd.dfm
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
object frmLabelAdd: TfrmLabelAdd
|
||||
Left = 191
|
||||
Top = 109
|
||||
Width = 997
|
||||
Height = 612
|
||||
BorderIcons = [biMaximize]
|
||||
Caption = #26631#31614#32534#36753
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 28
|
||||
Width = 413
|
||||
Height = 513
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 0
|
||||
object Label2: TLabel
|
||||
Left = 31
|
||||
Top = 21
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26631#31614#25991#20214#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 31
|
||||
Top = 95
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #22791' '#27880#65306
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 31
|
||||
Top = 71
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26631#31614#21517#31216#65306
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 31
|
||||
Top = 47
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26631#31614#31867#22411#65306
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object LabelFileName: TBtnEditA
|
||||
Left = 92
|
||||
Top = 17
|
||||
Width = 260
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
OnBtnClick = LabelFileNameBtnClick
|
||||
end
|
||||
object beizhu: TMemo
|
||||
Left = 92
|
||||
Top = 92
|
||||
Width = 257
|
||||
Height = 149
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
object LabelCaption: TEdit
|
||||
Left = 92
|
||||
Top = 67
|
||||
Width = 258
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object LabelType: TFTComboBox
|
||||
Tag = 99
|
||||
Left = 92
|
||||
Top = 43
|
||||
Width = 260
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 3
|
||||
Text = #20013#25991#26631#31614
|
||||
Items.Strings = (
|
||||
#20013#25991#26631#31614
|
||||
#33521#25991#26631#31614
|
||||
#20013#33521#25991#26631#31614)
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 981
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar2'
|
||||
Color = clBtnFace
|
||||
Flat = True
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
Transparent = False
|
||||
object Tsave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26631#31614
|
||||
ImageIndex = 5
|
||||
OnClick = TsaveClick
|
||||
end
|
||||
object Tclose: TToolButton
|
||||
Left = 87
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TcloseClick
|
||||
end
|
||||
end
|
||||
object RMPreview1: TRMPreview
|
||||
Left = 428
|
||||
Top = 32
|
||||
Width = 553
|
||||
Height = 541
|
||||
Align = alRight
|
||||
BevelOuter = bvLowered
|
||||
Caption = #26631#31614#39044#35272
|
||||
TabOrder = 2
|
||||
OnDblClick = RMPreview1DblClick
|
||||
Options.RulerUnit = rmutScreenPixels
|
||||
Options.RulerVisible = False
|
||||
Options.DrawBorder = False
|
||||
Options.BorderPen.Color = clGray
|
||||
Options.BorderPen.Style = psDash
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 512
|
||||
Top = 208
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Filter = 'RMFl(*.rmf)|*.rmf'
|
||||
InitialDir = '.'
|
||||
Left = 200
|
||||
Top = 4
|
||||
end
|
||||
object RMGridReport1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
ShowProgress = False
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
Preview = RMPreview1
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 336
|
||||
Top = 8
|
||||
ReportData = {}
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 528
|
||||
Top = 184
|
||||
end
|
||||
object RMGridReportDesigner1: TRMGridReportDesigner
|
||||
Left = 376
|
||||
Top = 8
|
||||
end
|
||||
object RMBarCodeObject1: TRMBarCodeObject
|
||||
Left = 280
|
||||
Top = 4
|
||||
end
|
||||
object RMBMPExport1: TRMBMPExport
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
Left = 408
|
||||
Top = 8
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 10
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 440
|
||||
Top = 8
|
||||
end
|
||||
object RMDS_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
AliasName = #26631#31614#25968#25454
|
||||
Left = 498
|
||||
Top = 72
|
||||
end
|
||||
object RMDataDictionary1: TRMDataDictionary
|
||||
FieldFieldNames.TableName = 'TableName'
|
||||
FieldFieldNames.FieldName = 'FieldName'
|
||||
FieldFieldNames.FieldAlias = 'FieldAlias'
|
||||
Left = 562
|
||||
Top = 72
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 480
|
||||
end
|
||||
object RMGridReport2: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
ShowProgress = False
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDS_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 432
|
||||
Top = 368
|
||||
ReportData = {}
|
||||
end
|
||||
object ADOQueryCmdSC: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 296
|
||||
Top = 304
|
||||
object ADOQueryCmdFileContent: TBlobField
|
||||
FieldName = 'Files'
|
||||
end
|
||||
object ADOQueryCmdFtFileName: TStringField
|
||||
FieldName = 'FileName'
|
||||
Size = 40
|
||||
end
|
||||
object ADOQueryCmdFileEditDate: TDateTimeField
|
||||
FieldName = 'FileEditDate'
|
||||
end
|
||||
object ADOQueryCmdFileSize: TFloatField
|
||||
FieldName = 'FileSize'
|
||||
end
|
||||
object ADOQueryCmdFiller: TStringField
|
||||
FieldName = 'Filler'
|
||||
end
|
||||
object ADOQueryCmdLastEditTime: TDateTimeField
|
||||
FieldName = 'LastEditTime'
|
||||
end
|
||||
object ADOQueryCmdLastEditer: TStringField
|
||||
FieldName = 'LastEditer'
|
||||
end
|
||||
object ADOQueryCmdFileCreateDate: TDateTimeField
|
||||
FieldName = 'FileCreateDate'
|
||||
end
|
||||
object ADOQueryCmdchildPath: TStringField
|
||||
FieldName = 'FilePath'
|
||||
end
|
||||
object ADOQueryCmdFileType: TStringField
|
||||
FieldName = 'FileType'
|
||||
end
|
||||
end
|
||||
end
|
||||
455
BI(BIView.dll)/U_LabelAdd.pas
Normal file
455
BI(BIView.dll)/U_LabelAdd.pas
Normal file
|
|
@ -0,0 +1,455 @@
|
|||
unit U_LabelAdd;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, BtnEdit, ExtCtrls, DB, ADODB,
|
||||
RM_System, RM_Common, RM_Class, RM_GridReport, Buttons, FTComboBox,
|
||||
RM_Preview, RM_e_Xls, RM_e_Graphic, RM_e_bmp, RM_BarCode,
|
||||
RM_DsgGridReport, RM_Dataset, cxStyles, cxCustomData, cxGraphics,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGrid;
|
||||
|
||||
type
|
||||
TfrmLabelAdd = class(TForm)
|
||||
Panel1: TPanel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
LabelFileName: TBtnEditA;
|
||||
beizhu: TMemo;
|
||||
ToolBar1: TToolBar;
|
||||
Tsave: TToolButton;
|
||||
Tclose: TToolButton;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
OpenDialog1: TOpenDialog;
|
||||
RMGridReport1: TRMGridReport;
|
||||
Label9: TLabel;
|
||||
LabelCaption: TEdit;
|
||||
Label10: TLabel;
|
||||
LabelType: TFTComboBox;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
RMPreview1: TRMPreview;
|
||||
RMGridReportDesigner1: TRMGridReportDesigner;
|
||||
RMBarCodeObject1: TRMBarCodeObject;
|
||||
RMBMPExport1: TRMBMPExport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDS_Main: TRMDBDataSet;
|
||||
RMDataDictionary1: TRMDataDictionary;
|
||||
ADOQuery1: TADOQuery;
|
||||
RMGridReport2: TRMGridReport;
|
||||
ADOQueryCmdSC: TADOQuery;
|
||||
ADOQueryCmdFileContent: TBlobField;
|
||||
ADOQueryCmdFtFileName: TStringField;
|
||||
ADOQueryCmdFileEditDate: TDateTimeField;
|
||||
ADOQueryCmdFileSize: TFloatField;
|
||||
ADOQueryCmdFiller: TStringField;
|
||||
ADOQueryCmdLastEditTime: TDateTimeField;
|
||||
ADOQueryCmdLastEditer: TStringField;
|
||||
ADOQueryCmdFileCreateDate: TDateTimeField;
|
||||
ADOQueryCmdchildPath: TStringField;
|
||||
ADOQueryCmdFileType: TStringField;
|
||||
procedure TcloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TsaveClick(Sender: TObject);
|
||||
procedure LabelFileNameBtnClick(Sender: TObject);
|
||||
procedure BtOpenClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure RMPreview1DblClick(Sender: TObject);
|
||||
private
|
||||
fIsChg:Boolean;
|
||||
function SaveData():Boolean;
|
||||
function EditData():Boolean;
|
||||
procedure InitWinData();
|
||||
procedure InitVarDictionary();
|
||||
procedure InitDataSetDictionary();
|
||||
function PostFileToData():boolean;
|
||||
procedure GetFileInfo(mFile:string;var mfileSize:integer;var CreationTime:tdatetime;var WriteTime:tdatetime);
|
||||
function CovFileDate(Fd:_FileTime):TDateTime;
|
||||
public
|
||||
fcustomNo:string;
|
||||
fKeyNo:string;
|
||||
fWinStatus:integer;
|
||||
end;
|
||||
|
||||
var
|
||||
frmLabelAdd: TfrmLabelAdd;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmLabelAdd.TcloseClick(Sender: TObject);
|
||||
begin
|
||||
if fIsChg then
|
||||
begin
|
||||
if application.MessageBox('标签设计过,是否要保存?','提示信息',1)=1 then
|
||||
begin
|
||||
Tsave.Click ;
|
||||
end
|
||||
else
|
||||
close;
|
||||
end
|
||||
else
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.FormCreate(Sender: TObject);
|
||||
begin
|
||||
panel1.Align :=alClient;
|
||||
fIsChg:=false;
|
||||
// ClearWinData(panel1);
|
||||
// InitVarDictionary();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.TsaveClick(Sender: TObject);
|
||||
begin
|
||||
if trim(labelCaption.Text)='' then
|
||||
begin
|
||||
application.MessageBox('标签名称不能为空!','提示');
|
||||
labelCaption.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
if trim(LabelFileName.Text)='' then
|
||||
begin
|
||||
application.MessageBox('标签文件不能为空,请选择标签!','提示');
|
||||
LabelFileName.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
PostFileToData();
|
||||
if fWinStatus=0 then
|
||||
begin
|
||||
if SaveData() then
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if EditData() then
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
function TfrmLabelAdd.PostFileToData():boolean;
|
||||
var
|
||||
mFileName,fFileName,fpathFileName:string;
|
||||
Stream : TMemoryStream;
|
||||
mfileSize:integer;
|
||||
mCreationTime:TdateTime;
|
||||
mWriteTime:TdateTime;
|
||||
begin
|
||||
result:=false;
|
||||
fFileName:=Trim(LabelCaption.Text);
|
||||
fpathFileName:=Trim(LabelFileName.Text);
|
||||
try
|
||||
ADOQueryCmdSC.Connection.BeginTrans ;
|
||||
try
|
||||
with ADOQueryCmdSC do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('delete from RT_FileUpdate');
|
||||
sql.Add('where FileName='+quotedStr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
with ADOQueryCmdSC do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select * from RT_FileUpdate');
|
||||
sql.Add('where FileName='+quotedStr(trim(fFileName)));
|
||||
Open;
|
||||
//////////////////////////
|
||||
//获取文件信息
|
||||
GetFileInfo(Trim(fpathFileName),mfileSize,mCreationTime,mWriteTime);
|
||||
|
||||
if RecordCount<=0 then
|
||||
begin
|
||||
Append;
|
||||
fieldByName('FileName').AsString := trim(fFileName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
edit;
|
||||
end;
|
||||
|
||||
fieldByName('FileEditDate').Value :=mWriteTime;
|
||||
fieldByName('FileCreateDate').Value :=mCreationTime;
|
||||
fieldByName('FileSize').Value :=mfileSize;
|
||||
fieldByName('Filler').Value :=Dname;
|
||||
fieldByName('LastEditer').Value :=Dname;
|
||||
fieldByName('LastEditTime').Value :=SGetServerDateTime(ADOQueryTmp);
|
||||
if pos('.rmf',fFileName)>0 then
|
||||
begin
|
||||
fieldByName('FilePath').Value :='report';
|
||||
fieldByName('FileType').Value :='公用';
|
||||
end
|
||||
else if pos('.dll',fFileName)>0 then
|
||||
begin
|
||||
fieldByName('FilePath').Value :='';
|
||||
fieldByName('FileType').Value :='一般';
|
||||
end
|
||||
else
|
||||
begin
|
||||
fieldByName('FilePath').Value :='';
|
||||
fieldByName('FileType').Value :='公用';
|
||||
end;
|
||||
//将OLE数据存入数据库
|
||||
ADOQueryCmdFileContent.LoadFromFile(fpathFileName);
|
||||
//ADOQueryCmdFileContent.LoadFromStream(Stream);
|
||||
|
||||
post;
|
||||
end;
|
||||
finally
|
||||
end;
|
||||
result:=true;
|
||||
ADOQueryCmdSC.Connection.CommitTrans ;
|
||||
except
|
||||
ADOQueryCmdSC.Connection.RollbackTrans ;
|
||||
Result:=False;
|
||||
application.MessageBox(pchar('提交文件['+trim(fFileName)+']失败!'),'提示信息',MB_ICONERROR);
|
||||
end;
|
||||
|
||||
end;
|
||||
procedure TfrmLabelAdd.GetFileInfo(mFile:string;var mfileSize:integer;var CreationTime:tdatetime;var WriteTime:tdatetime);
|
||||
var
|
||||
vSearchRec: TSearchRec;
|
||||
begin
|
||||
FindFirst(mFile,faAnyFile,vSearchRec);
|
||||
mfileSize:=vSearchRec.Size;
|
||||
CreationTime:=CovFileDate(vSearchRec.FindData.ftCreationTime);//创建时间
|
||||
//vSearchRec.FindData.ftLastAccessTime//访问时间
|
||||
WriteTime:=CovFileDate(vSearchRec.FindData.ftLastWriteTime);//修改时间
|
||||
FindClose(vSearchRec);
|
||||
end;
|
||||
function TfrmLabelAdd.CovFileDate(Fd:_FileTime):TDateTime;
|
||||
var
|
||||
Tct:_SystemTime;
|
||||
Temp:_FileTime;
|
||||
begin
|
||||
FileTimeToLocalFileTime(Fd,Temp);
|
||||
FileTimeToSystemTime(Temp,Tct);
|
||||
CovFileDate:=SystemTimeToDateTime(Tct);
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelAdd.SaveData():Boolean;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label');
|
||||
sql.Add('where 1<>1');
|
||||
Open;
|
||||
|
||||
Append;
|
||||
fieldByName('filler').value:=DName;
|
||||
fieldByName('filltime').value:=DServerDate;
|
||||
fieldByName('beizhu').value:= trim(beizhu.text);
|
||||
fieldByName('LabelCaption').value:=trim(LabelCaption.text);
|
||||
fieldByName('LabelType').value:=trim(LabelType.text);
|
||||
fieldByName('LabelFileName').value:= trim(LabelFileName.text);
|
||||
//TBlobField(FieldByName('LabelFile')).LoadFromStream(fStream);
|
||||
RMGridReport1.SaveToBlobField(TBlobField(FieldByName('LabelFile')));
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label where LabelCaption='''+Trim(LabelCaption.text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTmp.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('标签名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
result:=true;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelAdd.EditData():Boolean;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label');
|
||||
sql.Add('where labelId='+fkeyNo);
|
||||
Open;
|
||||
Edit;
|
||||
fieldByName('LabelCaption').value:=trim(LabelCaption.text);
|
||||
fieldByName('LabelType').value:=trim(LabelType.text);
|
||||
fieldByName('LabelFileName').value:= trim(LabelFileName.text);
|
||||
RMGridReport1.SaveToBlobField(TBlobField(FieldByName('LabelFile')));
|
||||
fieldByName('Editer').value:=DName;
|
||||
fieldByName('EditTime').value:=DServerDate;
|
||||
fieldByName('beizhu').value:= trim(beizhu.text);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label where LabelCaption='''+Trim(LabelCaption.text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTmp.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('标签名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
result:=true;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.LabelFileNameBtnClick(Sender: TObject);
|
||||
begin
|
||||
if OpenDialog1.Execute() then
|
||||
begin
|
||||
LabelFileName.Text:=OpenDialog1.FileName;
|
||||
LabelCaption.Text:=Trim(ExtractFileName(OpenDialog1.FileName));
|
||||
RMGridReport1.LoadFromFile(LabelFileName.Text);
|
||||
RMGridReport1.Preview :=RMPreview1;
|
||||
RMGridReport1.ShowReport ;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.BtOpenClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//初始化窗口数据
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelAdd.InitWinData();
|
||||
begin
|
||||
try
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select A.*');
|
||||
// sql.Add('customNoName=isnull((select customName from BC_customer where customNO=A.customNo),A.customNo)');
|
||||
sql.Add('from P_Label A');
|
||||
sql.Add('WHERE LabelId='+fkeyNo);
|
||||
Open;
|
||||
if isEmpty then
|
||||
begin
|
||||
close;
|
||||
exit;
|
||||
end;
|
||||
|
||||
SSetWinData(ADOQueryTmp,panel1);
|
||||
RMGridReport1.LoadFromBlobField(tblobfield(fieldbyname('labelFile')));
|
||||
RMGridReport2.FileName:=trim(fieldByName('labelFileName').AsString);
|
||||
RMGridReport2.LoadFromBlobField(tblobfield(fieldbyname('labelFile')));
|
||||
RMGridReport1.Preview :=RMPreview1;
|
||||
//RMGridReport1.PrepareReport;
|
||||
RMGridReport1.ShowReport ;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.FormShow(Sender: TObject);
|
||||
begin
|
||||
if fWinStatus>0 then
|
||||
InitWinData();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.RMPreview1DblClick(Sender: TObject);
|
||||
begin
|
||||
//btOpen.Click ;
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelAdd.InitVarDictionary();
|
||||
var
|
||||
i:integer;
|
||||
begin
|
||||
{ try
|
||||
with RMGridReport2 do
|
||||
begin
|
||||
Dictionary.Variables.Clear ;
|
||||
Dictionary.Variables.AddCategory('客户单位信息');
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.Add('exec P_Label_CustPrintData');
|
||||
sql.Add(quotedStr(fCustomNo));
|
||||
Open;
|
||||
for i:=0 to FieldCount-1 do
|
||||
begin
|
||||
|
||||
Dictionary.Variables.Add(trim(fields[i].FieldName)
|
||||
,'');
|
||||
Dictionary.Variables.AsString[trim(fields[i].FieldName)]:=trim(fields[i].AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
|
||||
end; }
|
||||
end;
|
||||
/////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////
|
||||
procedure TfrmLabelAdd.InitDataSetDictionary();
|
||||
begin
|
||||
{ with ADOQuery1 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('exec P_Label_PrintSet');
|
||||
sql.Add(quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
OPen;
|
||||
end;
|
||||
with RMGridReport2 do
|
||||
begin
|
||||
Dictionary.FieldAliases.Clear;
|
||||
Dictionary.FieldAliases['RMDS_Main']:= '标签数据';
|
||||
Dictionary.FieldAliases['RMDS_Main."barcode"']:='标签条码';
|
||||
end; }
|
||||
end;
|
||||
|
||||
end.
|
||||
438
BI(BIView.dll)/U_LabelList.dfm
Normal file
438
BI(BIView.dll)/U_LabelList.dfm
Normal file
|
|
@ -0,0 +1,438 @@
|
|||
object frmLabelList: TfrmLabelList
|
||||
Left = 145
|
||||
Top = 10
|
||||
Width = 1057
|
||||
Height = 693
|
||||
BorderIcons = [biMaximize]
|
||||
Caption = #26631#31614#20449#24687
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poOwnerFormCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel1: TPanel
|
||||
Left = 12
|
||||
Top = 80
|
||||
Width = 452
|
||||
Height = 561
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 0
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 3
|
||||
Width = 452
|
||||
Height = 558
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 448
|
||||
Height = 554
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object tv1: TcxGridDBTableView
|
||||
OnDblClick = tv1DblClick
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = tv1CellClick
|
||||
OnFocusedRecordChanged = tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_Label
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
object tv1labelId: TcxGridDBColumn
|
||||
Caption = #26631#31614'ID'
|
||||
DataBinding.FieldName = 'labelId'
|
||||
Visible = False
|
||||
Width = 53
|
||||
end
|
||||
object tv1labeltype: TcxGridDBColumn
|
||||
Caption = #26631#31614#31867#22411
|
||||
DataBinding.FieldName = 'labeltype'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaCenter
|
||||
Width = 107
|
||||
end
|
||||
object tv1labelCaption: TcxGridDBColumn
|
||||
Caption = #26631#31614#21517#31216
|
||||
DataBinding.FieldName = 'labelCaption'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaCenter
|
||||
Width = 261
|
||||
end
|
||||
object tv1labelFile: TcxGridDBColumn
|
||||
Caption = #25991#20214#21517
|
||||
DataBinding.FieldName = 'labelFile'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaCenter
|
||||
Width = 167
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 452
|
||||
Height = 3
|
||||
Align = alTop
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
object Label1: TLabel
|
||||
Left = 40
|
||||
Top = 13
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #23458#25143#21517#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 52
|
||||
Top = 35
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #19994#21153#21592#65306
|
||||
Visible = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 40
|
||||
Top = 61
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #30005#35805#21495#30721#65306
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 39
|
||||
Top = 86
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20844#21496#21517#31216#65306
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 14
|
||||
Top = 108
|
||||
Width = 84
|
||||
Height = 12
|
||||
Caption = #20844#21496#33521#25991#21517#31216#65306
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 61
|
||||
Top = 133
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #22320#22336#65306
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 37
|
||||
Top = 157
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #33521#25991#22320#22336#65306
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 61
|
||||
Top = 192
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #22791#27880#65306
|
||||
end
|
||||
object Note: TMemo
|
||||
Left = 120
|
||||
Top = 175
|
||||
Width = 293
|
||||
Height = 63
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object EngAddress: TEdit
|
||||
Left = 120
|
||||
Top = 151
|
||||
Width = 294
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object ChnAddress: TEdit
|
||||
Left = 120
|
||||
Top = 127
|
||||
Width = 293
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object engFactory: TEdit
|
||||
Left = 119
|
||||
Top = 104
|
||||
Width = 295
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
end
|
||||
object ChnFactory: TEdit
|
||||
Left = 119
|
||||
Top = 81
|
||||
Width = 294
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
end
|
||||
object TelePhone: TEdit
|
||||
Left = 119
|
||||
Top = 58
|
||||
Width = 294
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
end
|
||||
object ywy: TEdit
|
||||
Tag = 99
|
||||
Left = 119
|
||||
Top = 31
|
||||
Width = 295
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 6
|
||||
Text = 'ywy'
|
||||
Visible = False
|
||||
end
|
||||
object customNo: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 120
|
||||
Top = 7
|
||||
Width = 295
|
||||
Height = 20
|
||||
Enabled = False
|
||||
ReadOnly = True
|
||||
TabOrder = 7
|
||||
OnBtnClick = customNoBtnClick
|
||||
end
|
||||
end
|
||||
end
|
||||
object RMPreview1: TRMPreview
|
||||
Left = 488
|
||||
Top = 85
|
||||
Width = 553
|
||||
Height = 569
|
||||
Align = alRight
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Insert After'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = False
|
||||
TabOrder = 1
|
||||
OnDblClick = RMPreview1DblClick
|
||||
Options.RulerUnit = rmutScreenPixels
|
||||
Options.RulerVisible = False
|
||||
Options.DrawBorder = False
|
||||
Options.BorderPen.Color = clGray
|
||||
Options.BorderPen.Style = psDash
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1041
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar2'
|
||||
Color = clBtnFace
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
Transparent = False
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TOK: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30830#23450
|
||||
ImageIndex = 10
|
||||
OnClick = TOkClick
|
||||
end
|
||||
object Tadd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#26631#31614
|
||||
ImageIndex = 1
|
||||
OnClick = TaddClick
|
||||
end
|
||||
object Tupd: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913#26631#31614
|
||||
ImageIndex = 11
|
||||
OnClick = TupdClick
|
||||
end
|
||||
object Tdel: TToolButton
|
||||
Left = 300
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#26631#31614
|
||||
ImageIndex = 3
|
||||
OnClick = TdelClick
|
||||
end
|
||||
object Tclose: TToolButton
|
||||
Left = 387
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TcloseClick
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1041
|
||||
Height = 53
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label9: TLabel
|
||||
Left = 36
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26631#31614#31867#22411
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 280
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26631#31614#26631#39064
|
||||
end
|
||||
object LabelCaption: TEdit
|
||||
Left = 332
|
||||
Top = 16
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = LabelTypeChange
|
||||
end
|
||||
object LabelType: TFTComboBox
|
||||
Tag = 99
|
||||
Left = 88
|
||||
Top = 17
|
||||
Width = 100
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 1
|
||||
OnChange = LabelTypeChange
|
||||
Items.Strings = (
|
||||
''
|
||||
#20013#25991#26631#31614
|
||||
#33521#25991#26631#31614
|
||||
#20013#33521#25991#26631#31614)
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 508
|
||||
Top = 208
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Filter = 'RMFl(*.rmf)|*.rmf'
|
||||
InitialDir = '.'
|
||||
Left = 316
|
||||
Top = 148
|
||||
end
|
||||
object RMGridReport1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
ModalPreview = False
|
||||
ShowProgress = False
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
Preview = RMPreview1
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 436
|
||||
Top = 152
|
||||
ReportData = {}
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 528
|
||||
Top = 184
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 392
|
||||
Top = 228
|
||||
end
|
||||
object DS_Label: TDataSource
|
||||
DataSet = ADOQueryLabel
|
||||
Left = 66
|
||||
Top = 456
|
||||
end
|
||||
object ADOQueryLabel10: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 234
|
||||
Top = 296
|
||||
end
|
||||
object ADOQueryLabel: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 156
|
||||
Top = 267
|
||||
end
|
||||
end
|
||||
591
BI(BIView.dll)/U_LabelList.pas
Normal file
591
BI(BIView.dll)/U_LabelList.pas
Normal file
|
|
@ -0,0 +1,591 @@
|
|||
unit U_LabelList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, StrUtils,Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, BtnEdit, ExtCtrls, DB, ADODB,
|
||||
RM_System, RM_Common, RM_Class, RM_GridReport, Buttons, FTComboBox,
|
||||
RM_Preview, RM_e_Xls, RM_e_Graphic, RM_e_bmp, RM_BarCode,
|
||||
RM_DsgGridReport, RM_Dataset, cxStyles, cxCustomData, cxGraphics,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGrid, DBClient;
|
||||
|
||||
type
|
||||
TfrmLabelList = class(TForm)
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
OpenDialog1: TOpenDialog;
|
||||
RMGridReport1: TRMGridReport;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
RMPreview1: TRMPreview;
|
||||
ADOQuery1: TADOQuery;
|
||||
Panel2: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
tv1: TcxGridDBTableView;
|
||||
tv1labeltype: TcxGridDBColumn;
|
||||
tv1labelCaption: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
tv1labelFile: TcxGridDBColumn;
|
||||
DS_Label: TDataSource;
|
||||
ADOQueryLabel10: TADOQuery;
|
||||
Panel3: TPanel;
|
||||
Note: TMemo;
|
||||
EngAddress: TEdit;
|
||||
ChnAddress: TEdit;
|
||||
engFactory: TEdit;
|
||||
ChnFactory: TEdit;
|
||||
TelePhone: TEdit;
|
||||
ywy: TEdit;
|
||||
customNo: TBtnEditA;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
Label3: TLabel;
|
||||
tv1labelId: TcxGridDBColumn;
|
||||
ToolBar2: TToolBar;
|
||||
Tadd: TToolButton;
|
||||
Tupd: TToolButton;
|
||||
Tdel: TToolButton;
|
||||
TOK: TToolButton;
|
||||
Tclose: TToolButton;
|
||||
Panel4: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
Label9: TLabel;
|
||||
Label10: TLabel;
|
||||
LabelCaption: TEdit;
|
||||
LabelType: TFTComboBox;
|
||||
ADOQueryLabel: TClientDataSet;
|
||||
procedure TcloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TsaveClick(Sender: TObject);
|
||||
procedure customNoBtnClick(Sender: TObject);
|
||||
procedure BtOpenClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure RMPreview1DblClick(Sender: TObject);
|
||||
procedure TaddClick(Sender: TObject);
|
||||
procedure TupdClick(Sender: TObject);
|
||||
procedure tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure TdelClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TOkClick(Sender: TObject);
|
||||
procedure tv1DblClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure LabelTypeChange(Sender: TObject);
|
||||
procedure tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
isLoad:Boolean;
|
||||
function SaveData():Boolean;
|
||||
function EditData():Boolean;
|
||||
function IsCheckCustOk():Boolean;
|
||||
function DeleteData():Boolean;
|
||||
procedure InitWinData();
|
||||
procedure InitVarDictionary();
|
||||
procedure InitDataSetDictionary();
|
||||
procedure InitGrid();
|
||||
procedure OpenLabel();
|
||||
procedure SetWinStatus();
|
||||
procedure DoFilter();
|
||||
public
|
||||
fSelLabelId,LBName,LBInt,SLBName:String;
|
||||
fKeyNo:string;
|
||||
fchg:Boolean;
|
||||
fIsShowModal:Boolean;
|
||||
fWinStatus:integer;
|
||||
end;
|
||||
|
||||
var
|
||||
frmLabelList: TfrmLabelList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink, U_LabelAdd,U_RTFun;
|
||||
{$R *.dfm}
|
||||
procedure TfrmLabelList.DoFilter();
|
||||
var
|
||||
filterStr:string;
|
||||
begin
|
||||
filterStr:='';
|
||||
|
||||
if trim(LabelType.Text) <>'' then
|
||||
begin
|
||||
filterStr:=' and LabelType like '+quotedStr('%'+trim(LabelType.Text)+'%');
|
||||
end;
|
||||
//名称
|
||||
if trim(LabelCaption.Text)<>'' then
|
||||
begin
|
||||
filterStr:=filterStr+' and LabelCaption like '+quotedStr('%'+trim(LabelCaption.Text)+'%');
|
||||
end;
|
||||
try
|
||||
ADOQueryLabel10.DisableControls ;
|
||||
if trim(filterStr)='' then
|
||||
begin
|
||||
ADOQueryLabel.Filtered:=false;
|
||||
ADOQueryLabel.EnableControls;
|
||||
exit;
|
||||
end;
|
||||
filterStr:=trim(RightBStr(filterStr,length(filterStr)-4));
|
||||
with ADOQueryLabel do
|
||||
begin
|
||||
filtered:=false;
|
||||
filter:=filterStr;
|
||||
filtered:=true;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryLabel10,ADOQueryLabel);
|
||||
SInitCDSData20(ADOQueryLabel10,ADOQueryLabel);
|
||||
finally
|
||||
ADOQueryLabel10.EnableControls;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmLabelList.TcloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
panel1.Align :=alClient;
|
||||
// ClearWinData(panel3);
|
||||
fSelLabelId := '';
|
||||
|
||||
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TsaveClick(Sender: TObject);
|
||||
begin
|
||||
if trim(customNO.Text)='' then
|
||||
begin
|
||||
application.MessageBox('客户名称不能为空,请选择客户!','提示');
|
||||
customNo.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
if application.MessageBox('确定要保存吗?','提示信息',1)=2 then exit;
|
||||
if fWinStatus=0 then
|
||||
begin
|
||||
if not IsCheckCustOk() then exit;
|
||||
if SaveData() then
|
||||
begin
|
||||
fWinStatus:=1;
|
||||
fchg:=true;
|
||||
SetWinStatus();
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if EditData() then
|
||||
begin
|
||||
fchg:=true;
|
||||
application.MessageBox('保存成功!','提示信息',0)
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.SaveData():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JD_Label');
|
||||
sql.Add('where 1<>1');
|
||||
Open;
|
||||
|
||||
Append;
|
||||
fieldByName('customno').value:=trim(customno.txtCode);
|
||||
fieldByName('ChnFactory').value:=trim(ChnFactory.text);
|
||||
fieldByName('engFactory').value:=trim(engFactory.text);
|
||||
fieldByName('TelePhone').value:=trim(TelePhone.text);
|
||||
fieldByName('ChnAddress').value:=trim(ChnAddress.text);
|
||||
fieldByName('EngAddress').value:=trim(EngAddress.text);
|
||||
fieldByName('filler').value:=Dname;
|
||||
fieldByName('filltime').value:=DServerDate;
|
||||
fieldByName('note').value:= trim(Note.text);
|
||||
Post;
|
||||
end;
|
||||
result:=true;
|
||||
except
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.EditData():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JD_Label');
|
||||
sql.Add('where customNo='+fKeyNo);
|
||||
Open;
|
||||
|
||||
Edit;
|
||||
fieldByName('customno').value:=trim(customno.txtCode);
|
||||
fieldByName('ChnFactory').value:=trim(ChnFactory.text);
|
||||
fieldByName('engFactory').value:=trim(engFactory.text);
|
||||
fieldByName('TelePhone').value:=trim(TelePhone.text);
|
||||
fieldByName('ChnAddress').value:=trim(ChnAddress.text);
|
||||
fieldByName('EngAddress').value:=trim(EngAddress.text);
|
||||
fieldByName('note').value:= trim(Note.text);
|
||||
Post;
|
||||
end;
|
||||
result:=true;
|
||||
except
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.customNoBtnClick(Sender: TObject);
|
||||
begin
|
||||
{ FormGetCust:=TFormGetCust.Create(self);
|
||||
|
||||
if FormGetCust.ShowModal=mrok then
|
||||
begin
|
||||
customNo.TxtCode:=trim(FormGetCust.ADOQuery1.Fieldbyname('customno').AsString);
|
||||
customNo.Text:=trim(FormGetCust.ADOQuery1.Fieldbyname('shortname').AsString);
|
||||
end;
|
||||
FormGetCust.Free; }
|
||||
{ frmCustHelp:=TfrmCustHelp.create(self);
|
||||
with frmCustHelp do
|
||||
begin
|
||||
if showModal=1 then
|
||||
begin
|
||||
customNo.TxtCode:=trim(ADOQueryHelp.Fieldbyname('customno').AsString);
|
||||
customNo.Text:=trim(ADOQueryHelp.Fieldbyname('shortname').AsString);
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.BtOpenClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//初始化窗口数据
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitWinData();
|
||||
begin
|
||||
try
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select A.* ,B.customName as customNoName');
|
||||
sql.Add('from JD_Label A');
|
||||
sql.Add('INNER JOIN BC_customer B ON A.customNO=B.customNo');
|
||||
sql.Add('WHERE B.customNo='''+fkeyNo+'''');
|
||||
Open;
|
||||
if isEmpty then
|
||||
begin
|
||||
close;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// SetWinData(ADOQueryTmp,panel3);
|
||||
{
|
||||
RMGridReport1.LoadFromBlobField(tblobfield(fieldbyname('labelFile')));
|
||||
RMGridReport1.Preview :=RMPreview1;
|
||||
RMGridReport1.PrepareReport;
|
||||
RMGridReport1.ShowReport ;
|
||||
}
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormShow(Sender: TObject);
|
||||
begin
|
||||
if fWinStatus=1 then tok.Visible:=false;
|
||||
InitGrid();
|
||||
if Trim(SLBName)<>'' then
|
||||
begin
|
||||
ADOQueryLabel.Locate('labelCaption',SLBName,[]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.RMPreview1DblClick(Sender: TObject);
|
||||
begin
|
||||
//btOpen.Click ;
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitVarDictionary();
|
||||
var
|
||||
TmpList:Tstrings;
|
||||
mm:string;
|
||||
i:integer;
|
||||
begin
|
||||
try
|
||||
TmpList:=TstringList.Create();
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select distinct ItemType from JC_LabelSetItems ');
|
||||
sql.Add('where valid=''Y''');
|
||||
Open;
|
||||
TmpList.Clear ;
|
||||
while not Eof do
|
||||
begin
|
||||
TmpList.Add(trim(fieldByName('ItemType').AsString));
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
TmpList.Free ;
|
||||
end;
|
||||
end;
|
||||
/////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitDataSetDictionary();
|
||||
begin
|
||||
{ with ADOQuery1 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('exec P_Get_LabelPrintData');
|
||||
sql.Add(quotedStr(''));
|
||||
sql.Add(','+quotedStr(''));
|
||||
sql.Add(','+quotedStr(''));
|
||||
OPen;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TaddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmLabelAdd:=TfrmLabelAdd.create(self);
|
||||
with frmLabelAdd do
|
||||
begin
|
||||
if showModal =1 then
|
||||
begin
|
||||
fchg:=true;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelAdd.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TupdClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
try
|
||||
frmLabelAdd:=TfrmLabelAdd.create(self);
|
||||
with frmLabelAdd do
|
||||
begin
|
||||
fKeyNo:=ADOQueryLabel.fieldByName('LabelId').AsString ;
|
||||
fWinstatus:=1;
|
||||
if showModal =1 then
|
||||
begin
|
||||
fchg:=true;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelAdd.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
/////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitGrid();
|
||||
begin
|
||||
try
|
||||
isLoad:=false;
|
||||
ADOQueryLabel10.DisableControls ;
|
||||
with ADOQueryLabel10 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select * from P_Label');
|
||||
sql.Add('where valid=''Y''');
|
||||
sql.Add(' order by labelCaption');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryLabel10,ADOQueryLabel);
|
||||
SInitCDSData20(ADOQueryLabel10,ADOQueryLabel);
|
||||
finally
|
||||
ADOQueryLabel10.EnableControls;
|
||||
isLoad:=true;
|
||||
//DoFilter();
|
||||
//OpenLabel();
|
||||
end;
|
||||
end;
|
||||
////////////////////////////////////////////////////////
|
||||
//函数功能:打开标签文件
|
||||
////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.OpenLabel();
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
with RMGridReport1 do
|
||||
begin
|
||||
LoadFromBlobField(tblobfield(ADOQueryLabel.fieldbyname('labelFile')));
|
||||
//Preview :=RMPreview1;
|
||||
ShowReport ;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmLabelList.tv1FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
|
||||
end;
|
||||
//////////////////////////////////////////////////////////
|
||||
//函数功能:检查该客户的标签是否已存在
|
||||
/////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.IsCheckCustOk():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select count(customNO)as cnt from P_Label');
|
||||
sql.Add('where customNO='''+trim(customNO.TxtCode)+'''');
|
||||
Open;
|
||||
|
||||
if fieldByName('cnt').AsInteger>0 then
|
||||
begin
|
||||
Result:=false ;
|
||||
application.MessageBox('该客户标签信息已存!','警告信息',0);
|
||||
end
|
||||
else
|
||||
Result:=true;
|
||||
end;
|
||||
except
|
||||
result:=false;
|
||||
application.MessageBox('检查该客户标签信息是否已存在时发生错误!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.DeleteData():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.Add('delete P_Label');
|
||||
sql.Add('where labelId='+ADOQueryLabel.fieldByName('LabelID').asString);
|
||||
execSql;
|
||||
end;
|
||||
result:=true;
|
||||
except
|
||||
result:=false;
|
||||
application.MessageBox('删除失败!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmLabelList.TdelClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
if application.MessageBox('确定要删除此标签吗?','警告信息',1)=2 then exit;
|
||||
if DeleteData() then
|
||||
begin
|
||||
fchg:=true;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
//////////////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.SetWinStatus();
|
||||
begin
|
||||
case fWinStatus of
|
||||
0:
|
||||
begin
|
||||
// ToolBar2.Visible :=false;
|
||||
// tsave.Visible :=true;
|
||||
customNo.Enabled :=true;
|
||||
panel3.Enabled :=true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
// ToolBar2.Visible :=true;
|
||||
// tsave.Visible :=false;
|
||||
customNo.Enabled :=false;
|
||||
panel3.Enabled :=false;
|
||||
TOK.Visible:=false;
|
||||
end;
|
||||
5:
|
||||
begin
|
||||
// ToolBar2.Visible :=false;
|
||||
// tsave.Visible :=false;
|
||||
panel1.Enabled :=false;
|
||||
panel3.Enabled :=false;
|
||||
end;
|
||||
end ;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
{if fIsShowModal then
|
||||
Application:=MainApplication ; }
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmLabelList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TOkClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
LBName:=Trim(ADOQueryLabel.fieldbyname('labelCaption').AsString);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
TOk.Click ;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.LabelTypeChange(Sender: TObject);
|
||||
begin
|
||||
DoFilter();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if isLoad then
|
||||
OpenLabel();
|
||||
end;
|
||||
|
||||
end.
|
||||
181
BI(BIView.dll)/U_ModuleNote.dfm
Normal file
181
BI(BIView.dll)/U_ModuleNote.dfm
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
object frmModuleNote: TfrmModuleNote
|
||||
Left = 326
|
||||
Top = 178
|
||||
Width = 729
|
||||
Height = 528
|
||||
Align = alClient
|
||||
Caption = #25805#20316#35828#26126
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 713
|
||||
Height = 416
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
object V1OrderNo: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'MNDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object V1Name: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25805#20316#35828#26126
|
||||
DataBinding.FieldName = 'MNNOte'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 513
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 713
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 118
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 177
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 236
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 713
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label2: TLabel
|
||||
Left = -31
|
||||
Top = 13
|
||||
Width = 360
|
||||
Height = 16
|
||||
Caption = ' '#27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#21333#20803#26684#20445#23384#25968#25454#12290
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 280
|
||||
Top = 144
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 208
|
||||
Top = 144
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 168
|
||||
Top = 152
|
||||
end
|
||||
end
|
||||
220
BI(BIView.dll)/U_ModuleNote.pas
Normal file
220
BI(BIView.dll)/U_ModuleNote.pas
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
unit U_ModuleNote;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
cxTimeEdit, cxCalendar;
|
||||
|
||||
type
|
||||
TfrmModuleNote = class(TForm)
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
V1Name: TcxGridDBColumn;
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
TBAdd: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
V1OrderNo: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label2: TLabel;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag:string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmModuleNote: TfrmModuleNote;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmModuleNote.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Module_Note A where A.MNType='''+flag+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmModuleNote.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing:=True;
|
||||
TV1.OptionsSelection.CellSelect:=True;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('MNDate').Value:=Now;
|
||||
Post;
|
||||
end;
|
||||
|
||||
end;
|
||||
procedure TfrmModuleNote.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
if (Trim(ClientDataSet1.FieldByName('MNID').AsString)<>'') then
|
||||
begin
|
||||
if application.MessageBox('确定要删除吗?','提示信息',1)=2 then exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete SY_Module_Note where MNID='''+Trim(ClientDataSet1.fieldbyname('MNID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=2;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'模块说明');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj,fsj1:string;
|
||||
begin
|
||||
InitGrid();
|
||||
ReadCxGrid('自定义'+Trim(flag),TV1,'模块说明');
|
||||
frmModuleNote.Caption:=Trim(flag);
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'模块说明');
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing:=True;
|
||||
TV1.OptionsSelection.CellSelect:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if TV1.OptionsData.Editing=False then
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
maxno,mvalue:string;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
//Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('MNNote').Value:=Trim(mvalue);
|
||||
//Post;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(ClientDataSet1.FieldByName('MNID').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxno,'SY','SY_Module_Note',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('取最大编号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxno:=Trim(ClientDataSet1.fieldbyname('MNID').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from SY_Module_Note ');
|
||||
sql.Add(' where MNID='''+Trim(ClientDataSet1.fieldbyname('MNID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('MNID').AsString)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('FillTime').Value:=Now;
|
||||
end
|
||||
else begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=Now;
|
||||
end;
|
||||
FieldByName('MNDate').Value:=ClientDataSet1.fieldbyname('MNDate').Value;
|
||||
FieldByName('MNID').Value:=Trim(maxno);
|
||||
FieldByName('MNNote').Value:=ClientDataSet1.fieldbyname('MNNote').AsString;
|
||||
FieldByName('MNType').Value:=flag;
|
||||
Post;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('MNID').Value:=Trim(maxno);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
342
BI(BIView.dll)/U_ModulePromptList.dfm
Normal file
342
BI(BIView.dll)/U_ModulePromptList.dfm
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
object frmModulePromptList: TfrmModulePromptList
|
||||
Left = 131
|
||||
Top = 161
|
||||
Width = 1133
|
||||
Height = 547
|
||||
Caption = #25105#30340#31649#23478
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1117
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1117
|
||||
Height = 66
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 75
|
||||
Top = 11
|
||||
Width = 84
|
||||
Height = 12
|
||||
Caption = #38144#21806#21512#21516#26410#23457#26680
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 48
|
||||
Top = 8
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'aa:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 242
|
||||
Top = 11
|
||||
Width = 96
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#26410#23457#26680
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 215
|
||||
Top = 8
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'bb:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 457
|
||||
Top = 11
|
||||
Width = 120
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#24037#24207#26410#23450#20041
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 428
|
||||
Top = 8
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'cc:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 75
|
||||
Top = 40
|
||||
Width = 120
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#24037#24207#26410#23433#25490
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 48
|
||||
Top = 37
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'dd:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 241
|
||||
Top = 40
|
||||
Width = 168
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#37319#36141#21152#24037#21512#21516#26410#24405#20837
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 214
|
||||
Top = 37
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'ee:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 456
|
||||
Top = 40
|
||||
Width = 108
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#29983#20135#36229#26399
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 428
|
||||
Top = 37
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'ff:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 627
|
||||
Top = 11
|
||||
Width = 84
|
||||
Height = 12
|
||||
Caption = #26597' '#35810' '#26465' '#20214
|
||||
end
|
||||
object ModuleNote: TEdit
|
||||
Tag = 2
|
||||
Left = 608
|
||||
Top = 36
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = ModuleNoteChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 98
|
||||
Width = 1117
|
||||
Height = 410
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #24453#22788#29702#20107#39033
|
||||
DataBinding.FieldName = 'ModuleNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Footer = DataLink_DDMD.FoneRed
|
||||
Width = 843
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 1128
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 936
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1000
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1040
|
||||
Top = 8
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 1168
|
||||
Top = 8
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 815
|
||||
Top = 7
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDBMain
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 475
|
||||
Top = 193
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 400
|
||||
Top = 192
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 440
|
||||
Top = 192
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 877
|
||||
Top = 9
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 506
|
||||
Top = 195
|
||||
end
|
||||
end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user