`
This commit is contained in:
commit
bff149d192
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
**/layout
|
||||||
|
**/report
|
||||||
|
**/实施文件
|
||||||
|
**/image
|
||||||
|
**/doc
|
||||||
|
**/wav
|
||||||
|
**/__history
|
||||||
|
**/__recovery
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.ddp
|
||||||
|
*.dcu
|
||||||
|
*.~pas
|
||||||
|
*.~dfm
|
||||||
|
*.~ddp
|
||||||
|
*.~dpr
|
||||||
42
基础资料维护(BaseInfo.dll)/BaseInfo.cfg
Normal file
42
基础资料维护(BaseInfo.dll)/BaseInfo.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
基础资料维护(BaseInfo.dll)/BaseInfo.dof
Normal file
138
基础资料维护(BaseInfo.dll)/BaseInfo.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:\其속螺淃커덜쯤\淃커덜쯤\음<>\샘뇟栗죕郭빱(BaseInfo.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
|
||||||
48
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
48
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
library BaseInfo;
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils,
|
||||||
|
classes,
|
||||||
|
forms,
|
||||||
|
WinTypes,
|
||||||
|
WinProcs,
|
||||||
|
U_DataLink in 'U_DataLink.pas' {DataLink_BaseInfo: TDataModule},
|
||||||
|
U_GetDllForm in 'U_GetDllForm.pas',
|
||||||
|
U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
|
||||||
|
U_ZDYHelp in '..\..\..\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||||
|
U_SelExportField in '..\..\..\ThreeFun\Form\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_ZdyAttInputCP_HX in 'U_ZdyAttInputCP_HX.pas' {frmZdyAttInputCP_HX},
|
||||||
|
U_ZdyAttachCP10 in 'U_ZdyAttachCP10.pas' {frmZdyAttachCP10},
|
||||||
|
U_ZdyInput in 'U_ZdyInput.pas' {frmZdyInput},
|
||||||
|
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||||
|
U_ZdyAttInputCP30 in 'U_ZdyAttInputCP30.pas' {frmZdyAttInputCP30},
|
||||||
|
U_CPKWKCList in 'U_CPKWKCList.pas' {frmCPKWKCList},
|
||||||
|
getpic in 'getpic.pas' {FormGetPic};
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;
|
||||||
|
begin
|
||||||
|
DLLProc := @DLLEnterPoint;
|
||||||
|
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DLLUnloadProc(Reason: Integer); register;
|
||||||
|
begin
|
||||||
|
{ if (Reason = DLL_PROCESS_DETACH) or (Reason=DLL_THREAD_DETACH) then
|
||||||
|
Application:=NewDllApp; }
|
||||||
|
end;
|
||||||
|
exports
|
||||||
|
GetDllForm;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
NewDllApp:=Application;
|
||||||
|
DLLProc := @DLLUnloadProc;
|
||||||
|
except
|
||||||
|
|
||||||
|
end;
|
||||||
|
end.
|
||||||
|
|
||||||
BIN
基础资料维护(BaseInfo.dll)/BaseInfo.res
Normal file
BIN
基础资料维护(BaseInfo.dll)/BaseInfo.res
Normal file
Binary file not shown.
42
基础资料维护(BaseInfo.dll)/CPCK.cfg
Normal file
42
基础资料维护(BaseInfo.dll)/CPCK.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\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"c:\program files\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
基础资料维护(BaseInfo.dll)/CPCK.dof
Normal file
138
基础资料维护(BaseInfo.dll)/CPCK.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=F:\selfware_83398\selfware\马国钢开发代码\项目代码\self\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
|
||||||
BIN
基础资料维护(BaseInfo.dll)/CPCK.res
Normal file
BIN
基础资料维护(BaseInfo.dll)/CPCK.res
Normal file
Binary file not shown.
2
基础资料维护(BaseInfo.dll)/FieldExportSet/产品资料列表.INI
Normal file
2
基础资料维护(BaseInfo.dll)/FieldExportSet/产品资料列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/产品名称/产品编号/类型/规格/成份/颜色/花号/色号/门幅/克重/备注/名称/工艺/计划缩率(%)
|
||||||
2
基础资料维护(BaseInfo.dll)/FieldExportSet/客户资料列表.INI
Normal file
2
基础资料维护(BaseInfo.dll)/FieldExportSet/客户资料列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/产品名称/产品编号/类型/规格/成份/颜色/花号/色号/门幅/克重/备注/名称/工艺/计划缩率(%)
|
||||||
42
基础资料维护(BaseInfo.dll)/JCInfoSet.cfg
Normal file
42
基础资料维护(BaseInfo.dll)/JCInfoSet.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\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"c:\program files\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
基础资料维护(BaseInfo.dll)/JCInfoSet.dof
Normal file
138
基础资料维护(BaseInfo.dll)/JCInfoSet.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=F:\selfware_83398\selfware\马国钢开发代码\项目代码\self\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
|
||||||
BIN
基础资料维护(BaseInfo.dll)/JCInfoSet.res
Normal file
BIN
基础资料维护(BaseInfo.dll)/JCInfoSet.res
Normal file
Binary file not shown.
20
基础资料维护(BaseInfo.dll)/ProjectGroup1.bpg
Normal file
20
基础资料维护(BaseInfo.dll)/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
default: $(PROJECTS)
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
testDll.exe: testDll.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
|
||||||
23
基础资料维护(BaseInfo.dll)/ProjectGroup1.~bpg
Normal file
23
基础资料维护(BaseInfo.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
基础资料维护(BaseInfo.dll)/SYSTEMSET.ini
Normal file
5
基础资料维护(BaseInfo.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[SERVER]
|
||||||
|
服务器地址=101.132.145.136
|
||||||
|
服务器地址类型=70
|
||||||
|
是否自动更新=1
|
||||||
|
软件名称=英斯佩管理软件
|
||||||
275
基础资料维护(BaseInfo.dll)/U_CPKWEdit.dfm
Normal file
275
基础资料维护(BaseInfo.dll)/U_CPKWEdit.dfm
Normal file
|
|
@ -0,0 +1,275 @@
|
||||||
|
object frmCPKWEdit: TfrmCPKWEdit
|
||||||
|
Left = 447
|
||||||
|
Top = 268
|
||||||
|
Width = 1013
|
||||||
|
Height = 453
|
||||||
|
Caption = #20179#20301#36755#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 997
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 997
|
||||||
|
Height = 383
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.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>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column6PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 130
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 89
|
||||||
|
end
|
||||||
|
object v2DEFStr6: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2DEFStr6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550
|
||||||
|
#25171#22534)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 135
|
||||||
|
end
|
||||||
|
object Tv2Column1: TcxGridDBColumn
|
||||||
|
Caption = #20179#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CKTYPE'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#38754#26009
|
||||||
|
#36741#26009)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
object Tv2Column2: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'GG'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column3: TcxGridDBColumn
|
||||||
|
Caption = #27454#21495
|
||||||
|
DataBinding.FieldName = 'KH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column4: TcxGridDBColumn
|
||||||
|
Caption = #24067#21305#31867#22411
|
||||||
|
DataBinding.FieldName = 'BPLX'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = Tv2Column4PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column5: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column6: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'DDH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column7: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#22270#29255
|
||||||
|
DataBinding.FieldName = 'HXFile'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = Tv2Column7PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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 = 920
|
||||||
|
Top = 160
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 340
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
end
|
||||||
426
基础资料维护(BaseInfo.dll)/U_CPKWEdit.pas
Normal file
426
基础资料维护(BaseInfo.dll)/U_CPKWEdit.pas
Normal file
|
|
@ -0,0 +1,426 @@
|
||||||
|
unit U_CPKWEdit;
|
||||||
|
|
||||||
|
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, strutils, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
|
cxNavigator, 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
|
||||||
|
TfrmCPKWEdit = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2DEFStr6: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
Tv2Column1: TcxGridDBColumn;
|
||||||
|
Tv2Column2: TcxGridDBColumn;
|
||||||
|
Tv2Column3: TcxGridDBColumn;
|
||||||
|
Tv2Column4: TcxGridDBColumn;
|
||||||
|
ADOCmd: TADOQuery;
|
||||||
|
Tv2Column5: TcxGridDBColumn;
|
||||||
|
Tv2Column6: TcxGridDBColumn;
|
||||||
|
Tv2Column7: 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 ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2DEFStr6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure Tv2Column4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure v2Column6PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure Tv2Column7PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData(): Boolean;
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
fFlileFlag: string;
|
||||||
|
RKFlag, FCYID, XZdyCode, Xqty: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWEdit: TfrmCPKWEdit;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ZDYHelp, getpic;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID=''' + Trim(FCYID) + '''');
|
||||||
|
// ShowMessage(sql.text);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWEdit := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption, Tv2, '客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption, Tv2, '客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
|
||||||
|
if Trim(FCYID) = '' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
fFlileFlag := UserDataFlag + 'HX';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmCPKWEdit.SaveData(): Boolean;
|
||||||
|
var
|
||||||
|
maxId, CRID, fzdyCode: string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxId, 'KW', 'KH_Zdy_Attachment', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxId := Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment X where ATID=''' + Trim(FCYID) + ''' and defstr3=''固定架'' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('UPDATE CK_BanCP_KC set kckw='''' ');
|
||||||
|
sql.Add('where kckw=' + quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('UPDATE CK_BanCP_CR set kckw='''' ');
|
||||||
|
sql.Add('where kckw=' + quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID=''' + Trim(FCYID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID) = '' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
FieldByName('zdyCode').Value := Trim(fzdyCode);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value := Trim(DName);
|
||||||
|
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||||
|
FieldByName('ZT').Value := '修改';
|
||||||
|
if Trim(DParameters1) <> '高权限' then
|
||||||
|
begin
|
||||||
|
FieldByName('QRCZ').Value := '未审核'; //未审核
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('QRCZ').Value := '已审核'; //审核
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value := Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value := Trim(CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_HZ, '', 0);
|
||||||
|
FieldByName('Type').Value := 'CPKW';
|
||||||
|
FieldByName('mrate').Value := CDS_HZ.fieldbyname('mrate').AsFloat;
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
FieldByName('CKLX').Value := '在库';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value := Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
if FCYID <> '' then
|
||||||
|
begin
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result,Mainid) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('库位修改数据')));
|
||||||
|
sql.Add(',' + quotedstr(trim('修改前→卷条码:' + trim(FCYID) + ', ' + ',库位:' + Trim(XZdyCode) + ',数量:' + Trim(Xqty))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(',' + quotedstr(trim(FCYID)));
|
||||||
|
sql.Add(')');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// with ADOQueryTemp do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from KH_Zdy_Attachment where ZdyCode=''' + Trim(CDS_HZ.fieldbyname('ZdyCode').AsString) + '''');
|
||||||
|
// sql.Add(' and Type=''CPKW'' ');
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
// if ADOQueryTemp.RecordCount > 1 then
|
||||||
|
// begin
|
||||||
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
// Application.MessageBox('仓位编号重复!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
{ with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment X where ATID='''+Trim(FCYID)+''' and defstr3=''固定架'' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('UPDATE CK_BanCP_KC set kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('where C_CodeName='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr1').AsString)));
|
||||||
|
sql.Add('and C_color='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr2').AsString)));
|
||||||
|
sql.Add('UPDATE CK_BanCP_CR set kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('where C_CodeName='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr1').AsString)));
|
||||||
|
sql.Add('and C_color='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr2').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;}
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
Result := True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyCode').AsString) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('仓位编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!', '提示', 0);
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
if trim(mvalue) = '' then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
if rightBstr(trim(mvalue), 1) <> '#' then
|
||||||
|
begin
|
||||||
|
mvalue := trim(mvalue) + '#';
|
||||||
|
end;
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr1').Value := Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.v2DEFStr6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
if trim(mvalue) = '' then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
if rightBstr(trim(mvalue), 1) <> '#' then
|
||||||
|
begin
|
||||||
|
mvalue := trim(mvalue) + '#';
|
||||||
|
end;
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr2').Value := Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.Tv2Column4PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'BPLX';
|
||||||
|
flagname := '布匹类型';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_HZ.Edit;
|
||||||
|
Self.CDS_HZ.FieldByName('BPLX').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.v2Column6PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'KW';
|
||||||
|
flagname := '库位';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_HZ.Edit;
|
||||||
|
Self.CDS_HZ.FieldByName('ZdyCode').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.Tv2Column7PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
FormGetPic := TFormGetPic.create(self);
|
||||||
|
with FormGetPic do
|
||||||
|
begin
|
||||||
|
fFlileFlag := self.fFlileFlag;
|
||||||
|
fkeyNo := CDS_HZ.fieldbyname('HXFile').asstring;
|
||||||
|
pat1 := 'FileName';
|
||||||
|
pic1 := 'FilesOther';
|
||||||
|
FTFType := 'HX';
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
CDS_HZ.edit;
|
||||||
|
CDS_HZ.fieldbyname('HXFile').Value := trim(fkeyNo);
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
662
基础资料维护(BaseInfo.dll)/U_CPKWHZ.dfm
Normal file
662
基础资料维护(BaseInfo.dll)/U_CPKWHZ.dfm
Normal file
|
|
@ -0,0 +1,662 @@
|
||||||
|
object frmCPKWHZ: TfrmCPKWHZ
|
||||||
|
Left = 364
|
||||||
|
Top = 240
|
||||||
|
Width = 1327
|
||||||
|
Height = 626
|
||||||
|
Caption = #24211#20301#27719#24635#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1311
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475#26126#32454
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object ToolButton8: TToolButton
|
||||||
|
Left = 489
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20986#24211
|
||||||
|
ImageIndex = 7
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton8Click
|
||||||
|
end
|
||||||
|
object ToolButton7: TToolButton
|
||||||
|
Left = 552
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25968#25454#23548#20837
|
||||||
|
ImageIndex = 106
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton7Click
|
||||||
|
end
|
||||||
|
object ToolButton9: TToolButton
|
||||||
|
Left = 639
|
||||||
|
Top = 0
|
||||||
|
Caption = #23457#26680#25805#20316
|
||||||
|
ImageIndex = 16
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton9Click
|
||||||
|
end
|
||||||
|
object ToolButton10: TToolButton
|
||||||
|
Left = 722
|
||||||
|
Top = 0
|
||||||
|
Caption = #25805#20316#26085#24535
|
||||||
|
ImageIndex = 57
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton10Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 805
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 868
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1311
|
||||||
|
Height = 74
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 503
|
||||||
|
Top = 14
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 200
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 501
|
||||||
|
Top = 42
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 661
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 219
|
||||||
|
Top = 42
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 363
|
||||||
|
Top = 42
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #27454#21495
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 640
|
||||||
|
Top = 44
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 357
|
||||||
|
Top = 13
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 800
|
||||||
|
Top = 14
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23457#26680#31867#22411
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 530
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 249
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object DEFstr3: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 530
|
||||||
|
Top = 37
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550
|
||||||
|
#25171#22534)
|
||||||
|
end
|
||||||
|
object defstr2: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 691
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 1188
|
||||||
|
Top = 12
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #20840#36873
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
object GG: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 249
|
||||||
|
Top = 38
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object KH: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 393
|
||||||
|
Top = 38
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
Visible = False
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object CKLX: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 693
|
||||||
|
Top = 39
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 7
|
||||||
|
Visible = False
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22312#24211
|
||||||
|
#20986#24211)
|
||||||
|
end
|
||||||
|
object DDH: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 394
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 84
|
||||||
|
Top = 37
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
object CheckBox2: TCheckBox
|
||||||
|
Left = 13
|
||||||
|
Top = 13
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #25805#20316#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 10
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 84
|
||||||
|
Top = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 11
|
||||||
|
end
|
||||||
|
object QRCZ: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 853
|
||||||
|
Top = 9
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 12
|
||||||
|
Visible = False
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 105
|
||||||
|
Width = 1311
|
||||||
|
Height = 482
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnCustomDrawCell = Tv2CustomDrawCell
|
||||||
|
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
|
||||||
|
Column = v2Column4
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column2
|
||||||
|
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_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 97
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'CPRollNum'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#24635#25968#37327
|
||||||
|
DataBinding.FieldName = 'DDqty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 153
|
||||||
|
end
|
||||||
|
object Tv2Column1: TcxGridDBColumn
|
||||||
|
Caption = #24211#20301#31867#22411
|
||||||
|
DataBinding.FieldName = 'CKTYPE'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column2: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'GG'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column3: TcxGridDBColumn
|
||||||
|
Caption = #27454#21495
|
||||||
|
DataBinding.FieldName = 'KH'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column4: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CKLX'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column5: TcxGridDBColumn
|
||||||
|
Caption = #24067#21305#31867#22411
|
||||||
|
DataBinding.FieldName = 'BPLX'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column6: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'DDH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column7: TcxGridDBColumn
|
||||||
|
Caption = #29366#24577
|
||||||
|
DataBinding.FieldName = 'ZT'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column8: TcxGridDBColumn
|
||||||
|
Caption = #30830#35748#25805#20316
|
||||||
|
DataBinding.FieldName = 'QRCZ'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 861
|
||||||
|
Top = 297
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1029
|
||||||
|
Top = 313
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 749
|
||||||
|
Top = 257
|
||||||
|
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 = 780
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 572
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 888
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 903
|
||||||
|
Top = 159
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 736
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 376
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 412
|
||||||
|
Top = 222
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 1160
|
||||||
|
Top = 209
|
||||||
|
end
|
||||||
|
end
|
||||||
630
基础资料维护(BaseInfo.dll)/U_CPKWHZ.pas
Normal file
630
基础资料维护(BaseInfo.dll)/U_CPKWHZ.pas
Normal file
|
|
@ -0,0 +1,630 @@
|
||||||
|
unit U_CPKWHZ;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
ComObj, 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, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, 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
|
||||||
|
FdDy = record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys: string[32]; //客户端套接字
|
||||||
|
FdDysName: string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
|
||||||
|
TfrmCPKWHZ = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
defstr1: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr3: TComboBox;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
defstr2: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
ToolButton7: TToolButton;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
Tv2Column1: TcxGridDBColumn;
|
||||||
|
Tv2Column2: TcxGridDBColumn;
|
||||||
|
Tv2Column3: TcxGridDBColumn;
|
||||||
|
Tv2Column4: TcxGridDBColumn;
|
||||||
|
ToolButton8: TToolButton;
|
||||||
|
GG: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
KH: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
CKLX: TComboBox;
|
||||||
|
Tv2Column5: TcxGridDBColumn;
|
||||||
|
Tv2Column6: TcxGridDBColumn;
|
||||||
|
Label8: TLabel;
|
||||||
|
DDH: TEdit;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
CheckBox2: TCheckBox;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
ToolButton9: TToolButton;
|
||||||
|
Tv2Column7: TcxGridDBColumn;
|
||||||
|
Tv2Column8: TcxGridDBColumn;
|
||||||
|
Label9: TLabel;
|
||||||
|
QRCZ: TComboBox;
|
||||||
|
ToolButton10: 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 ToolButton2Click(Sender: TObject);
|
||||||
|
procedure defstr1Change(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure ToolButton7Click(Sender: TObject);
|
||||||
|
procedure ToolButton8Click(Sender: TObject);
|
||||||
|
procedure ToolButton9Click(Sender: TObject);
|
||||||
|
procedure Tv2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure ToolButton10Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
public
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWHZ: TfrmCPKWHZ;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ZDYHelp, U_CPKWEdit, U_CPKWKCList, U_SysLogOrderzsd,U_CPKWList;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.add(' select A.DEFstr1,A.DEFstr2,isnull(A.ddh,'''')as DDH,DDqty=(select sum(Qty) from KH_Zdy_Attachment X where isnull(X.DDH,'''')=isnull(A.ddh,'''')) ');
|
||||||
|
SQL.Add(' from KH_Zdy_Attachment A where Type=''CPKW'' and sczt<>1 group by A.DEFstr1,A.DEFstr2,isnull(A.ddh,'''')');
|
||||||
|
// sql.Add(' select A.*, '); A.ZdyName,A.ZdyCode,
|
||||||
|
// sql.Add(' cpRollNum=(select count(MJID) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0),');
|
||||||
|
// sql.Add(' cpQty=(select sum(kcQty) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0 and mjid NOT like ''%C%'') ');
|
||||||
|
// sql.Add(' from KH_Zdy_Attachment A ');
|
||||||
|
// sql.Add(' where Type=''CPKW'' and sczt<>1');
|
||||||
|
// sql.Add('and A.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' ');
|
||||||
|
// sql.Add('and A.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
|
||||||
|
// ShowMessage(sql.text);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWHZ := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption, Tv2, '客户自定义1');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
if Trim(DParameters1) <> '高权限' then
|
||||||
|
begin
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set ZT=''删除'' ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set sczt=1,ZT=''删除'' '); //1是假删除,0是新增的
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
end;
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('库位删除')));
|
||||||
|
sql.Add(',' + quotedstr(trim('条码号:' + trim(CDS_HZ.FieldByName('ATID').AsString))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
// sql.Add('delete KH_Zdy_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
// sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
|
||||||
|
// if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||||
|
// begin
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
// sql.Add('delete KH_Zdy_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
// sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.Align := alclient;
|
||||||
|
ReadCxGrid(self.Caption, Tv2, '客户自定义1');
|
||||||
|
if Trim(DParameters1) <> '高权限' then
|
||||||
|
begin
|
||||||
|
ToolButton8.Visible := false;
|
||||||
|
// TBDel.Visible := false;
|
||||||
|
// ToolButton3.Visible := false;
|
||||||
|
// ToolButton4.Visible := false;
|
||||||
|
ToolButton9.Visible := False;
|
||||||
|
ToolButton10.Visible := False;
|
||||||
|
end;
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 1;
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.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 TfrmCPKWHZ.defstr1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'供应商资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit := TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
XZdyCode := Trim(Self.CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
Xqty := Trim(Self.CDS_HZ.fieldbyname('qty').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit := TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID := '';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// frmCPKWKCList := TfrmCPKWKCList.create(self);
|
||||||
|
// with frmCPKWKCList do
|
||||||
|
// begin
|
||||||
|
// fkeyNO := CDS_HZ.fieldbyname('zdyCode').AsString;
|
||||||
|
// showmodal;
|
||||||
|
// free;
|
||||||
|
// end;
|
||||||
|
frmCPKWList := TfrmCPKWList.create(self);
|
||||||
|
with frmCPKWList do
|
||||||
|
begin
|
||||||
|
fkeyNO := Self.CDS_HZ.fieldbyname('DDh').AsString;
|
||||||
|
showmodal;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton6Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select A.* ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A');
|
||||||
|
SQL.Add(' where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
SQL.Add(' and Type=''CPKW'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
Txt := Trim(ADOQueryPrint.fieldbyname('ATID').AsString);
|
||||||
|
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
|
||||||
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\成品库位标签.rmf';
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
RM1.PrintReport;
|
||||||
|
sleep(200);
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
Application.MessageBox(PChar('没有找' + trim(fPrintFile)), '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_HZ, checkbox1.Checked);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton7Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp, WorkBook: Variant;
|
||||||
|
i, j, k, ExcelRowCount: integer;
|
||||||
|
maxId: string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
excelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter := '*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
excelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!', '错误信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
k := 0;
|
||||||
|
for i := 1 to 20 do
|
||||||
|
begin
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '' then
|
||||||
|
break;
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '仓位编号' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc := i;
|
||||||
|
dFdDy[k].FDdys := 'ZdyCode';
|
||||||
|
dFdDy[k].FdDysName := '产品编号';
|
||||||
|
end;
|
||||||
|
k := k + 1;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
for i := 2 to ExcelRowCount do
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxId, 'KW', 'KH_Zdy_Attachment', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
for j := 0 to k - 1 do
|
||||||
|
begin
|
||||||
|
if trim(dFdDy[j].FDdys) <> '' then
|
||||||
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value := excelApp.Cells[i, dFdDy[j].inc].Value;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.FieldByName('ATID').Value := Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('ZdyName').Value := Trim(ADOQueryCmd.fieldbyname('ZdyCode').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('khType').Value:=Trim(fkhType);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value := 'CPKW';
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value := Trim(DName);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
excelApp.Quit;
|
||||||
|
excelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
InitGrid();
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
excelApp.Quit;
|
||||||
|
excelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton8Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set CKLX=''出库'' ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('出库成功!', '提示信息');
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('出库失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton9Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set QRCZ=''已审核'' ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
if Trim(CDS_HZ.fieldbyname('zt').AsString) = '删除' then //审核删除
|
||||||
|
begin
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set sczt=1 ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
end;
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('审核成功!', '提示信息');
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('审核失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.Tv2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
if AViewInfo.GridRecord.Values[tv2.GetColumnByFieldName('QRCZ').Index] = '未审核' then
|
||||||
|
ACanvas.Brush.Color := clRed;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWHZ.ToolButton10Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmSysLogOrderzsd := TfrmSysLogOrderzsd.create(self);
|
||||||
|
with frmSysLogOrderzsd do
|
||||||
|
begin
|
||||||
|
fModel := self.caption;
|
||||||
|
// frmSysLogOrderzsd.FMainId := Trim(Self.FMainId);
|
||||||
|
showmodal;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
194
基础资料维护(BaseInfo.dll)/U_CPKWKCList.dfm
Normal file
194
基础资料维护(BaseInfo.dll)/U_CPKWKCList.dfm
Normal file
|
|
@ -0,0 +1,194 @@
|
||||||
|
object frmCPKWKCList: TfrmCPKWKCList
|
||||||
|
Left = 728
|
||||||
|
Top = 352
|
||||||
|
Width = 990
|
||||||
|
Height = 529
|
||||||
|
Caption = #24211#23384#21015#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 974
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 974
|
||||||
|
Height = 334
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
Column = v1Column6
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column6
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1KCROllNum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 115
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1C_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #26465#30721
|
||||||
|
DataBinding.FieldName = 'MJID'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'BCgangNO'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'MJXH'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'CPType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#27491#21697
|
||||||
|
#19968#31561#27425#21697
|
||||||
|
#20108#31561#27425#21697)
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1KCROllNum: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KCROllNum'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'KCQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 101
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'kcQtyUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryMain
|
||||||
|
Left = 588
|
||||||
|
Top = 212
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 408
|
||||||
|
Top = 236
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 292
|
||||||
|
Top = 260
|
||||||
|
end
|
||||||
|
end
|
||||||
142
基础资料维护(BaseInfo.dll)/U_CPKWKCList.pas
Normal file
142
基础资料维护(BaseInfo.dll)/U_CPKWKCList.pas
Normal file
|
|
@ -0,0 +1,142 @@
|
||||||
|
unit U_CPKWKCList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxCheckBox, cxDropDownEdit,
|
||||||
|
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, ADODB, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator, 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
|
||||||
|
TfrmCPKWKCList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v1C_Color: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1KCROllNum: TcxGridDBColumn;
|
||||||
|
cxGrid2Level1: TcxGridLevel;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fkeyNo: string;
|
||||||
|
{public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWKCList: TfrmCPKWKCList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPKWKCList.InitGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
// sql.Add('select * from KH_Zdy_Attachment A where Type=''CPKW'' and zdyCode='+quotedstr(trim(fkeyNo)));
|
||||||
|
sql.Add('select A.C_Code,A.C_CodeName,A.C_Spec,A.C_Color,');
|
||||||
|
sql.Add('kcqty=(select sum(kcqty) from CK_BanCP_KC B where B.kckw=' + quotedstr(trim(fkeyNo)) + ' and B.mjid not like ''%C%'' and B.C_CodeName=A.C_CodeName and B.C_Color=A.C_Color),');
|
||||||
|
sql.Add('KCqtyunit=(select top 1 KCqtyunit from CK_BanCP_KC B where B.kckw=' + quotedstr(trim(fkeyNo)) + ' and B.mjid not like ''%C%'' and B.C_CodeName=A.C_CodeName and B.C_Color=A.C_Color)');
|
||||||
|
sql.Add('from CK_BanCP_KC A ');
|
||||||
|
sql.Add('where A.kckw=' + quotedstr(trim(fkeyNo)) + ' and A.mjid not like ''%C%''');
|
||||||
|
sql.Add(' GROUP BY A.C_CodeName,A.C_Color,A.C_Code,A.C_Spec');
|
||||||
|
// showmessage(sql.text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if ADOQueryTmp.FieldByName('defstr3').AsString = '¹Ì¶¨¼Ü' then
|
||||||
|
// begin
|
||||||
|
// with ADOQueryMain do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from CK_BanCP_KC X where KCKW=' + quotedstr(trim(ADOQueryTmp.fieldbyname('zdyCode').AsString)));
|
||||||
|
// sql.Add('and kcQty>0');
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// if ADOQueryTmp.FieldByName('defstr3').AsString = '´ò¶Ñ' then
|
||||||
|
// begin
|
||||||
|
// with ADOQueryMain do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from CK_BanCP_KC X where C_CodeName=' + quotedstr(trim(ADOQueryTmp.fieldbyname('defstr1').AsString)));
|
||||||
|
// sql.Add('and C_CodeName=' + quotedstr(trim(ADOQueryTmp.fieldbyname('defstr2').AsString)));
|
||||||
|
// sql.Add('and kcQty>0');
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWKCList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWKCList := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWKCList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWKCList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWKCList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.Align := alclient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWKCList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
765
基础资料维护(BaseInfo.dll)/U_CPKWList.dfm
Normal file
765
基础资料维护(BaseInfo.dll)/U_CPKWList.dfm
Normal file
|
|
@ -0,0 +1,765 @@
|
||||||
|
object frmCPKWList: TfrmCPKWList
|
||||||
|
Left = 395
|
||||||
|
Top = 341
|
||||||
|
Width = 1327
|
||||||
|
Height = 621
|
||||||
|
Caption = #20379#24212#21830#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1311
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475#26126#32454
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object ToolButton8: TToolButton
|
||||||
|
Left = 489
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20986#24211
|
||||||
|
ImageIndex = 7
|
||||||
|
OnClick = ToolButton8Click
|
||||||
|
end
|
||||||
|
object ToolButton11: TToolButton
|
||||||
|
Left = 552
|
||||||
|
Top = 0
|
||||||
|
Caption = #25764#38144#20986#24211
|
||||||
|
ImageIndex = 99
|
||||||
|
OnClick = ToolButton11Click
|
||||||
|
end
|
||||||
|
object ToolButton7: TToolButton
|
||||||
|
Left = 635
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25968#25454#23548#20837
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = ToolButton7Click
|
||||||
|
end
|
||||||
|
object ToolButton9: TToolButton
|
||||||
|
Left = 722
|
||||||
|
Top = 0
|
||||||
|
Caption = #23457#26680#25805#20316
|
||||||
|
ImageIndex = 16
|
||||||
|
OnClick = ToolButton9Click
|
||||||
|
end
|
||||||
|
object ToolButton10: TToolButton
|
||||||
|
Left = 805
|
||||||
|
Top = 0
|
||||||
|
Caption = #25805#20316#26085#24535
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton10Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 888
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 951
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1311
|
||||||
|
Height = 74
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 503
|
||||||
|
Top = 14
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 200
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 501
|
||||||
|
Top = 42
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 661
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 219
|
||||||
|
Top = 42
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 363
|
||||||
|
Top = 42
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #27454#21495
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 640
|
||||||
|
Top = 44
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 357
|
||||||
|
Top = 13
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 800
|
||||||
|
Top = 14
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23457#26680#31867#22411
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 800
|
||||||
|
Top = 46
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #24067#21305#31867#22411
|
||||||
|
end
|
||||||
|
object Label49: TLabel
|
||||||
|
Left = 953
|
||||||
|
Top = 23
|
||||||
|
Width = 84
|
||||||
|
Height = 20
|
||||||
|
Caption = #25968#37327#33539#22260
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -20
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label50: TLabel
|
||||||
|
Left = 1095
|
||||||
|
Top = 19
|
||||||
|
Width = 14
|
||||||
|
Height = 25
|
||||||
|
Caption = '-'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -25
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 530
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 249
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object DEFstr3: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 530
|
||||||
|
Top = 37
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550
|
||||||
|
#25171#22534)
|
||||||
|
end
|
||||||
|
object defstr2: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 691
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 1188
|
||||||
|
Top = 12
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #20840#36873
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
object GG: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 249
|
||||||
|
Top = 38
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object KH: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 393
|
||||||
|
Top = 38
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object CKLX: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 693
|
||||||
|
Top = 39
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 1
|
||||||
|
TabOrder = 7
|
||||||
|
Text = #22312#24211
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22312#24211
|
||||||
|
#20986#24211)
|
||||||
|
end
|
||||||
|
object DDH: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 394
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 84
|
||||||
|
Top = 37
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
object CheckBox2: TCheckBox
|
||||||
|
Left = 13
|
||||||
|
Top = 13
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #25805#20316#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 10
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 84
|
||||||
|
Top = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 11
|
||||||
|
end
|
||||||
|
object QRCZ: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 853
|
||||||
|
Top = 9
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 12
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680)
|
||||||
|
end
|
||||||
|
object BPLX: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 853
|
||||||
|
Top = 41
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 13
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#27425#21697
|
||||||
|
#30041#26679
|
||||||
|
#33337#26679
|
||||||
|
#23458#21462
|
||||||
|
#33258#21462
|
||||||
|
#21322#28418)
|
||||||
|
end
|
||||||
|
object MaxQty: TEdit
|
||||||
|
Left = 1109
|
||||||
|
Top = 17
|
||||||
|
Width = 57
|
||||||
|
Height = 28
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -20
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 14
|
||||||
|
end
|
||||||
|
object MinQty: TEdit
|
||||||
|
Left = 1038
|
||||||
|
Top = 17
|
||||||
|
Width = 57
|
||||||
|
Height = 28
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -20
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 15
|
||||||
|
OnChange = MinQtyChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 105
|
||||||
|
Width = 1311
|
||||||
|
Height = 263
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnCellClick = Tv2CellClick
|
||||||
|
OnCustomDrawCell = Tv2CustomDrawCell
|
||||||
|
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
|
||||||
|
Column = v2Column4
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column2
|
||||||
|
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_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 97
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'CPRollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 153
|
||||||
|
end
|
||||||
|
object Tv2Column1: TcxGridDBColumn
|
||||||
|
Caption = #24211#20301#31867#22411
|
||||||
|
DataBinding.FieldName = 'CKTYPE'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column2: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'GG'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column3: TcxGridDBColumn
|
||||||
|
Caption = #27454#21495
|
||||||
|
DataBinding.FieldName = 'KH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column4: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CKLX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv2Column5: TcxGridDBColumn
|
||||||
|
Caption = #24067#21305#31867#22411
|
||||||
|
DataBinding.FieldName = 'BPLX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column6: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'DDH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column7: TcxGridDBColumn
|
||||||
|
Caption = #29366#24577
|
||||||
|
DataBinding.FieldName = 'ZT'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column8: TcxGridDBColumn
|
||||||
|
Caption = #30830#35748#25805#20316
|
||||||
|
DataBinding.FieldName = 'QRCZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv2Column9: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#26102#38388
|
||||||
|
end
|
||||||
|
object Tv2Column10: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#22270#29255
|
||||||
|
DataBinding.FieldName = 'HXFile'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 368
|
||||||
|
Width = 1311
|
||||||
|
Height = 214
|
||||||
|
Align = alBottom
|
||||||
|
Caption = #20135#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||||
|
TabOrder = 3
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 2
|
||||||
|
Top = 14
|
||||||
|
Width = 1307
|
||||||
|
Height = 198
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvLowered
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 853
|
||||||
|
Top = 161
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1045
|
||||||
|
Top = 169
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 661
|
||||||
|
Top = 185
|
||||||
|
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 = 796
|
||||||
|
Top = 144
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 572
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 984
|
||||||
|
Top = 168
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 903
|
||||||
|
Top = 159
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 696
|
||||||
|
Top = 148
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 376
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 420
|
||||||
|
Top = 190
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 1160
|
||||||
|
Top = 209
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 536
|
||||||
|
Top = 156
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #20840#36873
|
||||||
|
OnClick = N1Click
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #20840#24323
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object adoqueryPicture: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 143
|
||||||
|
Top = 480
|
||||||
|
end
|
||||||
|
end
|
||||||
808
基础资料维护(BaseInfo.dll)/U_CPKWList.pas
Normal file
808
基础资料维护(BaseInfo.dll)/U_CPKWList.pas
Normal file
|
|
@ -0,0 +1,808 @@
|
||||||
|
unit U_CPKWList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,jpeg,U_SLT,
|
||||||
|
ComObj, 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, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, 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, Menus, cxContainer, cxImage,
|
||||||
|
cxDBEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
FdDy = record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys: string[32]; //客户端套接字
|
||||||
|
FdDysName: string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
|
||||||
|
TfrmCPKWList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
defstr1: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr3: TComboBox;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
defstr2: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
ToolButton7: TToolButton;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
Tv2Column1: TcxGridDBColumn;
|
||||||
|
Tv2Column2: TcxGridDBColumn;
|
||||||
|
Tv2Column3: TcxGridDBColumn;
|
||||||
|
Tv2Column4: TcxGridDBColumn;
|
||||||
|
ToolButton8: TToolButton;
|
||||||
|
GG: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
KH: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
CKLX: TComboBox;
|
||||||
|
Tv2Column5: TcxGridDBColumn;
|
||||||
|
Tv2Column6: TcxGridDBColumn;
|
||||||
|
Label8: TLabel;
|
||||||
|
DDH: TEdit;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
CheckBox2: TCheckBox;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
ToolButton9: TToolButton;
|
||||||
|
Tv2Column7: TcxGridDBColumn;
|
||||||
|
Tv2Column8: TcxGridDBColumn;
|
||||||
|
Label9: TLabel;
|
||||||
|
QRCZ: TComboBox;
|
||||||
|
ToolButton10: TToolButton;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
ToolButton11: TToolButton;
|
||||||
|
Label10: TLabel;
|
||||||
|
BPLX: TComboBox;
|
||||||
|
Tv2Column9: TcxGridDBColumn;
|
||||||
|
Label49: TLabel;
|
||||||
|
Label50: TLabel;
|
||||||
|
MaxQty: TEdit;
|
||||||
|
MinQty: TEdit;
|
||||||
|
Tv2Column10: TcxGridDBColumn;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
adoqueryPicture: TADOQuery;
|
||||||
|
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 defstr1Change(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure ToolButton7Click(Sender: TObject);
|
||||||
|
procedure ToolButton8Click(Sender: TObject);
|
||||||
|
procedure ToolButton9Click(Sender: TObject);
|
||||||
|
procedure Tv2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure ToolButton10Click(Sender: TObject);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure ToolButton11Click(Sender: TObject);
|
||||||
|
procedure MinQtyChange(Sender: TObject);
|
||||||
|
procedure ToolButton12Click(Sender: TObject);
|
||||||
|
procedure Tv2CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitImage();
|
||||||
|
public
|
||||||
|
fkeyNo: string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWList: TfrmCPKWList;
|
||||||
|
Mach: array of TfrmSlt;
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ZDYHelp, U_CPKWEdit, U_CPKWKCList, U_SysLogOrderzsd;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select A.*, ');
|
||||||
|
sql.Add(' cpRollNum=(select count(MJID) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0),');
|
||||||
|
sql.Add(' cpQty=(select sum(kcQty) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0 and mjid NOT like ''%C%'') ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add(' where Type=''CPKW'' and sczt<>1');
|
||||||
|
// sql.Add('and A.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' ');
|
||||||
|
// sql.Add('and A.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
|
||||||
|
if trim(fkeyNo) <> '' then
|
||||||
|
begin
|
||||||
|
sql.Add(' and DDH=''' + trim(fkeyNo) + ''' ');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
sql.Add('and A.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' ');
|
||||||
|
sql.Add('and A.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
|
||||||
|
end;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWList := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption, Tv2, '客户自定义1');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
if Trim(DParameters1) <> '高权限' then
|
||||||
|
begin
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set ZT=''删除'' ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set sczt=1,ZT=''删除'' '); //1是假删除,0是新增的
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
end;
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('库位删除')));
|
||||||
|
sql.Add(',' + quotedstr(trim('条码号:' + trim(CDS_HZ.FieldByName('ATID').AsString))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
// sql.Add('delete KH_Zdy_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
// sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
|
||||||
|
// if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||||
|
// begin
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
// sql.Add('delete KH_Zdy_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
// sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.Align := alclient;
|
||||||
|
ReadCxGrid(self.Caption, Tv2, '客户自定义1');
|
||||||
|
if Trim(DParameters1) <> '高权限' then
|
||||||
|
begin
|
||||||
|
ToolButton8.Visible := false;
|
||||||
|
// TBDel.Visible := false;
|
||||||
|
// ToolButton3.Visible := false;
|
||||||
|
// ToolButton4.Visible := false;
|
||||||
|
ToolButton9.Visible := False;
|
||||||
|
ToolButton10.Visible := False;
|
||||||
|
end;
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 1;
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.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 TfrmCPKWList.defstr1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'供应商资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit := TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
XZdyCode := Trim(Self.CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
Xqty := Trim(Self.CDS_HZ.fieldbyname('qty').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit := TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID := '';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWKCList := TfrmCPKWKCList.create(self);
|
||||||
|
with frmCPKWKCList do
|
||||||
|
begin
|
||||||
|
fkeyNO := CDS_HZ.fieldbyname('zdyCode').AsString;
|
||||||
|
showmodal;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton6Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select A.* ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A');
|
||||||
|
SQL.Add(' where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
SQL.Add(' and Type=''CPKW'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
Txt := Trim(ADOQueryPrint.fieldbyname('ATID').AsString);
|
||||||
|
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
|
||||||
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\成品库位标签.rmf';
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
RM1.PrintReport;
|
||||||
|
sleep(200);
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
Application.MessageBox(PChar('没有找' + trim(fPrintFile)), '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_HZ, checkbox1.Checked);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton7Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp, WorkBook: Variant;
|
||||||
|
i, j, k, ExcelRowCount: integer;
|
||||||
|
maxId: string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
excelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter := '*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
excelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!', '错误信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
k := 0;
|
||||||
|
for i := 1 to 20 do
|
||||||
|
begin
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '' then
|
||||||
|
break;
|
||||||
|
if trim(excelApp.Cells[1, i].value) = '仓位编号' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc := i;
|
||||||
|
dFdDy[k].FDdys := 'ZdyCode';
|
||||||
|
dFdDy[k].FdDysName := '产品编号';
|
||||||
|
end;
|
||||||
|
k := k + 1;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
for i := 2 to ExcelRowCount do
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxId, 'KW', 'KH_Zdy_Attachment', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
for j := 0 to k - 1 do
|
||||||
|
begin
|
||||||
|
if trim(dFdDy[j].FDdys) <> '' then
|
||||||
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value := excelApp.Cells[i, dFdDy[j].inc].Value;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.FieldByName('ATID').Value := Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('ZdyName').Value := Trim(ADOQueryCmd.fieldbyname('ZdyCode').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('khType').Value:=Trim(fkhType);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value := 'CPKW';
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value := Trim(DName);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
excelApp.Quit;
|
||||||
|
excelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
InitGrid();
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
excelApp.Quit;
|
||||||
|
excelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton8Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set CKLX=''出库'',CKSJ=Getdate() ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('出库成功!', '提示信息');
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('出库失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton9Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set QRCZ=''已审核'' ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
if Trim(CDS_HZ.fieldbyname('zt').AsString) = '删除' then //审核删除
|
||||||
|
begin
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set sczt=1 ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
end;
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('审核成功!', '提示信息');
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('审核失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.Tv2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
if AViewInfo.GridRecord.Values[tv2.GetColumnByFieldName('QRCZ').Index] = '未审核' then
|
||||||
|
ACanvas.Brush.Color := clRed;
|
||||||
|
// InitImage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.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 CDS_HZ.IsEmpty then
|
||||||
|
exit;
|
||||||
|
try
|
||||||
|
with adoqueryPicture do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select A.tfid,A.WBID,A.FilesOther,A.FileName from TP_File A where A.WBID=' + quotedstr(trim(CDS_HZ.fieldbyname('hxFile').AsString)));
|
||||||
|
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, jpg);
|
||||||
|
end;
|
||||||
|
adoqueryPicture.Next;
|
||||||
|
end;
|
||||||
|
adoqueryPicture.EnableControls;
|
||||||
|
finally
|
||||||
|
jpg.free;
|
||||||
|
application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton10Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmSysLogOrderzsd := TfrmSysLogOrderzsd.create(self);
|
||||||
|
with frmSysLogOrderzsd do
|
||||||
|
begin
|
||||||
|
fModel := self.caption;
|
||||||
|
// frmSysLogOrderzsd.FMainId := Trim(Self.FMainId);
|
||||||
|
showmodal;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.N1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNoFiler(Tv2, True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.N2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNoFiler(Tv2, False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton11Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update KH_Zdy_Attachment Set CKLX=''在库'',CKSJ=null ');
|
||||||
|
sql.Add('where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('撤销出库成功!', '提示信息');
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('撤销出库失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.MinQtyChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select A.*, ');
|
||||||
|
sql.Add(' cpRollNum=(select count(MJID) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0),');
|
||||||
|
sql.Add(' cpQty=(select sum(kcQty) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0 and mjid NOT like ''%C%'') ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add(' where Type=''CPKW'' and sczt<>1');
|
||||||
|
sql.Add('and A.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' ');
|
||||||
|
sql.Add('and A.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
|
||||||
|
|
||||||
|
if strtofloatdef(trim(MinQty.text), 0) > 0 then
|
||||||
|
begin
|
||||||
|
sql.Add('and A.qty>=''' + (trim(MinQty.text)) + ''' ');
|
||||||
|
end;
|
||||||
|
if strtofloatdef(trim(MaxQty.text), 0) > 0 then
|
||||||
|
begin
|
||||||
|
sql.Add('and A.qty<=''' + (trim(MaxQty.text)) + ''' ');
|
||||||
|
end;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton12Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitImage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.Tv2CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
InitImage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
535
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.dfm
Normal file
535
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.dfm
Normal file
|
|
@ -0,0 +1,535 @@
|
||||||
|
object frmClothContractList_CG_help: TfrmClothContractList_CG_help
|
||||||
|
Left = 133
|
||||||
|
Top = 0
|
||||||
|
Width = 1217
|
||||||
|
Height = 738
|
||||||
|
Caption = #22383#24067#37319#36141#35745#21010#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 = 1201
|
||||||
|
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_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1201
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 267
|
||||||
|
Top = 22
|
||||||
|
Width = 78
|
||||||
|
Height = 12
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 592
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 720
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 349
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeNameM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 493
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 624
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 756
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTQty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #20379#26041
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MFQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object v1PRTUnit: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Caption = #24635#20215
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#22320#22336
|
||||||
|
DataBinding.FieldName = 'QDPalce'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.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 = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
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 = 352
|
||||||
|
Top = 192
|
||||||
|
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 = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
end
|
||||||
576
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.pas
Normal file
576
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.pas
Normal file
|
|
@ -0,0 +1,576 @@
|
||||||
|
unit U_ClothContractList_CG_help;
|
||||||
|
|
||||||
|
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, cxCalendar, cxButtonEdit, cxSplitter,
|
||||||
|
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
|
||||||
|
cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractList_CG_help = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNoM: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeNameM: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PRTUnit: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoMChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
FInt,PFInt:Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractList_CG_help: TfrmClothContractList_CG_help;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_ClothContractInPut_CG,U_Fun,U_ProductOrderList,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractList_CG_help:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= '''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''' ');
|
||||||
|
sql.Add('and A.FillTime< '''+Trim(FormatDateTime('yyyy-MM-dd',endDate.DateTime+1))+''' ');
|
||||||
|
sql.Add('and A.conType=''坯布采购计划'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.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 TfrmClothContractList_CG_help.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
with frmClothContractInPut_CG do
|
||||||
|
begin
|
||||||
|
PState:=1;
|
||||||
|
FMainId:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_CG.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已到坯,不能删除坯布合同!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString)='CM001' then exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractList_CG_help.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID='''+Trim(Order_Main.fieldbyname('MainID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString)='' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\坯布订购合同.rmf' ;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||||
|
+' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''';
|
||||||
|
Parameters.ParamByName('MainId').Value:=Trim(Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
Parameters.ParamByName('WSql').Value:='';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||||
|
FConNoM:=Trim(CDS_PRT.fieldbyname('ConNoM').AsString);
|
||||||
|
//SDofilter(ADOQueryMain,' ConNoM='''+Trim(Order_Main.fieldbyname('ConNoM').AsString)+'''');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\坯布订购合同.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
//SDofilter(ADOQueryMain,'');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
//Order_Main.Locate('ConNoM',FConNoM,[]);
|
||||||
|
//SelPrintData(TV4,ADOQueryMain,'合同查询报表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
with frmClothContractInPut_CG do
|
||||||
|
begin
|
||||||
|
PState:=0;
|
||||||
|
FMainId:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_CG.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ConNoMChange(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 TfrmClothContractList_CG_help.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv2MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'To','Contract_Sub_MxTo',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value:=Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value:=Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value:=ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value:=ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value:=ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString)<>'' then
|
||||||
|
FieldByName('TPQty').Value:=ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString)<>'' then
|
||||||
|
FieldByName('Qty1').Value:=ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString)<>'' then
|
||||||
|
FieldByName('Qty2').Value:=ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString)<>'' then
|
||||||
|
FieldByName('Qty3').Value:=ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value:=0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!','提示',0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if ClientDataSet3.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end else
|
||||||
|
if FInt=3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty=False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.v2Column3PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='RKPlace';
|
||||||
|
flagname:='入库地点';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.conPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
IF Order_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
17974
基础资料维护(BaseInfo.dll)/U_DataLink.dfm
Normal file
17974
基础资料维护(BaseInfo.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
87
基础资料维护(BaseInfo.dll)/U_DataLink.pas
Normal file
87
基础资料维护(BaseInfo.dll)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
unit U_DataLink;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||||
|
Windows,Messages,forms,OleCtnrs,DateUtils, 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;
|
||||||
|
var
|
||||||
|
DConString:String; {全局连接字符串}
|
||||||
|
server, dtbase, user, pswd: String; {数据库连接参数}
|
||||||
|
DCurHandle:hwnd; //当前窗体句柄
|
||||||
|
DName:string ; //#用户名#//
|
||||||
|
DCode:string ; //#用户编号#//
|
||||||
|
Ddatabase:string; //#数据库名称#//
|
||||||
|
DTitCaption:string; //#主窗体名称#//
|
||||||
|
PicSvr: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; //公司
|
||||||
|
UserDataFlag:string;
|
||||||
|
type
|
||||||
|
TDataLink_BaseInfo = 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;
|
||||||
|
procedure DataModuleDestroy(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_BaseInfo: TDataLink_BaseInfo;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
procedure TDataLink_BaseInfo.DataModuleDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DataLink_BaseInfo:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
386
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
386
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,386 @@
|
||||||
|
|
||||||
|
unit U_GetDllForm;
|
||||||
|
interface
|
||||||
|
uses
|
||||||
|
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB,IniFiles, dxcore,activeX;
|
||||||
|
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_KHInfo,U_ZdyAttachment,U_ZdyAttachGYS,U_ZdyAttachCP,U_CPKWlist,U_CPKWHZ,
|
||||||
|
U_ZdyAttachCP10,U_ZdyAttachCP20,U_ZdyAttachCP_HX,U_ZdyAttachCP_ImageList,U_ZdyAttachCP30,U_ZdyAttachCP_ImageList10;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// 功能说明:取Dll中得窗体 //
|
||||||
|
// 参数说明:App>>调用应用程序; //
|
||||||
|
// FormH>>调用窗口句柄 ; //
|
||||||
|
// FormID>>窗口号; //
|
||||||
|
// Language>>语言种类; //
|
||||||
|
// WinStyle>>窗口类型; //
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
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
|
||||||
|
mnewHandle: hwnd;
|
||||||
|
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||||||
|
mstate: TWindowState;
|
||||||
|
mborderstyle: TFormBorderStyle;
|
||||||
|
begin
|
||||||
|
mNewHandle:=0;
|
||||||
|
DName:=GName;
|
||||||
|
DCode:=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);
|
||||||
|
|
||||||
|
server:='101.132.143.144,7781';
|
||||||
|
// dtbase:='123';
|
||||||
|
dtbase:='lanshanjydata';
|
||||||
|
user:='rtsa';
|
||||||
|
pswd:='rightsoft@5740';
|
||||||
|
DConString := 'Provider=SQLOLEDB.1;Password='+pswd+';Persist Security Info=True;User ID='
|
||||||
|
+user+';Initial Catalog='+dtbase+';Data Source='+server;
|
||||||
|
IF trim(DataBaseStr)<>''then
|
||||||
|
DConString := DataBaseStr;
|
||||||
|
|
||||||
|
// DParameters1:='高权限';
|
||||||
|
// DParameters1:='1';
|
||||||
|
// DataBase:='加工厂';
|
||||||
|
// DataBase:='';
|
||||||
|
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
|
||||||
|
1: //客户资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachment=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachment:= TfrmZdyAttachment.Create(application.MainForm);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
fkhType:=trim(DataBase);
|
||||||
|
canshu1:=trim(DParameters1);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachment.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachment.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
2: //供应商资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachGYS=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachGYS:= TfrmZdyAttachGYS.Create(application.MainForm);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
// fDEFstr5:=trim('');
|
||||||
|
fDEFstr5:=trim(DataBase);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachGYS.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachGYS.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
3: //产品资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP:= TfrmZdyAttachCP.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
// fkhType:='';
|
||||||
|
fkhType:=trim(DataBase);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
31: //产品资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP10=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP10:= TfrmZdyAttachCP10.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP10 do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP10.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP10.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
32: //产品目录
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP20=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP20:= TfrmZdyAttachCP20.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP20 do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP20.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP20.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
33: //产品目录
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP30=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP30:= TfrmZdyAttachCP30.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP30 do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP30.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP30.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
|
||||||
|
6: //库位信息
|
||||||
|
begin
|
||||||
|
if frmCPKWList=nil then
|
||||||
|
begin
|
||||||
|
frmCPKWList:= TfrmCPKWList.Create(application.MainForm);
|
||||||
|
with frmCPKWList do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPKWList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmCPKWList.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
61: //库位信息汇总
|
||||||
|
begin
|
||||||
|
if frmCPKWHZ=nil then
|
||||||
|
begin
|
||||||
|
frmCPKWHZ:= TfrmCPKWHZ.Create(application.MainForm);
|
||||||
|
with frmCPKWHZ do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPKWHZ.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmCPKWHZ.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
7: //库位信息
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP_HX=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP_HX:= TfrmZdyAttachCP_HX.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP_HX do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP_HX.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP_HX.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
|
||||||
|
10: //库位信息
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP_ImageList=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP_ImageList:= TfrmZdyAttachCP_ImageList.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP_ImageList do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP_ImageList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP_ImageList.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
|
||||||
|
11: //库位信息
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP_ImageList10=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP_ImageList10:= TfrmZdyAttachCP_ImageList10.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP_ImageList10 do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP_ImageList10.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP_ImageList10.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
end ; // end case
|
||||||
|
|
||||||
|
Result:= mnewHandle;
|
||||||
|
// NewDllApp:=Application ;
|
||||||
|
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_BaseInfo) then
|
||||||
|
DataLink_BaseInfo:=TDataLink_BaseInfo.Create(Application);
|
||||||
|
Try
|
||||||
|
with DataLink_BaseInfo.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_BaseInfo.Free;
|
||||||
|
application:=NewDllApp;
|
||||||
|
dxUnitsLoader.Finalize;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
304
基础资料维护(BaseInfo.dll)/U_HTListSel.dfm
Normal file
304
基础资料维护(BaseInfo.dll)/U_HTListSel.dfm
Normal file
|
|
@ -0,0 +1,304 @@
|
||||||
|
object frmHTListSel: TfrmHTListSel
|
||||||
|
Left = 177
|
||||||
|
Top = 75
|
||||||
|
Width = 1094
|
||||||
|
Height = 600
|
||||||
|
Caption = #21512#21516#36873#25321
|
||||||
|
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 = 1078
|
||||||
|
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_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Caption = #36873#25321
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 59
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1078
|
||||||
|
Height = 54
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 35
|
||||||
|
Top = 22
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21512#21516#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object OrderNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 149
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnKeyPress = OrderNoMKeyPress
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 4
|
||||||
|
Top = 100
|
||||||
|
Width = 1065
|
||||||
|
Height = 369
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnDblClick = Tv1DblClick
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 44
|
||||||
|
end
|
||||||
|
object v1ConNo: TcxGridDBColumn
|
||||||
|
Caption = #21512#21516#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1KHConNO: TcxGridDBColumn
|
||||||
|
Caption = 'PO#'
|
||||||
|
DataBinding.FieldName = 'KHConNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1OrdDefStr1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'PRTCode'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1MPRTCodeName: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'PRTCodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1MPRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'PRTSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1MPRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'PRTMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1MPRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'PRTKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1PRTColor: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'PRTColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'PRTOrderQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'OrderUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 544
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 552
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 312
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 440
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 464
|
||||||
|
Top = 208
|
||||||
|
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 = 336
|
||||||
|
Top = 200
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Print
|
||||||
|
Left = 392
|
||||||
|
Top = 200
|
||||||
|
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 = 576
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 360
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object CDS_Print: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 344
|
||||||
|
Top = 288
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 328
|
||||||
|
Top = 232
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #20840#36873
|
||||||
|
OnClick = N1Click
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #20840#24323
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
173
基础资料维护(BaseInfo.dll)/U_HTListSel.pas
Normal file
173
基础资料维护(BaseInfo.dll)/U_HTListSel.pas
Normal file
|
|
@ -0,0 +1,173 @@
|
||||||
|
unit U_HTListSel;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmHTListSel = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
OrderNoM: TEdit;
|
||||||
|
v1ConNo: TcxGridDBColumn;
|
||||||
|
v1PRTColor: TcxGridDBColumn;
|
||||||
|
v1MPRTSpec: TcxGridDBColumn;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1MPRTCodeName: TcxGridDBColumn;
|
||||||
|
v1MPRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1MPRTKZ: TcxGridDBColumn;
|
||||||
|
v1OrdDefStr1: TcxGridDBColumn;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
CDS_Print: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1KHConNO: TcxGridDBColumn;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure OrderNoMKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure Tv1DblClick(Sender: TObject);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
DQdate:TDateTime;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FFInt,FCloth:Integer;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmHTListSel: TfrmHTListSel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_OrderInPut,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmHTListSel:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxgrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'生产指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.InitGrid();
|
||||||
|
begin
|
||||||
|
if Length(Trim(OrderNoM.Text))<3 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select B.*,A.* ');
|
||||||
|
sql.add('from JYOrdercon_sub A');
|
||||||
|
sql.Add('inner join JYOrdercon_Main B on B.mainID=A.mainID ');
|
||||||
|
SQL.Add('where B.conNo like '''+'%'+Trim(OrderNoM.Text)+'%'+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'生产指示单管理');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
if FFInt=1 then
|
||||||
|
begin
|
||||||
|
v1Column4.Visible:=False;
|
||||||
|
v1Column4.Hidden:=True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF Order_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.OrderNoMKeyPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.Tv1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton3.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.N1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(Order_Main,True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHTListSel.N2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(Order_Main,false);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
804
基础资料维护(BaseInfo.dll)/U_HZViewList.dfm
Normal file
804
基础资料维护(BaseInfo.dll)/U_HZViewList.dfm
Normal file
|
|
@ -0,0 +1,804 @@
|
||||||
|
object frmHZViewList: TfrmHZViewList
|
||||||
|
Left = 49
|
||||||
|
Top = 51
|
||||||
|
Width = 1024
|
||||||
|
Height = 706
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1008
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 437
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1008
|
||||||
|
Height = 636
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvSpace
|
||||||
|
BevelKind = bkFlat
|
||||||
|
TabOrder = 1
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1000
|
||||||
|
Height = 48
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #36710#38388
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 21
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 171
|
||||||
|
Top = 22
|
||||||
|
Width = 12
|
||||||
|
Height = 12
|
||||||
|
Caption = '--'
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 184
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Chejian: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 328
|
||||||
|
Top = 16
|
||||||
|
Width = 137
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ChejianChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 48
|
||||||
|
Width = 1000
|
||||||
|
Height = 260
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 1
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 353
|
||||||
|
Height = 256
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DS_NH
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column4
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #33021#32791#32479#35745
|
||||||
|
Width = 338
|
||||||
|
end>
|
||||||
|
object v1Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'Chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'NHMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 96
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 355
|
||||||
|
Top = 2
|
||||||
|
Width = 345
|
||||||
|
Height = 256
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DS_JWL
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn2
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #26426#29289#26009#29992#37327#32479#35745
|
||||||
|
Width = 334
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn1: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn2: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'JWLMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn3: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #21407#26009#21697#21517
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 47
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid3: TcxGrid
|
||||||
|
Left = 700
|
||||||
|
Top = 2
|
||||||
|
Width = 298
|
||||||
|
Height = 256
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv3: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DS_RHL
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn6
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn5
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #26579#21270#26009#29992#37327#32479#35745
|
||||||
|
Width = 323
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn4: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn5: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'RHLMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn6: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v3Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #21407#26009#21697#21517
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
Width = 66
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v3Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 44
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel3: TcxGridLevel
|
||||||
|
GridView = Tv3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 308
|
||||||
|
Width = 1000
|
||||||
|
Height = 320
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid4: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 353
|
||||||
|
Height = 316
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv4: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DS_PB
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn9
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #22383#24067#29992#37327#32479#35745
|
||||||
|
Width = 338
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn8: TcxGridDBBandedColumn
|
||||||
|
Caption = #22383#24067#21517#31216
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn9: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 98
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'GYSName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 54
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 40
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel4: TcxGridLevel
|
||||||
|
GridView = Tv4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid5: TcxGrid
|
||||||
|
Left = 355
|
||||||
|
Top = 2
|
||||||
|
Width = 643
|
||||||
|
Height = 316
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv5: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DS_CP
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn12
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v5Column1
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #25104#21697#29983#20135#32479#35745
|
||||||
|
Width = 673
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn11: TcxGridDBBandedColumn
|
||||||
|
Caption = #25104#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'PCode'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn12: TcxGridDBBandedColumn
|
||||||
|
Caption = #29983#20135#25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 8
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'PSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 53
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'PCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 5
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 57
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column4: TcxGridDBBandedColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'KHName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column5: TcxGridDBBandedColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 6
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column6: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'JSL'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 54
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 7
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column7: TcxGridDBBandedColumn
|
||||||
|
Caption = #31867#21035
|
||||||
|
DataBinding.FieldName = 'MJType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v5Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'CPMoney'
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 10
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v5Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'LenUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 47
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 9
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel5: TcxGridLevel
|
||||||
|
GridView = Tv5
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 557
|
||||||
|
Top = 217
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 581
|
||||||
|
Top = 217
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 157
|
||||||
|
Top = 273
|
||||||
|
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 = 480
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
|
object DS_NH: TDataSource
|
||||||
|
DataSet = CDS_NH
|
||||||
|
Left = 187
|
||||||
|
Top = 227
|
||||||
|
end
|
||||||
|
object CDS_NH: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 248
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object CDS_JWL: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 448
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
|
object DS_JWL: TDataSource
|
||||||
|
DataSet = CDS_JWL
|
||||||
|
Left = 419
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object DS_RHL: TDataSource
|
||||||
|
DataSet = CDS_RHL
|
||||||
|
Left = 819
|
||||||
|
Top = 267
|
||||||
|
end
|
||||||
|
object CDS_RHL: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 848
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 880
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_PB: TDataSource
|
||||||
|
DataSet = CDS_PB
|
||||||
|
Left = 163
|
||||||
|
Top = 531
|
||||||
|
end
|
||||||
|
object CDS_PB: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 192
|
||||||
|
Top = 528
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu4: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 224
|
||||||
|
Top = 528
|
||||||
|
end
|
||||||
|
object DS_CP: TDataSource
|
||||||
|
DataSet = CDS_CP
|
||||||
|
Left = 611
|
||||||
|
Top = 547
|
||||||
|
end
|
||||||
|
object CDS_CP: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 640
|
||||||
|
Top = 544
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu5: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 672
|
||||||
|
Top = 544
|
||||||
|
end
|
||||||
|
object dxComponentPrinter1: TdxComponentPrinter
|
||||||
|
CurrentLink = dxComponentPrinter1Link1
|
||||||
|
Version = 0
|
||||||
|
Left = 472
|
||||||
|
Top = 281
|
||||||
|
object dxComponentPrinter1Link1: TdxCustomContainerReportLink
|
||||||
|
Active = True
|
||||||
|
Component = ScrollBox1
|
||||||
|
PrinterPage.DMPaper = 9
|
||||||
|
PrinterPage.Footer = 6350
|
||||||
|
PrinterPage.GrayShading = True
|
||||||
|
PrinterPage.Header = 6350
|
||||||
|
PrinterPage.Margins.Bottom = 12700
|
||||||
|
PrinterPage.Margins.Left = 12700
|
||||||
|
PrinterPage.Margins.Right = 12700
|
||||||
|
PrinterPage.Margins.Top = 12700
|
||||||
|
PrinterPage.Orientation = poLandscape
|
||||||
|
PrinterPage.PageSize.X = 210000
|
||||||
|
PrinterPage.PageSize.Y = 297000
|
||||||
|
PrinterPage._dxMeasurementUnits_ = 0
|
||||||
|
PrinterPage._dxLastMU_ = 2
|
||||||
|
ReportDocument.CreationDate = 41590.612820057870000000
|
||||||
|
ReportTitle.Text = #20135#20540#27719#24635#34920
|
||||||
|
BuiltInReportLink = True
|
||||||
|
HiddenComponents = {}
|
||||||
|
ExcludedComponents = {}
|
||||||
|
AggregatedReportLinks = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object dxfQuickTyper1: TdxfQuickTyper
|
||||||
|
WinControl = Owner
|
||||||
|
QuickTyperControls = <>
|
||||||
|
MessageBeep = False
|
||||||
|
Left = 264
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
end
|
||||||
319
基础资料维护(BaseInfo.dll)/U_HZViewList.pas
Normal file
319
基础资料维护(BaseInfo.dll)/U_HZViewList.pas
Normal file
|
|
@ -0,0 +1,319 @@
|
||||||
|
unit U_HZViewList;
|
||||||
|
|
||||||
|
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, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||||
|
dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev,
|
||||||
|
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, dxPSCore,
|
||||||
|
dxfQuickTyp, dxPScxCommon, dxPScxGridLnk, dxPSContainerLnk;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmHZViewList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_NH: TDataSource;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
CDS_NH: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
CDS_JWL: TClientDataSet;
|
||||||
|
DS_JWL: TDataSource;
|
||||||
|
DS_RHL: TDataSource;
|
||||||
|
CDS_RHL: TClientDataSet;
|
||||||
|
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||||
|
DS_PB: TDataSource;
|
||||||
|
CDS_PB: TClientDataSet;
|
||||||
|
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||||
|
DS_CP: TDataSource;
|
||||||
|
CDS_CP: TClientDataSet;
|
||||||
|
cxGridPopupMenu5: TcxGridPopupMenu;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
dxComponentPrinter1: TdxComponentPrinter;
|
||||||
|
dxfQuickTyper1: TdxfQuickTyper;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Chejian: TComboBox;
|
||||||
|
Panel2: TPanel;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv1: TcxGridDBBandedTableView;
|
||||||
|
v1Column1: TcxGridDBBandedColumn;
|
||||||
|
v1Column2: TcxGridDBBandedColumn;
|
||||||
|
v1Column3: TcxGridDBBandedColumn;
|
||||||
|
v1Column4: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv2: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn1: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn2: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn3: TcxGridDBBandedColumn;
|
||||||
|
v2Column1: TcxGridDBBandedColumn;
|
||||||
|
v2Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
cxGrid3: TcxGrid;
|
||||||
|
Tv3: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn4: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn5: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn6: TcxGridDBBandedColumn;
|
||||||
|
v3Column1: TcxGridDBBandedColumn;
|
||||||
|
v3Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel3: TcxGridLevel;
|
||||||
|
Panel3: TPanel;
|
||||||
|
cxGrid4: TcxGrid;
|
||||||
|
Tv4: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn8: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn9: TcxGridDBBandedColumn;
|
||||||
|
v4Column1: TcxGridDBBandedColumn;
|
||||||
|
v4Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel4: TcxGridLevel;
|
||||||
|
cxGrid5: TcxGrid;
|
||||||
|
Tv5: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn11: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn12: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column1: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column2: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column3: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column4: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column5: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column6: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column7: TcxGridDBBandedColumn;
|
||||||
|
v5Column1: TcxGridDBBandedColumn;
|
||||||
|
v5Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel5: TcxGridLevel;
|
||||||
|
dxComponentPrinter1Link1: TdxCustomContainerReportLink;
|
||||||
|
v4Column3: TcxGridDBBandedColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure NHBiaoNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ChejianChange(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmHZViewList: TfrmHZViewList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_NengHaoInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(Qty) Qty,sum(Qty*Price) NHMoney,CheJian, NHType from NengHao ');
|
||||||
|
sql.Add(' where NHDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and NHDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add('Group by CheJian ,NHType');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_NH);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_NH);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(CRQty*YCLPrice) JWLMoney,ZdyStr1 chejian,YCLName,CRUnit from CK_YCL_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' and CKName=''机物料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by ZdyStr1,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_JWL);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_JWL);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(CRQty*YCLPrice) RHLMoney,ZdyStr1 chejian,YCLName,CRUnit from CK_YCL_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' and CKName=''染化料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by ZdyStr1,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_RHL);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_RHL);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(PS) PS,YCLName,CRUnit,GYSName from CK_PB_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
//sql.Add(' and CKName=''染化料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by GYSName,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_PB);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_PB);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select sum(AA.Qty) Qty ,sum(AA.KgQty) KgQty,sum(AA.KgQtyP) KgQtyP,Count(*) JSL,LenUnit,PCode,ColorNo,MJDate,KHName,CKNO,OrderNo ');
|
||||||
|
sql.Add(',PSpec,PCF,PHuaNo,PColorNo ,MJFK,MJSJKZ,MJType,CPMoney=Sum(CPMoney)');
|
||||||
|
SQL.Add(' from(select A.Qty ,A.KgQty ,A.KgQtyP,A.CKNO,D.LenUnit,D.PCode,D.ColorNo,D.OrderNo,CPMoney=Qty*A.Price,');
|
||||||
|
sql.Add('MJDate=convert(varchar(10),A.CRTime,120),A.KHName');
|
||||||
|
sql.Add(',D.PSpec,D.PCF,D.PHuaNo,D.PColorNo,D.MJFK,D.MJSJKZ,D.MJType,D.BatchNo');
|
||||||
|
sql.add('from CK_BanCP_CR A ');
|
||||||
|
Sql.add(' inner join XH_MJJY D on A.MJId=D.MJId');
|
||||||
|
sql.add('where A.CRTime>=:begdate and A.CRTime<:enddate');
|
||||||
|
SQL.Add(' and CRType=''正常出库'' ) AA');
|
||||||
|
sql.Add(' Group by LenUnit,PCode,ColorNo,MJDate,KHName,CKNO,OrderNo,PSpec,PCF,PHuaNo,PColorNo ,MJFK,MJSJKZ,MJType,BatchNo');
|
||||||
|
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime));
|
||||||
|
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1));
|
||||||
|
Open;
|
||||||
|
//ShowMessage(SQL.Text);
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_CP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_CP);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmHZViewList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxBandedGrid('HZ查询1',Tv1,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询2',Tv2,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询3',Tv3,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询4',Tv4,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询5',Tv5,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmHZViewList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//ReadCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询1',Tv1,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询2',Tv2,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询3',Tv3,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询4',Tv4,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询5',Tv5,'客户自定义');
|
||||||
|
//InitGrid();
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Code=ZdyNo,Name=ZdyName from KH_Zdy where Type=''chejian'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
Chejian.Items.Clear;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
Chejian.Items.Add(Trim(ADOQueryTemp.fieldbyname('Name').AsString));
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Chejian.Items.Add('');
|
||||||
|
BegDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||||
|
EndDate.Date:=BegDate.Date;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.NHBiaoNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'能耗列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ChejianChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_NH.Active=True then
|
||||||
|
SDofilter10(CDS_NH,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_JWL.Active=True then
|
||||||
|
SDofilter10(CDS_JWL,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_RHL.Active=True then
|
||||||
|
SDofilter10(CDS_RHL,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_NH.Active=True then
|
||||||
|
SDofilter10(CDS_NH,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_JWL.Active=True then
|
||||||
|
SDofilter10(CDS_JWL,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_RHL.Active=True then
|
||||||
|
SDofilter10(CDS_RHL,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
dxComponentPrinter1.Preview(False,nil);
|
||||||
|
dxComponentPrinter1.ReportLink[0].Preview;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
262
基础资料维护(BaseInfo.dll)/U_KHAdd.dfm
Normal file
262
基础资料维护(BaseInfo.dll)/U_KHAdd.dfm
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
object frmKHAdd: TfrmKHAdd
|
||||||
|
Left = 93
|
||||||
|
Top = 232
|
||||||
|
Width = 1130
|
||||||
|
Height = 388
|
||||||
|
Caption = #23458#25143#36164#26009#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1122
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGLWT.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGLWT.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 111
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1122
|
||||||
|
Height = 320
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_BJ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
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.Header = DataLink_YPGLWT.Default
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #24402#23646#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'MainType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#21517#31216'('#20013#25991')'
|
||||||
|
DataBinding.FieldName = 'DEFstr9'
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column5PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#26469#28304
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20027#33829#24066#22330
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column12PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #20027#33829#20135#21697
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column13PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21306#22495
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column15PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#24773#20917
|
||||||
|
DataBinding.FieldName = 'DEFstr10'
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #20854#20182#20449#24687
|
||||||
|
DataBinding.FieldName = 'DEFNote3'
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DS_BJ: TDataSource
|
||||||
|
DataSet = CDS_SQ
|
||||||
|
Left = 435
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object CDS_SQ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 392
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 261
|
||||||
|
Top = 169
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 317
|
||||||
|
Top = 121
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 117
|
||||||
|
end
|
||||||
|
end
|
||||||
303
基础资料维护(BaseInfo.dll)/U_KHAdd.pas
Normal file
303
基础资料维护(BaseInfo.dll)/U_KHAdd.pas
Normal file
|
|
@ -0,0 +1,303 @@
|
||||||
|
unit U_KHAdd;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, BtnEdit, ComCtrls, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ToolWin,
|
||||||
|
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, cxCalendar, DBClient,
|
||||||
|
ADODB, cxButtonEdit, cxDropDownEdit, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHAdd = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
DS_BJ: TDataSource;
|
||||||
|
CDS_SQ: TClientDataSet;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column17: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure v2Column5PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column12PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column13PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column15PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
FCYID,FYSID,FPrice:String;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHAdd: TfrmKHAdd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHAdd:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
FBZType,fsj:string;
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户Add',Tv2,'基础数据');
|
||||||
|
fsj:='select UserId code,UserName Name from SY_User where UserId not in(''Admin'',''Test'')';
|
||||||
|
SInitCxGridComboBoxBySql(ADOQueryTemp,v2Column14,fsj,1,False,'');
|
||||||
|
fsj:='select UserId code,UserName Name from SY_User where UserId not in(''Admin'',''Test'')';
|
||||||
|
SInitCxGridComboBoxBySql(ADOQueryTemp,v2Column10,fsj,1,False,'');
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FYSID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_SQ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_SQ);
|
||||||
|
if CDS_SQ.IsEmpty then
|
||||||
|
begin
|
||||||
|
with CDS_SQ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('客户Add',Tv2,'基础数据');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.ToolButton6Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:String;
|
||||||
|
begin
|
||||||
|
if Trim(CDS_SQ.fieldbyname('ZdyCode').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('客户编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FYSID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取客户最大ID失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(FYSID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(maxno)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FYSID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxno);
|
||||||
|
FieldByName('Type').Value:='KHName';
|
||||||
|
FieldByName('ZdyName').Value:=CDS_SQ.fieldbyname('ZdyName').Value;
|
||||||
|
FieldByName('MainType').Value:=CDS_SQ.fieldbyname('MainType').Value;
|
||||||
|
FieldByName('ZdyCode').Value:=CDS_SQ.fieldbyname('ZdyCode').Value;
|
||||||
|
FieldByName('DEFstr1').Value:=CDS_SQ.fieldbyname('DEFstr1').Value;
|
||||||
|
FieldByName('DEFstr2').Value:=CDS_SQ.fieldbyname('DEFstr2').Value;
|
||||||
|
FieldByName('DEFstr3').Value:=CDS_SQ.fieldbyname('DEFstr3').Value;
|
||||||
|
FieldByName('DEFstr4').Value:=CDS_SQ.fieldbyname('DEFstr4').Value;
|
||||||
|
FieldByName('DEFstr5').Value:=CDS_SQ.fieldbyname('DEFstr5').Value;
|
||||||
|
FieldByName('DEFstr6').Value:=CDS_SQ.fieldbyname('DEFstr6').Value;
|
||||||
|
FieldByName('DEFstr7').Value:=CDS_SQ.fieldbyname('DEFstr7').Value;
|
||||||
|
FieldByName('DEFstr8').Value:=CDS_SQ.fieldbyname('DEFstr8').Value;
|
||||||
|
FieldByName('DEFstr9').Value:=CDS_SQ.fieldbyname('DEFstr9').Value;
|
||||||
|
FieldByName('DEFstr10').Value:=CDS_SQ.fieldbyname('DEFstr10').Value;
|
||||||
|
FieldByName('DEFNote1').Value:=CDS_SQ.fieldbyname('DEFNote1').Value;
|
||||||
|
FieldByName('DEFNote2').Value:=CDS_SQ.fieldbyname('DEFNote2').Value;
|
||||||
|
FieldByName('DEFNote3').Value:=CDS_SQ.fieldbyname('DEFNote3').Value;
|
||||||
|
FieldByName('DEFNote4').Value:=CDS_SQ.fieldbyname('DEFNote4').Value;
|
||||||
|
FieldByName('DEFNote5').Value:=CDS_SQ.fieldbyname('DEFNote5').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Count(*) FFCount from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_SQ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.FieldByName('FFCount').AsInteger>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//FYSID:='';
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
FYSID:=Trim(maxno);
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column5PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr4GSLX';
|
||||||
|
flagname:='公司类型';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr4').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column12PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr6ZYSC';
|
||||||
|
flagname:='主营市场';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr6').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column13PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr7ZYCP';
|
||||||
|
flagname:='主营产品';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr7').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column15PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr8KHQY';
|
||||||
|
flagname:='客户区域';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr8').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
17996
基础资料维护(BaseInfo.dll)/U_KHHelp.dfm
Normal file
17996
基础资料维护(BaseInfo.dll)/U_KHHelp.dfm
Normal file
File diff suppressed because it is too large
Load Diff
167
基础资料维护(BaseInfo.dll)/U_KHHelp.pas
Normal file
167
基础资料维护(BaseInfo.dll)/U_KHHelp.pas
Normal file
|
|
@ -0,0 +1,167 @@
|
||||||
|
unit U_KHHelp;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHHelp = class(TForm)
|
||||||
|
TV1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
V1Name: TcxGridDBColumn;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZDYName: TEdit;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
V1Column1: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ZDYNameChange(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
flag,flagname,snote,MainType:string;
|
||||||
|
fnote,forderno,fZdyFlag:Boolean;
|
||||||
|
PPSTE:integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHHelp: TfrmKHHelp;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.InitGrid();
|
||||||
|
var
|
||||||
|
CYType:String;
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_User where UserId='''+Trim(DCode)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CYType:=Trim(ADOQueryTemp.fieldbyname('DPID').AsString);
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Select_User_KHName :CYType');
|
||||||
|
Parameters.ParamByName('CYType').Value:=Trim(CYType);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult:=2;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
WriteCxGrid('客户名称',TV1,'基础数据');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
ReadCxGrid('客户名称',TV1,'基础数据');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.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 TfrmKHHelp.ZDYNameChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj:String;
|
||||||
|
begin
|
||||||
|
if Trim(ZDYName.Text)<>'' then
|
||||||
|
begin
|
||||||
|
fsj:=' zdyname like '''+'%'+Trim(ZDYName.Text)+'%'+''''
|
||||||
|
+' or ZJM like '''+'%'+Trim(ZDYName.Text)+'%'+'''';
|
||||||
|
end;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,fsj);
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHHelp:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
314
基础资料维护(BaseInfo.dll)/U_KHInfo.dfm
Normal file
314
基础资料维护(BaseInfo.dll)/U_KHInfo.dfm
Normal file
|
|
@ -0,0 +1,314 @@
|
||||||
|
object frmKHInfo: TfrmKHInfo
|
||||||
|
Left = 41
|
||||||
|
Top = 136
|
||||||
|
Width = 1154
|
||||||
|
Height = 577
|
||||||
|
Caption = #23458#25143#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 = 1146
|
||||||
|
Height = 33
|
||||||
|
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_CPCK.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBTP: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #26356#26032
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = TBTPClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1146
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 27
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 174
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20195#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object OrderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 80
|
||||||
|
Top = 11
|
||||||
|
Width = 77
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = WFBCodeNameChange
|
||||||
|
end
|
||||||
|
object WFBCodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 203
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = WFBCodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 32
|
||||||
|
Top = 112
|
||||||
|
Width = 969
|
||||||
|
Height = 200
|
||||||
|
TabOrder = 2
|
||||||
|
object TV1: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Width = 174
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 99
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 157
|
||||||
|
end>
|
||||||
|
object V1Column1: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column2: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column3: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column4: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column5: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column6: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 5
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column7: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 6
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column8: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 7
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column9: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 8
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column10: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 9
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column11: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 10
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column12: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 11
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column13: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 12
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column14: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 13
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column15: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 14
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column16: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 15
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column17: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 16
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column18: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 17
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column19: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 18
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column20: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 19
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column21: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 20
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column22: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 21
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = TV1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 760
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 704
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 664
|
||||||
|
Top = 112
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_CPCK.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 648
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_CPCK.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
end
|
||||||
186
基础资料维护(BaseInfo.dll)/U_KHInfo.pas
Normal file
186
基础资料维护(BaseInfo.dll)/U_KHInfo.pas
Normal file
|
|
@ -0,0 +1,186 @@
|
||||||
|
unit U_KHInfo;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ADODB, DBClient,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, StdCtrls, ComCtrls, ExtCtrls,
|
||||||
|
ToolWin, cxCalendar, cxButtonEdit, cxCheckBox, cxGridBandedTableView,
|
||||||
|
cxGridDBBandedTableView;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHInfo = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
TBTP: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
OrderNo: TEdit;
|
||||||
|
WFBCodeName: TEdit;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
TV1: TcxGridDBBandedTableView;
|
||||||
|
V1Column1: TcxGridDBBandedColumn;
|
||||||
|
V1Column2: TcxGridDBBandedColumn;
|
||||||
|
V1Column3: TcxGridDBBandedColumn;
|
||||||
|
V1Column4: TcxGridDBBandedColumn;
|
||||||
|
V1Column5: TcxGridDBBandedColumn;
|
||||||
|
V1Column6: TcxGridDBBandedColumn;
|
||||||
|
V1Column7: TcxGridDBBandedColumn;
|
||||||
|
V1Column8: TcxGridDBBandedColumn;
|
||||||
|
V1Column9: TcxGridDBBandedColumn;
|
||||||
|
V1Column10: TcxGridDBBandedColumn;
|
||||||
|
V1Column11: TcxGridDBBandedColumn;
|
||||||
|
V1Column12: TcxGridDBBandedColumn;
|
||||||
|
V1Column13: TcxGridDBBandedColumn;
|
||||||
|
V1Column14: TcxGridDBBandedColumn;
|
||||||
|
V1Column15: TcxGridDBBandedColumn;
|
||||||
|
V1Column16: TcxGridDBBandedColumn;
|
||||||
|
V1Column17: TcxGridDBBandedColumn;
|
||||||
|
V1Column18: TcxGridDBBandedColumn;
|
||||||
|
V1Column19: TcxGridDBBandedColumn;
|
||||||
|
V1Column20: TcxGridDBBandedColumn;
|
||||||
|
V1Column21: TcxGridDBBandedColumn;
|
||||||
|
V1Column22: TcxGridDBBandedColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure WFBCodeNameChange(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBTPClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure v1Column16PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function DelData():Boolean;
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHInfo: TfrmKHInfo;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHInfo:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
procedure TfrmKHInfo.InitGrid();
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxBandedGrid('状态列表',Tv1,'无纺布订单');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.WFBCodeNameChange(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 TfrmKHInfo.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxBandedGrid('状态列表',Tv1,'无纺布订单');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBTPClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
except
|
||||||
|
Application.MessageBox('更新失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmKHInfo.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Order_Sub_KC where KCId='''+Trim(Order_Main.fieldbyname('KCId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('订单状态列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.v1Column16PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='hdmc';
|
||||||
|
flagname:='货代名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Order_Main.Edit;
|
||||||
|
Order_Main.FieldByName('OSStr1').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
240
基础资料维护(BaseInfo.dll)/U_NengHaoInput.dfm
Normal file
240
基础资料维护(BaseInfo.dll)/U_NengHaoInput.dfm
Normal file
|
|
@ -0,0 +1,240 @@
|
||||||
|
object frmNengHaoInput: TfrmNengHaoInput
|
||||||
|
Left = 292
|
||||||
|
Top = 254
|
||||||
|
Width = 697
|
||||||
|
Height = 370
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
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 ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 681
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 681
|
||||||
|
Height = 300
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column3
|
||||||
|
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_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'NHDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v2Column4PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#27827#27700
|
||||||
|
#33258#26469#27700
|
||||||
|
#27745#27700
|
||||||
|
#22825#28982#27668
|
||||||
|
#33976#27773
|
||||||
|
#30005
|
||||||
|
#23792#30005
|
||||||
|
#23574#30005
|
||||||
|
#35895#30005
|
||||||
|
''
|
||||||
|
''
|
||||||
|
'')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #34920#21517
|
||||||
|
DataBinding.FieldName = 'NHBiaoName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v2Column8PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Width = 93
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
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
|
||||||
254
基础资料维护(BaseInfo.dll)/U_NengHaoInput.pas
Normal file
254
基础资料维护(BaseInfo.dll)/U_NengHaoInput.pas
Normal file
|
|
@ -0,0 +1,254 @@
|
||||||
|
unit U_NengHaoInput;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmNengHaoInput = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column5: 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 ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column8PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmNengHaoInput: TfrmNengHaoInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from NengHao where NHID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmNengHaoInput:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('能耗录入',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmNengHaoInput.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('能耗录入',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmNengHaoInput.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'NH','NengHao',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from NengHao where NHID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('NHID').Value:=Trim(maxId);
|
||||||
|
//FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'NengHao',0);
|
||||||
|
if Trim(CDS_HZ.fieldbyname('Price').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value:=CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value:=0;
|
||||||
|
end;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('NHID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Trim(CDS_HZ.FieldByName('NHDate').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('日期不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(CDS_HZ.FieldByName('NHType').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('能耗类别不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.v2Column4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='chejian';
|
||||||
|
flagname:='车间';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Edit;
|
||||||
|
CDS_HZ.FieldByName('chejian').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.v2Column8PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='NHBiaoName';
|
||||||
|
flagname:='表名';
|
||||||
|
MainType:=Trim(CDS_HZ.fieldbyname('chejian').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Edit;
|
||||||
|
CDS_HZ.FieldByName('NHBiaoName').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
359
基础资料维护(BaseInfo.dll)/U_NengHaoList.dfm
Normal file
359
基础资料维护(BaseInfo.dll)/U_NengHaoList.dfm
Normal file
|
|
@ -0,0 +1,359 @@
|
||||||
|
object frmNengHaoList: TfrmNengHaoList
|
||||||
|
Left = 209
|
||||||
|
Top = 16
|
||||||
|
Width = 1036
|
||||||
|
Height = 618
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1020
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 437
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1020
|
||||||
|
Height = 66
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 439
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #34920#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #36710#38388
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 574
|
||||||
|
Top = 20
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 21
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 142
|
||||||
|
Top = 21
|
||||||
|
Width = 78
|
||||||
|
Height = 12
|
||||||
|
Caption = '-------------'
|
||||||
|
end
|
||||||
|
object NHBiaoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 463
|
||||||
|
Top = 17
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
end
|
||||||
|
object Chejian: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 327
|
||||||
|
Top = 17
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
end
|
||||||
|
object NHType: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 627
|
||||||
|
Top = 17
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#27827#27700
|
||||||
|
#33258#26469#27700
|
||||||
|
#27745#27700
|
||||||
|
#22825#28982#27668
|
||||||
|
#33976#27773
|
||||||
|
#30005
|
||||||
|
#23792#30005
|
||||||
|
#23574#30005
|
||||||
|
#35895#30005
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 184
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1020
|
||||||
|
Height = 482
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'NHDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #34920#21517
|
||||||
|
DataBinding.FieldName = 'NHBiaoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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 = 728
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 688
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 832
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 771
|
||||||
|
Top = 251
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 768
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
end
|
||||||
261
基础资料维护(BaseInfo.dll)/U_NengHaoList.pas
Normal file
261
基础资料维护(BaseInfo.dll)/U_NengHaoList.pas
Normal file
|
|
@ -0,0 +1,261 @@
|
||||||
|
unit U_NengHaoList;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmNengHaoList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
NHBiaoName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
Chejian: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
NHType: TComboBox;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
Label4: TLabel;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label5: TLabel;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
ToolButton5: 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 ToolButton2Click(Sender: TObject);
|
||||||
|
procedure NHBiaoNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmNengHaoList: TfrmNengHaoList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_NengHaoInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from NengHao ');
|
||||||
|
sql.Add(' where NHDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and NHDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' order by Chejian,NHTYpe,NHDate');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmNengHaoList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmNengHaoList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('NHID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete NengHao where NHID='''+Trim(CDS_HZ.fieldbyname('NHID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
EndDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||||
|
BegDate.Date:=EndDate.Date;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.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 TfrmNengHaoList.NHBiaoNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
SelExportData(Tv2,ADOQueryMain,'能耗列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmNengHaoInput:=TfrmNengHaoInput.Create(Application);
|
||||||
|
with frmNengHaoInput do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('NHID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_HZ.Locate('NHID',FCYID,[]);
|
||||||
|
with Self.CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('NHDate').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHDate').Value;
|
||||||
|
FieldByName('chejian').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('chejian').Value;
|
||||||
|
FieldByName('NHType').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHType').Value;
|
||||||
|
FieldByName('NHBiaoName').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHBiaoName').Value;
|
||||||
|
FieldByName('Price').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
FieldByName('Qty').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Qty').Value;
|
||||||
|
FieldByName('Note').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Note').Value;
|
||||||
|
//FieldByName('NHID').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHID').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmNengHaoInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmNengHaoInput:=TfrmNengHaoInput.Create(Application);
|
||||||
|
with frmNengHaoInput do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_HZ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('NHDate').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHDate').Value;
|
||||||
|
FieldByName('chejian').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('chejian').Value;
|
||||||
|
FieldByName('NHType').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHType').Value;
|
||||||
|
FieldByName('NHBiaoName').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHBiaoName').Value;
|
||||||
|
FieldByName('Price').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
FieldByName('Qty').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Qty').Value;
|
||||||
|
FieldByName('Note').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Note').Value;
|
||||||
|
FieldByName('NHID').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHID').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmNengHaoInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM,RPTName:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\能耗报表.rmf' ;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['begdate']:=BegDate.DateTime;
|
||||||
|
RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+RPTName),'提示',0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
35
基础资料维护(BaseInfo.dll)/U_SLT.dfm
Normal file
35
基础资料维护(BaseInfo.dll)/U_SLT.dfm
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
object frmSLT: TfrmSLT
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 161
|
||||||
|
Height = 138
|
||||||
|
TabOrder = 0
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 121
|
||||||
|
Width = 161
|
||||||
|
Height = 17
|
||||||
|
Align = alClient
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Panel1'
|
||||||
|
Color = clWindow
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object cxImage1: TcxImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Align = alTop
|
||||||
|
Style.BorderStyle = ebsOffice11
|
||||||
|
StyleHot.TextStyle = []
|
||||||
|
TabOrder = 1
|
||||||
|
OnDblClick = cxImage1DblClick
|
||||||
|
Height = 121
|
||||||
|
Width = 161
|
||||||
|
end
|
||||||
|
end
|
||||||
88
基础资料维护(BaseInfo.dll)/U_SLT.pas
Normal file
88
基础资料维护(BaseInfo.dll)/U_SLT.pas
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
unit U_SLT;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls,jpeg, cxControls, cxContainer, cxEdit, cxImage,IdFTP,ShellAPI,
|
||||||
|
cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, 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
|
||||||
|
TfrmSLT = class(TFrame)
|
||||||
|
cxImage1: TcxImage;
|
||||||
|
Panel1: TPanel;
|
||||||
|
procedure cxImage1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
CYID,FileName:string;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
procedure Init(fCYID:string;fFileName:string;fPicture:TJpegImage);
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmSLT.Init(fCYID:string;fFileName:string;fPicture:TJpegImage);
|
||||||
|
begin
|
||||||
|
CYID:=trim(fCYID);
|
||||||
|
FileName:=trim(fFileName);
|
||||||
|
Panel1.Caption:=FileName;
|
||||||
|
cxImage1.Picture.Assign(fPicture);
|
||||||
|
end;
|
||||||
|
procedure TfrmSLT.cxImage1DblClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
FPath,FFName:string;
|
||||||
|
FInt:integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1:=TIdFTP.Create(self);
|
||||||
|
IdFTP1.Host :=PicSvr;
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
except
|
||||||
|
IdFTP1.Quit;
|
||||||
|
IdFTP1.Free;
|
||||||
|
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
FPath:='C:\Right1209\';
|
||||||
|
if not DirectoryExists(ExtractFileDir(FPath)) then
|
||||||
|
CreateDir(ExtractFileDir(FPath));
|
||||||
|
FFName:=Trim(FileName);
|
||||||
|
FFName:=FPath+FFName;
|
||||||
|
if FileExists(FFName) then
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
if FInt<>1 then
|
||||||
|
IdFTP1.Get(UserDataFlag+'YP\'+FileName,FFName);
|
||||||
|
if IdFTP1.Connected then
|
||||||
|
begin
|
||||||
|
IdFTP1.Quit;
|
||||||
|
IdFTP1.Free;
|
||||||
|
end;
|
||||||
|
ShellExecute(Handle, 'open',PChar(FFName),'', '', SW_SHOWNORMAL);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
277
基础资料维护(BaseInfo.dll)/U_SYDept.dfm
Normal file
277
基础资料维护(BaseInfo.dll)/U_SYDept.dfm
Normal file
|
|
@ -0,0 +1,277 @@
|
||||||
|
object frmSYDept: TfrmSYDept
|
||||||
|
Left = 209
|
||||||
|
Top = 173
|
||||||
|
Width = 872
|
||||||
|
Height = 509
|
||||||
|
Caption = #32452#32455#32467#26500
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 864
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGLWT.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGLWT.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 TBAdd: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686#23376#31867
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
Caption = #32452#32455#20998#37197
|
||||||
|
ImageIndex = 132
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 359
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxDBTreeList1: TcxDBTreeList
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 249
|
||||||
|
Height = 439
|
||||||
|
Align = alLeft
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
end>
|
||||||
|
BufferedPaint = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.ParentField = 'DPParent'
|
||||||
|
DataController.KeyField = 'DPID'
|
||||||
|
OptionsBehavior.ExpandOnDblClick = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.CellAutoHeight = True
|
||||||
|
OptionsView.Headers = False
|
||||||
|
RootValue = -1
|
||||||
|
Styles.Inactive = DataLink_YPGLWT.Red
|
||||||
|
Styles.Selection = DataLink_YPGLWT.Red
|
||||||
|
Styles.IncSearch = DataLink_YPGLWT.Red
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxDBTreeList1Click
|
||||||
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'DPName'
|
||||||
|
Width = 210
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 249
|
||||||
|
Top = 33
|
||||||
|
Width = 315
|
||||||
|
Height = 439
|
||||||
|
Align = alLeft
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 40
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #19978#32423#32452#32455
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 81
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #32452#32455#21517#31216
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 121
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #32452#32455#32534#30721
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 16
|
||||||
|
Width = 60
|
||||||
|
Height = 14
|
||||||
|
Caption = #32452#32455#32467#26500
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object DPTopName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 37
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DPName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 77
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnKeyPress = DPNameKeyPress
|
||||||
|
end
|
||||||
|
object DPNo: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 117
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid4: TcxGrid
|
||||||
|
Left = 564
|
||||||
|
Top = 33
|
||||||
|
Width = 300
|
||||||
|
Height = 439
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv4: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DSUser
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_YPGLWT.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YPGLWT.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YPGLWT.SHuangSe
|
||||||
|
object cxGridDBColumn1: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#32534#21495
|
||||||
|
DataBinding.FieldName = 'UserId'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
object cxGridDBColumn7: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#21517#31216
|
||||||
|
DataBinding.FieldName = 'UserName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object cxGridDBColumn8: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#32452#32455
|
||||||
|
DataBinding.FieldName = 'dept'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = Tv4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Tree
|
||||||
|
Left = 147
|
||||||
|
Top = 219
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 357
|
||||||
|
Top = 177
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 397
|
||||||
|
Top = 177
|
||||||
|
end
|
||||||
|
object CDS_Tree: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 96
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
object CDS_User: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 272
|
||||||
|
end
|
||||||
|
object DSUser: TDataSource
|
||||||
|
DataSet = CDS_User
|
||||||
|
Left = 675
|
||||||
|
Top = 211
|
||||||
|
end
|
||||||
|
end
|
||||||
314
基础资料维护(BaseInfo.dll)/U_SYDept.pas
Normal file
314
基础资料维护(BaseInfo.dll)/U_SYDept.pas
Normal file
|
|
@ -0,0 +1,314 @@
|
||||||
|
unit U_SYDept;
|
||||||
|
|
||||||
|
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, ExtCtrls, DBClient, cxFilter, cxData, cxDataStorage, cxEdit,
|
||||||
|
cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxClasses, cxGridCustomView, cxGrid;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmSYDept = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxDBTreeList1: TcxDBTreeList;
|
||||||
|
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOQueryTree: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
DPTopName: TEdit;
|
||||||
|
DPName: TEdit;
|
||||||
|
DPNo: TEdit;
|
||||||
|
CDS_Tree: TClientDataSet;
|
||||||
|
cxGrid4: TcxGrid;
|
||||||
|
Tv4: TcxGridDBTableView;
|
||||||
|
cxGridDBColumn1: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn7: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn8: TcxGridDBColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
Label4: TLabel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
CDS_User: TClientDataSet;
|
||||||
|
DSUser: TDataSource;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
PState:Integer;
|
||||||
|
FCPID,FTopID:String;
|
||||||
|
procedure InitTree();
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmSYDept: TfrmSYDept;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmSYDept.InitTree();
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryTree.DisableControls;
|
||||||
|
with ADOQueryTree do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from SY_Dept order by DPlevel,DPOrder,DPName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTree,CDS_Tree);
|
||||||
|
SInitCDSData20(ADOQueryTree,CDS_Tree);
|
||||||
|
cxDBTreeList1.Items[0].Expand(false);
|
||||||
|
finally
|
||||||
|
ADOQueryTree.EnableControls;
|
||||||
|
end;
|
||||||
|
//cxDBTreeList1.Items[1].Expand(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmSYDept:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PState:=11;
|
||||||
|
DPTopName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||||
|
//FTopID:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
FCPID:='';
|
||||||
|
DPName.Text:='';
|
||||||
|
DPNo.Text:='';
|
||||||
|
DPName.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.cxDBTreeList1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PState:=22;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPParent').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
FCPID:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||||
|
DPTopName.Text:=Trim(ADOQueryTemp.fieldbyname('DPName').AsString);
|
||||||
|
DPName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||||
|
DPNo.Text:=Trim(CDS_Tree.fieldbyname('DPNo').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.ToolButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxId:String;
|
||||||
|
begin
|
||||||
|
if Trim(DPName.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('本级名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(DPNo.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('类别编码不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if PState=11 then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'DP','SY_Dept',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('区最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCPID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from SY_Dept where DPID='''+Trim(FCPID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if PState=11 then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('DPID').Value:=Trim(maxId);
|
||||||
|
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||||
|
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||||
|
FieldByName('DPParent').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||||
|
FieldByName('DPLevel').Value:=CDS_Tree.fieldbyname('DPLevel').AsInteger+1;
|
||||||
|
Post;
|
||||||
|
end else
|
||||||
|
if PState=22 then
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DPID').Value:=Trim(maxId);
|
||||||
|
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||||
|
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||||
|
//FieldByName('CPParent').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
//FieldByName('CPOrder').Value:=ADOQueryTree.fieldbyname('CPOrder').AsInteger+1;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTree.FieldByName('DPLevel').AsInteger=0 then Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已经定义下级组织不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_User where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('该组织已有人员不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
sql.Add('delete SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
DPNo.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Tree.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
if CDS_User.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要进行组织分配吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update SY_User Set DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
sql.Add(' where UserId='''+Trim(CDS_User.fieldbyname('UserId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with CDS_User do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Dept').Value:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Tree.FieldByName('DPLevel').Value=0 then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select A.*,Dept=(select DPName from SY_Dept where DPID=A.DPID) ');
|
||||||
|
SQL.Add(' from SY_User A where UserId not in(''Admin'',''Test'') ');
|
||||||
|
SQL.Add(' and Valid=''Y'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('exec P_Select_Dept_User :CYType');
|
||||||
|
Parameters.ParamByName('CYType').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
18071
基础资料维护(BaseInfo.dll)/U_SysLogOrderzsd.dfm
Normal file
18071
基础资料维护(BaseInfo.dll)/U_SysLogOrderzsd.dfm
Normal file
File diff suppressed because it is too large
Load Diff
196
基础资料维护(BaseInfo.dll)/U_SysLogOrderzsd.pas
Normal file
196
基础资料维护(BaseInfo.dll)/U_SysLogOrderzsd.pas
Normal file
|
|
@ -0,0 +1,196 @@
|
||||||
|
unit U_SysLogOrderzsd;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel,strUtils,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, ADODB, StdCtrls, ExtCtrls, ImgList,
|
||||||
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, 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
|
||||||
|
TfrmSysLogOrderzsd = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TQry: TToolButton;
|
||||||
|
Tclose: TToolButton;
|
||||||
|
ADOQueryLog: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
tv1: TcxGridDBTableView;
|
||||||
|
tv1OperMan: TcxGridDBColumn;
|
||||||
|
tv1jopertime: TcxGridDBColumn;
|
||||||
|
tv1Model: TcxGridDBColumn;
|
||||||
|
tv1acction: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
tv1Opevent: TcxGridDBColumn;
|
||||||
|
tv1Result: TcxGridDBColumn;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label1: TLabel;
|
||||||
|
begDate: TDateTimePicker;
|
||||||
|
endDate: TDateTimePicker;
|
||||||
|
Label3: TLabel;
|
||||||
|
edt_model: TEdit;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
Label4: TLabel;
|
||||||
|
edt_nr: TEdit;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
procedure TcloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TQryClick(Sender: TObject);
|
||||||
|
procedure edt_modelChange(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
private
|
||||||
|
|
||||||
|
procedure DoQuery();
|
||||||
|
procedure DoFilter();
|
||||||
|
public
|
||||||
|
fModel,facction:string;
|
||||||
|
fOtherWhere:string;
|
||||||
|
FMainid:String;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmSysLogOrderzsd: TfrmSysLogOrderzsd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmSysLogOrderzsd.TcloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSysLogOrderzsd.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align :=alClient;
|
||||||
|
begDate.DateTime :=date-31;
|
||||||
|
endDate.DateTime :=date;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
/////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmSysLogOrderzsd.DoQuery();
|
||||||
|
var
|
||||||
|
mbegdate,menddate:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
mbegdate:=formatDatetime('yyyy-MM-dd',begDate.Date); //
|
||||||
|
menddate:=formatDatetime('yyyy-MM-dd',endDate.Date+1);
|
||||||
|
try
|
||||||
|
with ADOQueryLog do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.clear;
|
||||||
|
filtered:=false;
|
||||||
|
sql.add('select A.* ');
|
||||||
|
sql.add('from SY_sysLog A');
|
||||||
|
if CheckBox1.Checked then
|
||||||
|
begin
|
||||||
|
sql.Add('where OperTime>='+quotedStr(mbegdate));
|
||||||
|
sql.Add('and OperTime<'+quotedStr(menddate));
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
sql.Add('where 1=1');
|
||||||
|
end;
|
||||||
|
// sql.Add(' and isnull(Mainid,'''')='''+Trim(FMainid)+''' and isnull(Mainid,'''')<>'''' ');
|
||||||
|
// if trim(facction)<>'' then
|
||||||
|
sql.add('and acction like ''¿âλ%'' ');
|
||||||
|
if trim(fOtherWhere)<>'' then
|
||||||
|
begin
|
||||||
|
sql.add(fOtherWhere);
|
||||||
|
end;
|
||||||
|
sql.Add('order by operOr,Opertime');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmSysLogOrderzsd.DoFilter();
|
||||||
|
var
|
||||||
|
filterStr:string;
|
||||||
|
begin
|
||||||
|
filterStr:='';
|
||||||
|
//
|
||||||
|
if trim(edt_model.text)<>'' then
|
||||||
|
begin
|
||||||
|
filterStr:=' and model ='+quotedStr(trim(edt_model.text));
|
||||||
|
end;
|
||||||
|
if trim(edt_nr.text)<>'' then
|
||||||
|
begin
|
||||||
|
filterStr:=' and OpEvent like '+quotedStr('%'+trim(edt_nr.text)+'%');
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
ADOQueryLog.DisableControls ;
|
||||||
|
if trim(filterStr)='' then
|
||||||
|
begin
|
||||||
|
ADOQueryLog.Filtered:=false;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
filterStr:=trim(RightBStr(filterStr,length(filterStr)-4));
|
||||||
|
with ADOQueryLog do
|
||||||
|
begin
|
||||||
|
filtered:=false;
|
||||||
|
filter:=filterStr;
|
||||||
|
filtered:=true;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryLog.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmSysLogOrderzsd.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoQuery();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSysLogOrderzsd.TQryClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoQuery();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSysLogOrderzsd.edt_modelChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoFilter();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSysLogOrderzsd.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
23820
基础资料维护(BaseInfo.dll)/U_UserHelpSel.dfm
Normal file
23820
基础资料维护(BaseInfo.dll)/U_UserHelpSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
234
基础资料维护(BaseInfo.dll)/U_UserHelpSel.pas
Normal file
234
基础资料维护(BaseInfo.dll)/U_UserHelpSel.pas
Normal file
|
|
@ -0,0 +1,234 @@
|
||||||
|
unit U_UserHelpSel;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, StdCtrls, cxGridLevel,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, cxInplaceContainer, cxDBTL,
|
||||||
|
cxTLData, ComCtrls, ToolWin, ADODB, ImgList,StrUtils, ExtCtrls,
|
||||||
|
cxCheckBox, DBClient;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmUserHelpSel = class(TForm)
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
TOk: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxDBTreeList1: TcxDBTreeList;
|
||||||
|
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
tv1: TcxGridDBTableView;
|
||||||
|
tv1Code: TcxGridDBColumn;
|
||||||
|
tv1Name: TcxGridDBColumn;
|
||||||
|
DBGrid1Level1: TcxGridLevel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
ADOQueryDept: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
tv1Column1: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
ADOQueryHelp: TADOQuery;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
Label1: TLabel;
|
||||||
|
Edt_name: TEdit;
|
||||||
|
ImageList1: TImageList;
|
||||||
|
cxStyleTree: TcxStyle;
|
||||||
|
Label2: TLabel;
|
||||||
|
Edt_Code: TEdit;
|
||||||
|
Splitter1: TSplitter;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
procedure tv1DblClick(Sender: TObject);
|
||||||
|
procedure Edt_nameChange(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitTree();
|
||||||
|
procedure DoQuery();
|
||||||
|
procedure FilterData(strdepotno,strcode,strname:string);
|
||||||
|
public
|
||||||
|
fFrameNo:string;
|
||||||
|
fFrameName:string;
|
||||||
|
fIsYwy:boolean;
|
||||||
|
ReturnStr:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmUserHelpSel: TfrmUserHelpSel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
{$R *.dfm}
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
//////功能:过滤数据
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmUserHelpSel.FilterData(strdepotno,strcode,strname:string);
|
||||||
|
var
|
||||||
|
filterStr:string;
|
||||||
|
begin
|
||||||
|
filterStr:='';
|
||||||
|
if trim(strdepotno)<>'' then
|
||||||
|
filterStr:=filterStr+' and dept like '+quotedstr('%'+trim(strdepotno)+'%');
|
||||||
|
if trim(strcode)<>'' then
|
||||||
|
filterStr:=filterStr+' and userID like '+quotedstr('%'+trim(strcode)+'%');
|
||||||
|
if trim(strname)<>'' then
|
||||||
|
filterStr:=filterStr+' and userName like '+quotedstr('%'+trim(strname)+'%');
|
||||||
|
|
||||||
|
try
|
||||||
|
ADOQueryHelp.DisableControls ;
|
||||||
|
if trim(filterStr)='' then
|
||||||
|
begin
|
||||||
|
ADOQueryHelp.Filtered:=false;
|
||||||
|
ADOQueryHelp.EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
filterStr:=trim(RightBStr(filterStr,length(filterStr)-5));
|
||||||
|
// showmessage(filterStr);
|
||||||
|
with ADOQueryHelp do
|
||||||
|
begin
|
||||||
|
filtered:=false;
|
||||||
|
filter:=filterStr;
|
||||||
|
filtered:=true;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryHelp.EnableControls;
|
||||||
|
SCreateCDS20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
procedure TfrmUserHelpSel.InitTree();
|
||||||
|
var
|
||||||
|
strsql,strwhere:string;
|
||||||
|
begin
|
||||||
|
strsql:=' SELECT distinct UDept=''ALL'',UDeptTop='''',UDeptName=''所有部门'',Framelevel=0 '+
|
||||||
|
' union '+
|
||||||
|
' SELECT distinct UDept,UDeptTop=''ALL'',UDept,Framelevel=1 '+
|
||||||
|
' FROM BD_staff A '+
|
||||||
|
' WHERE USERID<>''ADMIN'' and ISNULL(UDept,'''')<>'''' ';
|
||||||
|
|
||||||
|
strwhere:=' where A.Valid=''Y'' ';
|
||||||
|
{ if fIsYwy then
|
||||||
|
strwhere:=strwhere+' and A.YWYFlag=''Y'' ';
|
||||||
|
if trim(fFrameNo)<>'' then
|
||||||
|
strwhere:=strwhere+' and A.dept='+quotedstr(trim(fFrameNo));
|
||||||
|
if trim(fFrameName)<>'' then
|
||||||
|
strwhere:=strwhere+' and B.frameName like '+quotedstr('%'+trim(fFrameName)+'%');
|
||||||
|
strsql:=strsql+ strwhere; }
|
||||||
|
|
||||||
|
with ADOQueryDept do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear ;
|
||||||
|
sql.Add( strsql);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
cxDBTreeList1.FullExpand;
|
||||||
|
|
||||||
|
DoQuery();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align :=alclient;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////
|
||||||
|
procedure TfrmUserHelpSel.DoQuery();
|
||||||
|
var
|
||||||
|
strsql,strwhere:string;
|
||||||
|
begin
|
||||||
|
strsql:=' select * '+
|
||||||
|
' from BD_staff A '+
|
||||||
|
' where isnull(UserID,'''')<>''ADMIN'' ';
|
||||||
|
strwhere:=' and A.Valid=''Y'' ';
|
||||||
|
if fIsYwy then
|
||||||
|
strwhere:=strwhere+' and A.Isywy=1 ';
|
||||||
|
|
||||||
|
strsql:=strsql+ strwhere +' order by A.userID ';
|
||||||
|
|
||||||
|
with ADOQueryHelp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear ;
|
||||||
|
sql.Add( strsql);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then exit;
|
||||||
|
|
||||||
|
ReturnStr:='';
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if FieldByName('SSel').AsBoolean=True then
|
||||||
|
begin
|
||||||
|
ReturnStr:=ReturnStr+Trim(fieldbyname('UserName').AsString)+';'
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// if JiangeStr<>99 then
|
||||||
|
IF ReturnStr<>'' then
|
||||||
|
ReturnStr:=Copy(ReturnStr,1,Length(ReturnStr)-1);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.tv1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Tok.Click ;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.Edt_nameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FilterData('',edt_code.Text,Edt_name.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.cxDBTreeList1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryDept.IsEmpty then exit;
|
||||||
|
if trim(ADOQueryDept.FieldByName('Framelevel').AsString)='0' then
|
||||||
|
FilterData('','','')
|
||||||
|
else
|
||||||
|
FilterData(ADOQueryDept.FieldByName('UDept').AsString,'','');
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
18066
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.dfm
Normal file
18066
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.dfm
Normal file
File diff suppressed because it is too large
Load Diff
628
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.pas
Normal file
628
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.pas
Normal file
|
|
@ -0,0 +1,628 @@
|
||||||
|
unit U_ZDYHelp;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZDYHelp = class(TForm)
|
||||||
|
TV1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
V1Code: TcxGridDBColumn;
|
||||||
|
V1Name: TcxGridDBColumn;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBSave: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
V1Note: TcxGridDBColumn;
|
||||||
|
V1OrderNo: TcxGridDBColumn;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZDYName: TEdit;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
V1ZdyFlag: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure TBSaveClick(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 ZDYNameChange(Sender: TObject);
|
||||||
|
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
flag,flagname,snote,MainType:string;
|
||||||
|
fnote,forderno,fZdyFlag:Boolean;
|
||||||
|
PPSTE:integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZDYHelp: TfrmZDYHelp;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='23242';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.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='''+flag+'''');
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
begin
|
||||||
|
sql.Add(' and A.MainType='''+Trim(MainType)+'''');
|
||||||
|
end;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
TV1.OptionsData.Editing:=True;
|
||||||
|
TV1.OptionsSelection.CellSelect:=True;
|
||||||
|
for i:=0 to 5 do
|
||||||
|
begin
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBSaveClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then Exit;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
|
||||||
|
if ClientDataSet1.Locate('ZDYName',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet1.Locate('ZDYName','',[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from KH_ZDY where ZdyNo='''+Trim(flag)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||||
|
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
|
||||||
|
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
|
||||||
|
Parameters.ParamByName('Type').Value:='Main';
|
||||||
|
Parameters.ParamByName('MainType').Value:=Trim(MainType);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
ClientDataSet1.DisableControls;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTemp,maxno,'SY','KH_ZDY',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('取最大编号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from KH_Zdy where Type='''+Trim(flag)+'''');
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
SQL.Add(' and MainType='''+Trim(MainType)+'''');
|
||||||
|
sql.Add(' and ZdyName='''+Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
if ADOQueryTemp.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)='' then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString)<>Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('delete KH_ZDY where ZDYNO='''+Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||||
|
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||||
|
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||||
|
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
ClientDataSet1.Edit;
|
||||||
|
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ClientDataSet1.Post;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
TV1.OptionsData.Editing:=False;
|
||||||
|
TV1.OptionsSelection.CellSelect:=False;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then Exit;
|
||||||
|
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString)<>'') or
|
||||||
|
(Trim(ClientDataSet1.FieldByName('ZDYname').AsString)<>'') then
|
||||||
|
begin
|
||||||
|
if application.MessageBox('确定要删除吗?','提示信息',1)=2 then exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete KH_ZDY where ZDYNo='''+Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString)+'''');
|
||||||
|
SQL.Add(' and Type='''+Trim(flag)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ClientDataSet1.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult:=2;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
WriteCxGrid('自定义',TV1,'自定义数据');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj,fsj1:string;
|
||||||
|
begin
|
||||||
|
{if PPSTE=1 then
|
||||||
|
begin
|
||||||
|
Application.Terminate;
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
InitGrid();
|
||||||
|
fsj:=Trim(flag)+'01';
|
||||||
|
fsj1:=Trim(flagname)+'01';
|
||||||
|
{if ClientDataSet1.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYname,Type,note)');
|
||||||
|
sql.Add('select '''+Trim(fsj)+'''');
|
||||||
|
sql.Add(','''+Trim(fsj1)+'''');
|
||||||
|
SQL.Add(','''+Trim(flag)+'''');
|
||||||
|
sql.Add(','''+Trim(snote)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
InitGrid();
|
||||||
|
end;}
|
||||||
|
//frmZDYHelp.Caption:=Trim(flagname)+'<'+Trim(flag)+'>';
|
||||||
|
ReadCxGrid('自定义',TV1,'自定义数据');
|
||||||
|
frmZDYHelp.Caption:=Trim(flagname);
|
||||||
|
V1Note.Visible:=fnote;
|
||||||
|
V1ZdyFlag.Visible:=fZdyFlag;
|
||||||
|
V1OrderNo.Visible:=forderno;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TV1.OptionsData.Editing:=True;
|
||||||
|
TV1.OptionsSelection.CellSelect:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.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 TfrmZDYHelp.ZDYNameChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj:String;
|
||||||
|
begin
|
||||||
|
if Trim(ZDYName.Text)<>'' then
|
||||||
|
begin
|
||||||
|
fsj:=' zdyname like '''+'%'+Trim(ZDYName.Text)+'%'+''''
|
||||||
|
+' or Note like '''+'%'+Trim(ZDYName.Text)+'%'+''''
|
||||||
|
+' or ZJM like '''+'%'+Trim(ZDYName.Text)+'%'+'''';
|
||||||
|
end;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,fsj);
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.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('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from KH_ZDY where ZdyNo='''+Trim(flag)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||||
|
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
|
||||||
|
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
|
||||||
|
Parameters.ParamByName('Type').Value:='Main';
|
||||||
|
Parameters.ParamByName('MainType').Value:=Trim(MainType);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
//ClientDataSet1.DisableControls;
|
||||||
|
//with ClientDataSet1 do
|
||||||
|
//begin
|
||||||
|
//First;
|
||||||
|
//while not eof do
|
||||||
|
//begin
|
||||||
|
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTemp,maxno,'SY','KH_ZDY',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('取最大编号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from KH_Zdy where Type='''+Trim(flag)+'''');
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
SQL.Add(' and MainType='''+Trim(MainType)+'''');
|
||||||
|
sql.Add(' and ZdyName='''+Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
if ADOQueryTemp.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)='' then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString)<>Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('delete KH_ZDY where ZDYNO='''+Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||||
|
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||||
|
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||||
|
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
ClientDataSet1.Edit;
|
||||||
|
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ClientDataSet1.Post;
|
||||||
|
// Next;
|
||||||
|
//end;
|
||||||
|
//end;
|
||||||
|
// ClientDataSet1.EnableControls;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
//Application.MessageBox('保存成功!','提示',0);
|
||||||
|
//TV1.OptionsData.Editing:=False;
|
||||||
|
//TV1.OptionsSelection.CellSelect:=False;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('OrderNo').Value:=mvalue;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set OrderNo='+mvalue);
|
||||||
|
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Note').Value:=mvalue;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set Note='''+Trim(mvalue)+'''');
|
||||||
|
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:String;
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyFlag').Value:=StrToInt(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set ZdyFlag='+Trim(mvalue));
|
||||||
|
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
269
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.dfm
Normal file
269
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.dfm
Normal file
|
|
@ -0,0 +1,269 @@
|
||||||
|
object frmZdyAttInput: TfrmZdyAttInput
|
||||||
|
Left = 146
|
||||||
|
Top = 208
|
||||||
|
Width = 1048
|
||||||
|
Height = 450
|
||||||
|
Caption = #23458#25143#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1032
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1032
|
||||||
|
Height = 381
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.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>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 147
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 64
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21457#36135#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2DefFlt1: TcxGridDBColumn
|
||||||
|
Caption = #27424#27454#39069#24230
|
||||||
|
DataBinding.FieldName = 'DefFlt1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #25176#36816#37096
|
||||||
|
DataBinding.FieldName = 'DEFStr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25176#36816#37096#30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFNote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #37038#31665
|
||||||
|
DataBinding.FieldName = 'DEFStr9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 154
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'defstr10'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsEditFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#29983#20135
|
||||||
|
#38144#21806)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
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
|
||||||
|
object ADOQueryKH: TADOQuery
|
||||||
|
Parameters = <>
|
||||||
|
Left = 692
|
||||||
|
Top = 31
|
||||||
|
end
|
||||||
|
object DSKH: TDataSource
|
||||||
|
DataSet = ADOQueryKH
|
||||||
|
Left = 544
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
296
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.pas
Normal file
296
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.pas
Normal file
|
|
@ -0,0 +1,296 @@
|
||||||
|
unit U_ZdyAttInput;
|
||||||
|
|
||||||
|
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, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInput = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2DefFlt1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
ADOQueryKH: TADOQuery;
|
||||||
|
DSKH: TDataSource;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: 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 ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInput: TfrmZdyAttInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//frmZdyAttInput:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
//Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('客户资料录入1',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInput.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户资料录入1',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInput.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
fzdyCode:string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
IF trim(fkhType)='广东客户' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'KH','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
IF trim(fkhType)='湖州客户' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'HZ','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'KF','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('zdyCode').Value:=Trim(fzdyCode);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'',0);
|
||||||
|
FieldByName('Type').Value:='KHName';
|
||||||
|
FieldByName('khType').Value:=trim(fkhType);
|
||||||
|
FieldByName('DefFlt1').Value:=CDS_HZ.fieldbyname('DefFlt1').AsFloat;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='KHName';
|
||||||
|
FieldByName('MainType').Value:=Trim(CDS_HZ.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyName='''+Trim(CDS_HZ.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''KHName'' ');
|
||||||
|
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('客户名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_HZ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''KHName'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('客户名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
end.
|
||||||
267
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.dfm
Normal file
267
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.dfm
Normal file
|
|
@ -0,0 +1,267 @@
|
||||||
|
object frmZdyAttInputCP: TfrmZdyAttInputCP
|
||||||
|
Left = 193
|
||||||
|
Top = 205
|
||||||
|
Width = 961
|
||||||
|
Height = 404
|
||||||
|
Caption = #20135#21697#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 945
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 945
|
||||||
|
Height = 335
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
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_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2defstr9: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'defNote3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#25104#21697)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 64
|
||||||
|
end
|
||||||
|
object v2Mrate: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#32553#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'Mrate'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #24037#33402
|
||||||
|
DataBinding.FieldName = 'defNote2'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column5PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 115
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #33457#21495
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #20215#26684#22686#24133
|
||||||
|
DataBinding.FieldName = 'defflt1'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##;-,0.##'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
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
|
||||||
333
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.pas
Normal file
333
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.pas
Normal file
|
|
@ -0,0 +1,333 @@
|
||||||
|
unit U_ZdyAttInputCP;
|
||||||
|
|
||||||
|
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,strutils, cxCurrencyEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputCP = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2defstr9: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Mrate: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column2: 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 ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2defstr9PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2Column5PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
fkhType:string;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputCP: TfrmZdyAttInputCP;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputCP:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('产品资料录入1',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputCP.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('产品资料录入1',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInputCP.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'KH_Zdy_Attachment',0);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('ZdyCode').Value:=Trim(maxId);
|
||||||
|
FieldByName('Mrate').Value:=CDS_HZ.fieldbyname('Mrate').AsFloat;
|
||||||
|
FieldByName('defflt1').Value:=CDS_HZ.fieldbyname('defflt1').AsFloat;
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
FieldByName('khType').Value:=trim(fkhType);
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
FieldByName('MainType').Value:=Trim(CDS_HZ.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_HZ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''CP'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('产品编号不能重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
{ if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('供应商名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.v2Column6PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.v2defstr9PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP.v2Column5PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr3').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
676
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP10.dfm
Normal file
676
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP10.dfm
Normal file
|
|
@ -0,0 +1,676 @@
|
||||||
|
object frmZdyAttInputCP10: TfrmZdyAttInputCP10
|
||||||
|
Left = 27
|
||||||
|
Top = 35
|
||||||
|
Width = 1256
|
||||||
|
Height = 725
|
||||||
|
Caption = #20135#21697#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 96
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20960' '#39068' '#33394
|
||||||
|
end
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1240
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1240
|
||||||
|
Height = 638
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 1
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1240
|
||||||
|
Height = 257
|
||||||
|
Align = alTop
|
||||||
|
Caption = #20135#21697#20449#24687
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21697#21517
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 476
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#35268#26684
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#21697#21517
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#35268#26684
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 476
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#39068#33394
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#20215#26684
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #36215' '#35746' '#37327
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 476
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #35745#37327#21333#20301
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 100
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #24320#21457#26102#38388
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 124
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#22791#27880
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 184
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#22791#27880
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 792
|
||||||
|
Top = 32
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#22270#29255
|
||||||
|
end
|
||||||
|
object zdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'zdyCode'
|
||||||
|
end
|
||||||
|
object zdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'zdyName'
|
||||||
|
end
|
||||||
|
object DEFstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'DEFstr1'
|
||||||
|
end
|
||||||
|
object DEFstr2: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 48
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
Text = 'Edit1'
|
||||||
|
end
|
||||||
|
object DEFstr3: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 48
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
Text = 'Edit1'
|
||||||
|
end
|
||||||
|
object DEFstr4: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 48
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
Text = 'Edit1'
|
||||||
|
end
|
||||||
|
object defnote1: TMemo
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 120
|
||||||
|
Width = 581
|
||||||
|
Height = 60
|
||||||
|
Lines.Strings = (
|
||||||
|
'Memo1')
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object defnote2: TMemo
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 184
|
||||||
|
Width = 581
|
||||||
|
Height = 60
|
||||||
|
Lines.Strings = (
|
||||||
|
'Memo1')
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 72
|
||||||
|
Width = 141
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 8
|
||||||
|
Text = 'PCS'
|
||||||
|
Items.Strings = (
|
||||||
|
'PCS')
|
||||||
|
end
|
||||||
|
object cxImage1: TcxImage
|
||||||
|
Left = 852
|
||||||
|
Top = 28
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
|
TabOrder = 9
|
||||||
|
Height = 209
|
||||||
|
Width = 301
|
||||||
|
end
|
||||||
|
object DEFFlt2: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 72
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 10
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt1: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 72
|
||||||
|
Properties.DecimalPlaces = 2
|
||||||
|
Properties.DisplayFormat = '0.00'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 11
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFDate1: TDateTimePicker
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 96
|
||||||
|
Width = 141
|
||||||
|
Height = 20
|
||||||
|
Date = 41855.391053391210000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41855.391053391210000000
|
||||||
|
TabOrder = 12
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox2: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 257
|
||||||
|
Width = 1240
|
||||||
|
Height = 228
|
||||||
|
Align = alTop
|
||||||
|
Caption = #21046#29256#20449#24687
|
||||||
|
TabOrder = 1
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 20
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #21046#29256#23610#23544
|
||||||
|
end
|
||||||
|
object Label15: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 92
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20960' '#39068' '#33394
|
||||||
|
end
|
||||||
|
object Label16: TLabel
|
||||||
|
Left = 388
|
||||||
|
Top = 96
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #21360#21047#26448#26009
|
||||||
|
end
|
||||||
|
object Label18: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 116
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #34955#23376#21402#24230
|
||||||
|
end
|
||||||
|
object Label19: TLabel
|
||||||
|
Left = 388
|
||||||
|
Top = 116
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#25968#37327
|
||||||
|
end
|
||||||
|
object Label21: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 140
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #21046#29256#21378#21830
|
||||||
|
end
|
||||||
|
object Label20: TLabel
|
||||||
|
Left = 792
|
||||||
|
Top = 20
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #21046#29256#22270#29255
|
||||||
|
end
|
||||||
|
object defnote3: TMemo
|
||||||
|
Tag = 2
|
||||||
|
Left = 84
|
||||||
|
Top = 16
|
||||||
|
Width = 581
|
||||||
|
Height = 69
|
||||||
|
Lines.Strings = (
|
||||||
|
'Memo1')
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DEFstr8: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 84
|
||||||
|
Top = 112
|
||||||
|
Width = 217
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'DEFstr8'
|
||||||
|
end
|
||||||
|
object DEFstr6: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 84
|
||||||
|
Top = 88
|
||||||
|
Width = 217
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'Edit10'
|
||||||
|
end
|
||||||
|
object DEFstr7: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 444
|
||||||
|
Top = 88
|
||||||
|
Width = 217
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
Text = 'Edit10'
|
||||||
|
end
|
||||||
|
object DEFstr9: TBtnEditA
|
||||||
|
Tag = 2
|
||||||
|
Left = 84
|
||||||
|
Top = 136
|
||||||
|
Width = 217
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object cxImage2: TcxImage
|
||||||
|
Left = 852
|
||||||
|
Top = 11
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
|
TabOrder = 5
|
||||||
|
Height = 209
|
||||||
|
Width = 305
|
||||||
|
end
|
||||||
|
object DEFFlt3: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 444
|
||||||
|
Top = 112
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 6
|
||||||
|
Width = 217
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox3: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 485
|
||||||
|
Width = 1240
|
||||||
|
Height = 153
|
||||||
|
Align = alClient
|
||||||
|
Caption = #21253#35013#20449#24687
|
||||||
|
TabOrder = 2
|
||||||
|
object Label22: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #21253#35013#26041#24335
|
||||||
|
end
|
||||||
|
object Label23: TLabel
|
||||||
|
Left = 252
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#35013#37327
|
||||||
|
end
|
||||||
|
object Label24: TLabel
|
||||||
|
Left = 468
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#21333#20301
|
||||||
|
end
|
||||||
|
object Label25: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#38271#24230
|
||||||
|
end
|
||||||
|
object Label26: TLabel
|
||||||
|
Left = 252
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#23485#24230
|
||||||
|
end
|
||||||
|
object Label27: TLabel
|
||||||
|
Left = 468
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#39640#24230
|
||||||
|
end
|
||||||
|
object Label28: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#20307#31215
|
||||||
|
end
|
||||||
|
object Label29: TLabel
|
||||||
|
Left = 252
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#27611#37325
|
||||||
|
end
|
||||||
|
object Label30: TLabel
|
||||||
|
Left = 468
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22806#31665#20928#37325
|
||||||
|
end
|
||||||
|
object Label31: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 100
|
||||||
|
Width = 42
|
||||||
|
Height = 12
|
||||||
|
Caption = '20#'#35013#37327
|
||||||
|
end
|
||||||
|
object Label32: TLabel
|
||||||
|
Left = 252
|
||||||
|
Top = 100
|
||||||
|
Width = 42
|
||||||
|
Height = 12
|
||||||
|
Caption = '40#'#35013#37327
|
||||||
|
end
|
||||||
|
object Label33: TLabel
|
||||||
|
Left = 468
|
||||||
|
Top = 100
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = '40HQ#'#35013#37327
|
||||||
|
end
|
||||||
|
object DEFstr10: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'Edit1'
|
||||||
|
end
|
||||||
|
object DEFstr11: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 524
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'CTNS'
|
||||||
|
Items.Strings = (
|
||||||
|
'CTNS')
|
||||||
|
end
|
||||||
|
object DEFFlt5: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 48
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 2
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt6: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 304
|
||||||
|
Top = 48
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 3
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt4: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 304
|
||||||
|
Top = 24
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 4
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt7: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 524
|
||||||
|
Top = 48
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 5
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt8: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 72
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 6
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt9: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 304
|
||||||
|
Top = 72
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 7
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt10: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 524
|
||||||
|
Top = 72
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 8
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt11: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 96
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 9
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt12: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 304
|
||||||
|
Top = 96
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 10
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object DEFFlt13: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 524
|
||||||
|
Top = 96
|
||||||
|
Properties.DecimalPlaces = 0
|
||||||
|
Properties.DisplayFormat = '0'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 11
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 1140
|
||||||
|
Top = 103
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #21024#38500
|
||||||
|
end
|
||||||
|
object N3: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #21478#23384#20026'...'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 720
|
||||||
|
Top = 71
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 720
|
||||||
|
Top = 139
|
||||||
|
end
|
||||||
|
object ADOQueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 736
|
||||||
|
Top = 227
|
||||||
|
end
|
||||||
|
object ADOQuerymain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 716
|
||||||
|
Top = 191
|
||||||
|
end
|
||||||
|
end
|
||||||
208
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP10.pas
Normal file
208
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP10.pas
Normal file
|
|
@ -0,0 +1,208 @@
|
||||||
|
unit U_ZdyAttInputCP10;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, cxPC, cxControls, ComCtrls, ToolWin, StdCtrls, Menus,
|
||||||
|
cxTextEdit, cxCurrencyEdit, BtnEdit, cxContainer, cxEdit, cxImage, DB,
|
||||||
|
ADODB;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputCP10 = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
GroupBox2: TGroupBox;
|
||||||
|
GroupBox3: TGroupBox;
|
||||||
|
Label1: TLabel;
|
||||||
|
zdyCode: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
zdyName: TEdit;
|
||||||
|
Label3: TLabel;
|
||||||
|
DEFstr1: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
Label10: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
Label12: TLabel;
|
||||||
|
DEFstr2: TEdit;
|
||||||
|
DEFstr3: TEdit;
|
||||||
|
DEFstr4: TEdit;
|
||||||
|
defnote1: TMemo;
|
||||||
|
defnote2: TMemo;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
Label13: TLabel;
|
||||||
|
cxImage1: TcxImage;
|
||||||
|
Label14: TLabel;
|
||||||
|
defnote3: TMemo;
|
||||||
|
Label15: TLabel;
|
||||||
|
DEFstr8: TEdit;
|
||||||
|
Label16: TLabel;
|
||||||
|
Label17: TLabel;
|
||||||
|
Label18: TLabel;
|
||||||
|
Label19: TLabel;
|
||||||
|
Label21: TLabel;
|
||||||
|
DEFstr6: TEdit;
|
||||||
|
DEFstr7: TEdit;
|
||||||
|
DEFstr9: TBtnEditA;
|
||||||
|
Label20: TLabel;
|
||||||
|
cxImage2: TcxImage;
|
||||||
|
Label22: TLabel;
|
||||||
|
DEFstr10: TEdit;
|
||||||
|
Label23: TLabel;
|
||||||
|
Label24: TLabel;
|
||||||
|
DEFstr11: TComboBox;
|
||||||
|
Label25: TLabel;
|
||||||
|
Label26: TLabel;
|
||||||
|
Label27: TLabel;
|
||||||
|
DEFFlt2: TcxCurrencyEdit;
|
||||||
|
DEFFlt5: TcxCurrencyEdit;
|
||||||
|
DEFFlt6: TcxCurrencyEdit;
|
||||||
|
DEFFlt4: TcxCurrencyEdit;
|
||||||
|
DEFFlt7: TcxCurrencyEdit;
|
||||||
|
Label28: TLabel;
|
||||||
|
DEFFlt8: TcxCurrencyEdit;
|
||||||
|
Label29: TLabel;
|
||||||
|
DEFFlt9: TcxCurrencyEdit;
|
||||||
|
Label30: TLabel;
|
||||||
|
DEFFlt10: TcxCurrencyEdit;
|
||||||
|
Label31: TLabel;
|
||||||
|
DEFFlt11: TcxCurrencyEdit;
|
||||||
|
Label32: TLabel;
|
||||||
|
DEFFlt12: TcxCurrencyEdit;
|
||||||
|
Label33: TLabel;
|
||||||
|
DEFFlt13: TcxCurrencyEdit;
|
||||||
|
DEFFlt1: TcxCurrencyEdit;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
N3: TMenuItem;
|
||||||
|
DEFFlt3: TcxCurrencyEdit;
|
||||||
|
DEFDate1: TDateTimePicker;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryImage: TADOQuery;
|
||||||
|
ADOQuerymain: TADOQuery;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
function savedata():Boolean;
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FATID:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputCP10: TfrmZdyAttInputCP10;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp;
|
||||||
|
{$R *.dfm}
|
||||||
|
function TfrmZdyAttInputCP10.savedata():Boolean;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
if GetLSNo(ADOQueryCmd,FATID,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FATID)+'''');
|
||||||
|
Open;
|
||||||
|
If IsEmpty then
|
||||||
|
begin
|
||||||
|
append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTmp);
|
||||||
|
end;
|
||||||
|
SSetsaveSqlNew(ADOQueryCmd,'KH_Zdy_Attachment',GroupBox1,2);
|
||||||
|
SSetsaveSqlNew(ADOQueryCmd,'KH_Zdy_Attachment',GroupBox2,2);
|
||||||
|
SSetsaveSqlNew(ADOQueryCmd,'KH_Zdy_Attachment',GroupBox3,2);
|
||||||
|
FieldByName('ATID').Value:=Trim(FATID);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputCP10.InitGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A');
|
||||||
|
sql.Add('where ATID='+quotedstr(trim(FATID)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF not ADOQueryMain.IsEmpty then
|
||||||
|
begin
|
||||||
|
SCSHDataNew(ADOQueryMain,GroupBox1,2);
|
||||||
|
SCSHDataNew(ADOQueryMain,GroupBox2,2);
|
||||||
|
SCSHDataNew(ADOQueryMain,GroupBox3,2);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP10.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputCP10:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP10.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP10.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel1.Align:=alclient;
|
||||||
|
clearControl(GroupBox1,2);
|
||||||
|
clearControl(GroupBox2,2);
|
||||||
|
clearControl(GroupBox3,2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP10.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF trim(zdyCode.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('产品编号不能为空!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
AdoqueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
IF not savedata() then
|
||||||
|
begin
|
||||||
|
AdoqueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
AdoqueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
AdoqueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
202
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP20.dfm
Normal file
202
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP20.dfm
Normal file
|
|
@ -0,0 +1,202 @@
|
||||||
|
object frmZdyAttInputCP20: TfrmZdyAttInputCP20
|
||||||
|
Left = 219
|
||||||
|
Top = 254
|
||||||
|
Width = 920
|
||||||
|
Height = 370
|
||||||
|
Caption = #20135#21697#30446#24405#36755#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 904
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 904
|
||||||
|
Height = 301
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
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_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2defstr9: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'defNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 64
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
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
|
||||||
304
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP20.pas
Normal file
304
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP20.pas
Normal file
|
|
@ -0,0 +1,304 @@
|
||||||
|
unit U_ZdyAttInputCP20;
|
||||||
|
|
||||||
|
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,strutils, cxCurrencyEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputCP20 = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2defstr9: 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 ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2defstr9PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2Column5PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
fkhType:string;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputCP20: TfrmZdyAttInputCP20;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputCP20:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputCP20.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInputCP20.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'ML','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'KH_Zdy_Attachment',0);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('ZdyCode').Value:=Trim(maxId);
|
||||||
|
FieldByName('Mrate').Value:=CDS_HZ.fieldbyname('Mrate').AsFloat;
|
||||||
|
FieldByName('defflt1').Value:=CDS_HZ.fieldbyname('defflt1').AsFloat;
|
||||||
|
FieldByName('Type').Value:='CPML';
|
||||||
|
FieldByName('khType').Value:=trim(fkhType);
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyName='''+Trim(CDS_HZ.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''CPML'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('产品名称不能重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('供应商名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.v2Column6PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.v2defstr9PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP20.v2Column5PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr3').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
296
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP30.dfm
Normal file
296
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP30.dfm
Normal file
|
|
@ -0,0 +1,296 @@
|
||||||
|
object frmZdyAttInputCP30: TfrmZdyAttInputCP30
|
||||||
|
Left = 114
|
||||||
|
Top = 203
|
||||||
|
Width = 1205
|
||||||
|
Height = 434
|
||||||
|
Caption = #20135#21697#22270#29255#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poMainFormCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 96
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20960' '#39068' '#33394
|
||||||
|
end
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1189
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1189
|
||||||
|
Height = 330
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 1
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1189
|
||||||
|
Height = 330
|
||||||
|
Align = alClient
|
||||||
|
Caption = #20135#21697#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 28
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697'ID'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 476
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 52
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #33457' '#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867' '#22411
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 212
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#20215#26684
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22791' '#27880
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 688
|
||||||
|
Top = 24
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#22270#29255
|
||||||
|
end
|
||||||
|
object zdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'zdyCode'
|
||||||
|
end
|
||||||
|
object zdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'zdyName'
|
||||||
|
OnExit = zdyNameExit
|
||||||
|
end
|
||||||
|
object defNote3: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'defNote3'
|
||||||
|
end
|
||||||
|
object DEFstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 48
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Note: TMemo
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 76
|
||||||
|
Width = 581
|
||||||
|
Height = 97
|
||||||
|
Lines.Strings = (
|
||||||
|
'Memo1')
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object DEFFlt1: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 208
|
||||||
|
Properties.DecimalPlaces = 2
|
||||||
|
Properties.DisplayFormat = '0.00'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object Picture4: TcxDBImage
|
||||||
|
Left = 765
|
||||||
|
Top = 17
|
||||||
|
Hint = 'FileName'
|
||||||
|
DataBinding.DataField = 'FilesOther'
|
||||||
|
DataBinding.DataSource = DataSource1
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 6
|
||||||
|
Height = 300
|
||||||
|
Width = 400
|
||||||
|
end
|
||||||
|
object FileName: TcxButton
|
||||||
|
Left = 685
|
||||||
|
Top = 292
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #21152#36733#22270#29255
|
||||||
|
TabOrder = 7
|
||||||
|
OnClick = FileNameClick
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object defstr5: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 48
|
||||||
|
Width = 145
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 8
|
||||||
|
Text = #29616#36135
|
||||||
|
Items.Strings = (
|
||||||
|
#29616#36135
|
||||||
|
#29305#20215)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 1140
|
||||||
|
Top = 103
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #21024#38500
|
||||||
|
end
|
||||||
|
object N3: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #21478#23384#20026'...'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 676
|
||||||
|
Top = 71
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 720
|
||||||
|
Top = 139
|
||||||
|
end
|
||||||
|
object ADOQueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 616
|
||||||
|
Top = 219
|
||||||
|
end
|
||||||
|
object ADOQuerymain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 716
|
||||||
|
Top = 191
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryImage
|
||||||
|
Left = 676
|
||||||
|
Top = 183
|
||||||
|
end
|
||||||
|
end
|
||||||
214
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP30.pas
Normal file
214
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP30.pas
Normal file
|
|
@ -0,0 +1,214 @@
|
||||||
|
unit U_ZdyAttInputCP30;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, cxPC, cxControls, ComCtrls, ToolWin, StdCtrls, Menus,
|
||||||
|
cxTextEdit, cxCurrencyEdit, BtnEdit, cxContainer, cxEdit, cxImage, DB,
|
||||||
|
ADODB, cxDBEdit, cxLookAndFeelPainters, cxButtons,strUtils;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputCP30 = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
Label1: TLabel;
|
||||||
|
zdyCode: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
zdyName: TEdit;
|
||||||
|
Label3: TLabel;
|
||||||
|
defNote3: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
DEFstr1: TEdit;
|
||||||
|
Note: TMemo;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label17: TLabel;
|
||||||
|
DEFFlt1: TcxCurrencyEdit;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
N3: TMenuItem;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryImage: TADOQuery;
|
||||||
|
ADOQuerymain: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Picture4: TcxDBImage;
|
||||||
|
FileName: TcxButton;
|
||||||
|
defstr5: TComboBox;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FileNameClick(Sender: TObject);
|
||||||
|
procedure zdyNameExit(Sender: TObject);
|
||||||
|
private
|
||||||
|
function savedata():Boolean;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitImage();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FCYID:string;
|
||||||
|
fFlileFlag:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputCP30: TfrmZdyAttInputCP30;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, getpic;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmZdyAttInputCP30.InitImage();
|
||||||
|
begin
|
||||||
|
with ADOQueryImage do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File A');
|
||||||
|
sql.Add('where WBID='+quotedstr(trim(FCYID)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
function TfrmZdyAttInputCP30.savedata():Boolean;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
If IsEmpty then
|
||||||
|
begin
|
||||||
|
append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTmp);
|
||||||
|
end;
|
||||||
|
SSetsaveSqlNew(ADOQueryCmd,'KH_Zdy_Attachment',GroupBox1,2);
|
||||||
|
FieldByName('ATID').Value:=Trim(FCYID);
|
||||||
|
FieldByName('Type').Value:='CPTP';
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputCP30.InitGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A');
|
||||||
|
sql.Add('where ATID='+quotedstr(trim(FCYID)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF not ADOQueryMain.IsEmpty then
|
||||||
|
begin
|
||||||
|
SCSHDataNew(ADOQueryMain,GroupBox1,2);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP30.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputCP30:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP30.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP30.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel1.Align:=alclient;
|
||||||
|
clearControl(GroupBox1,2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP30.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF trim(zdyCode.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('产品ID不能为空!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
IF trim(zdyName.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('产品名称不能为空!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
IF rightBStr(trim(zdyName.Text),1)<>'#' then
|
||||||
|
zdyName.Text:=trim(zdyName.Text)+'#';
|
||||||
|
|
||||||
|
AdoqueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
IF not savedata() then
|
||||||
|
begin
|
||||||
|
AdoqueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
AdoqueryCmd.Connection.CommitTrans;
|
||||||
|
application.MessageBox('保存成功!','提示信息');
|
||||||
|
self.ModalResult:=1;
|
||||||
|
except
|
||||||
|
AdoqueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('保存失败!','提示信息',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP30.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
IF FCYID='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,FCYID,'CT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
zdyCode.Text:=trim(FCYID);
|
||||||
|
end;
|
||||||
|
initGrid();
|
||||||
|
InitImage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP30.FileNameClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FormGetPic:=TFormGetPic.create(self);
|
||||||
|
with FormGetPic do
|
||||||
|
begin
|
||||||
|
fFlileFlag:=self.fFlileFlag;
|
||||||
|
fkeyNo:=trim(zdyCode.Text);
|
||||||
|
pat1:='FileName';
|
||||||
|
pic1:='FilesOther';
|
||||||
|
FTFType:='CT';
|
||||||
|
If showmodal=1 then
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
Initimage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP30.zdyNameExit(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF rightBStr(trim(zdyName.Text),1)<>'#' then
|
||||||
|
zdyName.Text:=trim(zdyName.Text)+'#';
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
176
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_HX.dfm
Normal file
176
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_HX.dfm
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
object frmZdyAttInputCP_HX: TfrmZdyAttInputCP_HX
|
||||||
|
Left = 219
|
||||||
|
Top = 254
|
||||||
|
Width = 920
|
||||||
|
Height = 370
|
||||||
|
Caption = #20135#21697#33457#22411#20449#24687#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 904
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 904
|
||||||
|
Height = 301
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
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
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 137
|
||||||
|
end
|
||||||
|
object v2defstr9: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#25551#36848
|
||||||
|
DataBinding.FieldName = 'defNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 130
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 203
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
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
|
||||||
298
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_HX.pas
Normal file
298
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_HX.pas
Normal file
|
|
@ -0,0 +1,298 @@
|
||||||
|
unit U_ZdyAttInputCP_HX;
|
||||||
|
|
||||||
|
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,strutils, cxCurrencyEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputCP_HX = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2defstr9: 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 ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2defstr9PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2Column5PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
fkhType:string;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputCP_HX: TfrmZdyAttInputCP_HX;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputCP_HX:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputCP_HX.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInputCP_HX.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'ML','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'KH_Zdy_Attachment',0);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('ZdyCode').Value:=Trim(maxId);
|
||||||
|
FieldByName('Type').Value:='CPHX';
|
||||||
|
// FieldByName('khType').Value:=trim(fkhType);
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyName='''+Trim(CDS_HZ.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''CPML'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('产品名称不能重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('花型名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.v2Column6PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.v2defstr9PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_HX.v2Column5PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr3').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
308
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_other.dfm
Normal file
308
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_other.dfm
Normal file
|
|
@ -0,0 +1,308 @@
|
||||||
|
object frmZdyAttInputCP_other: TfrmZdyAttInputCP_other
|
||||||
|
Left = 130
|
||||||
|
Top = 208
|
||||||
|
Width = 1213
|
||||||
|
Height = 429
|
||||||
|
Caption = #20135#21697#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poMainFormCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 96
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20960' '#39068' '#33394
|
||||||
|
end
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1197
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1197
|
||||||
|
Height = 330
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 1
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1197
|
||||||
|
Height = 330
|
||||||
|
Align = alClient
|
||||||
|
Caption = #20135#21697#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 28
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697'ID'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 476
|
||||||
|
Top = 28
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068' '#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 212
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#20215#26684
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 76
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22791' '#27880
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 688
|
||||||
|
Top = 24
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#22270#29255
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 476
|
||||||
|
Top = 52
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #30382' '#37325
|
||||||
|
end
|
||||||
|
object zdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'zdyCode'
|
||||||
|
end
|
||||||
|
object zdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'zdyName'
|
||||||
|
OnExit = zdyNameExit
|
||||||
|
end
|
||||||
|
object defNote3: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 24
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'defNote3'
|
||||||
|
end
|
||||||
|
object DEFstr3: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 48
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnExit = DEFstr3Exit
|
||||||
|
end
|
||||||
|
object DEFstr6: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 48
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
Text = 'Edit1'
|
||||||
|
end
|
||||||
|
object Note: TMemo
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 76
|
||||||
|
Width = 581
|
||||||
|
Height = 97
|
||||||
|
Lines.Strings = (
|
||||||
|
'Memo1')
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object DEFFlt1: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 88
|
||||||
|
Top = 208
|
||||||
|
Properties.DecimalPlaces = 2
|
||||||
|
Properties.DisplayFormat = '0.00'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 6
|
||||||
|
Visible = False
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object Picture4: TcxDBImage
|
||||||
|
Left = 765
|
||||||
|
Top = 17
|
||||||
|
Hint = 'FileName'
|
||||||
|
DataBinding.DataField = 'FilesOther'
|
||||||
|
DataBinding.DataSource = DataSource1
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 7
|
||||||
|
Height = 300
|
||||||
|
Width = 400
|
||||||
|
end
|
||||||
|
object FileName: TcxButton
|
||||||
|
Left = 685
|
||||||
|
Top = 292
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #21152#36733#22270#29255
|
||||||
|
TabOrder = 8
|
||||||
|
OnClick = FileNameClick
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object DEFFlt3: TcxCurrencyEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 48
|
||||||
|
Properties.DecimalPlaces = 2
|
||||||
|
Properties.DisplayFormat = '0.00'
|
||||||
|
Properties.NullString = '0'
|
||||||
|
TabOrder = 9
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 1140
|
||||||
|
Top = 103
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #21024#38500
|
||||||
|
end
|
||||||
|
object N3: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #21478#23384#20026'...'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 676
|
||||||
|
Top = 71
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 720
|
||||||
|
Top = 139
|
||||||
|
end
|
||||||
|
object ADOQueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 616
|
||||||
|
Top = 219
|
||||||
|
end
|
||||||
|
object ADOQuerymain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 716
|
||||||
|
Top = 191
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryImage
|
||||||
|
Left = 676
|
||||||
|
Top = 183
|
||||||
|
end
|
||||||
|
end
|
||||||
247
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_other.pas
Normal file
247
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP_other.pas
Normal file
|
|
@ -0,0 +1,247 @@
|
||||||
|
unit U_ZdyAttInputCP_other;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, cxPC, cxControls, ComCtrls, ToolWin, StdCtrls, Menus,
|
||||||
|
cxTextEdit, cxCurrencyEdit, BtnEdit, cxContainer, cxEdit, cxImage, DB,
|
||||||
|
ADODB, cxDBEdit, cxLookAndFeelPainters, cxButtons,strUtils;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputCP_other = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
Label1: TLabel;
|
||||||
|
zdyCode: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
zdyName: TEdit;
|
||||||
|
Label3: TLabel;
|
||||||
|
defNote3: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
DEFstr3: TEdit;
|
||||||
|
DEFstr6: TEdit;
|
||||||
|
Note: TMemo;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label17: TLabel;
|
||||||
|
DEFFlt1: TcxCurrencyEdit;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
N3: TMenuItem;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryImage: TADOQuery;
|
||||||
|
ADOQuerymain: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Picture4: TcxDBImage;
|
||||||
|
FileName: TcxButton;
|
||||||
|
DEFFlt3: TcxCurrencyEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FileNameClick(Sender: TObject);
|
||||||
|
procedure DEFstr3Exit(Sender: TObject);
|
||||||
|
procedure zdyNameExit(Sender: TObject);
|
||||||
|
private
|
||||||
|
function savedata():Boolean;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitImage();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FCYID:string;
|
||||||
|
fFlileFlag:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputCP_other: TfrmZdyAttInputCP_other;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, getpic;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmZdyAttInputCP_other.InitImage();
|
||||||
|
begin
|
||||||
|
with ADOQueryImage do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File A');
|
||||||
|
sql.Add('where WBID='+quotedstr(trim(FCYID)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
function TfrmZdyAttInputCP_other.savedata():Boolean;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
If IsEmpty then
|
||||||
|
begin
|
||||||
|
append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTmp);
|
||||||
|
end;
|
||||||
|
SSetsaveSqlNew(ADOQueryCmd,'KH_Zdy_Attachment',GroupBox1,2);
|
||||||
|
FieldByName('ATID').Value:=Trim(FCYID);
|
||||||
|
FieldByName('DEFFlt3').Value:=strtofloatdef(DEFFlt3.Text,0);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyName='''+Trim(zdyName.Text)+''' and DEFstr3='''+Trim(DEFstr3.Text)+''' ');
|
||||||
|
sql.Add(' and Type=''CP'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('产品名称颜色不能重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputCP_other.InitGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A');
|
||||||
|
sql.Add('where ATID='+quotedstr(trim(FCYID)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF not ADOQueryMain.IsEmpty then
|
||||||
|
begin
|
||||||
|
SCSHDataNew(ADOQueryMain,GroupBox1,2);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputCP_other:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel1.Align:=alclient;
|
||||||
|
clearControl(GroupBox1,2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF trim(zdyCode.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('产品ID不能为空!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
IF trim(zdyName.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('产品名称不能为空!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
IF trim(DEFstr3.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('颜色不能为空!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
IF rightBStr(trim(zdyName.Text),1)<>'#' then
|
||||||
|
zdyName.Text:=trim(zdyName.Text)+'#';
|
||||||
|
IF rightBStr(trim(defstr3.Text),1)<>'#' then
|
||||||
|
defstr3.Text:=trim(defstr3.Text)+'#';
|
||||||
|
|
||||||
|
AdoqueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
IF not savedata() then
|
||||||
|
begin
|
||||||
|
AdoqueryCmd.Connection.RollbackTrans;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
AdoqueryCmd.Connection.CommitTrans;
|
||||||
|
application.MessageBox('保存成功!','提示信息');
|
||||||
|
self.ModalResult:=1;
|
||||||
|
except
|
||||||
|
AdoqueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('保存失败!','提示信息',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
IF FCYID='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,FCYID,'CP','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
zdyCode.Text:=trim(FCYID);
|
||||||
|
end;
|
||||||
|
initGrid();
|
||||||
|
InitImage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.FileNameClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FormGetPic:=TFormGetPic.create(self);
|
||||||
|
with FormGetPic do
|
||||||
|
begin
|
||||||
|
fFlileFlag:=self.fFlileFlag;
|
||||||
|
fkeyNo:=trim(zdyCode.Text);
|
||||||
|
pat1:='FileName';
|
||||||
|
pic1:='FilesOther';
|
||||||
|
FTFType:='HX';
|
||||||
|
If showmodal=1 then
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
Initimage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.DEFstr3Exit(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF rightBStr(trim(defstr3.Text),1)<>'#' then
|
||||||
|
defstr3.Text:=trim(defstr3.Text)+'#';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputCP_other.zdyNameExit(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF rightBStr(trim(zdyName.Text),1)<>'#' then
|
||||||
|
zdyName.Text:=trim(zdyName.Text)+'#';
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
231
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.dfm
Normal file
231
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.dfm
Normal file
|
|
@ -0,0 +1,231 @@
|
||||||
|
object frmZdyAttInputGYS: TfrmZdyAttInputGYS
|
||||||
|
Left = 219
|
||||||
|
Top = 254
|
||||||
|
Width = 920
|
||||||
|
Height = 370
|
||||||
|
Caption = #20379#24212#21830#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 904
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 904
|
||||||
|
Height = 301
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
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>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#31616#31216
|
||||||
|
DataBinding.FieldName = 'zdyNameZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#22383#24067#21378
|
||||||
|
#21152#24037#21378
|
||||||
|
#22383#24067#20179)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2DEFStr6: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
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
|
||||||
251
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.pas
Normal file
251
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.pas
Normal file
|
|
@ -0,0 +1,251 @@
|
||||||
|
unit U_ZdyAttInputGYS;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputGYS = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2DEFStr6: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
v2Column2: 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 ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
fDEFstr5:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputGYS: TfrmZdyAttInputGYS;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputGYS:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('供应商资料录入1',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('供应商资料录入1',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
IF trim(fDEFstr5)<>'' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.FieldByName('DEFstr5').Value:=trim(fDEFstr5);
|
||||||
|
v2Column8.Options.Editing:=false;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInputGYS.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID,fzdyCode:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'PB','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('zdyCode').Value:=Trim(fzdyCode);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'',0);
|
||||||
|
FieldByName('Type').Value:='GYS';
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='GYS';
|
||||||
|
FieldByName('MainType').Value:=Trim(CDS_HZ.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_HZ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''GYS'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('供应商名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
end.
|
||||||
579
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.dfm
Normal file
579
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.dfm
Normal file
|
|
@ -0,0 +1,579 @@
|
||||||
|
object frmZdyAttachCP: TfrmZdyAttachCP
|
||||||
|
Left = 275
|
||||||
|
Top = 80
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnResize = FormResize
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1366
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 113
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
Caption = #25552#21462'Excel'#25968#25454
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 428
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 491
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 578
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 211
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 821
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 395
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 575
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 261
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 71
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 850
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#25104#21697
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
object DEFstr3: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 425
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr6: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 625
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1366
|
||||||
|
Height = 645
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnFocusedRecordChanged = Tv2FocusedRecordChanged
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column8
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column10
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 94
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 120
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'defNote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Mrate: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#32553#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'Mrate'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #24037#33402
|
||||||
|
DataBinding.FieldName = 'defNote2'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2defflt1: TcxGridDBColumn
|
||||||
|
Caption = #20215#26684#22686#24133
|
||||||
|
DataBinding.FieldName = 'defflt1'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 188
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KCRollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'KCQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #30382#37325
|
||||||
|
DataBinding.FieldName = 'defflt3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 344
|
||||||
|
Top = 112
|
||||||
|
Width = 269
|
||||||
|
Height = 177
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26631#31614#21517#31216
|
||||||
|
end
|
||||||
|
object RadioGroup1: TRadioGroup
|
||||||
|
Left = 37
|
||||||
|
Top = 29
|
||||||
|
Width = 192
|
||||||
|
Height = 88
|
||||||
|
ItemIndex = 0
|
||||||
|
Items.Strings = (
|
||||||
|
#20135#21697#26631#31614
|
||||||
|
#20135#21697#26631#31614'1')
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object cxButton1: TcxButton
|
||||||
|
Left = 28
|
||||||
|
Top = 140
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #25171#21360
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxButton1Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton2: TcxButton
|
||||||
|
Left = 172
|
||||||
|
Top = 140
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #21462#28040
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = cxButton2Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Pan_Image: TPanel
|
||||||
|
Left = 708
|
||||||
|
Top = 381
|
||||||
|
Width = 400
|
||||||
|
Height = 300
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Panel2'
|
||||||
|
TabOrder = 4
|
||||||
|
object Pic_Image1: TcxDBImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Hint = 'FileName'
|
||||||
|
Align = alClient
|
||||||
|
DataBinding.DataField = 'FilesOther'
|
||||||
|
DataBinding.DataSource = DSImage
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.GraphicTransparency = gtTransparent
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 0
|
||||||
|
OnDblClick = Pic_Image1DblClick
|
||||||
|
Height = 300
|
||||||
|
Width = 400
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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 = 708
|
||||||
|
Top = 228
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 700
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
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 = 948
|
||||||
|
Top = 204
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 576
|
||||||
|
Top = 321
|
||||||
|
end
|
||||||
|
object ADOQueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 393
|
||||||
|
end
|
||||||
|
object DSImage: TDataSource
|
||||||
|
DataSet = ADOQueryImage
|
||||||
|
Left = 600
|
||||||
|
Top = 433
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 616
|
||||||
|
Top = 322
|
||||||
|
end
|
||||||
|
end
|
||||||
607
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.pas
Normal file
607
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.pas
Normal file
|
|
@ -0,0 +1,607 @@
|
||||||
|
unit U_ZdyAttachCP;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils,StrUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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, Menus, cxLookAndFeelPainters, cxButtons,
|
||||||
|
cxContainer, cxImage, cxDBEdit, cxLookAndFeels, cxNavigator, 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
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Mrate: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2defflt1: TcxGridDBColumn;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
|
RadioGroup1: TRadioGroup;
|
||||||
|
Label4: TLabel;
|
||||||
|
cxButton1: TcxButton;
|
||||||
|
cxButton2: TcxButton;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
Pan_Image: TPanel;
|
||||||
|
Pic_Image1: TcxDBImage;
|
||||||
|
ADOQueryImage: TADOQuery;
|
||||||
|
DSImage: TDataSource;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column17: TcxGridDBColumn;
|
||||||
|
DEFstr3: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
DEFstr6: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
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 ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure cxButton2Click(Sender: TObject);
|
||||||
|
procedure cxButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure FormResize(Sender: TObject);
|
||||||
|
procedure Tv2FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure Pic_Image1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
fFlileFlag:string;
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitImage();
|
||||||
|
procedure LookImage(FileName:string);
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP: TfrmZdyAttachCP;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP, U_ZdyAttInputCP_other;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmZdyAttachCP.LookImage(FileName:string);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
// ff: TADOBlobStream;
|
||||||
|
// FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
|
||||||
|
sFieldName:=leftbstr(ExtractFilePath(Application.ExeName),1)+':\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
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(fFlileFlag+'\'+ 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 TfrmZdyAttachCP.InitImage();
|
||||||
|
begin
|
||||||
|
|
||||||
|
ADOQueryImage.Close;
|
||||||
|
if CDS_HZ.IsEmpty then exit;
|
||||||
|
with ADOQueryImage do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File A');
|
||||||
|
sql.Add('where WBID='+quotedstr(trim(CDS_HZ.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('and TFType='+quotedstr(trim('HX')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,defNote3,DEFstr3,DEFstr5,DEFstr4,');
|
||||||
|
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,defflt2,defflt3,Filler,FillTime, ');
|
||||||
|
sql.Add(' kcRollNum=(select count(MJID) from CK_BanCP_KC X where X.C_CodeName=A.zdyName and X.C_Color=A.defstr3 and X.KCQty>0),');
|
||||||
|
sql.Add(' kcQty=(select sum(kcQty) from CK_BanCP_KC X where X.C_CodeName=A.zdyName and X.C_Color=A.defstr3 and X.KCQty>0)');
|
||||||
|
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A where Type=''CP'' ');
|
||||||
|
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
sql.Add(' order by zdyName ');
|
||||||
|
// sql.Add(' order by zdyName ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('产品资料13',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
fFlileFlag:=UserDataFlag+'HX';
|
||||||
|
ReadCxGrid('产品资料13',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.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 TfrmZdyAttachCP.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP_other:=TfrmZdyAttInputCP_other.Create(Application);
|
||||||
|
with frmZdyAttInputCP_other do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
fFlileFlag:=self.fFlileFlag;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP_other.Free;
|
||||||
|
end;
|
||||||
|
{ try
|
||||||
|
frmZdyAttInputCP:=TfrmZdyAttInputCP.Create(Application);
|
||||||
|
with frmZdyAttInputCP do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP_other:=TfrmZdyAttInputCP_other.Create(Application);
|
||||||
|
with frmZdyAttInputCP_other do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
fFlileFlag:=self.fFlileFlag;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP_other.Free;
|
||||||
|
end;
|
||||||
|
{
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP:=TfrmZdyAttInputCP.Create(Application);
|
||||||
|
with frmZdyAttInputCP do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp,WorkBook:Variant;
|
||||||
|
i,j,k,ExcelRowCount:integer;
|
||||||
|
maxId:string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
ExcelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter:='*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
ExcelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
k:=0;
|
||||||
|
for i:=1 to 20 do
|
||||||
|
begin
|
||||||
|
if trim(excelapp.Cells[1,i].value)='' then break;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyCode';
|
||||||
|
dFdDy[k].FdDysName:='产品编号';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyName';
|
||||||
|
dFdDy[k].FdDysName:='产品名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='中文名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote3';
|
||||||
|
dFdDy[k].FdDysName:='中文名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='颜色' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr3';
|
||||||
|
dFdDy[k].FdDysName:='颜色';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='中文颜色' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr6';
|
||||||
|
dFdDy[k].FdDysName:='中文颜色';
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='类型' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr5';
|
||||||
|
dFdDy[k].FdDysName:='类型';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='规格' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr1';
|
||||||
|
dFdDy[k].FdDysName:='规格';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='成份' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr2';
|
||||||
|
dFdDy[k].FdDysName:='成份';
|
||||||
|
end;
|
||||||
|
k:=k+1;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
for i := 2 to excelrowcount do
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
for j:=0 to k-1 do
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('zdyCode').Value:=Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('khType').Value:=Trim(fkhType);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
|
||||||
|
{ with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+trim(maxId)+''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(maxId)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(ADOQueryTemp.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
FieldByName('MainType').Value:=Trim(ADOQueryTemp.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;}
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
InitGrid();
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.cxButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.cxButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Txt,fImagePath:string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar:TMakebar;
|
||||||
|
Mixtext:TMixtext;
|
||||||
|
begin
|
||||||
|
IF CDS_HZ.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||||
|
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||||
|
Txt:=Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
||||||
|
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
|
||||||
|
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\'+trim(RadioGroup1.Items[RadioGroup1.ItemIndex])+'.rmf' ;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE']:=fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
RM1.PrintReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Application.MessageBox(PChar('没有找到文件'+fPrintFile),'提示',0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton6Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Left:=(self.Width-Panel2.Width) div 2;
|
||||||
|
Panel2.Top:=(self.Height-Panel2.Height) div 2 -100;
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Pan_image.Left:=self.Width-Pan_image.Width-30;
|
||||||
|
Pan_image.Top:=self.Height-Pan_image.Height-80;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.Tv2FocusedRecordChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||||
|
AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
InitImage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.Pic_Image1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF TcxDBImage(Sender).Picture.Height=0 then exit;
|
||||||
|
|
||||||
|
LookImage(ADOQueryImage.fieldbyname(TcxDBImage(Sender).Hint).asstring);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
409
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP10.dfm
Normal file
409
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP10.dfm
Normal file
|
|
@ -0,0 +1,409 @@
|
||||||
|
object frmZdyAttachCP10: TfrmZdyAttachCP10
|
||||||
|
Left = 145
|
||||||
|
Top = 152
|
||||||
|
Width = 1062
|
||||||
|
Height = 529
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1046
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 113
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25552#21462'Excel'#25968#25454
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 432
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 495
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1046
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 191
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 369
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 241
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 71
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 398
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#25104#21697
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1046
|
||||||
|
Height = 421
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 53
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #21517#31216
|
||||||
|
DataBinding.FieldName = 'defNote1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Mrate: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#32553#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'Mrate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #24037#33402
|
||||||
|
DataBinding.FieldName = 'defNote2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #33457#21495
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#25968
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
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
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
end
|
||||||
386
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP10.pas
Normal file
386
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP10.pas
Normal file
|
|
@ -0,0 +1,386 @@
|
||||||
|
unit U_ZdyAttachCP10;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP10 = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Mrate: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
v2Column17: 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 ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP10: TfrmZdyAttachCP10;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP, U_ZdyAttInputCP10;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr3,DEFNote1,Type,Filler,Filltime,DEFstr4,DEFstr5,editer,editTime,valid,mrate from KH_Zdy_Attachment where Type=''CP'' order by zdyName,dbo.getNum(Defstr3) ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP10:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('产品资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP10.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('产品资料',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.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 TfrmZdyAttachCP10.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP10:=TfrmZdyAttInputCP10.Create(Application);
|
||||||
|
with frmZdyAttInputCP10 do
|
||||||
|
begin
|
||||||
|
FATID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP10.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP10:=TfrmZdyAttInputCP10.Create(Application);
|
||||||
|
with frmZdyAttInputCP10 do
|
||||||
|
begin
|
||||||
|
FATID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP10.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP10.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp,WorkBook:Variant;
|
||||||
|
i,j,k,ExcelRowCount:integer;
|
||||||
|
maxId:string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
ExcelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter:='*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
ExcelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
k:=0;
|
||||||
|
for i:=1 to 20 do
|
||||||
|
begin
|
||||||
|
if trim(excelapp.Cells[1,i].value)='' then break;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyCode';
|
||||||
|
dFdDy[k].FdDysName:='产品编号';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyName';
|
||||||
|
dFdDy[k].FdDysName:='产品名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote1';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='颜色' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr3';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='工艺' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote2';
|
||||||
|
dFdDy[k].FdDysName:='工艺';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='类型' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr5';
|
||||||
|
dFdDy[k].FdDysName:='类型';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='规格' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr1';
|
||||||
|
dFdDy[k].FdDysName:='规格';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='成份' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr2';
|
||||||
|
dFdDy[k].FdDysName:='成份';
|
||||||
|
end;
|
||||||
|
k:=k+1;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
for i := 2 to excelrowcount do
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
for j:=0 to k-1 do
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+trim(maxId)+''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(maxId)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(ADOQueryTemp.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
FieldByName('MainType').Value:=Trim(ADOQueryTemp.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
InitGrid();
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
406
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP20.dfm
Normal file
406
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP20.dfm
Normal file
|
|
@ -0,0 +1,406 @@
|
||||||
|
object frmZdyAttachCP20: TfrmZdyAttachCP20
|
||||||
|
Left = 111
|
||||||
|
Top = 136
|
||||||
|
Width = 1075
|
||||||
|
Height = 629
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1059
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 113
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
Caption = #25552#21462'Excel'#25968#25454
|
||||||
|
ImageIndex = 106
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 428
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 491
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 578
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1059
|
||||||
|
Height = 38
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 35
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 57
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 369
|
||||||
|
Top = 57
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 85
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 71
|
||||||
|
Top = 53
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 394
|
||||||
|
Top = 52
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#25104#21697
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 69
|
||||||
|
Width = 1059
|
||||||
|
Height = 522
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 120
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'defNote1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 155
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 384
|
||||||
|
Top = 128
|
||||||
|
Width = 269
|
||||||
|
Height = 181
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26631#31614#21517#31216
|
||||||
|
end
|
||||||
|
object RadioGroup1: TRadioGroup
|
||||||
|
Left = 37
|
||||||
|
Top = 29
|
||||||
|
Width = 192
|
||||||
|
Height = 116
|
||||||
|
ItemIndex = 0
|
||||||
|
Items.Strings = (
|
||||||
|
#20135#21697#26631#31614
|
||||||
|
#20135#21697#26631#31614'1'
|
||||||
|
#20135#21697#26631#31614'2('#26607#26725')'
|
||||||
|
#20135#21697#26631#31614'2('#28246#24030')'
|
||||||
|
#20135#21697#26631#31614'2('#24191#19996')')
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object cxButton1: TcxButton
|
||||||
|
Left = 24
|
||||||
|
Top = 152
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #25171#21360
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxButton1Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton2: TcxButton
|
||||||
|
Left = 172
|
||||||
|
Top = 152
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #21462#28040
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = cxButton2Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
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 = 708
|
||||||
|
Top = 228
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 700
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
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 = 948
|
||||||
|
Top = 204
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
end
|
||||||
443
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP20.pas
Normal file
443
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP20.pas
Normal file
|
|
@ -0,0 +1,443 @@
|
||||||
|
unit U_ZdyAttachCP20;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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, Menus, cxLookAndFeelPainters, cxButtons;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP20 = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
|
RadioGroup1: TRadioGroup;
|
||||||
|
Label4: TLabel;
|
||||||
|
cxButton1: TcxButton;
|
||||||
|
cxButton2: TcxButton;
|
||||||
|
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 ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure cxButton2Click(Sender: TObject);
|
||||||
|
procedure cxButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP20: TfrmZdyAttachCP20;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP20;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,DEFstr3,DEFstr5,DEFstr4,');
|
||||||
|
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,Filler,FillTime ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment where Type=''CPML'' ');
|
||||||
|
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
sql.Add(' order by zdyName,dbo.getNum(Defstr3) ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP20:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('产品目录资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP20.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('产品目录资料',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.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 TfrmZdyAttachCP20.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP20:=TfrmZdyAttInputCP20.Create(Application);
|
||||||
|
with frmZdyAttInputCP20 do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP20.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP20:=TfrmZdyAttInputCP20.Create(Application);
|
||||||
|
with frmZdyAttInputCP20 do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP20.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp,WorkBook:Variant;
|
||||||
|
i,j,k,ExcelRowCount:integer;
|
||||||
|
maxId:string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
ExcelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter:='*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
ExcelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
k:=0;
|
||||||
|
for i:=1 to 20 do
|
||||||
|
begin
|
||||||
|
if trim(excelapp.Cells[1,i].value)='' then break;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyCode';
|
||||||
|
dFdDy[k].FdDysName:='产品编号';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyName';
|
||||||
|
dFdDy[k].FdDysName:='产品名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote1';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='颜色' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr3';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='工艺' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote2';
|
||||||
|
dFdDy[k].FdDysName:='工艺';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='类型' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr5';
|
||||||
|
dFdDy[k].FdDysName:='类型';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='规格' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr1';
|
||||||
|
dFdDy[k].FdDysName:='规格';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='成份' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr2';
|
||||||
|
dFdDy[k].FdDysName:='成份';
|
||||||
|
end;
|
||||||
|
k:=k+1;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
for i := 2 to excelrowcount do
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
for j:=0 to k-1 do
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+trim(maxId)+''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(maxId)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(ADOQueryTemp.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
FieldByName('MainType').Value:=Trim(ADOQueryTemp.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
InitGrid();
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.cxButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.cxButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Txt,fImagePath:string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar:TMakebar;
|
||||||
|
Mixtext:TMixtext;
|
||||||
|
begin
|
||||||
|
IF CDS_HZ.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||||
|
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||||
|
Txt:=Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
||||||
|
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
|
||||||
|
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\'+trim(RadioGroup1.Items[RadioGroup1.ItemIndex])+'.rmf' ;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE']:=fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
||||||
|
RM1.ShowReport;
|
||||||
|
// RM1.PrintReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Application.MessageBox(PChar('没有找到文件'+fPrintFile),'提示',0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP20.ToolButton6Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Left:=(self.Width-Panel2.Width) div 2;
|
||||||
|
Panel2.Top:=(self.Height-Panel2.Height) div 2 -100;
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
460
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP30.dfm
Normal file
460
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP30.dfm
Normal file
|
|
@ -0,0 +1,460 @@
|
||||||
|
object frmZdyAttachCP30: TfrmZdyAttachCP30
|
||||||
|
Left = -8
|
||||||
|
Top = -8
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnResize = FormResize
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1366
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 465
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 191
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 369
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 241
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 71
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 398
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#29616#36135
|
||||||
|
#29305#20215)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1366
|
||||||
|
Height = 646
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
OnFocusedRecordChanged = Tv2FocusedRecordChanged
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
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>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 94
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 120
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'defNote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'defstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 186
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 188
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 520
|
||||||
|
Top = 116
|
||||||
|
Width = 269
|
||||||
|
Height = 177
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26631#31614#21517#31216
|
||||||
|
end
|
||||||
|
object RadioGroup1: TRadioGroup
|
||||||
|
Left = 37
|
||||||
|
Top = 29
|
||||||
|
Width = 192
|
||||||
|
Height = 88
|
||||||
|
ItemIndex = 0
|
||||||
|
Items.Strings = (
|
||||||
|
#20135#21697#26631#31614
|
||||||
|
#20135#21697#26631#31614'1')
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object cxButton1: TcxButton
|
||||||
|
Left = 28
|
||||||
|
Top = 140
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #25171#21360
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxButton1Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton2: TcxButton
|
||||||
|
Left = 172
|
||||||
|
Top = 140
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #21462#28040
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = cxButton2Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Pan_Image: TPanel
|
||||||
|
Left = 708
|
||||||
|
Top = 381
|
||||||
|
Width = 400
|
||||||
|
Height = 300
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Panel2'
|
||||||
|
TabOrder = 4
|
||||||
|
object Pic_Image1: TcxDBImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Hint = 'FileName'
|
||||||
|
Align = alClient
|
||||||
|
DataBinding.DataField = 'FilesOther'
|
||||||
|
DataBinding.DataSource = DSImage
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.GraphicTransparency = gtTransparent
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
Style.BorderStyle = ebsSingle
|
||||||
|
TabOrder = 0
|
||||||
|
OnDblClick = Pic_Image1DblClick
|
||||||
|
Height = 300
|
||||||
|
Width = 400
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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 = 708
|
||||||
|
Top = 228
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 700
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
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 = 948
|
||||||
|
Top = 204
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
object ADOQueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 864
|
||||||
|
Top = 273
|
||||||
|
end
|
||||||
|
object DSImage: TDataSource
|
||||||
|
DataSet = ADOQueryImage
|
||||||
|
Left = 824
|
||||||
|
Top = 289
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 784
|
||||||
|
Top = 178
|
||||||
|
end
|
||||||
|
end
|
||||||
383
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP30.pas
Normal file
383
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP30.pas
Normal file
|
|
@ -0,0 +1,383 @@
|
||||||
|
unit U_ZdyAttachCP30;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils,StrUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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, Menus, cxLookAndFeelPainters, cxButtons,
|
||||||
|
cxContainer, cxImage, cxDBEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP30 = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
|
RadioGroup1: TRadioGroup;
|
||||||
|
Label4: TLabel;
|
||||||
|
cxButton1: TcxButton;
|
||||||
|
cxButton2: TcxButton;
|
||||||
|
Pan_Image: TPanel;
|
||||||
|
Pic_Image1: TcxDBImage;
|
||||||
|
ADOQueryImage: TADOQuery;
|
||||||
|
DSImage: TDataSource;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
v2Column4: 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 ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure cxButton2Click(Sender: TObject);
|
||||||
|
procedure cxButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure FormResize(Sender: TObject);
|
||||||
|
procedure Tv2FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure Pic_Image1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
fFlileFlag:string;
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitImage();
|
||||||
|
procedure LookImage(FileName:string);
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP30: TfrmZdyAttachCP30;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP,
|
||||||
|
U_ZdyAttInputCP30;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmZdyAttachCP30.LookImage(FileName:string);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
// ff: TADOBlobStream;
|
||||||
|
// FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
|
||||||
|
sFieldName:=leftbstr(ExtractFilePath(Application.ExeName),1)+':\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
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(fFlileFlag+'\'+ 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 TfrmZdyAttachCP30.InitImage();
|
||||||
|
begin
|
||||||
|
ADOQueryImage.Close;
|
||||||
|
if CDS_HZ.IsEmpty then exit;
|
||||||
|
with ADOQueryImage do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File A');
|
||||||
|
sql.Add('where WBID='+quotedstr(trim(CDS_HZ.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('and TFType='+quotedstr(trim('CT')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
|
||||||
|
Close;
|
||||||
|
Filtered:=False;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,defNote3,DEFstr3,DEFstr5,DEFstr4,');
|
||||||
|
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,Filler,FillTime ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A where Type=''CPTP'' ');
|
||||||
|
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
sql.Add(' order by zdyName ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP30:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('产品资料14',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP30.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
fFlileFlag:=UserDataFlag+'CT';
|
||||||
|
ReadCxGrid('产品资料14',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.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 TfrmZdyAttachCP30.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP30:=TfrmZdyAttInputCP30.Create(Application);
|
||||||
|
with frmZdyAttInputCP30 do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
fFlileFlag:=self.fFlileFlag;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP30.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP30:=TfrmZdyAttInputCP30.Create(Application);
|
||||||
|
with frmZdyAttInputCP30 do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
fFlileFlag:=self.fFlileFlag;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP30.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.cxButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.cxButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Txt,fImagePath:string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar:TMakebar;
|
||||||
|
Mixtext:TMixtext;
|
||||||
|
begin
|
||||||
|
IF CDS_HZ.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||||
|
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||||
|
Txt:=Trim(CDS_HZ.fieldbyname('ZDYCODE').AsString);
|
||||||
|
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
|
||||||
|
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\'+trim(RadioGroup1.Items[RadioGroup1.ItemIndex])+'.rmf' ;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE']:=fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
// Rm2.DefaultCopies:=strtointdef(trim(ComboBox1.Text),1);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
RM1.PrintReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Application.MessageBox(PChar('没有找到文件'+fPrintFile),'提示',0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.ToolButton6Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Left:=(self.Width-Panel2.Width) div 2;
|
||||||
|
Panel2.Top:=(self.Height-Panel2.Height) div 2 -100;
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Pan_image.Left:=self.Width-Pan_image.Width-30;
|
||||||
|
Pan_image.Top:=self.Height-Pan_image.Height-80;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.Tv2FocusedRecordChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||||
|
AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
InitImage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP30.Pic_Image1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF TcxDBImage(Sender).Picture.Height=0 then exit;
|
||||||
|
|
||||||
|
LookImage(ADOQueryImage.fieldbyname(TcxDBImage(Sender).Hint).asstring);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
334
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX.dfm
Normal file
334
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX.dfm
Normal file
|
|
@ -0,0 +1,334 @@
|
||||||
|
object frmZdyAttachCP_HX: TfrmZdyAttachCP_HX
|
||||||
|
Left = 103
|
||||||
|
Top = 90
|
||||||
|
Width = 1111
|
||||||
|
Height = 628
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1095
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 113
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
Caption = #25552#21462'Excel'#25968#25454
|
||||||
|
ImageIndex = 106
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 428
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 491
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1095
|
||||||
|
Height = 38
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 35
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33457#22411#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 57
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 369
|
||||||
|
Top = 57
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 227
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33457#22411#25551#36848
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 85
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 71
|
||||||
|
Top = 53
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 394
|
||||||
|
Top = 52
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#25104#21697
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
object defNote1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 277
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1095
|
||||||
|
Height = 520
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 138
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#25551#36848
|
||||||
|
DataBinding.FieldName = 'defNote1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 148
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 159
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 155
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
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 = 708
|
||||||
|
Top = 228
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 700
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
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 = 948
|
||||||
|
Top = 204
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
end
|
||||||
382
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX.pas
Normal file
382
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX.pas
Normal file
|
|
@ -0,0 +1,382 @@
|
||||||
|
unit U_ZdyAttachCP_HX;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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, Menus, cxLookAndFeelPainters, cxButtons;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP_HX = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
defNote1: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
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 ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP_HX: TfrmZdyAttachCP_HX;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP20, U_ZdyAttInputCP_HX;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,DEFstr3,DEFstr5,DEFstr4,');
|
||||||
|
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,Filler,FillTime ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment where Type=''CPHX'' ');
|
||||||
|
// sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
sql.Add(' order by zdyName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP_HX:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP_HX.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.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 TfrmZdyAttachCP_HX.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP_HX:=TfrmZdyAttInputCP_HX.Create(Application);
|
||||||
|
with frmZdyAttInputCP_HX do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP_HX.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputCP_HX:=TfrmZdyAttInputCP_HX.Create(Application);
|
||||||
|
with frmZdyAttInputCP_HX do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP_HX.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp,WorkBook:Variant;
|
||||||
|
i,j,k,ExcelRowCount:integer;
|
||||||
|
maxId:string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
ExcelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter:='*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
ExcelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
k:=0;
|
||||||
|
for i:=1 to 20 do
|
||||||
|
begin
|
||||||
|
if trim(excelapp.Cells[1,i].value)='' then break;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyCode';
|
||||||
|
dFdDy[k].FdDysName:='产品编号';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyName';
|
||||||
|
dFdDy[k].FdDysName:='产品名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote1';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='颜色' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr3';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='工艺' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote2';
|
||||||
|
dFdDy[k].FdDysName:='工艺';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='类型' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr5';
|
||||||
|
dFdDy[k].FdDysName:='类型';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='规格' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr1';
|
||||||
|
dFdDy[k].FdDysName:='规格';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='成份' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr2';
|
||||||
|
dFdDy[k].FdDysName:='成份';
|
||||||
|
end;
|
||||||
|
k:=k+1;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
for i := 2 to excelrowcount do
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
for j:=0 to k-1 do
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+trim(maxId)+''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(maxId)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(ADOQueryTemp.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
FieldByName('MainType').Value:=Trim(ADOQueryTemp.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
InitGrid();
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
342
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX_Sel.dfm
Normal file
342
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX_Sel.dfm
Normal file
|
|
@ -0,0 +1,342 @@
|
||||||
|
object frmZdyAttachCP_HX_Sel: TfrmZdyAttachCP_HX_Sel
|
||||||
|
Left = 103
|
||||||
|
Top = 90
|
||||||
|
Width = 1111
|
||||||
|
Height = 628
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1095
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 113
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
Caption = #25552#21462'Excel'#25968#25454
|
||||||
|
ImageIndex = 106
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 428
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TOK: TToolButton
|
||||||
|
Left = 491
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = TOKClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 554
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1095
|
||||||
|
Height = 38
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 35
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33457#22411#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 57
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 369
|
||||||
|
Top = 57
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 227
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33457#22411#25551#36848
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 85
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 71
|
||||||
|
Top = 53
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 394
|
||||||
|
Top = 52
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#25104#21697
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
object defNote1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 277
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1095
|
||||||
|
Height = 520
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 138
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#25551#36848
|
||||||
|
DataBinding.FieldName = 'defNote1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 148
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 159
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 155
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
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 = 708
|
||||||
|
Top = 228
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 700
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
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 = 520
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
end
|
||||||
333
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX_Sel.pas
Normal file
333
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_HX_Sel.pas
Normal file
|
|
@ -0,0 +1,333 @@
|
||||||
|
unit U_ZdyAttachCP_HX_Sel;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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, Menus, cxLookAndFeelPainters, cxButtons;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP_HX_Sel = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
defNote1: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
TOK: TToolButton;
|
||||||
|
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 ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure TOKClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP_HX_Sel: TfrmZdyAttachCP_HX_Sel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp ;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select ATID,ZdyName,ZdyCode,DEFstr1,DEFstr2,defNote1,Mrate,defNote2,DEFstr3,DEFstr5,DEFstr4,');
|
||||||
|
sql.Add(' DEFstr6,DEFstr7,DEFstr8,Note,DEFstr4,DEFstr5,defflt1,Filler,FillTime ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment where Type=''CPHX'' ');
|
||||||
|
// sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
sql.Add(' order by zdyName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP_HX_Sel:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.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 TfrmZdyAttachCP_HX_Sel.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp,WorkBook:Variant;
|
||||||
|
i,j,k,ExcelRowCount:integer;
|
||||||
|
maxId:string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
ExcelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter:='*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
ExcelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
k:=0;
|
||||||
|
for i:=1 to 20 do
|
||||||
|
begin
|
||||||
|
if trim(excelapp.Cells[1,i].value)='' then break;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyCode';
|
||||||
|
dFdDy[k].FdDysName:='产品编号';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='ZdyName';
|
||||||
|
dFdDy[k].FdDysName:='产品名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='名称' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote1';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='颜色' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr3';
|
||||||
|
dFdDy[k].FdDysName:='名称';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(excelapp.Cells[1,i].value)='工艺' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='defNote2';
|
||||||
|
dFdDy[k].FdDysName:='工艺';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='类型' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr5';
|
||||||
|
dFdDy[k].FdDysName:='类型';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='规格' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr1';
|
||||||
|
dFdDy[k].FdDysName:='规格';
|
||||||
|
end;
|
||||||
|
if trim(excelapp.Cells[1,i].value)='成份' then
|
||||||
|
begin
|
||||||
|
dFdDy[k].inc:=i;
|
||||||
|
dFdDy[k].FDdys:='DEFstr2';
|
||||||
|
dFdDy[k].FdDysName:='成份';
|
||||||
|
end;
|
||||||
|
k:=k+1;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
for i := 2 to excelrowcount do
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
for j:=0 to k-1 do
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+trim(maxId)+''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(maxId)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(ADOQueryTemp.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='CP';
|
||||||
|
FieldByName('MainType').Value:=Trim(ADOQueryTemp.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
InitGrid();
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
ExcelApp.Quit;
|
||||||
|
ExcelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_HX_Sel.TOKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF CDS_HZ.IsEmpty then exit;
|
||||||
|
self.ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
353
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList.dfm
Normal file
353
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList.dfm
Normal file
|
|
@ -0,0 +1,353 @@
|
||||||
|
object frmZdyAttachCP_ImageList: TfrmZdyAttachCP_ImageList
|
||||||
|
Left = -8
|
||||||
|
Top = -8
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1366
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 46
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 323
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 70
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 121
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object C_Color: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 351
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 77
|
||||||
|
Width = 1366
|
||||||
|
Height = 614
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
OnCellDblClick = Tv2CellDblClick
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
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>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.DataRowHeight = 120
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.HeaderAutoHeight = True
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255
|
||||||
|
DataBinding.FieldName = 'FilesOther0'
|
||||||
|
PropertiesClassName = 'TcxImageProperties'
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName0'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color0'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KcRollNum0'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'KCQty0'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255
|
||||||
|
DataBinding.FieldName = 'FilesOther1'
|
||||||
|
PropertiesClassName = 'TcxImageProperties'
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_Codename1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KCRollNum1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'kcQty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255
|
||||||
|
DataBinding.FieldName = 'FilesOther2'
|
||||||
|
PropertiesClassName = 'TcxImageProperties'
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_Codename2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KCRollNum2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'kcQty2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl_page: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 691
|
||||||
|
Width = 1366
|
||||||
|
Height = 25
|
||||||
|
Align = alBottom
|
||||||
|
Style = 3
|
||||||
|
TabIndex = 0
|
||||||
|
TabOrder = 3
|
||||||
|
Tabs.Strings = (
|
||||||
|
#31532'1'#39029
|
||||||
|
#31532'2'#39029)
|
||||||
|
OnChange = cxTabControl_pageChange
|
||||||
|
ClientRectBottom = 25
|
||||||
|
ClientRectRight = 1366
|
||||||
|
ClientRectTop = 22
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 49
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 833
|
||||||
|
Top = 49
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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 = 704
|
||||||
|
Top = 228
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 700
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
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 = 908
|
||||||
|
Top = 124
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
object ADOQueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 864
|
||||||
|
Top = 273
|
||||||
|
end
|
||||||
|
object DSImage: TDataSource
|
||||||
|
DataSet = ADOQueryImage
|
||||||
|
Left = 820
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 784
|
||||||
|
Top = 178
|
||||||
|
end
|
||||||
|
end
|
||||||
274
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList.pas
Normal file
274
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList.pas
Normal file
|
|
@ -0,0 +1,274 @@
|
||||||
|
unit U_ZdyAttachCP_ImageList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils,StrUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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, Menus, cxLookAndFeelPainters, cxButtons,
|
||||||
|
cxContainer, cxImage, cxDBEdit, cxPC;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP_ImageList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
Label1: TLabel;
|
||||||
|
C_Color: TEdit;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ADOQueryImage: TADOQuery;
|
||||||
|
DSImage: TDataSource;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
cxTabControl_page: TcxTabControl;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: 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 Pic_Image1DblClick(Sender: TObject);
|
||||||
|
procedure cxTabControl_pageChange(Sender: TObject);
|
||||||
|
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
fFlileFlag:string;
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitPage();
|
||||||
|
procedure LookImage(FileName:string);
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP_ImageList: TfrmZdyAttachCP_ImageList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP, U_ZdyAttInputCP_other;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.InitPage();
|
||||||
|
var
|
||||||
|
JLInt,YeInt,i:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
Filtered:=False;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' exec P_Get_CP_Image_Page ');
|
||||||
|
sql.Add(' @C_CodeName='+quotedstr(trim(C_CodeName.text)));
|
||||||
|
sql.Add(',@C_Color='+quotedstr(trim(C_Color.text)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
JLInt:=ADOQueryTemp.fieldbyname('JLInt').AsInteger;
|
||||||
|
YeInt:=JLInt div 90;
|
||||||
|
YeInt:=YeInt+1;
|
||||||
|
cxTabControl_page.Tabs.Clear;
|
||||||
|
for i:=1 to YeInt do
|
||||||
|
begin
|
||||||
|
cxTabControl_page.Tabs.Add('第'+IntToStr(i)+'页');
|
||||||
|
end;
|
||||||
|
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.LookImage(FileName:string);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
// ff: TADOBlobStream;
|
||||||
|
// FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
|
||||||
|
sFieldName:=leftbstr(ExtractFilePath(Application.ExeName),1)+':\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
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(fFlileFlag+'\'+ 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 TfrmZdyAttachCP_ImageList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' exec P_Get_CP_Image_List ');
|
||||||
|
sql.Add(' @C_CodeName='+quotedstr(trim(C_CodeName.text)));
|
||||||
|
sql.Add(',@C_Color='+quotedstr(trim(C_Color.text)));
|
||||||
|
sql.Add(',@yeInt='''+inttostr(cxTabControl_page.TabIndex)+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP_ImageList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
fFlileFlag:=UserDataFlag+'HX';
|
||||||
|
// InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitPage();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.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 TfrmZdyAttachCP_ImageList.C_CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.Pic_Image1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF TcxDBImage(Sender).Picture.Height=0 then exit;
|
||||||
|
|
||||||
|
LookImage(ADOQueryImage.fieldbyname(TcxDBImage(Sender).Hint).asstring);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.cxTabControl_pageChange(
|
||||||
|
Sender: TObject);
|
||||||
|
begin
|
||||||
|
Initgrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList.Tv2CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
var
|
||||||
|
ffieldName,ffileName:string;
|
||||||
|
begin
|
||||||
|
ffieldName:=uppercase(trim(tv2.Controller.FocusedColumn.DataBinding.FilterFieldName));
|
||||||
|
|
||||||
|
IF (ffieldName='FILESOTHER0') OR (ffieldName='FILESOTHER1') OR (ffieldName='FILESOTHER2') then
|
||||||
|
begin
|
||||||
|
ffileName:='FileName'+RightStr(ffieldName,1);
|
||||||
|
LookImage(CDS_HZ.fieldbyname(ffileName).asstring);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
335
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList10.dfm
Normal file
335
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList10.dfm
Normal file
|
|
@ -0,0 +1,335 @@
|
||||||
|
object frmZdyAttachCP_ImageList10: TfrmZdyAttachCP_ImageList10
|
||||||
|
Left = -8
|
||||||
|
Top = -8
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1366
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 46
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 319
|
||||||
|
Top = 73
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 38
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 89
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object C_Color: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 347
|
||||||
|
Top = 69
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 77
|
||||||
|
Width = 1366
|
||||||
|
Height = 614
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
OnCellDblClick = Tv2CellDblClick
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
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>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.DataRowHeight = 120
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.HeaderAutoHeight = True
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255
|
||||||
|
DataBinding.FieldName = 'FilesOther0'
|
||||||
|
PropertiesClassName = 'TcxImageProperties'
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName0'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KcRollNum0'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'KCQty0'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255
|
||||||
|
DataBinding.FieldName = 'FilesOther1'
|
||||||
|
PropertiesClassName = 'TcxImageProperties'
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_Codename1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KCRollNum1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'kcQty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255
|
||||||
|
DataBinding.FieldName = 'FilesOther2'
|
||||||
|
PropertiesClassName = 'TcxImageProperties'
|
||||||
|
Properties.GraphicClassName = 'TJPEGImage'
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.ShowFocusRect = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_Codename2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'KCRollNum2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#25968#37327
|
||||||
|
DataBinding.FieldName = 'kcQty2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl_page: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 691
|
||||||
|
Width = 1366
|
||||||
|
Height = 25
|
||||||
|
Align = alBottom
|
||||||
|
Style = 3
|
||||||
|
TabIndex = 0
|
||||||
|
TabOrder = 3
|
||||||
|
Tabs.Strings = (
|
||||||
|
#31532'1'#39029
|
||||||
|
#31532'2'#39029)
|
||||||
|
OnChange = cxTabControl_pageChange
|
||||||
|
ClientRectBottom = 25
|
||||||
|
ClientRectRight = 1366
|
||||||
|
ClientRectTop = 22
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 49
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 833
|
||||||
|
Top = 49
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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 = 704
|
||||||
|
Top = 228
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 700
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
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 = 908
|
||||||
|
Top = 124
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
object ADOQueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 864
|
||||||
|
Top = 273
|
||||||
|
end
|
||||||
|
object DSImage: TDataSource
|
||||||
|
DataSet = ADOQueryImage
|
||||||
|
Left = 820
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 784
|
||||||
|
Top = 178
|
||||||
|
end
|
||||||
|
end
|
||||||
271
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList10.pas
Normal file
271
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP_ImageList10.pas
Normal file
|
|
@ -0,0 +1,271 @@
|
||||||
|
unit U_ZdyAttachCP_ImageList10;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils,StrUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||||
|
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, Menus, cxLookAndFeelPainters, cxButtons,
|
||||||
|
cxContainer, cxImage, cxDBEdit, cxPC;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
FdDy=record
|
||||||
|
inc: integer; //客户端套接字句柄
|
||||||
|
FDdys:string[32]; //客户端套接字
|
||||||
|
FdDysName:string[32]; //客户端套接字
|
||||||
|
end;
|
||||||
|
TfrmZdyAttachCP_ImageList10 = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
Label1: TLabel;
|
||||||
|
C_Color: TEdit;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ADOQueryImage: TADOQuery;
|
||||||
|
DSImage: TDataSource;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
cxTabControl_page: TcxTabControl;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: 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 Pic_Image1DblClick(Sender: TObject);
|
||||||
|
procedure cxTabControl_pageChange(Sender: TObject);
|
||||||
|
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
fFlileFlag:string;
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitPage();
|
||||||
|
procedure LookImage(FileName:string);
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP_ImageList10: TfrmZdyAttachCP_ImageList10;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP, U_ZdyAttInputCP_other;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.InitPage();
|
||||||
|
var
|
||||||
|
JLInt,YeInt,i:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
Filtered:=False;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' exec P_Get_CP_Image_Page10 ');
|
||||||
|
sql.Add(' @C_CodeName='+quotedstr(trim(C_CodeName.text)));
|
||||||
|
sql.Add(',@C_Color='+quotedstr(trim(C_Color.text)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
JLInt:=ADOQueryTemp.fieldbyname('JLInt').AsInteger;
|
||||||
|
YeInt:=JLInt div 30;
|
||||||
|
YeInt:=YeInt+1;
|
||||||
|
cxTabControl_page.Tabs.Clear;
|
||||||
|
for i:=1 to YeInt do
|
||||||
|
begin
|
||||||
|
cxTabControl_page.Tabs.Add('第'+IntToStr(i)+'页');
|
||||||
|
end;
|
||||||
|
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.LookImage(FileName:string);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
// ff: TADOBlobStream;
|
||||||
|
// FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
|
||||||
|
sFieldName:=leftbstr(ExtractFilePath(Application.ExeName),1)+':\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
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(fFlileFlag+'\'+ 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 TfrmZdyAttachCP_ImageList10.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' exec P_Get_CP_Image_List10 ');
|
||||||
|
sql.Add(' @C_CodeName='+quotedstr(trim(C_CodeName.text)));
|
||||||
|
sql.Add(',@C_Color='+quotedstr(trim(C_Color.text)));
|
||||||
|
sql.Add(',@yeInt='''+inttostr(cxTabControl_page.TabIndex)+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP_ImageList10:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
fFlileFlag:=UserDataFlag+'CT';
|
||||||
|
// InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitPage();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.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 TfrmZdyAttachCP_ImageList10.C_CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.Pic_Image1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF TcxDBImage(Sender).Picture.Height=0 then exit;
|
||||||
|
|
||||||
|
LookImage(ADOQueryImage.fieldbyname(TcxDBImage(Sender).Hint).asstring);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.cxTabControl_pageChange(
|
||||||
|
Sender: TObject);
|
||||||
|
begin
|
||||||
|
Initgrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP_ImageList10.Tv2CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
var
|
||||||
|
ffieldName,ffileName:string;
|
||||||
|
begin
|
||||||
|
ffieldName:=uppercase(trim(tv2.Controller.FocusedColumn.DataBinding.FilterFieldName));
|
||||||
|
|
||||||
|
IF (ffieldName='FILESOTHER0') OR (ffieldName='FILESOTHER1') OR (ffieldName='FILESOTHER2') then
|
||||||
|
begin
|
||||||
|
ffileName:='FileName'+RightStr(ffieldName,1);
|
||||||
|
LookImage(CDS_HZ.fieldbyname(ffileName).asstring);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
374
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.dfm
Normal file
374
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.dfm
Normal file
|
|
@ -0,0 +1,374 @@
|
||||||
|
object frmZdyAttachGYS: TfrmZdyAttachGYS
|
||||||
|
Left = 159
|
||||||
|
Top = 119
|
||||||
|
Width = 1038
|
||||||
|
Height = 618
|
||||||
|
Caption = #20379#24212#21830#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1022
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 311
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 374
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1022
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 203
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 395
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 534
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #22320#21306
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 267
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 83
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 424
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22383#24067#21378
|
||||||
|
#21152#24037#21378
|
||||||
|
#22383#24067#20179)
|
||||||
|
end
|
||||||
|
object DEFStr7: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 564
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1022
|
||||||
|
Height = 509
|
||||||
|
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.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#31616#31216
|
||||||
|
DataBinding.FieldName = 'zdyNameZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
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
|
||||||
223
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.pas
Normal file
223
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.pas
Normal file
|
|
@ -0,0 +1,223 @@
|
||||||
|
unit U_ZdyAttachGYS;
|
||||||
|
|
||||||
|
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, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
|
cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachGYS = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
DEFStr7: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column14: 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 ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fDEFstr5:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachGYS: TfrmZdyAttachGYS;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputGYS;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''GYS'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachGYS:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('供应商资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachGYS.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('供应商资料',Tv2,'客户自定义');
|
||||||
|
IF trim(fDEFstr5)<>'' then
|
||||||
|
begin
|
||||||
|
DEFstr5.Text:=trim(fDEFstr5);
|
||||||
|
DEFstr5.Enabled:=false;
|
||||||
|
end;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.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 TfrmZdyAttachGYS.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'供应商资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fDEFstr5:=self.fDEFstr5;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fDEFstr5:=self.fDEFstr5;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
408
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.dfm
Normal file
408
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.dfm
Normal file
|
|
@ -0,0 +1,408 @@
|
||||||
|
object frmZdyAttachment: TfrmZdyAttachment
|
||||||
|
Left = -8
|
||||||
|
Top = -8
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #23458#25143#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1366
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.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 ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object Tadd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TaddClick
|
||||||
|
end
|
||||||
|
object Tedit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TeditClick
|
||||||
|
end
|
||||||
|
object TDel: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 311
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 374
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 190
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 350
|
||||||
|
Top = 13
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 506
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #22320#21306
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 658
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 238
|
||||||
|
Top = 9
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 70
|
||||||
|
Top = 9
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 388
|
||||||
|
Top = 9
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFStr7: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 532
|
||||||
|
Top = 9
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object defstr10: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 684
|
||||||
|
Top = 9
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1366
|
||||||
|
Height = 646
|
||||||
|
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.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21457#36135#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 165
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #27424#27454#39069#24230
|
||||||
|
DataBinding.FieldName = 'DefFlt1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #25176#36816#37096
|
||||||
|
DataBinding.FieldName = 'defstr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #25176#36816#37096#30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFNote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #37038#31665
|
||||||
|
DataBinding.FieldName = 'defstr9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column18: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'defstr10'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.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
|
||||||
|
Grid = cxGrid2
|
||||||
|
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
|
||||||
238
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.pas
Normal file
238
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.pas
Normal file
|
|
@ -0,0 +1,238 @@
|
||||||
|
unit U_ZdyAttachment;
|
||||||
|
|
||||||
|
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, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachment = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
Tadd: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
Tedit: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TEdit;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
DEFStr7: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
v2Column17: TcxGridDBColumn;
|
||||||
|
v2Column18: TcxGridDBColumn;
|
||||||
|
Label5: TLabel;
|
||||||
|
defstr10: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TeditClick(Sender: TObject);
|
||||||
|
procedure TaddClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
canshu1,canshu2:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachment: TfrmZdyAttachment;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInput,U_ZdyInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''KHName'' ');
|
||||||
|
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
IF trim(canshu1)='' then
|
||||||
|
sql.Add(' and isnull(defstr5,'''')='+quotedstr(trim(DName)));
|
||||||
|
IF trim(canshu1)='操作员' then
|
||||||
|
sql.Add(' and isnull(Filler,'''')='+quotedstr(trim(DName)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachment:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('客户资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachment.TDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户资料',Tv2,'客户自定义');
|
||||||
|
if trim(canshu1)='查询'then
|
||||||
|
begin
|
||||||
|
Tadd.Visible:=false;
|
||||||
|
tedit.Visible:=false;
|
||||||
|
tdel.Visible:=false;
|
||||||
|
end;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.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 TfrmZdyAttachment.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'客户资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TeditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInput:=TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TaddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInput:=TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
FCYID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
17
基础资料维护(BaseInfo.dll)/U_ZdyInput.dfm
Normal file
17
基础资料维护(BaseInfo.dll)/U_ZdyInput.dfm
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
object frmZdyInput: TfrmZdyInput
|
||||||
|
Left = 165
|
||||||
|
Top = 188
|
||||||
|
Width = 870
|
||||||
|
Height = 500
|
||||||
|
Caption = #23458#25143#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
end
|
||||||
30
基础资料维护(BaseInfo.dll)/U_ZdyInput.pas
Normal file
30
基础资料维护(BaseInfo.dll)/U_ZdyInput.pas
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
unit U_ZdyInput;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyInput = class(TForm)
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyInput: TfrmZdyInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZdyInput.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyInput:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
221
基础资料维护(BaseInfo.dll)/U_testdll.dfm
Normal file
221
基础资料维护(BaseInfo.dll)/U_testdll.dfm
Normal file
|
|
@ -0,0 +1,221 @@
|
||||||
|
object Form1: TForm1
|
||||||
|
Left = 97
|
||||||
|
Top = 122
|
||||||
|
Width = 791
|
||||||
|
Height = 554
|
||||||
|
Caption = 'Form1'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
FormStyle = fsMDIForm
|
||||||
|
Menu = MainMenu1
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
OnClose = FormClose
|
||||||
|
OnResize = FormResize
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 783
|
||||||
|
Height = 25
|
||||||
|
ButtonWidth = 57
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = ImageList1
|
||||||
|
TabOrder = 0
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 81
|
||||||
|
Height = 22
|
||||||
|
TabOrder = 0
|
||||||
|
Text = '1'
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 81
|
||||||
|
Top = 0
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 0
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 138
|
||||||
|
Top = 0
|
||||||
|
Width = 79
|
||||||
|
Height = 22
|
||||||
|
Caption = ' DllName'#65306
|
||||||
|
end
|
||||||
|
object DllName: TEdit
|
||||||
|
Left = 217
|
||||||
|
Top = 0
|
||||||
|
Width = 135
|
||||||
|
Height = 22
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object MainMenu1: TMainMenu
|
||||||
|
Left = 232
|
||||||
|
Top = 40
|
||||||
|
object test1: TMenuItem
|
||||||
|
Caption = 'test'
|
||||||
|
OnClick = test1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ImageList1: TImageList
|
||||||
|
Left = 320
|
||||||
|
Top = 56
|
||||||
|
Bitmap = {
|
||||||
|
494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||||
|
0000000000003600000028000000400000001000000001002000000000000010
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000EFEFEF000000
|
||||||
|
0000EFEFEF00EFEFEF000000000000000000EFEFEF0000000000000000000000
|
||||||
|
0000EFEFEF00EFEFEF0000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000EFEFEF0000000000EFEFEF00EFEFEF0000000000EFEFEF00000000008080
|
||||||
|
00008080000000000000C0C0C000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000000000000000000EFEFEF00EFEFEF000000
|
||||||
|
0000EFEFEF00EFEFEF000000000000000000C0C0C00000000000000000008080
|
||||||
|
00008080000080800000EFEFEF00EFEFEF000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000EFEFEF0000000000000000000000000000000000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000EFEFEF0000000000808080008080800080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000008080000000000000808080008080800080808000000000008080
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000EFEFEF00EFEF
|
||||||
|
EF0000000000FFFF000080800000000000008080800080808000000000000000
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000FFFF0000FFFF0000808000000000000080808000000000008080
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000808000008080
|
||||||
|
000080800000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000FFFF0000FFFF
|
||||||
|
0000FFFF0000FFFF000000000000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000808000000000000080808000808080008080800080808000FFFF
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000808080008080800080808000808080000000
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||||
|
2800000040000000100000000100010000000000800000000000000000000000
|
||||||
|
000000000000000000000000FFFFFF00FFFF000000000000D343000000000000
|
||||||
|
F4810000000000009340000000000000F801000000000000F001000000000000
|
||||||
|
F001000000000000C001000000000000C001000000000000C001000000000000
|
||||||
|
C201000000000000C001000000000000F001000000000000F001000000000000
|
||||||
|
FC03000000000000FFFF00000000000000000000000000000000000000000000
|
||||||
|
000000000000}
|
||||||
|
end
|
||||||
|
object ADOConnection1: TADOConnection
|
||||||
|
ConnectionString =
|
||||||
|
'Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ' +
|
||||||
|
'ID=sa;Initial Catalog=rzdata;Data Source=6GMFFMYKYMJDZW7'
|
||||||
|
LoginPrompt = False
|
||||||
|
Provider = 'SQLOLEDB.1'
|
||||||
|
Left = 408
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
end
|
||||||
106
基础资料维护(BaseInfo.dll)/U_testdll.pas
Normal file
106
基础资料维护(BaseInfo.dll)/U_testdll.pas
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
unit U_testdll;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, StdCtrls, Menus, ToolWin, ComCtrls, ImgList, DB, ADODB;
|
||||||
|
|
||||||
|
type
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
MainMenu1: TMainMenu;
|
||||||
|
test1: TMenuItem;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
Edit1: TEdit;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ImageList1: TImageList;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
DllName: TEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure test1Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure FormResize(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
newh:hwnd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
sendmessage(newh,1034,4,0);
|
||||||
|
action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.test1Click(Sender: TObject);
|
||||||
|
type
|
||||||
|
TMyFunc = function(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;stdcall;
|
||||||
|
var
|
||||||
|
Tf: TMyFunc;
|
||||||
|
Tp: TFarProc;
|
||||||
|
Th:Thandle;
|
||||||
|
begin
|
||||||
|
//静态加载
|
||||||
|
//newh:=getForm(Application,1,ADOConnection1,PChar('sa'),PChar('dsa'));
|
||||||
|
|
||||||
|
//动态加载
|
||||||
|
// showMessage(intTostr(application.Handle));
|
||||||
|
Th := LoadLibrary('BaseInfo.dll');
|
||||||
|
if Th > 0 then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Tp := GetProcAddress(Th, 'GetDllForm');
|
||||||
|
if Tp <> nil then
|
||||||
|
begin
|
||||||
|
Tf := TMyFunc(Tp);
|
||||||
|
newh:=Tf(Application,0,strToint(edit1.text),0,0,
|
||||||
|
PChar('sa'),
|
||||||
|
PChar('dsa'),
|
||||||
|
PChar('bsa'),
|
||||||
|
PChar('tsa'),
|
||||||
|
PChar('d1sa'),
|
||||||
|
PChar('d2sa'),
|
||||||
|
'','','','','','','','',''
|
||||||
|
);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ShowMessage('打印执行错误');
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
// FreeLibrary();
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ShowMessage('找不到'+Trim(DllName.Text));
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
sendmessage(newh,1034,1,0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
2
基础资料维护(BaseInfo.dll)/consvr.ini
Normal file
2
基础资料维护(BaseInfo.dll)/consvr.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[SERVER]
|
||||||
|
SERVER=192.168.88.254
|
||||||
155
基础资料维护(BaseInfo.dll)/getpic.dfm
Normal file
155
基础资料维护(BaseInfo.dll)/getpic.dfm
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
object FormGetPic: TFormGetPic
|
||||||
|
Left = 244
|
||||||
|
Top = 118
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
Caption = #33719#21462#22270#29255
|
||||||
|
ClientHeight = 449
|
||||||
|
ClientWidth = 670
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poDesktopCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object Image2: TImage
|
||||||
|
Left = 464
|
||||||
|
Top = 8
|
||||||
|
Width = 160
|
||||||
|
Height = 120
|
||||||
|
end
|
||||||
|
object SpeedButton1: TSpeedButton
|
||||||
|
Left = 500
|
||||||
|
Top = 334
|
||||||
|
Width = 80
|
||||||
|
Height = 22
|
||||||
|
Caption = #25171#24320#22270#29255'...'
|
||||||
|
OnClick = SpeedButton1Click
|
||||||
|
end
|
||||||
|
object SpeedButton2: TSpeedButton
|
||||||
|
Left = 500
|
||||||
|
Top = 380
|
||||||
|
Width = 80
|
||||||
|
Height = 22
|
||||||
|
Caption = #30830#23450
|
||||||
|
Enabled = False
|
||||||
|
OnClick = SpeedButton2Click
|
||||||
|
end
|
||||||
|
object SpeedButton3: TSpeedButton
|
||||||
|
Left = 500
|
||||||
|
Top = 426
|
||||||
|
Width = 80
|
||||||
|
Height = 22
|
||||||
|
Caption = #25918#24323
|
||||||
|
OnClick = SpeedButton3Click
|
||||||
|
end
|
||||||
|
object SpeedButton4: TSpeedButton
|
||||||
|
Left = 500
|
||||||
|
Top = 358
|
||||||
|
Width = 80
|
||||||
|
Height = 22
|
||||||
|
Caption = #22270#29255#21478#23384'...'
|
||||||
|
OnClick = SpeedButton4Click
|
||||||
|
end
|
||||||
|
object SpeedButton5: TSpeedButton
|
||||||
|
Left = 500
|
||||||
|
Top = 404
|
||||||
|
Width = 80
|
||||||
|
Height = 22
|
||||||
|
Caption = #21024#38500
|
||||||
|
OnClick = SpeedButton5Click
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 5
|
||||||
|
Top = 5
|
||||||
|
Width = 440
|
||||||
|
Height = 440
|
||||||
|
HorzScrollBar.Visible = False
|
||||||
|
VertScrollBar.Visible = False
|
||||||
|
TabOrder = 0
|
||||||
|
object Image1: TImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 437
|
||||||
|
Height = 436
|
||||||
|
Cursor = crSizeAll
|
||||||
|
AutoSize = True
|
||||||
|
Center = True
|
||||||
|
IncrementalDisplay = True
|
||||||
|
OnMouseDown = Image1MouseDown
|
||||||
|
OnMouseMove = Image1MouseMove
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 464
|
||||||
|
Top = 252
|
||||||
|
Width = 81
|
||||||
|
Height = 21
|
||||||
|
Caption = #25171#24320#25668#20687#22836
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
object Button2: TButton
|
||||||
|
Left = 560
|
||||||
|
Top = 252
|
||||||
|
Width = 81
|
||||||
|
Height = 21
|
||||||
|
Caption = #25235#22270
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = Button2Click
|
||||||
|
end
|
||||||
|
object Twain: TDelphiTwain
|
||||||
|
OnTwainAcquire = TwainTwainAcquire
|
||||||
|
TransferMode = ttmMemory
|
||||||
|
SourceCount = 0
|
||||||
|
Info.MajorVersion = 1
|
||||||
|
Info.MinorVersion = 0
|
||||||
|
Info.Language = tlUserLocale
|
||||||
|
Info.CountryCode = 1
|
||||||
|
Info.Groups = [tgControl, tgImage]
|
||||||
|
Info.VersionInfo = 'Application name'
|
||||||
|
Info.Manufacturer = 'Application manufacturer'
|
||||||
|
Info.ProductFamily = 'App product family'
|
||||||
|
Info.ProductName = 'App product name'
|
||||||
|
LibraryLoaded = False
|
||||||
|
SourceManagerLoaded = False
|
||||||
|
Left = 518
|
||||||
|
Top = 160
|
||||||
|
end
|
||||||
|
object OpenPictureDialog1: TOpenPictureDialog
|
||||||
|
Left = 568
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 280
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSavePictureDialog
|
||||||
|
Filter = 'JPG'#22270#29255#26684#24335' (*.JPG)|*.JPG'
|
||||||
|
Left = 568
|
||||||
|
Top = 299
|
||||||
|
end
|
||||||
|
object adoqueryImage: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 488
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 500
|
||||||
|
Top = 198
|
||||||
|
end
|
||||||
|
end
|
||||||
596
基础资料维护(BaseInfo.dll)/getpic.pas
Normal file
596
基础资料维护(BaseInfo.dll)/getpic.pas
Normal file
|
|
@ -0,0 +1,596 @@
|
||||||
|
unit getpic;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, strUtils,Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, ExtCtrls, jpeg, IniFiles, ExtDlgs,
|
||||||
|
DelphiTwain, Buttons, StdCtrls, DB, ADODB, IdBaseComponent, IdComponent,
|
||||||
|
IdTCPConnection, IdTCPClient, IdFTP;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFormGetPic = class(TForm)
|
||||||
|
Twain: TDelphiTwain;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
Image1: TImage;
|
||||||
|
OpenPictureDialog1: TOpenPictureDialog;
|
||||||
|
Image2: TImage;
|
||||||
|
SpeedButton1: TSpeedButton;
|
||||||
|
SpeedButton2: TSpeedButton;
|
||||||
|
SpeedButton3: TSpeedButton;
|
||||||
|
Button1: TButton;
|
||||||
|
Button2: TButton;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
SpeedButton4: TSpeedButton;
|
||||||
|
SaveDialog1: TSavePictureDialog;
|
||||||
|
adoqueryImage: TADOQuery;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
SpeedButton5: TSpeedButton;
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure TwainTwainAcquire(Sender: TObject; const Index: Integer;
|
||||||
|
Image: TBitmap; var Cancel: Boolean);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||||
|
Y: Integer);
|
||||||
|
procedure SpeedButton1Click(Sender: TObject);
|
||||||
|
procedure SpeedButton2Click(Sender: TObject);
|
||||||
|
procedure SpeedButton3Click(Sender: TObject);
|
||||||
|
procedure Button1Click(Sender: TObject);
|
||||||
|
procedure Button2Click(Sender: TObject);
|
||||||
|
procedure SpeedButton4Click(Sender: TObject);
|
||||||
|
procedure Initimage();
|
||||||
|
procedure SpeedButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
hWndC : THandle;
|
||||||
|
CapturingAVI : bool;
|
||||||
|
{ Private declarations }
|
||||||
|
ClickPos: TPoint;
|
||||||
|
SelectedSource, PicLeft, PicTop, PicWidth, PicHeight: Integer;
|
||||||
|
procedure CreThumb(Width, Height: Integer);
|
||||||
|
function SaveImage():Boolean;
|
||||||
|
public
|
||||||
|
FilePath:string;
|
||||||
|
FileName:string;
|
||||||
|
FTFType:string;
|
||||||
|
pat1:string;
|
||||||
|
pic1:string;
|
||||||
|
fkeyNo:string;
|
||||||
|
fFlileFlag:string;
|
||||||
|
{ Public declarations }
|
||||||
|
MyJpeg: TJPEGImage;
|
||||||
|
// JPStream: TMemoryStream;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
FormGetPic: TFormGetPic;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses U_DataLink,U_Fun10;
|
||||||
|
const WM_CAP_START = WM_USER;
|
||||||
|
const WM_CAP_STOP = WM_CAP_START + 68;
|
||||||
|
const WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10;
|
||||||
|
const WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11;
|
||||||
|
const WM_CAP_SAVEDIB = WM_CAP_START + 25;
|
||||||
|
const WM_CAP_GRAB_FRAME = WM_CAP_START + 60;
|
||||||
|
const WM_CAP_SEQUENCE = WM_CAP_START + 62;
|
||||||
|
const WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20;
|
||||||
|
const WM_CAP_SEQUENCE_NOFILE =WM_CAP_START+ 63 ;
|
||||||
|
const WM_CAP_SET_OVERLAY =WM_CAP_START+ 51 ;
|
||||||
|
const WM_CAP_SET_PREVIEW =WM_CAP_START+ 50 ;
|
||||||
|
const WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START +6;
|
||||||
|
const WM_CAP_SET_CALLBACK_ERROR=WM_CAP_START +2;
|
||||||
|
const WM_CAP_SET_CALLBACK_STATUSA= WM_CAP_START +3;
|
||||||
|
const WM_CAP_SET_CALLBACK_FRAME= WM_CAP_START +5;
|
||||||
|
const WM_CAP_SET_SCALE=WM_CAP_START+ 53 ;
|
||||||
|
const WM_CAP_SET_PREVIEWRATE=WM_CAP_START+ 52 ;
|
||||||
|
function capCreateCaptureWindowA(lpszWindowName : PCHAR;
|
||||||
|
dwStyle : longint;
|
||||||
|
x : integer;
|
||||||
|
y : integer;
|
||||||
|
nWidth : integer;
|
||||||
|
nHeight : integer;
|
||||||
|
ParentWin : HWND;
|
||||||
|
nId : integer): HWND;
|
||||||
|
STDCALL EXTERNAL 'AVICAP32.DLL';
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TFormGetPic.Initimage();
|
||||||
|
var
|
||||||
|
jpg:TJpegImage;
|
||||||
|
myStream: TADOBlobStream;
|
||||||
|
sFieldName:string;
|
||||||
|
JPStream: TMemoryStream;
|
||||||
|
begin
|
||||||
|
jpg:=TJpegImage.Create();
|
||||||
|
JPStream := TMemoryStream.Create;
|
||||||
|
try
|
||||||
|
|
||||||
|
with adoqueryImage do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File where WBID='+quotedstr(trim(fkeyNo)));
|
||||||
|
open;
|
||||||
|
IF not IsEmpty then
|
||||||
|
begin
|
||||||
|
IF not fieldbyname(pic1).IsNull then
|
||||||
|
begin
|
||||||
|
myStream:=tadoblobstream.Create(tblobfield(adoqueryImage.fieldbyname(pic1)),bmread);
|
||||||
|
jpg.LoadFromStream(myStream);
|
||||||
|
Image2.Picture.Assign(jpg);
|
||||||
|
myStream.Free;
|
||||||
|
|
||||||
|
try
|
||||||
|
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
except
|
||||||
|
;
|
||||||
|
end;
|
||||||
|
|
||||||
|
JPStream.Clear;
|
||||||
|
if IdFTP1.Connected then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1.Get(fFlileFlag+'\'+ Trim(fieldbyname(pat1).AsString), JPStream);
|
||||||
|
except
|
||||||
|
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if IdFTP1.Connected then IdFTP1.Quit;
|
||||||
|
JPStream.Position := 0;
|
||||||
|
jpg.LoadFromStream(JPStream);
|
||||||
|
Image1.Picture.Assign(jpg);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
jpg.free;
|
||||||
|
JPStream.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TFormGetPic.SaveImage():Boolean;
|
||||||
|
var
|
||||||
|
myStream: TADOBlobStream;
|
||||||
|
maxNo:string;
|
||||||
|
fNewFileName:string;
|
||||||
|
begin
|
||||||
|
fNewFileName:=formatdatetime('yyyyMMddhhnnsszzz',now())+ExtractFileExt(FilePath);
|
||||||
|
IF fkeyNO='' then fkeyNO:=fNewFileName;
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
with adoqueryImage do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File where WBID='+quotedstr(trim(fkeyNo)));
|
||||||
|
sql.Add('and TFType='+quotedstr(trim(FTFType)));
|
||||||
|
open;
|
||||||
|
if RecordCount<=0 then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
if GetLSNo(ADOQuery1,maxNo,'FJ','TP_File',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
fieldByName('TFID').AsString := maxNo;
|
||||||
|
fieldByName('WBID').AsString := fkeyNO;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
end;
|
||||||
|
fieldByName(pat1).AsString :=trim(fNewFileName);
|
||||||
|
fieldByName('Filler').AsString :=trim(dName);
|
||||||
|
fieldByName('TFType').AsString :=trim(FTFType);
|
||||||
|
myStream := TADOBlobStream.Create(TBlobField(FieldByName(pic1)), bmWrite);
|
||||||
|
MyJpeg.Assign(Image2.Picture.Graphic);
|
||||||
|
MyJpeg.SaveToStream(myStream);
|
||||||
|
myStream.Free;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FilePath <> '' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
IdFTP1.Put(FilePath, fFlileFlag+'\' + Trim(fNewFileName));
|
||||||
|
IdFTP1.Quit;
|
||||||
|
except
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Application.MessageBox('上传客户图样文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
IdFTP1.Quit;
|
||||||
|
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
myStream.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.ToolButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
Ini: TIniFile;
|
||||||
|
begin
|
||||||
|
if Twain.LoadLibrary then
|
||||||
|
begin
|
||||||
|
{Load source manager}
|
||||||
|
Twain.SourceManagerLoaded := TRUE;
|
||||||
|
{Allow user to select source}
|
||||||
|
SelectedSource := Twain.SelectSource;
|
||||||
|
if SelectedSource <> -1 then
|
||||||
|
begin
|
||||||
|
Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||||
|
try
|
||||||
|
Ini.WriteInteger( 'SCANNER', 'Scanner', SelectedSource);
|
||||||
|
finally
|
||||||
|
Ini.Free;
|
||||||
|
end;
|
||||||
|
end {if SelectedSource <> -1}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ShowMessage('未安装扫描仪');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Twain.LoadLibrary then
|
||||||
|
begin
|
||||||
|
{Load source manager}
|
||||||
|
Twain.SourceManagerLoaded := TRUE;
|
||||||
|
|
||||||
|
if SelectedSource <> -1 then
|
||||||
|
begin
|
||||||
|
{Load source, select transference method and enable (display interface)}
|
||||||
|
Twain.Source[SelectedSource].Loaded := TRUE;
|
||||||
|
Twain.Source[SelectedSource].SetICapUnits(tuInches);
|
||||||
|
Twain.Source[SelectedSource].SetImagelayoutFrame(PicLeft/25.4, PicTop/25.4, (PicLeft+PicWidth)/25.4, (PicTop+PicHeight)/25.4);
|
||||||
|
Twain.Source[SelectedSource].SetIYResolution(200);
|
||||||
|
Twain.Source[SelectedSource].SetIXResolution(200);
|
||||||
|
Twain.Source[SelectedSource].TransferMode := ttmMemory;
|
||||||
|
Twain.Source[SelectedSource].EnableSource(FALSE, TRUE);
|
||||||
|
while Twain.Source[SelectedSource].Enabled do Application.ProcessMessages;
|
||||||
|
end; {if SelectedSource <> -1}
|
||||||
|
// Twain.UnloadLibrary;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ShowMessage('未安装扫描仪');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.TwainTwainAcquire(Sender: TObject;
|
||||||
|
const Index: Integer; Image: TBitmap; var Cancel: Boolean);
|
||||||
|
begin
|
||||||
|
Image1.Picture.Assign(Image);
|
||||||
|
Cancel := TRUE;
|
||||||
|
CreThumb(150, 150);
|
||||||
|
SpeedButton2.Enabled := TRUE;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
Ini: TIniFile;
|
||||||
|
begin
|
||||||
|
{ Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||||
|
try
|
||||||
|
SelectedSource := Ini.ReadInteger( 'SCANNER', 'Scanner', 0);
|
||||||
|
PicLeft := Ini.ReadInteger( 'SCANNER', 'Left', 0);
|
||||||
|
PicTop := Ini.ReadInteger( 'SCANNER', 'Top', 0);
|
||||||
|
PicWidth := Ini.ReadInteger( 'SCANNER', 'Width', 100);
|
||||||
|
PicHeight := Ini.ReadInteger( 'SCANNER', 'Height', 100);
|
||||||
|
finally
|
||||||
|
Ini.Free;
|
||||||
|
end; }
|
||||||
|
Initimage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
{
|
||||||
|
procedure TFormGetPic.ToolButton6Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
Ini: TIniFile;
|
||||||
|
begin
|
||||||
|
FormGetPos := TFormGetPos.Create(Self);
|
||||||
|
FormGetPos.SpinEdit1.Value := PicLeft;
|
||||||
|
FormGetPos.SpinEdit2.Value := PicTop;
|
||||||
|
FormGetPos.SpinEdit3.Value := PicWidth;
|
||||||
|
FormGetPos.SpinEdit4.Value := PicHeight;
|
||||||
|
if FormGetPos.ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
PicLeft := FormGetPos.SpinEdit1.Value;
|
||||||
|
PicTop := FormGetPos.SpinEdit2.Value;
|
||||||
|
PicWidth := FormGetPos.SpinEdit3.Value;
|
||||||
|
PicHeight := FormGetPos.SpinEdit4.Value;
|
||||||
|
|
||||||
|
Ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'scanner.ini');
|
||||||
|
try
|
||||||
|
Ini.WriteInteger( 'SCANNER', 'Left', PicLeft);
|
||||||
|
Ini.WriteInteger( 'SCANNER', 'Top', PicTop);
|
||||||
|
Ini.WriteInteger( 'SCANNER', 'Width', PicWidth);
|
||||||
|
Ini.WriteInteger( 'SCANNER', 'Height', PicHeight);
|
||||||
|
finally
|
||||||
|
Ini.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
FormGetPos.Free;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
|
procedure TFormGetPic.CreThumb(Width, Height: Integer);
|
||||||
|
var
|
||||||
|
Bitmap: TBitmap;
|
||||||
|
Ratio: Double;
|
||||||
|
ARect: TRect;
|
||||||
|
AHeight, AHeightOffset: Integer;
|
||||||
|
AWidth, AWidthOffset: Integer;
|
||||||
|
begin
|
||||||
|
Bitmap := TBitmap.Create;
|
||||||
|
try
|
||||||
|
Ratio := Image1.Picture.Graphic.Width/Image1.Picture.Graphic.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));
|
||||||
|
// StretchDraw original image
|
||||||
|
ARect := Rect(AWidthOffset, AHeightOffset, AWidth+AWidthOffset, AHeight+AHeightOffset);
|
||||||
|
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
|
||||||
|
// Assign back to the Jpeg, and save to the file
|
||||||
|
Image2.Picture.Assign(BitMap);
|
||||||
|
// MyJpeg1.Assign(Image2.Picture.Graphic);
|
||||||
|
finally
|
||||||
|
Bitmap.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
MyJpeg := TJpegImage.Create;
|
||||||
|
// MyJpeg1 := TJpegImage.Create;
|
||||||
|
Button2.Enabled:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// MyJpeg1.Free;
|
||||||
|
MyJpeg.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.Image1MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
ClickPos.x := X;
|
||||||
|
ClickPos.y := Y;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.Image1MouseMove(Sender: TObject; Shift: TShiftState;
|
||||||
|
X, Y: Integer);
|
||||||
|
var
|
||||||
|
NewPos: TPoint;
|
||||||
|
begin
|
||||||
|
{The left button was pressed}
|
||||||
|
if ssLeft in Shift then
|
||||||
|
begin
|
||||||
|
{Calculate new position}
|
||||||
|
NewPos.X := Image1.Left + x - ClickPos.x;
|
||||||
|
NewPos.Y := Image1.Top + y - ClickPos.y;
|
||||||
|
if NewPos.x + Image1.Width < ScrollBox1.Width then
|
||||||
|
NewPos.x := ScrollBox1.Width - Image1.Width;
|
||||||
|
if NewPos.y + Image1.Height < ScrollBox1.Height then
|
||||||
|
NewPos.y := ScrollBox1.Height - Image1.Height;
|
||||||
|
if NewPos.X > 0 then NewPos.X := 0;
|
||||||
|
if NewPos.Y > 0 then NewPos.Y := 0;
|
||||||
|
|
||||||
|
Image1.Top := NewPos.Y;
|
||||||
|
Image1.Left := NewPos.X;
|
||||||
|
end {if ssLeft in Shift}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.SpeedButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if OpenPictureDialog1.Execute then
|
||||||
|
begin
|
||||||
|
Image1.Top := 0;
|
||||||
|
Image1.Left := 0;
|
||||||
|
Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
|
||||||
|
FilePath:=OpenPictureDialog1.FileName;
|
||||||
|
FileName:=ExtractFileName(FilePath);
|
||||||
|
// CreThumb(240, 180);
|
||||||
|
CreThumb(400, 300);
|
||||||
|
SpeedButton2.Enabled := TRUE;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.SpeedButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
IF SaveImage() then
|
||||||
|
begin
|
||||||
|
ModalResult := 1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存失败!','提示信息',0)
|
||||||
|
end;
|
||||||
|
// JPStream := TMemoryStream.Create;
|
||||||
|
// MyJPeg.Assign(Image1.Picture.Graphic);
|
||||||
|
// MyJPeg.SaveToStream(JPStream);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.SpeedButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := 2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.Button1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
hWndC := 0;
|
||||||
|
try
|
||||||
|
hWndC := capCreateCaptureWindowA('My Own Capture Window',
|
||||||
|
WS_CHILD or WS_VISIBLE ,
|
||||||
|
ScrollBox1.Left,
|
||||||
|
ScrollBox1.Top,
|
||||||
|
ScrollBox1.Width,
|
||||||
|
ScrollBox1.Height,
|
||||||
|
FormGetPic.Handle,
|
||||||
|
0);
|
||||||
|
if hWndC <> 0 then
|
||||||
|
begin
|
||||||
|
SendMessage(hWndC, WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, 0);
|
||||||
|
SendMessage(hWndC, WM_CAP_SET_CALLBACK_ERROR, 0, 0);
|
||||||
|
SendMessage(hWndC, WM_CAP_SET_CALLBACK_STATUSA, 0, 0);
|
||||||
|
SendMessage(hWndC, WM_CAP_DRIVER_CONNECT, 0, 0);
|
||||||
|
SendMessage(hWndC, WM_CAP_SET_SCALE, 1, 0);
|
||||||
|
SendMessage(hWndC, WM_CAP_SET_PREVIEWRATE, 66, 0);
|
||||||
|
//SendMessage(hWndC, WM_CAP_SEQUENCE_NOFILE, 1, 0);
|
||||||
|
SendMessage(hWndC, WM_CAP_SET_OVERLAY, 1, 0);
|
||||||
|
SendMessage(hWndC, WM_CAP_SET_PREVIEW, 1, 0);
|
||||||
|
Button1.Enabled:=false;
|
||||||
|
Button2.Enabled:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
application.MessageBox('连接摄像头失败!','错误信息',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.Button2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
MBMP:TBitmap;
|
||||||
|
MJPG:TJpegImage;
|
||||||
|
begin
|
||||||
|
|
||||||
|
sFieldName:='D:\抓图';
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
sFieldName:=sFieldName+'\'+formatdateTime('yyyyMMddhhnnss',SGetServerDateTime(ADOQuery1));
|
||||||
|
|
||||||
|
FileName:=ExtractFileName(sFieldName);
|
||||||
|
if hWndC <> 0 then
|
||||||
|
begin
|
||||||
|
SendMessage(hWndC,WM_CAP_SAVEDIB,0,longint(pchar(sFieldName+'.BMP')));
|
||||||
|
SendMessage(hWndC, WM_CAP_DRIVER_DISCONNECT, 0, 0);
|
||||||
|
hWndC := 0;
|
||||||
|
application.ProcessMessages;
|
||||||
|
Button1.Enabled:=true;
|
||||||
|
Button2.Enabled:=false;
|
||||||
|
try
|
||||||
|
MBMP:= TBitmap.Create;
|
||||||
|
MJPG:= TJpegImage.Create;
|
||||||
|
MBMP.LoadFromFile(pchar(sFieldName+'.BMP'));
|
||||||
|
MJPG.assign(MBMP);
|
||||||
|
Image1.Picture.Bitmap.Assign(MJPG);
|
||||||
|
application.ProcessMessages;
|
||||||
|
MJPG.SaveToFile(pchar(sFieldName+'.JPG'));
|
||||||
|
CreThumb(240, 180);
|
||||||
|
finally
|
||||||
|
MBMP.Free;
|
||||||
|
MJPG.Free;
|
||||||
|
if Fileexists(pchar(sFieldName+'.BMP')) then DeleteFile(pchar(sFieldName+'.BMP'));
|
||||||
|
FilePath:=sFieldName+'.JPG';
|
||||||
|
FileName:=ExtractFileName(FilePath);
|
||||||
|
end;
|
||||||
|
SpeedButton2.Enabled:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.SpeedButton4Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
MJPG:TJpegImage;
|
||||||
|
pathFile:string;
|
||||||
|
begin
|
||||||
|
if Image1.Picture.Graphic=nil then exit;
|
||||||
|
|
||||||
|
MJPG:= TJpegImage.Create;
|
||||||
|
try
|
||||||
|
SaveDialog1.FileName:=FileName;
|
||||||
|
if SaveDialog1.Execute then
|
||||||
|
begin
|
||||||
|
if SaveDialog1.FileName<>'' then
|
||||||
|
begin
|
||||||
|
pathFile:=trim(SaveDialog1.FileName);
|
||||||
|
|
||||||
|
IF (RightStr(UPPERCASE(pathFile),4)<>'.JPG') and (RightStr(UPPERCASE(pathFile),5)<>'.JPEG') then
|
||||||
|
begin
|
||||||
|
pathFile:=pathFile+'.JPG';
|
||||||
|
end;
|
||||||
|
MJPG.Assign(Image1.Picture.Graphic);
|
||||||
|
if fileexists(pathFile) then
|
||||||
|
begin
|
||||||
|
if application.MessageBox(pchar('文件['+trim(pathFile)+']已存在,是否要替换它?'),'提示信息',MB_YESNO+mb_iconinformation+MB_DEFBUTTON2)=idyes then
|
||||||
|
MJPG.SaveToFile(pathFile);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
MJPG.SaveToFile(pathFile);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
MJPG.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormGetPic.SpeedButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
with adoqueryImage do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File where WBID='+quotedstr(trim(fkeyNo)));
|
||||||
|
open;
|
||||||
|
if RecordCount>0 then
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldByName(pat1).Value:=null;
|
||||||
|
FieldByName(pic1).Value:=null;
|
||||||
|
post;
|
||||||
|
Image1.Picture.Assign(nil);
|
||||||
|
Image2.Picture.Assign(nil);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
38
基础资料维护(BaseInfo.dll)/testDll.cfg
Normal file
38
基础资料维护(BaseInfo.dll)/testDll.cfg
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
-$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\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-w-UNSAFE_TYPE
|
||||||
|
-w-UNSAFE_CODE
|
||||||
|
-w-UNSAFE_CAST
|
||||||
136
基础资料维护(BaseInfo.dll)/testDll.dof
Normal file
136
基础资料维护(BaseInfo.dll)/testDll.dof
Normal file
|
|
@ -0,0 +1,136 @@
|
||||||
|
[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=
|
||||||
|
Packages=
|
||||||
|
Conditionals=
|
||||||
|
DebugSourceDirs=
|
||||||
|
UsePackages=0
|
||||||
|
[Parameters]
|
||||||
|
RunParams=
|
||||||
|
HostApplication=D:\selfware_83398\selfware\马国钢开发代码\项目代码\self\基础资料维护(BaseInfo.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=
|
||||||
14
基础资料维护(BaseInfo.dll)/testDll.dpr
Normal file
14
基础资料维护(BaseInfo.dll)/testDll.dpr
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
program testDll;
|
||||||
|
|
||||||
|
uses
|
||||||
|
Forms,
|
||||||
|
U_testdll in 'U_testdll.pas' {Form1};
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
begin
|
||||||
|
Application.Initialize;
|
||||||
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
||||||
BIN
基础资料维护(BaseInfo.dll)/testDll.res
Normal file
BIN
基础资料维护(BaseInfo.dll)/testDll.res
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user