~
This commit is contained in:
commit
43fbfa8db2
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
|
||||||
59
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
59
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
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 in 'U_ZdyAttInputCP.pas' {frmZdyAttInputCP},
|
||||||
|
U_ZdyAttachCP10 in 'U_ZdyAttachCP10.pas' {frmZdyAttachCP10},
|
||||||
|
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||||
|
U_ZdyAttInputCP10 in 'U_ZdyAttInputCP10.pas' {frmZdyAttInputCP10},
|
||||||
|
U_FjList_RZ in 'U_FjList_RZ.pas' {frmFjList_RZ},
|
||||||
|
U_CompressionFun in '..\..\..\ThreeFun\Fun\U_CompressionFun.pas',
|
||||||
|
U_UserHelpSel in 'U_UserHelpSel.pas' {frmUserHelpSel},
|
||||||
|
U_UserHelp in '..\..\..\ThreeFun\Form\U_UserHelp.pas' {frmUserHelp},
|
||||||
|
U_RTFun in '..\..\..\ThreeFun\Fun\U_RTFun.pas';
|
||||||
|
|
||||||
|
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
||||||
|
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
||||||
|
// U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField},
|
||||||
|
// U_SelPrintFieldNew in '..\..\SelfForm\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||||
|
//U_FormPas in '..\CommonPas\formPas\U_FormPas.pas',
|
||||||
|
//U_CxGridSet in '..\CommonPas\cxgridPas\U_CxGridSet.pas';
|
||||||
|
|
||||||
|
//U_RSFormPas in '..\CommonPas\RSCommon\U_RSFormPas.pas';
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;
|
||||||
|
begin
|
||||||
|
DLLProc := @DLLEnterPoint;
|
||||||
|
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DLLUnloadProc(Reason: Integer); register;
|
||||||
|
begin
|
||||||
|
// 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.rar
Normal file
BIN
基础资料维护(BaseInfo.dll)/BaseInfo.rar
Normal file
Binary file not shown.
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)
|
||||||
|
|
||||||
|
|
||||||
3
基础资料维护(BaseInfo.dll)/SYSTEMSET.ini
Normal file
3
基础资料维护(BaseInfo.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[SERVER]
|
||||||
|
服务器地址=192.168.0.100
|
||||||
|
软件名称=欣戈纺织
|
||||||
354
基础资料维护(BaseInfo.dll)/U_AddYFGYS.dfm
Normal file
354
基础资料维护(BaseInfo.dll)/U_AddYFGYS.dfm
Normal file
|
|
@ -0,0 +1,354 @@
|
||||||
|
object frmAddYFGYS: TfrmAddYFGYS
|
||||||
|
Left = 302
|
||||||
|
Top = 145
|
||||||
|
Width = 641
|
||||||
|
Height = 390
|
||||||
|
Caption = #24212#20184#21333#20301#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poDesktopCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 625
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clBtnFace
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBsave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBsaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
Width = 475
|
||||||
|
Height = 30
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 625
|
||||||
|
Height = 320
|
||||||
|
Align = alClient
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 1
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 199
|
||||||
|
Width = 99
|
||||||
|
Height = 14
|
||||||
|
Caption = #24320' '#25143' '#38134' '#34892#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 164
|
||||||
|
Width = 99
|
||||||
|
Height = 14
|
||||||
|
Caption = #20256' '#30495' '#21495' '#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 47
|
||||||
|
Top = 129
|
||||||
|
Width = 92
|
||||||
|
Height = 14
|
||||||
|
Caption = #32852' '#31995' '#20154#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 34
|
||||||
|
Top = 24
|
||||||
|
Width = 105
|
||||||
|
Height = 14
|
||||||
|
Caption = #24212#20184#21333#20301#21517#31216#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 234
|
||||||
|
Width = 99
|
||||||
|
Height = 14
|
||||||
|
Caption = #38134' '#34892' '#36134' '#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 94
|
||||||
|
Width = 99
|
||||||
|
Height = 14
|
||||||
|
Caption = #20844' '#21496' '#22320' '#22336#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 331
|
||||||
|
Top = 129
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #30005#35805#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 34
|
||||||
|
Top = 59
|
||||||
|
Width = 105
|
||||||
|
Height = 14
|
||||||
|
Caption = #24212#20184#21333#20301#31616#31216#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label18: TLabel
|
||||||
|
Left = 331
|
||||||
|
Top = 164
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #25163#26426#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 38
|
||||||
|
Top = 269
|
||||||
|
Width = 101
|
||||||
|
Height = 14
|
||||||
|
Caption = #22791' '#27880#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 19
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object Linkman: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 124
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object FaxNo: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 159
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object BankName: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 194
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Note: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 264
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object MobileNo: TEdit
|
||||||
|
Left = 408
|
||||||
|
Top = 159
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object Shortened: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 54
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object TelNo: TEdit
|
||||||
|
Left = 408
|
||||||
|
Top = 124
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object Address: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 89
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
object BankNo: TEdit
|
||||||
|
Left = 140
|
||||||
|
Top = 229
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 181
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 333
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 237
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
end
|
||||||
206
基础资料维护(BaseInfo.dll)/U_AddYFGYS.pas
Normal file
206
基础资料维护(BaseInfo.dll)/U_AddYFGYS.pas
Normal file
|
|
@ -0,0 +1,206 @@
|
||||||
|
unit U_AddYFGYS;
|
||||||
|
|
||||||
|
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
|
||||||
|
TfrmAddYFGYS = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
TBsave: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label10: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
Label12: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label18: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
Linkman: TEdit;
|
||||||
|
FaxNo: TEdit;
|
||||||
|
BankName: TEdit;
|
||||||
|
Note: TEdit;
|
||||||
|
MobileNo: TEdit;
|
||||||
|
Shortened: TEdit;
|
||||||
|
TelNo: TEdit;
|
||||||
|
Address: TEdit;
|
||||||
|
BankNo: TEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
Panel2: TPanel;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBsaveClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
FATID,FFromATID:String;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmAddYFGYS: TfrmAddYFGYS;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmAddYFGYS.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FATID)+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCSHDataNew(ADOQueryMain,Panel1,0);
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FFromATID)+''' ');
|
||||||
|
Open;
|
||||||
|
Panel2.Caption:=Trim(FieldByName('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmAddYFGYS.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmAddYFGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmAddYFGYS.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
fzdyCode,maxId:string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if ( Trim(FATID)='' ) 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,'YF','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取应付单位编号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FATID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FATID)+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FATID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('ZdyCode').Value:=Trim(fzdyCode);
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
FieldByName('Type').Value:='GYS';
|
||||||
|
if ( Trim(FFromATID)='' ) then
|
||||||
|
FieldByName('FromATID').Value:=Trim(maxId)
|
||||||
|
else
|
||||||
|
FieldByName('FromATID').Value:=Trim(FFromATID);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
SSetsavedataNew(ADOQueryCmd,'KH_Zdy_Attachment',Panel1,0);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ZdyName='''+Trim(maxId)+''' ');
|
||||||
|
sql.Add(' and Type=''GYS'' and Valid=''Y'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('应付单位名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmAddYFGYS.TBsaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZdyName.SetFocus;
|
||||||
|
if Trim(ZdyName.Text)='' 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.
|
||||||
215
基础资料维护(BaseInfo.dll)/U_CFAdd.dfm
Normal file
215
基础资料维护(BaseInfo.dll)/U_CFAdd.dfm
Normal file
|
|
@ -0,0 +1,215 @@
|
||||||
|
object frmCFAdd: TfrmCFAdd
|
||||||
|
Left = 453
|
||||||
|
Top = 176
|
||||||
|
Width = 500
|
||||||
|
Height = 492
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 484
|
||||||
|
Height = 30
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
Width = 80
|
||||||
|
Height = 30
|
||||||
|
Caption = #26679#21697#32534#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 332
|
||||||
|
Top = 0
|
||||||
|
Width = 8
|
||||||
|
Height = 30
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 30
|
||||||
|
Width = 484
|
||||||
|
Height = 424
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #27604#20363
|
||||||
|
DataBinding.FieldName = 'account'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
object v1PRTColor: TcxGridDBColumn
|
||||||
|
Caption = #25104#20998
|
||||||
|
DataBinding.FieldName = 'CYCF'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = False
|
||||||
|
Properties.OnButtonClick = v1PRTColorPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_YPGL.handBlack
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYECF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 517
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 565
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object Order_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 84
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 645
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 13
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Sub
|
||||||
|
Left = 548
|
||||||
|
Top = 84
|
||||||
|
end
|
||||||
|
end
|
||||||
220
基础资料维护(BaseInfo.dll)/U_CFAdd.pas
Normal file
220
基础资料维护(BaseInfo.dll)/U_CFAdd.pas
Normal file
|
|
@ -0,0 +1,220 @@
|
||||||
|
unit U_CFAdd;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, ComCtrls, ToolWin,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit, cxButtonEdit,
|
||||||
|
StdCtrls, ExtCtrls, cxCurrencyEdit, cxDropDownEdit, cxCalendar, BtnEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCFAdd = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1PRTColor: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
Order_Sub: TClientDataSet;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOCmd: TADOQuery;
|
||||||
|
Label1: TLabel;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label2: TLabel;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure CYCFBtnDnClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v1PRTColorPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
canshu1:string;
|
||||||
|
Fint:Integer;
|
||||||
|
procedure InitSubGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FCYID,FCPID:String;
|
||||||
|
CopyInt:Integer;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCFAdd: TfrmCFAdd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_iniParam,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.InitSubGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOCmd.DisableControls;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(' select * from CP_YDang_CF where mainid='''+FCPID+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOCmd,Order_Sub);
|
||||||
|
SInitCDSData20(ADOCmd,Order_Sub);
|
||||||
|
finally
|
||||||
|
ADOCmd.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitSubGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmCFAdd.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
Smaxno:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with Order_Sub do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if Trim(Order_Sub.fieldbyname('Id').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,Smaxno,'CF','CP_YDang_CF',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取子流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Smaxno:=Trim(Order_Sub.fieldbyname('Id').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from CP_YDang_CF where');
|
||||||
|
sql.Add(' ID='''+Trim(Smaxno)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if IsEmpty then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MainId').Value:=Trim(Label1.Caption);
|
||||||
|
FieldByName('Id').Value:=Trim(Smaxno);
|
||||||
|
FieldByName('CYCF').Value:=Order_Sub.FieldByName('CYCF').AsString;
|
||||||
|
fieldbyname('CYECF').Value:=Order_Sub.FieldByName('CYECF').AsString;
|
||||||
|
fieldbyname('account').Value:=Order_Sub.FieldByName('account').AsString;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.CYCFBtnDnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBtnEditC(Sender).Text:='';
|
||||||
|
TBtnEditC(Sender).TxtCode:='';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.ToolButton2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
CopyAddRow(Tv1,Order_Sub);
|
||||||
|
with Order_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('CYCF').Value:='';
|
||||||
|
FieldByName('CYECF').Value:='';
|
||||||
|
FieldByName('account').Value:='';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Trim(Order_Sub.fieldbyname('ID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from CP_YDang_CF where ID='''+Trim(Order_Sub.fieldbyname('ID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Order_Sub.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCFAdd.v1PRTColorPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='CYCF';
|
||||||
|
flagname:='成分';
|
||||||
|
V1Name.Caption:='中文名称';
|
||||||
|
V1Note.Caption:='英文名称';
|
||||||
|
fnote:=True;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('CYCF').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.Order_Sub.FieldByName('CYECF').Value:=Trim(ClientDataSet1.fieldbyname('Note').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
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
69
基础资料维护(BaseInfo.dll)/U_DataLink.pas
Normal file
69
基础资料维护(BaseInfo.dll)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
unit U_DataLink;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||||
|
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses;
|
||||||
|
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; //公司
|
||||||
|
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;
|
||||||
|
|
||||||
|
var
|
||||||
|
DataLink_BaseInfo: TDataLink_BaseInfo;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
procedure TDataLink_BaseInfo.DataModuleDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DataLink_BaseInfo:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
183
基础资料维护(BaseInfo.dll)/U_FjList_RZ.dfm
Normal file
183
基础资料维护(BaseInfo.dll)/U_FjList_RZ.dfm
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
object frmFjList_RZ: TfrmFjList_RZ
|
||||||
|
Left = 177
|
||||||
|
Top = 159
|
||||||
|
Width = 796
|
||||||
|
Height = 501
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
|
Caption = #38468#20214#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ListView1: TListView
|
||||||
|
Left = 40
|
||||||
|
Top = 20
|
||||||
|
Width = 429
|
||||||
|
Height = 77
|
||||||
|
Columns = <>
|
||||||
|
TabOrder = 0
|
||||||
|
OnDblClick = ListView1DblClick
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 629
|
||||||
|
Top = 0
|
||||||
|
Width = 151
|
||||||
|
Height = 463
|
||||||
|
Align = alRight
|
||||||
|
TabOrder = 1
|
||||||
|
object FileName: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 60
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #28155#21152
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = FileNameClick
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton1: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 96
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #21024#38500
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxButton1Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton2: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 132
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #20445#23384
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = cxButton2Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton3: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 172
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #20851#38381
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = cxButton3Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 176
|
||||||
|
Top = 140
|
||||||
|
Width = 193
|
||||||
|
Height = 41
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Panel2'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
OnDblClick = Panel2DblClick
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 8
|
||||||
|
Top = 84
|
||||||
|
Width = 593
|
||||||
|
Height = 345
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnDblClick = Tv1DblClick
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #25991#20214#21517#31216
|
||||||
|
DataBinding.FieldName = 'FileName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 146
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #25991#20214#20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'TFdate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #19978#20256#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = ADOConnection1
|
||||||
|
Parameters = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 28
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = ADOConnection1
|
||||||
|
Parameters = <>
|
||||||
|
Left = 568
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
object ImageList1: TImageList
|
||||||
|
Left = 536
|
||||||
|
Top = 228
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 500
|
||||||
|
Top = 198
|
||||||
|
end
|
||||||
|
object ADOConnection1: TADOConnection
|
||||||
|
LoginPrompt = False
|
||||||
|
Left = 532
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryTmp
|
||||||
|
Left = 548
|
||||||
|
Top = 140
|
||||||
|
end
|
||||||
|
end
|
||||||
443
基础资料维护(BaseInfo.dll)/U_FjList_RZ.pas
Normal file
443
基础资料维护(BaseInfo.dll)/U_FjList_RZ.pas
Normal file
|
|
@ -0,0 +1,443 @@
|
||||||
|
unit U_FjList_RZ;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, ComCtrls, Menus, cxLookAndFeelPainters, StdCtrls,
|
||||||
|
cxButtons, DB, ADODB, ImgList,shellapi, IdBaseComponent, IdComponent,
|
||||||
|
IdTCPConnection, IdTCPClient, IdFTP, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmFjList_RZ = class(TForm)
|
||||||
|
ListView1: TListView;
|
||||||
|
Panel1: TPanel;
|
||||||
|
FileName: TcxButton;
|
||||||
|
cxButton1: TcxButton;
|
||||||
|
cxButton2: TcxButton;
|
||||||
|
cxButton3: TcxButton;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ImageList1: TImageList;
|
||||||
|
Panel2: TPanel;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
procedure cxButton3Click(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FileNameClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ListView1DblClick(Sender: TObject);
|
||||||
|
procedure cxButton1Click(Sender: TObject);
|
||||||
|
procedure cxButton2Click(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure Panel2DblClick(Sender: TObject);
|
||||||
|
procedure Tv1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitData();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fkeyNO:string;
|
||||||
|
fType:string;
|
||||||
|
fId:integer;
|
||||||
|
fstatus:integer;
|
||||||
|
// fmanage:string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmFjList_RZ: TfrmFjList_RZ;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_CompressionFun;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmFjList_RZ.InitData();
|
||||||
|
var
|
||||||
|
ListItem: TListItem;
|
||||||
|
Flag: Cardinal;
|
||||||
|
info: SHFILEINFOA;
|
||||||
|
Icon: TIcon;
|
||||||
|
begin
|
||||||
|
ListView1.Items.Clear;
|
||||||
|
try
|
||||||
|
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File ');
|
||||||
|
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
open;
|
||||||
|
{ if not IsEmpty then
|
||||||
|
begin
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with ListView1 do
|
||||||
|
begin
|
||||||
|
LargeImages := ImageList1;
|
||||||
|
Icon := TIcon.Create;
|
||||||
|
ListItem := Items.Add;
|
||||||
|
Listitem.Caption := trim(fieldbyname('fileName').AsString);
|
||||||
|
// Listitem.SubItems.Add(OpenDiaLog.FileName);
|
||||||
|
Flag := (SHGFI_SMALLICON or SHGFI_ICON or SHGFI_USEFILEATTRIBUTES);
|
||||||
|
SHGetFileInfo(Pchar(trim(fieldbyname('fileName').AsString)), 0, info, Sizeof(info), Flag);
|
||||||
|
Icon.Handle := info.hIcon;
|
||||||
|
ImageList1.AddIcon(Icon);
|
||||||
|
ListItem.ImageIndex := ImageList1.Count - 1;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.cxButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ADOQueryTmp.Close;
|
||||||
|
ADOQuerycmd.Close;
|
||||||
|
ListView1.Items.Free;
|
||||||
|
ModalResult:=-1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmFjList_RZ:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FileNameClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
OpenDiaLog: TOpenDialog;
|
||||||
|
fFileName:string;
|
||||||
|
fFilePath:string;
|
||||||
|
maxNo:string;
|
||||||
|
// myStream: TADOBlobStream;
|
||||||
|
FJStream : TMemoryStream;
|
||||||
|
mfileSize:integer;
|
||||||
|
mCreationTime:TdateTime;
|
||||||
|
mWriteTime:TdateTime;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
OpenDiaLog := TOpenDialog.Create(Self);
|
||||||
|
if OpenDiaLog.Execute then
|
||||||
|
begin
|
||||||
|
fFilePath:=OpenDiaLog.FileName;
|
||||||
|
fFileName:=ExtractFileName(OpenDiaLog.FileName);
|
||||||
|
|
||||||
|
|
||||||
|
{ with adoqueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select TFId from TP_File ');
|
||||||
|
sql.Add('where WBID<>'+quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
open;
|
||||||
|
IF not adoqueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('此附件名称已存在,请修改文件名,继续上传!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
|
Panel2.Caption:='正在上传数据,请稍等...';
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
application.ProcessMessages;
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd,maxNo,'FJ','TP_File',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//获取文件信息
|
||||||
|
GetFileInfo(fFilePath,mfileSize,mCreationTime,mWriteTime);
|
||||||
|
|
||||||
|
adoqueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
|
||||||
|
with adoqueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from TP_File ');
|
||||||
|
sql.Add('where TFID='+quotedstr(trim(maxNO)));
|
||||||
|
// sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||||
|
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
FJStream:=TMemoryStream.Create;
|
||||||
|
with adoqueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File ');
|
||||||
|
sql.Add('where TFID='+quotedstr(trim(maxNO)));
|
||||||
|
// sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||||
|
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
open;
|
||||||
|
append;
|
||||||
|
fieldbyname('TFID').Value:=trim(maxNO);
|
||||||
|
fieldbyname('WBID').Value:=trim(fkeyNO);
|
||||||
|
fieldbyname('TFType').Value:=trim(fType);
|
||||||
|
fieldbyname('Filler').Value:=trim(DName);
|
||||||
|
fieldbyname('FileName').Value:=trim(fFileName);
|
||||||
|
fieldbyname('TFDate').Value:=mWriteTime;
|
||||||
|
FJStream.LoadFromFile(fFilePath);
|
||||||
|
CompressionStream(FJStream);
|
||||||
|
tblobfield(FieldByName('Filesother')).LoadFromStream(FJStream);
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ if fFilePath <> '' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1.Host := PicSvr;
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
IdFTP1.Put(fFilePath, 'FJ\' + Trim(fFileName));
|
||||||
|
IdFTP1.Quit;
|
||||||
|
except
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Application.MessageBox('上传客户图样文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
IdFTP1.Quit;
|
||||||
|
}
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
initdata();
|
||||||
|
finally
|
||||||
|
FJStream.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
adoqueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
adoqueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('附件保存失败!','提示信息',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
fstatus:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF fstatus=0 then Panel1.Visible:=true
|
||||||
|
else Panel1.Visible:=false;
|
||||||
|
initdata();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.ListView1DblClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
fileName:string;
|
||||||
|
begin
|
||||||
|
if ListView1.Items.Count<1 THEN EXIT;
|
||||||
|
|
||||||
|
if listView1.SelCount<1 then exit;
|
||||||
|
sFieldName:='D:\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
fileName:=ListView1.Selected.Caption;
|
||||||
|
|
||||||
|
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||||
|
|
||||||
|
try
|
||||||
|
IdFTP1.Host := PicSvr;
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
except
|
||||||
|
;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if IdFTP1.Connected then
|
||||||
|
begin
|
||||||
|
|
||||||
|
Panel2.Caption:='正在下载数据,请稍等...';
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
application.ProcessMessages;
|
||||||
|
try
|
||||||
|
IdFTP1.Get('FJ\'+ Trim(fileName), sFieldName,false, true);
|
||||||
|
except
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
if IdFTP1.Connected then IdFTP1.Quit;
|
||||||
|
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.cxButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fFileName:string;
|
||||||
|
fFilePath:string;
|
||||||
|
begin
|
||||||
|
// if listView1.SelCount<1 then exit;
|
||||||
|
|
||||||
|
IF ADOQueryTmp.IsEmpty then exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
// fFileName:=ListView1.Selected.Caption;
|
||||||
|
// ADOQueryTmp.Locate('fileName',fFileName,[]);
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from TP_File ');
|
||||||
|
sql.Add('where TFID='+quotedstr(trim(ADOQueryTmp.fieldbyname('TFID').AsString)));
|
||||||
|
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
|
||||||
|
initData();
|
||||||
|
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.cxButton2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
SaveDialog: TSaveDialog;
|
||||||
|
fFileName:string;
|
||||||
|
fFilePath:string;
|
||||||
|
ff: TADOBlobStream;
|
||||||
|
FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
if adoqueryTmp.IsEmpty then exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
|
||||||
|
fFileName:=adoqueryTmp.fieldbyname('FileName').AsString;
|
||||||
|
|
||||||
|
SaveDialog := TSaveDialog.Create(Self);
|
||||||
|
|
||||||
|
SaveDialog.FileName:=fFileName;
|
||||||
|
if SaveDialog.Execute then
|
||||||
|
begin
|
||||||
|
Panel2.Caption:='正在保存数据,请稍等...';
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
application.ProcessMessages;
|
||||||
|
fFilePath:=SaveDialog.FileName;
|
||||||
|
|
||||||
|
try
|
||||||
|
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||||
|
|
||||||
|
fjStream:= TMemoryStream.Create ;
|
||||||
|
ff.SaveToStream(fjStream);
|
||||||
|
UnCompressionStream(fjStream);
|
||||||
|
fjStream.SaveToFile(fFilePath);
|
||||||
|
// ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||||
|
finally
|
||||||
|
fjStream.free;
|
||||||
|
ff.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
// if IdFTP1.Connected then IdFTP1.Quit;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
if fId=10 then Action:=cafree
|
||||||
|
else
|
||||||
|
Action:=cahide;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.Panel2DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.Tv1DblClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
fileName:string;
|
||||||
|
ff: TADOBlobStream;
|
||||||
|
FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
|
||||||
|
IF adoqueryTmp.IsEmpty then exit;
|
||||||
|
|
||||||
|
sFieldName:='D:\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
fileName:=adoqueryTmp.fieldbyname('FileName').AsString;
|
||||||
|
|
||||||
|
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||||
|
|
||||||
|
try
|
||||||
|
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||||
|
|
||||||
|
fjStream:= TMemoryStream.Create ;
|
||||||
|
ff.SaveToStream(fjStream);
|
||||||
|
UnCompressionStream(fjStream);
|
||||||
|
fjStream.SaveToFile(sFieldName);
|
||||||
|
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||||
|
finally
|
||||||
|
fjStream.free;
|
||||||
|
ff.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
229
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
229
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,229 @@
|
||||||
|
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_ZdyAttachment, U_ZdyAttachGYS, U_ZdyAttachCP, U_ZdyAttachCP10;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// 功能说明:取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 := 'shunbangdata';
|
||||||
|
user := 'rtsa';
|
||||||
|
pswd := 'rightsoft@5740';
|
||||||
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||||
|
|
||||||
|
// DConString:=DataBaseStr;
|
||||||
|
|
||||||
|
// DParameters1 := '高权限';
|
||||||
|
// 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);
|
||||||
|
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);
|
||||||
|
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 := 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;
|
||||||
|
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.
|
||||||
|
|
||||||
23823
基础资料维护(BaseInfo.dll)/U_UserHelpSel.dfm
Normal file
23823
基础资料维护(BaseInfo.dll)/U_UserHelpSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
235
基础资料维护(BaseInfo.dll)/U_UserHelpSel.pas
Normal file
235
基础资料维护(BaseInfo.dll)/U_UserHelpSel.pas
Normal file
|
|
@ -0,0 +1,235 @@
|
||||||
|
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, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
|
cxTLdxBarBuiltInMenu, cxNavigator;
|
||||||
|
|
||||||
|
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.
|
||||||
18034
基础资料维护(BaseInfo.dll)/U_UserSelf.dfm
Normal file
18034
基础资料维护(BaseInfo.dll)/U_UserSelf.dfm
Normal file
File diff suppressed because it is too large
Load Diff
637
基础资料维护(BaseInfo.dll)/U_UserSelf.pas
Normal file
637
基础资料维护(BaseInfo.dll)/U_UserSelf.pas
Normal file
|
|
@ -0,0 +1,637 @@
|
||||||
|
unit U_UserSelf;
|
||||||
|
|
||||||
|
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
|
||||||
|
TfrmUserSelf = class(TForm)
|
||||||
|
TV1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
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;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZDYName: TEdit;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
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);
|
||||||
|
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
flag, flagname, snote, MainType: string;
|
||||||
|
fnote, forderno, fZdyFlag, ViewFlag, fnote1: Boolean;
|
||||||
|
PPSTE: integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmUserSelf: TfrmUserSelf;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun10, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.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 TfrmUserSelf.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Username from SY_User ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.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 TfrmUserSelf.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('select * from KH_ZDY where 1=2');
|
||||||
|
open;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value := 'Main';
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
{ 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').Value;
|
||||||
|
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 TfrmUserSelf.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 TfrmUserSelf.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := 2;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
// WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TV1.OptionsData.Editing := True;
|
||||||
|
TV1.OptionsSelection.CellSelect := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.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 TfrmUserSelf.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 TfrmUserSelf.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('select * from KH_ZDY where 1=2');
|
||||||
|
open;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value := 'Main';
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
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) + '''');
|
||||||
|
sql.Add(' and note=''' + Trim(ClientDataSet1.fieldbyname('note').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 TfrmUserSelf.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 TfrmUserSelf.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 TfrmUserSelf.V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue: string;
|
||||||
|
fieldname: string;
|
||||||
|
begin
|
||||||
|
fieldname := Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
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(fieldname).Value := StrToInt(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set ' + fieldname + '=' + Trim(mvalue));
|
||||||
|
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserSelf.V1HelpTypePropertiesEditValueChanged(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('HelpType').Value := mvalue;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set HelpType=''' + Trim(mvalue) + '''');
|
||||||
|
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
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.
|
||||||
498
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.dfm
Normal file
498
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.dfm
Normal file
|
|
@ -0,0 +1,498 @@
|
||||||
|
object frmZdyAttInput: TfrmZdyAttInput
|
||||||
|
Left = 217
|
||||||
|
Top = 50
|
||||||
|
Width = 910
|
||||||
|
Height = 682
|
||||||
|
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
|
||||||
|
Position = poDesktopCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 894
|
||||||
|
Height = 30
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clBtnFace
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBsave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBsaveClick
|
||||||
|
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 = 30
|
||||||
|
Width = 894
|
||||||
|
Height = 614
|
||||||
|
Align = alClient
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 1
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 94
|
||||||
|
Width = 77
|
||||||
|
Height = 14
|
||||||
|
Caption = #22320' '#21306#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 301
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #24320#25143#38134#34892#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 234
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #20256#30495#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 199
|
||||||
|
Width = 76
|
||||||
|
Height = 14
|
||||||
|
Caption = #32852' '#31995' '#20154#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 24
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #23458#25143#21517#31216#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 414
|
||||||
|
Top = 94
|
||||||
|
Width = 77
|
||||||
|
Height = 14
|
||||||
|
Caption = #31561' '#32423#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 336
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #38134#34892#36134#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 129
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #20844#21496#22320#22336#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 414
|
||||||
|
Top = 199
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #30005#35805#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 59
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #23458#25143#31616#31216#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 414
|
||||||
|
Top = 59
|
||||||
|
Width = 76
|
||||||
|
Height = 14
|
||||||
|
Caption = #19994' '#21153' '#21592#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 164
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #36865#36135#22320#22336#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label18: TLabel
|
||||||
|
Left = 414
|
||||||
|
Top = 234
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #25163#26426#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 38
|
||||||
|
Top = 370
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #23458#25143#20998#26512#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 34
|
||||||
|
Top = 266
|
||||||
|
Width = 86
|
||||||
|
Height = 19
|
||||||
|
Caption = 'E-mail'#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -19
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 598
|
||||||
|
Top = 22
|
||||||
|
Width = 77
|
||||||
|
Height = 14
|
||||||
|
Caption = #31867' '#22411#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 19
|
||||||
|
Width = 461
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object Region: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 89
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Linkman: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 194
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object FaxNo: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 229
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object BankName: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 296
|
||||||
|
Width = 645
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object ywy: TEdit
|
||||||
|
Left = 493
|
||||||
|
Top = 54
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
OnDblClick = ywyDblClick
|
||||||
|
end
|
||||||
|
object MobileNo: TEdit
|
||||||
|
Left = 493
|
||||||
|
Top = 229
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object ToPlace: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 159
|
||||||
|
Width = 645
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object Shortened: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 54
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
object Grade: TEdit
|
||||||
|
Left = 493
|
||||||
|
Top = 89
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
object TelNo: TEdit
|
||||||
|
Left = 493
|
||||||
|
Top = 194
|
||||||
|
Width = 269
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 10
|
||||||
|
end
|
||||||
|
object Address: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 124
|
||||||
|
Width = 645
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 11
|
||||||
|
end
|
||||||
|
object BankNo: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 331
|
||||||
|
Width = 645
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 12
|
||||||
|
end
|
||||||
|
object EMAIL: TEdit
|
||||||
|
Left = 116
|
||||||
|
Top = 264
|
||||||
|
Width = 645
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 13
|
||||||
|
end
|
||||||
|
object Note: TMemo
|
||||||
|
Left = 116
|
||||||
|
Top = 364
|
||||||
|
Width = 645
|
||||||
|
Height = 181
|
||||||
|
TabOrder = 14
|
||||||
|
end
|
||||||
|
object KHType: TComboBox
|
||||||
|
Left = 673
|
||||||
|
Top = 18
|
||||||
|
Width = 89
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 16
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 15
|
||||||
|
Items.Strings = (
|
||||||
|
#20869#38144
|
||||||
|
#22806#38144
|
||||||
|
#20013#38388#21830)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 229
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 381
|
||||||
|
Top = 17
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 309
|
||||||
|
Top = 17
|
||||||
|
end
|
||||||
|
end
|
||||||
258
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.pas
Normal file
258
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.pas
Normal file
|
|
@ -0,0 +1,258 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInput = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
TBsave: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
Label10: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
Label12: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label14: TLabel;
|
||||||
|
Label17: TLabel;
|
||||||
|
Label18: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
Region: TEdit;
|
||||||
|
Linkman: TEdit;
|
||||||
|
FaxNo: TEdit;
|
||||||
|
BankName: TEdit;
|
||||||
|
ywy: TEdit;
|
||||||
|
MobileNo: TEdit;
|
||||||
|
ToPlace: TEdit;
|
||||||
|
Shortened: TEdit;
|
||||||
|
Grade: TEdit;
|
||||||
|
TelNo: TEdit;
|
||||||
|
Address: TEdit;
|
||||||
|
BankNo: TEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
EMAIL: TEdit;
|
||||||
|
Label3: TLabel;
|
||||||
|
Note: TMemo;
|
||||||
|
Label9: TLabel;
|
||||||
|
KHType: TComboBox;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBsaveClick(Sender: TObject);
|
||||||
|
procedure ywyDblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData(): Boolean;
|
||||||
|
public
|
||||||
|
fkhType: string;
|
||||||
|
{ Public declarations }
|
||||||
|
FATID, FFromATID: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInput: TfrmZdyAttInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ZDYHelp, U_UserSelf;
|
||||||
|
|
||||||
|
{$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(FATID) + ''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCSHDataNew(ADOQueryMain, Panel1, 0);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FATID) = '' then
|
||||||
|
begin
|
||||||
|
ywy.Text := Trim(Dname);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInput.SaveData(): Boolean;
|
||||||
|
var
|
||||||
|
fzdyCode, maxId, LX: string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if (Trim(FATID) = '') 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 KHType.Text = '内销' then
|
||||||
|
begin
|
||||||
|
LX := '201';
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
LX := '202'
|
||||||
|
end;
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd, fzdyCode, LX, 'KH_Zdy_Attachment', 4, 0) = False then
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取客户编号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxId := Trim(FATID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID=''' + Trim(FATID) + ''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FATID) = '' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
FieldByName('ZdyCode').Value := Trim(fzdyCode);
|
||||||
|
FieldByName('ATID').Value := Trim(maxId);
|
||||||
|
FieldByName('Type').Value := 'KHName';
|
||||||
|
if (Trim(FFromATID) = '') then
|
||||||
|
FieldByName('FromATID').Value := Trim(maxId)
|
||||||
|
else
|
||||||
|
FieldByName('FromATID').Value := Trim(FFromATID);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value := Trim(DName);
|
||||||
|
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
SSetsavedataNew(ADOQueryCmd, 'KH_Zdy_Attachment', Panel1, 0);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ZdyName=''' + Trim(maxId) + ''' ');
|
||||||
|
sql.Add(' and Type=''KHName'' and Valid=''Y'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount > 1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('客户名称重复!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
Result := False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.TBsaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZdyName.SetFocus;
|
||||||
|
if Trim(ZdyName.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('客户名称不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Trim(KHType.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('客户类型不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Trim(Linkman.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('联系人不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Trim(MobileNo.Text) = '' 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 TfrmZdyAttInput.ywyDblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmUserSelf := TfrmUserSelf.Create(self);
|
||||||
|
with frmUserSelf do
|
||||||
|
begin
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
ywy.Text := ClientDataSet1.fieldbyname('username').AsString;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
271
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.dfm
Normal file
271
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.dfm
Normal file
|
|
@ -0,0 +1,271 @@
|
||||||
|
object frmZdyAttInputCP: TfrmZdyAttInputCP
|
||||||
|
Left = 219
|
||||||
|
Top = 254
|
||||||
|
Width = 920
|
||||||
|
Height = 370
|
||||||
|
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 = 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 v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 124
|
||||||
|
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 v2Mrate: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#32553#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'Mrate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #24037#33402
|
||||||
|
DataBinding.FieldName = 'defNote2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column5PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
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 v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #33457#21495
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 61
|
||||||
|
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
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#25968
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #20215#26684#22686#24133
|
||||||
|
DataBinding.FieldName = 'defflt1'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##;-,0.##'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
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 = 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
|
||||||
335
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.pas
Normal file
335
基础资料维护(BaseInfo.dll)/U_ZdyAttInputCP.pas
Normal file
|
|
@ -0,0 +1,335 @@
|
||||||
|
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;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Mrate: 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 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('产品资料录入',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputCP.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('产品资料录入',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(CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
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 = 232
|
||||||
|
Top = 29
|
||||||
|
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.
|
||||||
425
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.dfm
Normal file
425
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.dfm
Normal file
|
|
@ -0,0 +1,425 @@
|
||||||
|
object frmZdyAttInputGYS: TfrmZdyAttInputGYS
|
||||||
|
Left = 261
|
||||||
|
Top = 177
|
||||||
|
Width = 620
|
||||||
|
Height = 464
|
||||||
|
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
|
||||||
|
Position = poDesktopCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 604
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clBtnFace
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBsave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBsaveClick
|
||||||
|
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 = 29
|
||||||
|
Width = 604
|
||||||
|
Height = 396
|
||||||
|
Align = alClient
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 1
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 49
|
||||||
|
Top = 225
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #24320#25143#38134#34892#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 49
|
||||||
|
Top = 190
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #20256#30495#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 48
|
||||||
|
Top = 155
|
||||||
|
Width = 76
|
||||||
|
Height = 14
|
||||||
|
Caption = #32852' '#31995' '#20154#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 34
|
||||||
|
Top = 23
|
||||||
|
Width = 90
|
||||||
|
Height = 14
|
||||||
|
Caption = #20379#24212#21830#21517#31216#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 49
|
||||||
|
Top = 260
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #38134#34892#36134#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 49
|
||||||
|
Top = 120
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #20844#21496#22320#22336#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 319
|
||||||
|
Top = 155
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #30005#35805#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 34
|
||||||
|
Top = 53
|
||||||
|
Width = 90
|
||||||
|
Height = 14
|
||||||
|
Caption = #20379#24212#21830#31616#31216#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 48
|
||||||
|
Top = 85
|
||||||
|
Width = 77
|
||||||
|
Height = 14
|
||||||
|
Caption = #31867' '#22411#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label18: TLabel
|
||||||
|
Left = 319
|
||||||
|
Top = 190
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #25163#26426#21495#30721#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 47
|
||||||
|
Top = 332
|
||||||
|
Width = 77
|
||||||
|
Height = 14
|
||||||
|
Caption = #22791' '#27880#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 48
|
||||||
|
Top = 295
|
||||||
|
Width = 75
|
||||||
|
Height = 14
|
||||||
|
Caption = #20027#33829#20135#21697#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 53
|
||||||
|
Width = 90
|
||||||
|
Height = 14
|
||||||
|
Caption = #20379#24212#21830#31561#32423#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 18
|
||||||
|
Width = 417
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object Linkman: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 150
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object FaxNo: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 185
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object BankName: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 220
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Note: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 327
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object MobileNo: TEdit
|
||||||
|
Left = 396
|
||||||
|
Top = 185
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object Shortened: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 48
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object TelNo: TEdit
|
||||||
|
Left = 396
|
||||||
|
Top = 150
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object Address: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 115
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
object BankNo: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 255
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
object ZdyType: TComboBox
|
||||||
|
Left = 129
|
||||||
|
Top = 80
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 16
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 10
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067#21378
|
||||||
|
#21152#24037#21378
|
||||||
|
#29289#27969#20844#21496
|
||||||
|
#38376#24066#37096
|
||||||
|
#21518#24037#33402)
|
||||||
|
end
|
||||||
|
object ZYCP: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 290
|
||||||
|
Width = 418
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 11
|
||||||
|
end
|
||||||
|
object Grade: TEdit
|
||||||
|
Left = 396
|
||||||
|
Top = 48
|
||||||
|
Width = 150
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 12
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 181
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 333
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 237
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
end
|
||||||
260
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.pas
Normal file
260
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.pas
Normal file
|
|
@ -0,0 +1,260 @@
|
||||||
|
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;
|
||||||
|
TBsave: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label10: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
Label12: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label14: TLabel;
|
||||||
|
Label18: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
Linkman: TEdit;
|
||||||
|
FaxNo: TEdit;
|
||||||
|
BankName: TEdit;
|
||||||
|
Note: TEdit;
|
||||||
|
MobileNo: TEdit;
|
||||||
|
Shortened: TEdit;
|
||||||
|
TelNo: TEdit;
|
||||||
|
Address: TEdit;
|
||||||
|
BankNo: TEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyType: TComboBox;
|
||||||
|
Label2: TLabel;
|
||||||
|
ZYCP: TEdit;
|
||||||
|
Grade: TEdit;
|
||||||
|
Label3: TLabel;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBsaveClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData(): Boolean;
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
FATID, FFromATID: string;
|
||||||
|
FZdyname: 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(FATID) + ''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCSHDataNew(ADOQueryMain, Panel1, 0);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FZdyname := ADOQueryMain.fieldbyname('zdyname').AsString;
|
||||||
|
|
||||||
|
ZdyType.Items.Clear;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select ZDYName from KH_ZDY where type=''GYSSZ''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.First;
|
||||||
|
while not ADOQueryCmd.Eof do
|
||||||
|
begin
|
||||||
|
ZdyType.Items.Add(ADOQueryCmd.fieldByName('ZDYName').AsString);
|
||||||
|
ADOQueryCmd.Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInputGYS.SaveData(): Boolean;
|
||||||
|
var
|
||||||
|
fzdyCode, maxId, GZ: string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if (Trim(FATID) = '') 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;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select top 1 note from KH_ZDY where Type=''GYSSZ'' and ZDYName=''' + ZdyType.Text + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
GZ := ADOQueryCmd.fieldByName('note').AsString;
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd, fzdyCode, GZ, 'KH_Zdy_Attachment', 4, 0) = False then
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取供应商编号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxId := Trim(FATID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID=''' + Trim(FATID) + ''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FATID) = '' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
FieldByName('ZdyCode').Value := Trim(fzdyCode);
|
||||||
|
FieldByName('ATID').Value := Trim(maxId);
|
||||||
|
FieldByName('Type').Value := 'GYS';
|
||||||
|
if (Trim(FFromATID) = '') then
|
||||||
|
FieldByName('FromATID').Value := Trim(maxId)
|
||||||
|
else
|
||||||
|
FieldByName('FromATID').Value := Trim(FFromATID);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value := Trim(DName);
|
||||||
|
FieldByName('Edittime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
SSetsavedataNew(ADOQueryCmd, 'KH_Zdy_Attachment', Panel1, 0);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ZdyName=''' + Trim(ZdyName.Text) + ''' ');
|
||||||
|
sql.Add(' and Type=''GYS'' and Valid=''Y'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount > 1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('供应商名称重复!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// if Trim(ZdyName.Text) <> FZdyname then
|
||||||
|
// begin
|
||||||
|
// if Application.MessageBox('供应商名称已修改,是否同步应付款?', '提示', 32 + 4) <> IDYES then
|
||||||
|
// begin
|
||||||
|
//
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
// sql.Add('update YF_Money_CR set OldFactoryName=FactoryName ,FactoryName=''' + trim(ZdyName.Text) + ''' ');
|
||||||
|
// sql.Add('where CRFlag=''应付付'' and FactoryName=''' + Trim(FZdyname) + ''' ');
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
Result := False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.TBsaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZdyName.SetFocus;
|
||||||
|
if Trim(ZdyName.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('供应商名称不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ZdyType.Text) = '' 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.
|
||||||
|
|
||||||
416
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.dfm
Normal file
416
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.dfm
Normal file
|
|
@ -0,0 +1,416 @@
|
||||||
|
object frmZdyAttachCP: TfrmZdyAttachCP
|
||||||
|
Left = 143
|
||||||
|
Top = 168
|
||||||
|
Width = 1075
|
||||||
|
Height = 569
|
||||||
|
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
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25552#21462'Excel'#25968#25454
|
||||||
|
ImageIndex = 106
|
||||||
|
Visible = False
|
||||||
|
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 = 1059
|
||||||
|
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 = 1059
|
||||||
|
Height = 461
|
||||||
|
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 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'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#25968
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2defflt1: TcxGridDBColumn
|
||||||
|
Caption = #20215#26684#22686#24133
|
||||||
|
DataBinding.FieldName = 'defflt1'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Editing = False
|
||||||
|
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 OpenDialog1: TOpenDialog
|
||||||
|
Left = 936
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
end
|
||||||
391
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.pas
Normal file
391
基础资料维护(BaseInfo.dll)/U_ZdyAttachCP.pas
Normal file
|
|
@ -0,0 +1,391 @@
|
||||||
|
unit U_ZdyAttachCP;
|
||||||
|
|
||||||
|
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;
|
||||||
|
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;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Mrate: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
v2Column17: TcxGridDBColumn;
|
||||||
|
v2defflt1: 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
|
||||||
|
fkhType:string;
|
||||||
|
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP: TfrmZdyAttachCP;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputCP;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''CP'' ');
|
||||||
|
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
sql.Add(' order by zdyCode ');
|
||||||
|
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('产品资料',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
|
||||||
|
ReadCxGrid('产品资料',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:=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:=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:='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.
|
||||||
|
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
|
||||||
720
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.dfm
Normal file
720
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.dfm
Normal file
|
|
@ -0,0 +1,720 @@
|
||||||
|
object frmZdyAttachGYS: TfrmZdyAttachGYS
|
||||||
|
Left = 260
|
||||||
|
Top = 75
|
||||||
|
Width = 991
|
||||||
|
Height = 623
|
||||||
|
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
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 975
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 95
|
||||||
|
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 TBedit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBeditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object Tchk: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23457#26680
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TchkClick
|
||||||
|
end
|
||||||
|
object TNochk: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23457#26680
|
||||||
|
ImageIndex = 86
|
||||||
|
OnClick = TNochkClick
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 465
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #38468#20214
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 528
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 591
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 654
|
||||||
|
Top = 0
|
||||||
|
Hint = 'GYSSZ/'#20379#24212#21830#35774#32622
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20379#24212#21830#35774#32622
|
||||||
|
ImageIndex = 1
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 975
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 182
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 28
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 510
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 632
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #22320#21306
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 760
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20027#33829#20135#21697
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 342
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#31616#31216
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 246
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 89
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 539
|
||||||
|
Top = 9
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22383#24067#21378
|
||||||
|
#21152#24037#21378
|
||||||
|
#29289#27969#20844#21496
|
||||||
|
#38376#24066#37096
|
||||||
|
#21518#24037#33402)
|
||||||
|
end
|
||||||
|
object Region: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 662
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZYCP: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 814
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object Shortened: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 406
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 92
|
||||||
|
Width = 975
|
||||||
|
Height = 304
|
||||||
|
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.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
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #20840#36873
|
||||||
|
DataBinding.FieldName = 'ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
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.Editing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#31616#31216
|
||||||
|
DataBinding.FieldName = 'Shortened'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'ZdyType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'Region'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'TelNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'MobileNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'FaxNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'Address'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'Linkman'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 114
|
||||||
|
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 = 80
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #20027#33829#20135#21697
|
||||||
|
DataBinding.FieldName = 'ZYCP'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'grade'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 975
|
||||||
|
Height = 22
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 0
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 22
|
||||||
|
ClientRectRight = 975
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 396
|
||||||
|
Width = 975
|
||||||
|
Height = 188
|
||||||
|
Align = alBottom
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 4
|
||||||
|
object Tlb1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 975
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clBtnFace
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TB3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TB3Click
|
||||||
|
end
|
||||||
|
object TB4: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TB4Click
|
||||||
|
end
|
||||||
|
object TB5: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TB5Click
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Width = 452
|
||||||
|
Height = 30
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -21
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 975
|
||||||
|
Height = 157
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||||
|
DataController.DataSource = DS1
|
||||||
|
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
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object cxGridDBColumn2: TcxGridDBColumn
|
||||||
|
Caption = #24212#20184#21333#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object cxGridDBColumn3: TcxGridDBColumn
|
||||||
|
Caption = #24212#20184#21333#20301#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object cxGridDBColumn4: TcxGridDBColumn
|
||||||
|
Caption = #24212#20184#21333#20301#31616#31216
|
||||||
|
DataBinding.FieldName = 'Shortened'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object cxGridDBColumn7: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'TelNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object cxGridDBColumn8: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'MobileNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object cxGridDBColumn9: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'FaxNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object cxGridDBColumn10: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'Address'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object cxGridDBColumn11: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'Linkman'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object cxGridDBColumn12: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object cxGridDBColumn13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object cxGridDBColumn14: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
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 = 677
|
||||||
|
Top = 217
|
||||||
|
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 = 552
|
||||||
|
Top = 200
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 832
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 584
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 659
|
||||||
|
Top = 171
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 736
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 488
|
||||||
|
Top = 456
|
||||||
|
end
|
||||||
|
object DS1: TDataSource
|
||||||
|
DataSet = CDS1
|
||||||
|
Left = 563
|
||||||
|
Top = 475
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 429
|
||||||
|
Top = 449
|
||||||
|
end
|
||||||
|
object CDS1: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 616
|
||||||
|
Top = 464
|
||||||
|
end
|
||||||
|
object ADOTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 880
|
||||||
|
Top = 13
|
||||||
|
end
|
||||||
|
end
|
||||||
575
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.pas
Normal file
575
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.pas
Normal file
|
|
@ -0,0 +1,575 @@
|
||||||
|
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, cxPC, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
|
cxNavigator, dxBarBuiltInMenu;
|
||||||
|
|
||||||
|
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;
|
||||||
|
TBedit: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
ZdyType: TComboBox;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
Region: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
Tchk: TToolButton;
|
||||||
|
TNochk: TToolButton;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Tlb1: TToolBar;
|
||||||
|
TB3: TToolButton;
|
||||||
|
TB4: TToolButton;
|
||||||
|
TB5: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGridDBColumn2: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn3: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn4: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn7: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn8: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn9: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn10: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn11: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn12: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn13: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn14: TcxGridDBColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
DS1: TDataSource;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
CDS1: TClientDataSet;
|
||||||
|
Panel3: TPanel;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
ADOTemp: TADOQuery;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
ZYCP: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
Label6: TLabel;
|
||||||
|
Shortened: TEdit;
|
||||||
|
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 TBeditClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TchkClick(Sender: TObject);
|
||||||
|
procedure TNochkClick(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure Tv2FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure TB3Click(Sender: TObject);
|
||||||
|
procedure TB4Click(Sender: TObject);
|
||||||
|
procedure TB5Click(Sender: TObject);
|
||||||
|
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure setstatus();
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
canshu1:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachGYS: TfrmZdyAttachGYS;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputGYS,U_AddYFGYS,U_FjList_RZ;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmZdyAttachGYS.setstatus();
|
||||||
|
begin
|
||||||
|
TBedit.Visible:=false;
|
||||||
|
TBdel.Visible:=false;
|
||||||
|
tchk.Visible:=false;
|
||||||
|
tnochk.Visible:=false;
|
||||||
|
toolbutton1.Visible:=false;
|
||||||
|
IF trim(canshu1)=''then
|
||||||
|
begin
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
TBedit.Visible:=true;
|
||||||
|
TBdel.Visible:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else IF trim(canshu1)='高权限'then
|
||||||
|
begin
|
||||||
|
toolbutton1.Visible:=true;
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
TBedit.Visible:=true;
|
||||||
|
tbdel.Visible:=True;
|
||||||
|
tchk.Visible:=True;
|
||||||
|
end;
|
||||||
|
1:begin
|
||||||
|
tNochk.Visible:=True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
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'' and Valid=''Y'' and ATID=FromATID ');
|
||||||
|
if cxTabControl1.TabIndex<2 then
|
||||||
|
sql.Add(' and Status='''+inttostr(cxTabControl1.TabIndex)+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ZdyType.Items.Clear;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select ZDYName from KH_ZDY where type=''GYSSZ''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.First;
|
||||||
|
while not ADOQueryCmd.Eof do
|
||||||
|
begin
|
||||||
|
ZdyType.Items.Add(ADOQueryCmd.fieldByName('ZDYName').AsString);
|
||||||
|
ADOQueryCmd.Next;
|
||||||
|
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;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(' select * from KH_Zdy_Attachment where FromATID='+QuotedStr(Trim(CDS_HZ.FieldByName('ATID').AsString)));
|
||||||
|
SQL.Add(' and Type=''GYS'' and Valid=''Y'' and FromATID<>ATID ');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已存在相关付款单位,不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
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(' update KH_Zdy_Attachment set Valid=''N'',ZFTime=GETDATE(),ZFPerson='+QuotedStr(Trim(DName)));
|
||||||
|
SQL.Add(' where ATID='+QuotedStr(Trim(CDS_HZ.FieldByName('ATID').AsString)));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('供应商资料',Tv2,'客户自定义');
|
||||||
|
setstatus();
|
||||||
|
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.TBeditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FATID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
FFromATID:=Trim(Self.CDS_HZ.fieldbyname('FromATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
Self.CDS_HZ.Locate('ATID',FATID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FATID:='';
|
||||||
|
FFromATID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
canshu1:=trim(DParameters1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TchkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then exit;
|
||||||
|
if CDS_HZ.Locate('ssel',true,[])=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
iF fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' update KH_Zdy_Attachment SET status=''1'',ChkTime=GETDATE(),Chker='''+Trim(DName)+''' ');
|
||||||
|
sql.Add(' where ATID='+quotedstr(trim(CDS_HZ.fieldbyname('ATID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
application.MessageBox('审核成功!','提示信息');
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('审核失败!','提示信息',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TNochkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then exit;
|
||||||
|
if CDS_HZ.Locate('ssel',true,[])=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
iF fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' update KH_Zdy_Attachment SET status=''0'',ChkTime=NULL,Chker=NULL ');
|
||||||
|
sql.Add(' where ATID='+quotedstr(trim(CDS_HZ.fieldbyname('ATID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
application.MessageBox('撤销审核成功!','提示信息');
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('撤销审核失败!','提示信息',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
setstatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmFjList_RZ:=TfrmFjList_RZ.Create(Application);
|
||||||
|
with frmFjList_RZ do
|
||||||
|
begin
|
||||||
|
fkeyNO:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fType:='供应商资料';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmFjList_RZ.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.Tv2FocusedRecordChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||||
|
AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(' select * from KH_Zdy_Attachment where Type=''GYS'' and Valid=''Y'' ');
|
||||||
|
SQL.Add(' and FromATID='''+Trim(CDS_HZ.FieldByName('ATID').AsString)+''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQuery1,CDS1);
|
||||||
|
SInitCDSData20(ADOQuery1,CDS1);
|
||||||
|
Panel3.Caption := Trim(CDS_HZ.FieldByName('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TB3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmAddYFGYS:=TfrmAddYFGYS.Create(Application);
|
||||||
|
with frmAddYFGYS do
|
||||||
|
begin
|
||||||
|
FATID:='';
|
||||||
|
FFromATID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
Self.CDS_HZ.Locate('ATID',FFromATID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmAddYFGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TB4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmAddYFGYS:=TfrmAddYFGYS.Create(Application);
|
||||||
|
with frmAddYFGYS do
|
||||||
|
begin
|
||||||
|
FATID:=Trim(Self.CDS1.fieldbyname('ATID').AsString);
|
||||||
|
FFromATID:=Trim(Self.CDS1.fieldbyname('FromATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
Self.CDS_HZ.Locate('ATID',FFromATID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmAddYFGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TB5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(' update KH_Zdy_Attachment set Valid=''N'',ZFTime=GETDATE(),ZFPerson='+QuotedStr(Trim(DName)));
|
||||||
|
SQL.Add(' where ATID='+QuotedStr(Trim(CDS1.FieldByName('ATID').AsString)));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
CDS1.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.Tv1FocusedRecordChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||||
|
AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
if ( Trim(CDS1.FieldByName('ATID').AsString)=Trim(CDS1.FieldByName('FromATID').AsString) ) then
|
||||||
|
begin
|
||||||
|
TB4.Enabled:=False;
|
||||||
|
TB5.Enabled:=False;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
TB4.Enabled:=True;
|
||||||
|
TB5.Enabled:=True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj:string;
|
||||||
|
FWZ:Integer;
|
||||||
|
begin
|
||||||
|
fsj:=Trim(TEdit(Sender).Hint);
|
||||||
|
FWZ:=Pos('/',fsj);
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:=Copy(fsj,1,FWZ-1);
|
||||||
|
flagname:=Copy(fsj,FWZ+1,Length(fsj)-fwz);
|
||||||
|
if Trim(flag)='GYSSZ' then
|
||||||
|
begin
|
||||||
|
ToolButton1.Visible:=False;
|
||||||
|
V1Name.Caption:='供应商类型';
|
||||||
|
V1Note.Caption:='编号规则';
|
||||||
|
fnote:=True;
|
||||||
|
end;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TEdit(Sender).Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
if Trim(flag)='MPRTCode' then
|
||||||
|
begin
|
||||||
|
with ADOTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Top 1 * from JYOrder_Main where MPRTCode='''+Trim(ClientDataSet1.fieldbyname('ZDYName').AsString)+'''');
|
||||||
|
sql.Add(' order by FillTime desc');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
// MPRTCodeName.Text:=ADOTemp.fieldbyname('MPRTCodeName').AsString;
|
||||||
|
// MPRTMF.Text:=ADOTemp.fieldbyname('MPRTMF').AsString;
|
||||||
|
// MPRTKZ.Text:=ADOTemp.fieldbyname('MPRTKZ').AsString;
|
||||||
|
// MPRTSpec.Text:=ADOTemp.fieldbyname('MPRTSpec').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
502
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.dfm
Normal file
502
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.dfm
Normal file
|
|
@ -0,0 +1,502 @@
|
||||||
|
object frmZdyAttachment: TfrmZdyAttachment
|
||||||
|
Left = 144
|
||||||
|
Top = 135
|
||||||
|
Width = 1188
|
||||||
|
Height = 612
|
||||||
|
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
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1172
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 95
|
||||||
|
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 TBedit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBeditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object Tchk: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23457#26680
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TchkClick
|
||||||
|
end
|
||||||
|
object TNochk: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23457#26680
|
||||||
|
ImageIndex = 86
|
||||||
|
OnClick = TNochkClick
|
||||||
|
end
|
||||||
|
object TBuser: TToolButton
|
||||||
|
Left = 465
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25351#23450#29702#21333#21592
|
||||||
|
ImageIndex = 97
|
||||||
|
OnClick = TBuserClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 564
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 627
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #38468#20214
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 690
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 753
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1172
|
||||||
|
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 = 502
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #22320#21306
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 646
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#31867#22411
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 238
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 70
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ywy: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 388
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object edtRegion: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 532
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 816
|
||||||
|
Top = 10
|
||||||
|
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 KHType: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 700
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 92
|
||||||
|
Width = 1172
|
||||||
|
Height = 482
|
||||||
|
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.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
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column19: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#31616#31216
|
||||||
|
DataBinding.FieldName = 'Shortened'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'ywy'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'Grade'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'Region'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'TelNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'MobileNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'FaxNo'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'Address'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21457#36135#22320#22336
|
||||||
|
DataBinding.FieldName = 'ToPlace'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'Linkman'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column18: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#36134#21495
|
||||||
|
DataBinding.FieldName = 'BankNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column20: TcxGridDBColumn
|
||||||
|
Caption = #24320#25143#34892
|
||||||
|
DataBinding.FieldName = 'BankName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 165
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #29702#21333#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 = 70
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#31867#22411
|
||||||
|
DataBinding.FieldName = 'KHType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1172
|
||||||
|
Height = 22
|
||||||
|
Align = alTop
|
||||||
|
Style = 9
|
||||||
|
TabIndex = 0
|
||||||
|
TabOrder = 3
|
||||||
|
Tabs.Strings = (
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 22
|
||||||
|
ClientRectRight = 1172
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 605
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 557
|
||||||
|
Top = 153
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 549
|
||||||
|
Top = 201
|
||||||
|
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 = 632
|
||||||
|
Top = 200
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 664
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 800
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 731
|
||||||
|
Top = 243
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 760
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
end
|
||||||
458
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.pas
Normal file
458
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.pas
Normal file
|
|
@ -0,0 +1,458 @@
|
||||||
|
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, cxPC;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachment = 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;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
TBedit: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
ywy: TEdit;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
edtRegion: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
TBuser: TToolButton;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
v2Column19: TcxGridDBColumn;
|
||||||
|
Tchk: TToolButton;
|
||||||
|
TNochk: TToolButton;
|
||||||
|
v2Column18: TcxGridDBColumn;
|
||||||
|
v2Column20: TcxGridDBColumn;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
KHType: TEdit;
|
||||||
|
Label5: 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 TBeditClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure TBuserClick(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure TchkClick(Sender: TObject);
|
||||||
|
procedure TNochkClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure setstatus();
|
||||||
|
public
|
||||||
|
fkhType: string;
|
||||||
|
canshu1: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachment: TfrmZdyAttachment;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ZDYHelp, U_ZdyAttInput, U_FjList_RZ, U_UserSelf;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.setstatus();
|
||||||
|
begin
|
||||||
|
TBedit.Visible := false;
|
||||||
|
TBdel.Visible := false;
|
||||||
|
tchk.Visible := false;
|
||||||
|
tnochk.Visible := false;
|
||||||
|
TBuser.Visible := false;
|
||||||
|
toolbutton1.Visible := false;
|
||||||
|
if trim(canshu1) = '' then
|
||||||
|
begin
|
||||||
|
TBuser.Visible := True;
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:
|
||||||
|
begin
|
||||||
|
TBedit.Visible := true;
|
||||||
|
TBdel.Visible := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else if trim(canshu1) = '高权限' then
|
||||||
|
begin
|
||||||
|
TBuser.Visible := True;
|
||||||
|
toolbutton1.Visible := true;
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:
|
||||||
|
begin
|
||||||
|
TBedit.Visible := true;
|
||||||
|
tbdel.Visible := True;
|
||||||
|
tchk.Visible := True;
|
||||||
|
end;
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
tNochk.Visible := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
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'' and Valid=''Y'' and ATID=FromATID ');
|
||||||
|
if trim(canshu1) <> '高权限' then
|
||||||
|
sql.Add(' and (Filler=' + quotedstr(trim(DName)) + 'or ywy like ' + quotedstr('%' + trim(DName) + '%') + ')');
|
||||||
|
if cxTabControl1.TabIndex < 2 then
|
||||||
|
sql.Add(' and Status=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
|
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.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(' update KH_Zdy_Attachment set Valid=''N'',ZFTime=GETDATE(),ZFPerson=''' + Trim(DName) + ''' ');
|
||||||
|
SQL.Add(' where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + ''' ');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户资料', Tv2, '客户自定义');
|
||||||
|
setstatus();
|
||||||
|
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);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBeditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
exit;
|
||||||
|
try
|
||||||
|
frmZdyAttInput := TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
FATID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
FFromATID := Trim(Self.CDS_HZ.fieldbyname('FromATID').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
Self.CDS_HZ.Locate('ATID', FATID, []);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInput := TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
FATID := '';
|
||||||
|
FFromATID := '';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBuserClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
FuserName: string;
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
exit;
|
||||||
|
frmUserSelf := TfrmUserSelf.Create(self);
|
||||||
|
with frmUserSelf do
|
||||||
|
begin
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
FuserName := ClientDataSet1.fieldbyname('username').AsString;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
if trim(FuserName) <> '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' update KH_Zdy_Attachment SET Filler=''' + trim(FuserName) + ''' where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + ''' ');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_HZ, CheckBox1.Checked);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TchkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if CDS_HZ.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' update KH_Zdy_Attachment SET Status=''1'',ChkTime=GETDATE(),Chker=''' + Trim(DName) + ''' ');
|
||||||
|
sql.Add(' where ATID=' + quotedstr(trim(CDS_HZ.fieldbyname('ATID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
application.MessageBox('审核成功!', '提示信息', 0);
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('审核失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TNochkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if CDS_HZ.Locate('ssel', true, []) = false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' update KH_Zdy_Attachment SET Status=''0'',ChkTime=NULL,Chker=NULL ');
|
||||||
|
sql.Add(' where ATID=' + quotedstr(trim(CDS_HZ.fieldbyname('ATID').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
application.MessageBox('撤销审核成功!', '提示信息', 0);
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
application.MessageBox('撤销审核失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
canshu1 := trim(DParameters1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
setstatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
try
|
||||||
|
frmFjList_RZ := TfrmFjList_RZ.Create(Application);
|
||||||
|
with frmFjList_RZ do
|
||||||
|
begin
|
||||||
|
fkeyNO := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fType := '客户资料';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmFjList_RZ.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
exit;
|
||||||
|
try
|
||||||
|
frmZdyAttInput := TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
TBsave.Visible := false;
|
||||||
|
FATID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
FFromATID := Trim(Self.CDS_HZ.fieldbyname('FromATID').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
ToolButton5.Click;
|
||||||
|
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
|
||||||
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.
2
样品(YPGL.dll)/DyeTwoStore.INI
Normal file
2
样品(YPGL.dll)/DyeTwoStore.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[ム<>キア犲ナ]
|
||||||
|
ア犲ナタ獎ヘ=
|
||||||
42
样品(YPGL.dll)/JWLCK.cfg
Normal file
42
样品(YPGL.dll)/JWLCK.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
样品(YPGL.dll)/JWLCK.dof
Normal file
138
样品(YPGL.dll)/JWLCK.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\机物料仓库\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
样品(YPGL.dll)/JWLCK.res
Normal file
BIN
样品(YPGL.dll)/JWLCK.res
Normal file
Binary file not shown.
42
样品(YPGL.dll)/OrderManage.cfg
Normal file
42
样品(YPGL.dll)/OrderManage.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
样品(YPGL.dll)/OrderManage.dof
Normal file
138
样品(YPGL.dll)/OrderManage.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\订单\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
样品(YPGL.dll)/OrderManage.res
Normal file
BIN
样品(YPGL.dll)/OrderManage.res
Normal file
Binary file not shown.
23
样品(YPGL.dll)/ProjectGroup1.bpg
Normal file
23
样品(YPGL.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
样品(YPGL.dll)/SYSTEMSET.ini
Normal file
5
样品(YPGL.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[SERVER]
|
||||||
|
服务器地址=101.132.143.144
|
||||||
|
服务器地址类型=716
|
||||||
|
是否自动更新=1
|
||||||
|
软件名称=打卷检验管理软件
|
||||||
362
样品(YPGL.dll)/U_BaseIn.dfm
Normal file
362
样品(YPGL.dll)/U_BaseIn.dfm
Normal file
|
|
@ -0,0 +1,362 @@
|
||||||
|
object frmBaseIn: TfrmBaseIn
|
||||||
|
Left = 58
|
||||||
|
Top = 224
|
||||||
|
Width = 1211
|
||||||
|
Height = 591
|
||||||
|
Caption = #20837#24211#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1203
|
||||||
|
Height = 20
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 18
|
||||||
|
ButtonWidth = 60
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
Transparent = True
|
||||||
|
Wrapable = False
|
||||||
|
object BtnSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 5
|
||||||
|
OnClick = BtnSaveClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 40
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 23
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 80
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22797#21046#22686#34892
|
||||||
|
ImageIndex = 66
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 144
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #19968#38190#26367#25442
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 208
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 24
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object BtnExit: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 10
|
||||||
|
OnClick = BtnExitClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 8
|
||||||
|
Top = 32
|
||||||
|
Width = 1137
|
||||||
|
Height = 433
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'DefStr1'
|
||||||
|
Column = v1P_ChnName10
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'DefStr2'
|
||||||
|
Column = v1ShortName
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'RollUnit'
|
||||||
|
Column = v1UnitName
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'P_Code'
|
||||||
|
Column = v1P_ChnName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Quantity
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20837#24211#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.Kind = ckDateTime
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v1defstr6: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #29677#27425
|
||||||
|
DataBinding.FieldName = 'defstr6'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1Column2PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1defstr7: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #29677#32452
|
||||||
|
DataBinding.FieldName = 'defstr7'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1defstr7PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1DepotClass: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'DepotClass'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1DepotClassPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v1batchnum: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'batchnum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1PlanNo: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #25209#21495
|
||||||
|
DataBinding.FieldName = 'PlanNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = False
|
||||||
|
Properties.OnButtonClick = v1PlanNoPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1P_ChnName: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'P_ChnName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1P_ChnNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 105
|
||||||
|
end
|
||||||
|
object v1P_ChnName10: TcxGridDBColumn
|
||||||
|
Caption = #22522#24067#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_ChnName10'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1P_ChnName10PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 118
|
||||||
|
end
|
||||||
|
object v1ShortName: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'ShortName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1ShortNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 96
|
||||||
|
end
|
||||||
|
object v1DefStr3: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22522#24067#39068#33394
|
||||||
|
DataBinding.FieldName = 'DefStr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1DefFlt1: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21402#24230
|
||||||
|
DataBinding.FieldName = 'DefFlt1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Quantity: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #20837#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'Quantity'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1UnitName: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'UnitName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1UnitNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 44
|
||||||
|
end
|
||||||
|
object v1DefStr4: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DefStr4'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1DefStr4PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
object v1P_SeqNo: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #35745#21010#21333#24207#21495
|
||||||
|
DataBinding.FieldName = 'P_SeqNo'
|
||||||
|
Visible = False
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1P_Code: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #32534#21495
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
end
|
||||||
|
object v1DefStr1: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22522#24067#32534#21495
|
||||||
|
DataBinding.FieldName = 'DefStr1'
|
||||||
|
Visible = False
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v1DefStr2: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'DefStr2'
|
||||||
|
Visible = False
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1RollUnit: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21333#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'RollUnit'
|
||||||
|
Visible = False
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Sub
|
||||||
|
Left = 216
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
object CDS_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 256
|
||||||
|
Top = 160
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Parameters = <>
|
||||||
|
Left = 184
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Parameters = <>
|
||||||
|
Left = 224
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Parameters = <>
|
||||||
|
Left = 264
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
585
样品(YPGL.dll)/U_BaseIn.pas
Normal file
585
样品(YPGL.dll)/U_BaseIn.pas
Normal file
|
|
@ -0,0 +1,585 @@
|
||||||
|
unit U_BaseIn;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, ADODB, DBClient,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxCalendar;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBaseIn = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
BtnSave: TToolButton;
|
||||||
|
BtnExit: TToolButton;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
v1PlanNo: TcxGridDBColumn;
|
||||||
|
v1P_ChnName: TcxGridDBColumn;
|
||||||
|
v1P_ChnName10: TcxGridDBColumn;
|
||||||
|
v1ShortName: TcxGridDBColumn;
|
||||||
|
v1DefStr3: TcxGridDBColumn;
|
||||||
|
v1DefFlt1: TcxGridDBColumn;
|
||||||
|
v1DefStr4: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
v1Quantity: TcxGridDBColumn;
|
||||||
|
v1UnitName: TcxGridDBColumn;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Sub: TClientDataSet;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1DefStr2: TcxGridDBColumn;
|
||||||
|
v1DefStr1: TcxGridDBColumn;
|
||||||
|
v1P_Code: TcxGridDBColumn;
|
||||||
|
v1RollUnit: TcxGridDBColumn;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
v1P_SeqNo: TcxGridDBColumn;
|
||||||
|
v1batchnum: TcxGridDBColumn;
|
||||||
|
v1DepotClass: TcxGridDBColumn;
|
||||||
|
v1defstr6: TcxGridDBColumn;
|
||||||
|
v1defstr7: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure BtnExitClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure v1P_ChnNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1P_ChnName10PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1ShortNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1UnitNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1DefStr4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1PlanNoPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure BtnSaveClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure v1DepotClassPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1Column2PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1defstr7PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
DepotNo:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBaseIn: TfrmBaseIn;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.BtnExitClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmBaseIn.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_ClothInOutList :begdate,:enddate,:DepotNo,:DepotCode,:PState,:CRK');
|
||||||
|
Parameters.ParamByName('DepotNo').Value:=Trim(DepotNo);
|
||||||
|
Parameters.ParamByName('PState').Value:=2;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CreateCDS20(ADOQueryMain,CDS_Sub);
|
||||||
|
InitCDSData20(ADOQueryMain,CDS_Sub);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
CDS_Sub.FieldByName('UnitName').Value:='米';
|
||||||
|
CDS_Sub.FieldByName('RollUnit').Value:='JL004';
|
||||||
|
CDS_Sub.FieldByName('DefStr4').Value:='一等';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Sub.IsEmpty then Exit;
|
||||||
|
CDS_Sub.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CopyAddRow(tv1,CDS_Sub);
|
||||||
|
///CDS_Sub.FieldByName('DepotNo').Value:='';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
OneKeyPost(Tv1,CDS_Sub);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmBaseIn.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
MaxNo,strSQL:string;
|
||||||
|
KID,i,SubId,j:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
CDS_Sub.First;
|
||||||
|
for i:=0 to CDS_Sub.RecordCount-1 do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
MaxNo:=Trim(CDS_Sub.fieldbyname('DepotNo').AsString);
|
||||||
|
KID:=CDS_Sub.fieldbyname('KcID').AsInteger;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if GetMaxNo20(ADOQueryCmd,MaxNo,'WC_ClothInout','BR',1,4)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('UPDATE WC_ClothKcid SET KcID = KcID+1');
|
||||||
|
SQL.Add('SELECT KcID FROM WC_ClothKcid');
|
||||||
|
Open;
|
||||||
|
KID:=fieldbyname('KcID').AsInteger;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//保存主表
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from WC_ClothInout where DepotNO='''+Trim(DepotNo)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)<>'' then
|
||||||
|
Edit
|
||||||
|
else
|
||||||
|
Append;
|
||||||
|
FieldByName('DepotNo').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('DepotCode').Value:=Trim(gDef1);
|
||||||
|
FieldByName('DepotType').Value:=1;
|
||||||
|
FieldByName('Filler').Value:=Trim(gUserName);
|
||||||
|
FieldByName('FillTime').Value:=Trim(CDS_Sub.fieldbyname('FillTime').AsString);
|
||||||
|
FieldByName('DepotClass').Value:=Trim(CDS_Sub.fieldbyname('DepotClass').AsString);
|
||||||
|
FieldByName('Status').Value:='I9';
|
||||||
|
FieldByName('DepotNo').Value:=Trim(MaxNo);
|
||||||
|
//SSetSaveDataCDS(ADOQueryCmd,Tv1,CDS_Sub,'WC_ClothInout',1);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
//保存从表
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from WC_ClothInOut_Info where DepotNO='''+Trim(DepotNo)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)<>'' then
|
||||||
|
Edit
|
||||||
|
else
|
||||||
|
Append;
|
||||||
|
FieldByName('DepotNo').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('KCID').Value:=KID;
|
||||||
|
FieldByName('ID').Value:=1;
|
||||||
|
{if Trim(gdatabase)<>'期初' then
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)='' then
|
||||||
|
begin
|
||||||
|
FieldByName('DefFlt2').Value:=SubId;
|
||||||
|
FieldByName('DefFlt3').Value:=((SubId-1) div 10);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end; }
|
||||||
|
|
||||||
|
SSetSaveDataCDS(ADOQueryCmd,Tv1,CDS_Sub,'WC_ClothInOut_Info',2);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select DepotNo,DefFlt2,DefFlt3 from WC_ClothInout_Info where DepotNo like ''BR%'' ');
|
||||||
|
if Trim(CDS_Sub.fieldbyname('PlanNo').AsString)<>'' then
|
||||||
|
SQL.Add(' and PlanNo='''+CDS_Sub.fieldbyname('PlanNo').AsString+'''');
|
||||||
|
if Trim(CDS_Sub.fieldbyname('P_Code').AsString)<>'' then
|
||||||
|
SQL.Add(' and P_Code='''+CDS_Sub.fieldbyname('P_Code').AsString+'''');
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DefStr1').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr1='''+CDS_Sub.fieldbyname('DefStr1').AsString+'''');
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DefStr2').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr2='''+CDS_Sub.fieldbyname('DefStr2').AsString+'''');
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DefStr3').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr3='''+CDS_Sub.fieldbyname('DefStr3').AsString+'''');
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DefStr4').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr4='''+CDS_Sub.fieldbyname('DefStr4').AsString+'''');
|
||||||
|
if Trim(CDS_Sub.fieldbyname('Defflt1').AsString)<>'' then
|
||||||
|
SQL.Add(' and Defflt1='''+CDS_Sub.fieldbyname('Defflt1').AsString+'''');
|
||||||
|
Open;
|
||||||
|
{ if ADOQueryTemp.fieldbyname('aa').AsInteger>0 then
|
||||||
|
SubId:=ADOQueryTemp.fieldbyname('aa').AsInteger
|
||||||
|
else}
|
||||||
|
//SubId:=ADOQueryTemp.fieldbyname('aa').AsInteger+1;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
j:=1;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update WC_ClothInout_Info Set defflt2='+inttostr(j));
|
||||||
|
sql.Add(',defflt3='+inttostr((j-1) div 10) );
|
||||||
|
sql.Add(' where DepotNo='''+Trim(ADOQueryTemp.fieldbyname('DepotNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
j:=j+1;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//保存到库存表
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)='' then
|
||||||
|
begin
|
||||||
|
strSQL := 'INSERT WC_ClothClothing ('
|
||||||
|
+ 'KcID,'
|
||||||
|
+ 'batchnum,'
|
||||||
|
+ 'P_Code,'
|
||||||
|
+ 'P_ChnName,'
|
||||||
|
+ 'Quantity,'
|
||||||
|
+ 'RollUnit,'
|
||||||
|
+ 'DepotNo'
|
||||||
|
+ ') VALUES ('
|
||||||
|
+ IntToStr(KID) + ','
|
||||||
|
+ QuotedStr(Trim(CDS_Sub.fieldbyname('batchnum').AsString)) + ','
|
||||||
|
+ QuotedStr(Trim(CDS_Sub.fieldbyname('P_Code').AsString)) + ','
|
||||||
|
+ QuotedStr(Trim(CDS_Sub.fieldbyname('P_ChnName').AsString)) + ','
|
||||||
|
+ CDS_Sub.fieldbyname('Quantity').AsString + ','
|
||||||
|
+ QuotedStr(Trim(CDS_Sub.fieldbyname('RollUnit').AsString)) + ','
|
||||||
|
+ QuotedStr(MaxNo)
|
||||||
|
+ ')';
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
//更新到库存表
|
||||||
|
strSQL := 'UPDATE WC_ClothClothing SET '
|
||||||
|
+ 'batchnum = ' + QuotedStr(Trim(CDS_Sub.fieldbyname('batchnum').AsString)) + ','
|
||||||
|
+ 'P_Code = ' + QuotedStr(Trim(CDS_Sub.fieldbyname('P_Code').AsString)) + ','
|
||||||
|
+ 'P_ChnName = ' + QuotedStr(Trim(CDS_Sub.fieldbyname('P_ChnName').AsString)) + ','
|
||||||
|
+ 'Quantity = ' + CDS_Sub.fieldbyname('Quantity').AsString+ ','
|
||||||
|
+ 'RollUnit = ' + QuotedStr(Trim(CDS_Sub.fieldbyname('RollUnit').AsString)) + ' '
|
||||||
|
+ 'WHERE KcID = ' + IntToStr(KID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add(strSQL);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
//更新卷号
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update WC_ClothInout_Info set batchnum='''+Trim(CDS_Sub.fieldbyname('batchnum').AsString)+'''');
|
||||||
|
sql.Add(' where KCID='+IntToStr(KID));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Next;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
DepotNo:=MaxNo;
|
||||||
|
ModalResult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1P_ChnNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductHelp:=TfrmProductHelp.Create(Application);
|
||||||
|
with frmProductHelp do
|
||||||
|
begin
|
||||||
|
fDipFlag:=3;
|
||||||
|
cxTabControl1.Tabs[0].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[1].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[2].Visible:=False;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('P_Code').Value:=ADOQueryHelp.fieldbyname('P_Code').AsString;
|
||||||
|
CDS_Sub.FieldByName('P_ChnName').Value:=ADOQueryHelp.fieldbyname('P_ChnName').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1P_ChnName10PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductHelp:=TfrmProductHelp.Create(Application);
|
||||||
|
with frmProductHelp do
|
||||||
|
begin
|
||||||
|
fDipFlag:=2;
|
||||||
|
cxTabControl1.Tabs[0].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[1].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[3].Visible:=False;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('DefStr1').Value:=ADOQueryHelp.fieldbyname('P_Code').AsString;
|
||||||
|
CDS_Sub.FieldByName('P_ChnName10').Value:=ADOQueryHelp.fieldbyname('P_ChnName').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1ShortNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmSupplyHelp:=TfrmSupplyHelp.Create(Application);
|
||||||
|
with frmSupplyHelp do
|
||||||
|
begin
|
||||||
|
FLType:='坯布';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
self.CDS_Sub.FieldByName('ShortName').Value:=Trim(ADOQueryHelp.fieldbyname('ShortName').AsString);
|
||||||
|
self.CDS_Sub.FieldByName('DefStr2').Value:=Trim(ADOQueryHelp.fieldbyname('CustomNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmSupplyHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1UnitNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
kf_frmJlUnitHelp:=Tkf_frmJlUnitHelp.Create(Application);
|
||||||
|
with kf_frmJlUnitHelp do
|
||||||
|
begin
|
||||||
|
Fflag:='length';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('UnitName').Value:=Trim(ADOQueryHelp.fieldbyname('名称').AsString);
|
||||||
|
Self.CDS_Sub.FieldByName('RollUnit').Value:=Trim(ADOQueryHelp.fieldbyname('编号').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
kf_frmJlUnitHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1DefStr4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmItemManageNew:=TfrmItemManageNew.Create(Application);
|
||||||
|
with frmItemManageNew do
|
||||||
|
begin
|
||||||
|
flag:='DefStr4';
|
||||||
|
flagname:='贝斯等级';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('DefStr4').Value:=Trim(ClientDataSet1.fieldbyname('name').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmItemManageNew.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1PlanNoPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmGetPlanListHelp:=TfrmGetPlanListHelp.Create(Application);
|
||||||
|
with frmGetPlanListHelp do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('PlanNo').Value:=Trim(ADOQueryHelp.fieldbyname('PlanNo').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_SeqNo').Value:=Trim(ADOQueryHelp.fieldbyname('P_SeqNo').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr1').Value:=Trim(ADOQueryHelp.fieldbyname('P_BaseCode').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_ChnName10').Value:=Trim(ADOQueryHelp.fieldbyname('P_BaseChnName').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr2').Value:=Trim(ADOQueryHelp.fieldbyname('P_Factory').AsString);
|
||||||
|
CDS_Sub.FieldByName('Shortname').Value:=Trim(ADOQueryHelp.fieldbyname('SupplierName').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr3').Value:=Trim(ADOQueryHelp.fieldbyname('SBtr2').AsString);
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Select P_Code from MC_CatLog where P_ChnName='''+Trim(ADOQueryHelp.fieldbyname('LbStr6').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
CDS_Sub.FieldByName('P_Code').Value:=Trim(ADOQueryTemp.fieldbyname('P_Code').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_ChnName').Value:=Trim(ADOQueryHelp.fieldbyname('LbStr6').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmGetPlanListHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.BtnSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Sub.Locate('FillTime',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('入库时间不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('PlanNo',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('批号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('P_ChnName',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('品名不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('DepotClass',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('入库类型不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('Quantity',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('数量不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.IsEmpty then Exit;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1DepotClassPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmItemManageNew:=TfrmItemManageNew.Create(Application);
|
||||||
|
with frmItemManageNew do
|
||||||
|
begin
|
||||||
|
flag:='BSInType';
|
||||||
|
flagname:='贝斯入库类型';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('DepotClass').Value:=Trim(ClientDataSet1.fieldbyname('name').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmItemManageNew.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1Column2PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmItemManageNew:=TfrmItemManageNew.Create(Application);
|
||||||
|
with frmItemManageNew do
|
||||||
|
begin
|
||||||
|
flag:='BSBC';
|
||||||
|
flagname:='贝斯班次';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('defstr6').Value:=Trim(ClientDataSet1.fieldbyname('name').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmItemManageNew.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseIn.v1defstr7PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmItemManageNew:=TfrmItemManageNew.Create(Application);
|
||||||
|
with frmItemManageNew do
|
||||||
|
begin
|
||||||
|
flag:='BSBZ';
|
||||||
|
flagname:='贝斯班组';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('defstr7').Value:=Trim(ClientDataSet1.fieldbyname('name').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmItemManageNew.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
317
样品(YPGL.dll)/U_BaseInList.dfm
Normal file
317
样品(YPGL.dll)/U_BaseInList.dfm
Normal file
|
|
@ -0,0 +1,317 @@
|
||||||
|
object frmBaseInList: TfrmBaseInList
|
||||||
|
Left = 61
|
||||||
|
Top = 97
|
||||||
|
Width = 1165
|
||||||
|
Height = 618
|
||||||
|
Caption = #20837#24211#21015#34920
|
||||||
|
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 = 1157
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
DisabledImages = DataLink_JWLCK.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_JWLCK.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #39640#32423#36807#28388
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 339
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBView: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 25
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBViewClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 465
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 528
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 591
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1157
|
||||||
|
Height = 73
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 28
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#26102#38388
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 64
|
||||||
|
Top = 36
|
||||||
|
Width = 12
|
||||||
|
Height = 12
|
||||||
|
Caption = #33267
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 184
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #29289#26009#21517#31216
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 360
|
||||||
|
Top = 12
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268' '#26684
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 184
|
||||||
|
Top = 36
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379' '#24212' '#21830
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 77
|
||||||
|
Top = 9
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Date = 40768.458268587970000000
|
||||||
|
Time = 40768.458268587970000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 77
|
||||||
|
Top = 33
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Date = 40768.458268587970000000
|
||||||
|
Time = 40768.458268587970000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object PlanNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 233
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object P_ChnName20: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 398
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object ShorName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 233
|
||||||
|
Top = 33
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 28
|
||||||
|
Top = 124
|
||||||
|
Width = 1093
|
||||||
|
Height = 389
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Quantity
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.Kind = ckDateTime
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1DepotClass: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'DepotClass'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1batchnum: TcxGridDBColumn
|
||||||
|
Caption = #29289#26009#21517#31216
|
||||||
|
DataBinding.FieldName = 'batchnum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'defstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1ShortName: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'ShortName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Quantity: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'Quantity'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v1UnitName: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'UnitName'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 99
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 496
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Parameters = <>
|
||||||
|
Left = 552
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 600
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 672
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryMain
|
||||||
|
Left = 640
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
end
|
||||||
331
样品(YPGL.dll)/U_BaseInList.pas
Normal file
331
样品(YPGL.dll)/U_BaseInList.pas
Normal file
|
|
@ -0,0 +1,331 @@
|
||||||
|
unit U_BaseInList;
|
||||||
|
|
||||||
|
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, cxCalendar, cxButtonEdit, cxDropDownEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBaseInList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBView: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
PlanNo: TEdit;
|
||||||
|
P_ChnName20: TEdit;
|
||||||
|
ShorName: TEdit;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1ShortName: TcxGridDBColumn;
|
||||||
|
v1Quantity: TcxGridDBColumn;
|
||||||
|
v1UnitName: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1batchnum: TcxGridDBColumn;
|
||||||
|
v1DepotClass: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
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 TBViewClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure PlanNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBaseInList: TfrmBaseInList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_BaseIn;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBaseInList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxgrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('入库列表',Tv1,'贝斯仓库');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_ClothInOutList :begdate,:enddate,:DepotNo,:DepotCode,:PState,:CRK');
|
||||||
|
Parameters.ParamByName('DepotCode').Value:=Trim(gDef1);
|
||||||
|
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime));
|
||||||
|
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1));
|
||||||
|
Parameters.ParamByName('PState').Value:=1;
|
||||||
|
Parameters.ParamByName('CRK').Value:=1;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid('入库列表',Tv1,'贝斯仓库');
|
||||||
|
BegDate.DateTime:=GetServerTime10(ADOQueryTemp);//SGetServerDate10(ADOQueryTemp);
|
||||||
|
EndDate.DateTime:=GetServerTime10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from WC_ClothInout_Info where KCID='+Trim(ADOQueryMain.fieldbyname('KCID').AsString));
|
||||||
|
sql.Add(' and DepotNO like ''BC%'' ');
|
||||||
|
open;
|
||||||
|
if ADOQueryTemp.RecordCount>0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('此贝斯已经有出库记录,不能进行操作!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
frmBaseIn:=TfrmBaseIn.Create(Application);
|
||||||
|
with frmBaseIn do
|
||||||
|
begin
|
||||||
|
DepotNo:=Trim(self.ADOQueryMain.fieldbyname('DepotNo').AsString);
|
||||||
|
ToolButton1.Visible:=False;
|
||||||
|
ToolButton2.Visible:=False;
|
||||||
|
ToolButton3.Visible:=False;
|
||||||
|
ToolButton4.Visible:=False;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.TBFind.Click;
|
||||||
|
Self.ADOQueryMain.Locate('DepotNo',DepotNo,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmBaseIn.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from WC_ClothInout_Info where KCID='+Trim(ADOQueryMain.fieldbyname('KCID').AsString));
|
||||||
|
sql.Add(' and DepotNO like ''BC%'' ');
|
||||||
|
open;
|
||||||
|
if ADOQueryTemp.RecordCount>0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('此贝斯已经有出库记录,不能进行操作!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
TBFind.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmBaseInList.DelData():Boolean;
|
||||||
|
var
|
||||||
|
FInt:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from WC_ClothInout_Info where DefFlt2>0 ');
|
||||||
|
SQL.Add(' and DepotNo<>'''+Trim(ADOQueryMain.fieldbyname('DepotNo').AsString)+'''');
|
||||||
|
if Trim(ADOQueryMain.fieldbyname('PlanNo').AsString)<>'' then
|
||||||
|
SQL.Add(' and PlanNo='''+ADOQueryMain.fieldbyname('PlanNo').AsString+'''');
|
||||||
|
if Trim(ADOQueryMain.fieldbyname('P_Code').AsString)<>'' then
|
||||||
|
SQL.Add(' and P_Code='''+ADOQueryMain.fieldbyname('P_Code').AsString+'''');
|
||||||
|
if Trim(ADOQueryMain.fieldbyname('DefStr1').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr1='''+ADOQueryMain.fieldbyname('DefStr1').AsString+'''');
|
||||||
|
if Trim(ADOQueryMain.fieldbyname('DefStr2').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr2='''+ADOQueryMain.fieldbyname('DefStr2').AsString+'''');
|
||||||
|
if Trim(ADOQueryMain.fieldbyname('DefStr3').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr3='''+ADOQueryMain.fieldbyname('DefStr3').AsString+'''');
|
||||||
|
if Trim(ADOQueryMain.fieldbyname('DefStr4').AsString)<>'' then
|
||||||
|
SQL.Add(' and DefStr4='''+ADOQueryMain.fieldbyname('DefStr4').AsString+'''');
|
||||||
|
if Trim(ADOQueryMain.fieldbyname('Defflt1').AsString)<>'' then
|
||||||
|
SQL.Add(' and Defflt1='+ADOQueryMain.fieldbyname('Defflt1').AsString);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
FInt:=1;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update WC_ClothInout_Info Set DefFlt2='+inttostr(FInt));
|
||||||
|
sql.Add(',DefFlt3='+inttostr((FInt-1) div 10));
|
||||||
|
sql.Add(' where DepotNo='''+Trim(ADOQueryTemp.fieldbyname('DepotNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
FInt:=FInt+1;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete WC_ClothInout_Info where depotno='''+Trim(ADOQueryMain.fieldbyname('depotno').AsString)+'''');
|
||||||
|
sql.Add(' delete WC_ClothInout where depotno='''+Trim(ADOQueryMain.fieldbyname('depotno').AsString)+'''');
|
||||||
|
sql.Add(' delete WC_ClothClothing where KCID='+Trim(ADOQueryMain.fieldbyname('KCID').AsString));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBViewClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('入库列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBPrintClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmBaseIn:=TfrmBaseIn.Create(Application);
|
||||||
|
with frmBaseIn do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.TBFind.Click;
|
||||||
|
Self.ADOQueryMain.Locate('DepotNo',DepotNo,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmBaseIn.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.PlanNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseInList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
SeniorFilter(Tv1,ADOQueryMain);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
341
样品(YPGL.dll)/U_BaseOut.dfm
Normal file
341
样品(YPGL.dll)/U_BaseOut.dfm
Normal file
|
|
@ -0,0 +1,341 @@
|
||||||
|
object frmBaseOut: TfrmBaseOut
|
||||||
|
Left = 58
|
||||||
|
Top = 246
|
||||||
|
Width = 1211
|
||||||
|
Height = 591
|
||||||
|
Caption = #20986#24211#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1203
|
||||||
|
Height = 24
|
||||||
|
AutoSize = True
|
||||||
|
ButtonWidth = 51
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = ADODBMD_BSCK.ImageList24
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
Transparent = True
|
||||||
|
Wrapable = False
|
||||||
|
object BtnSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 5
|
||||||
|
OnClick = BtnSaveClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 55
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 23
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 110
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 24
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object BtnExit: TToolButton
|
||||||
|
Left = 165
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 10
|
||||||
|
OnClick = BtnExitClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 16
|
||||||
|
Top = 32
|
||||||
|
Width = 1169
|
||||||
|
Height = 433
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'DefStr1'
|
||||||
|
Column = v1P_ChnName10
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'DefStr2'
|
||||||
|
Column = v1ShortName
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'RollUnit'
|
||||||
|
Column = v1UnitName
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'P_Code'
|
||||||
|
Column = v1P_ChnName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Quantity
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20986#24211#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.Kind = ckDateTime
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v1DepotClass: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'DepotClass'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1DepotClassPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #29677#32452
|
||||||
|
DataBinding.FieldName = 'defstr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #29677#27425
|
||||||
|
DataBinding.FieldName = 'defstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1batchnum: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'batchnum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1PlanNo: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #25209#21495
|
||||||
|
DataBinding.FieldName = 'PlanNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = False
|
||||||
|
Properties.OnButtonClick = v1PlanNoPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1P_SeqNo: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #35745#21010#21333#24207#21495
|
||||||
|
DataBinding.FieldName = 'P_SeqNo'
|
||||||
|
Visible = False
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1P_ChnName: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'P_ChnName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1P_ChnNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 105
|
||||||
|
end
|
||||||
|
object v1P_Code: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #32534#21495
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
end
|
||||||
|
object v1P_ChnName10: TcxGridDBColumn
|
||||||
|
Caption = #22522#24067#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_ChnName10'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1P_ChnName10PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 118
|
||||||
|
end
|
||||||
|
object v1DefStr1: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22522#24067#32534#21495
|
||||||
|
DataBinding.FieldName = 'DefStr1'
|
||||||
|
Visible = False
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v1ShortName: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'ShortName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1ShortNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 96
|
||||||
|
end
|
||||||
|
object v1DefStr2: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'DefStr2'
|
||||||
|
Visible = False
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1DefStr3: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22522#24067#39068#33394
|
||||||
|
DataBinding.FieldName = 'DefStr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1DefFlt1: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21402#24230
|
||||||
|
DataBinding.FieldName = 'DefFlt1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Quantity: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #20986#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'Quantity'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1UnitName: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'UnitName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1UnitNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 44
|
||||||
|
end
|
||||||
|
object v1RollUnit: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21333#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'RollUnit'
|
||||||
|
Visible = False
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
end
|
||||||
|
object v1DefStr4: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DefStr4'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1DefStr4PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Sub
|
||||||
|
Left = 216
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
object CDS_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 256
|
||||||
|
Top = 160
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = ADODBMD_BSCK.ADOCon
|
||||||
|
Parameters = <>
|
||||||
|
Left = 184
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = ADODBMD_BSCK.ADOCon
|
||||||
|
Parameters = <>
|
||||||
|
Left = 224
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = ADODBMD_BSCK.ADOCon
|
||||||
|
Parameters = <>
|
||||||
|
Left = 264
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
471
样品(YPGL.dll)/U_BaseOut.pas
Normal file
471
样品(YPGL.dll)/U_BaseOut.pas
Normal file
|
|
@ -0,0 +1,471 @@
|
||||||
|
unit U_BaseOut;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, ADODB, DBClient,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxCalendar;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBaseOut = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
BtnSave: TToolButton;
|
||||||
|
BtnExit: TToolButton;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
v1PlanNo: TcxGridDBColumn;
|
||||||
|
v1P_ChnName: TcxGridDBColumn;
|
||||||
|
v1P_ChnName10: TcxGridDBColumn;
|
||||||
|
v1ShortName: TcxGridDBColumn;
|
||||||
|
v1DefStr3: TcxGridDBColumn;
|
||||||
|
v1DefFlt1: TcxGridDBColumn;
|
||||||
|
v1DefStr4: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
v1Quantity: TcxGridDBColumn;
|
||||||
|
v1UnitName: TcxGridDBColumn;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Sub: TClientDataSet;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1DefStr2: TcxGridDBColumn;
|
||||||
|
v1DefStr1: TcxGridDBColumn;
|
||||||
|
v1P_Code: TcxGridDBColumn;
|
||||||
|
v1RollUnit: TcxGridDBColumn;
|
||||||
|
v1P_SeqNo: TcxGridDBColumn;
|
||||||
|
v1DepotClass: TcxGridDBColumn;
|
||||||
|
v1batchnum: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure BtnExitClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v1P_ChnNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1P_ChnName10PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1ShortNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1UnitNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1DefStr4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1PlanNoPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure BtnSaveClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure v1DepotClassPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
DepotNo:string;
|
||||||
|
QuantityCK:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBaseOut: TfrmBaseOut;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_adodbmd,U_global,U_FormPas,U_SelfForm,U_ProductHelp,
|
||||||
|
U_SupplyHelp,U_JlUnitHelp,U_ItemManageNew,U_GetPlanListHelp
|
||||||
|
,U_GetBaseInList;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.BtnExitClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmBaseOut.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_ClothInOutList :begdate,:enddate,:DepotNo,:DepotCode,:PState,:CRK');
|
||||||
|
Parameters.ParamByName('DepotNo').Value:=Trim(DepotNo);
|
||||||
|
Parameters.ParamByName('PState').Value:=2;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CreateCDS20(ADOQueryMain,CDS_Sub);
|
||||||
|
InitCDSData20(ADOQueryMain,CDS_Sub);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmGetBaseInList:=TfrmGetBaseInList.Create(Application);
|
||||||
|
with frmGetBaseInList do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
CDS_Sub.FieldByName('PlanNo').Value:=Trim(ADOQueryMain.fieldbyname('PlanNo').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_SeqNO').Value:=Trim(ADOQueryMain.fieldbyname('P_SeqNO').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_Code').Value:=Trim(ADOQueryMain.fieldbyname('P_Code').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_ChnName').Value:=Trim(ADOQueryMain.fieldbyname('P_ChnName').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr1').Value:=Trim(ADOQueryMain.fieldbyname('DefStr1').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_ChnName10').Value:=Trim(ADOQueryMain.fieldbyname('P_ChnName10').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr2').Value:=Trim(ADOQueryMain.fieldbyname('DefStr2').AsString);
|
||||||
|
CDS_Sub.FieldByName('ShortName').Value:=Trim(ADOQueryMain.fieldbyname('ShortName').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr3').Value:=Trim(ADOQueryMain.fieldbyname('DefStr3').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefFlt1').Value:=Trim(ADOQueryMain.fieldbyname('DefFlt1').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr6').Value:=Trim(ADOQueryMain.fieldbyname('DefStr6').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr7').Value:=Trim(ADOQueryMain.fieldbyname('DefStr7').AsString);
|
||||||
|
CDS_Sub.FieldByName('Quantity').Value:=Trim(ADOQueryMain.fieldbyname('QuantityKC').AsString);
|
||||||
|
CDS_Sub.FieldByName('UnitName').Value:=Trim(ADOQueryMain.fieldbyname('UnitName').AsString);
|
||||||
|
CDS_Sub.FieldByName('RollUnit').Value:=Trim(ADOQueryMain.fieldbyname('RollUnit').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr4').Value:=Trim(ADOQueryMain.fieldbyname('DefStr4').AsString);
|
||||||
|
CDS_Sub.FieldByName('KCID').Value:=Trim(ADOQueryMain.fieldbyname('KCID').AsString);
|
||||||
|
CDS_Sub.FieldByName('batchnum').Value:=Trim(ADOQueryMain.fieldbyname('batchnum').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmGetBaseInList.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Sub.IsEmpty then Exit;
|
||||||
|
CDS_Sub.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmBaseOut.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
MaxNo,strSQL:string;
|
||||||
|
KID,i:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
CDS_Sub.First;
|
||||||
|
for i:=0 to CDS_Sub.RecordCount-1 do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
MaxNo:=Trim(CDS_Sub.fieldbyname('DepotNo').AsString);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if GetMaxNo20(ADOQueryCmd,MaxNo,'WC_ClothInout','BC',1,4)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
KID:=CDS_Sub.fieldbyname('KcID').AsInteger;
|
||||||
|
//保存主表
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from WC_ClothInout where DepotNO='''+Trim(DepotNo)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)<>'' then
|
||||||
|
Edit
|
||||||
|
else
|
||||||
|
Append;
|
||||||
|
FieldByName('DepotNo').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('DepotCode').Value:=Trim(gDef1);
|
||||||
|
FieldByName('DepotType').Value:=0;
|
||||||
|
FieldByName('Filler').Value:=Trim(gUserName);
|
||||||
|
FieldByName('FillTime').Value:=Trim(CDS_Sub.fieldbyname('FillTime').AsString);
|
||||||
|
FieldByName('DepotClass').Value:=Trim(CDS_Sub.fieldbyname('DepotClass').AsString);
|
||||||
|
FieldByName('Status').Value:='I9';
|
||||||
|
FieldByName('DepotNo').Value:=Trim(MaxNo);
|
||||||
|
//SSetSaveDataCDS(ADOQueryCmd,Tv1,CDS_Sub,'WC_ClothInout',1);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
//保存从表
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from WC_ClothInOut_Info where DepotNO='''+Trim(DepotNo)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)<>'' then
|
||||||
|
Edit
|
||||||
|
else
|
||||||
|
Append;
|
||||||
|
FieldByName('DepotNo').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('KCID').Value:=KID;
|
||||||
|
FieldByName('ID').Value:=1;
|
||||||
|
SSetSaveDataCDS(ADOQueryCmd,Tv1,CDS_Sub,'WC_ClothInOut_Info',2);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
//保存到库存表
|
||||||
|
if Trim(CDS_Sub.fieldbyname('DepotNo').AsString)='' then
|
||||||
|
begin
|
||||||
|
//更新到库存表
|
||||||
|
strSQL := 'UPDATE WC_ClothClothing SET '
|
||||||
|
+ 'Quantity =Quantity-' + CDS_Sub.fieldbyname('Quantity').AsString+ ' '
|
||||||
|
+ 'WHERE KcID = ' + IntToStr(KID);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
//更新到库存表
|
||||||
|
strSQL := 'UPDATE WC_ClothClothing SET '
|
||||||
|
+ 'Quantity =Quantity+'+QuantityCK+'-'+CDS_Sub.fieldbyname('Quantity').AsString+ ' '
|
||||||
|
+ 'WHERE KcID = ' + IntToStr(KID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add(strSQL);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Next;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
DepotNo:=MaxNo;
|
||||||
|
ModalResult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.v1P_ChnNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductHelp:=TfrmProductHelp.Create(Application);
|
||||||
|
with frmProductHelp do
|
||||||
|
begin
|
||||||
|
fDipFlag:=3;
|
||||||
|
cxTabControl1.Tabs[0].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[1].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[2].Visible:=False;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('P_Code').Value:=ADOQueryHelp.fieldbyname('P_Code').AsString;
|
||||||
|
CDS_Sub.FieldByName('P_ChnName').Value:=ADOQueryHelp.fieldbyname('P_ChnName').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.v1P_ChnName10PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductHelp:=TfrmProductHelp.Create(Application);
|
||||||
|
with frmProductHelp do
|
||||||
|
begin
|
||||||
|
fDipFlag:=2;
|
||||||
|
cxTabControl1.Tabs[0].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[1].Visible:=False;
|
||||||
|
cxTabControl1.Tabs[3].Visible:=False;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('DefStr1').Value:=ADOQueryHelp.fieldbyname('P_Code').AsString;
|
||||||
|
CDS_Sub.FieldByName('P_ChnName10').Value:=ADOQueryHelp.fieldbyname('P_ChnName').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.v1ShortNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmSupplyHelp:=TfrmSupplyHelp.Create(Application);
|
||||||
|
with frmSupplyHelp do
|
||||||
|
begin
|
||||||
|
FLType:='坯布';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
self.CDS_Sub.FieldByName('ShortName').Value:=Trim(ADOQueryHelp.fieldbyname('ShortName').AsString);
|
||||||
|
self.CDS_Sub.FieldByName('DefStr2').Value:=Trim(ADOQueryHelp.fieldbyname('CustomNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmSupplyHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.v1UnitNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
kf_frmJlUnitHelp:=Tkf_frmJlUnitHelp.Create(Application);
|
||||||
|
with kf_frmJlUnitHelp do
|
||||||
|
begin
|
||||||
|
Fflag:='length';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('UnitName').Value:=Trim(ADOQueryHelp.fieldbyname('名称').AsString);
|
||||||
|
Self.CDS_Sub.FieldByName('RollUnit').Value:=Trim(ADOQueryHelp.fieldbyname('编号').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
kf_frmJlUnitHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.v1DefStr4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmItemManageNew:=TfrmItemManageNew.Create(Application);
|
||||||
|
with frmItemManageNew do
|
||||||
|
begin
|
||||||
|
flag:='DefStr4';
|
||||||
|
flagname:='贝斯等级';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('DefStr4').Value:=Trim(ClientDataSet1.fieldbyname('name').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmItemManageNew.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.v1PlanNoPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmGetPlanListHelp:=TfrmGetPlanListHelp.Create(Application);
|
||||||
|
with frmGetPlanListHelp do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('PlanNo').Value:=Trim(ADOQueryHelp.fieldbyname('PlanNo').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_SeqNo').Value:=Trim(ADOQueryHelp.fieldbyname('P_SeqNo').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr1').Value:=Trim(ADOQueryHelp.fieldbyname('P_BaseCode').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_ChnName10').Value:=Trim(ADOQueryHelp.fieldbyname('P_BaseChnName').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr2').Value:=Trim(ADOQueryHelp.fieldbyname('P_Factory').AsString);
|
||||||
|
CDS_Sub.FieldByName('Shortname').Value:=Trim(ADOQueryHelp.fieldbyname('SupplierName').AsString);
|
||||||
|
CDS_Sub.FieldByName('DefStr3').Value:=Trim(ADOQueryHelp.fieldbyname('SBtr2').AsString);
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Select P_Code from MC_CatLog where P_ChnName='''+Trim(ADOQueryHelp.fieldbyname('LbStr6').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
CDS_Sub.FieldByName('P_Code').Value:=Trim(ADOQueryTemp.fieldbyname('P_Code').AsString);
|
||||||
|
CDS_Sub.FieldByName('P_ChnName').Value:=Trim(ADOQueryHelp.fieldbyname('LbStr6').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmGetPlanListHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.BtnSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Sub.Locate('FillTime',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('出库时间不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('PlanNo',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('批号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('batchnum',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('卷号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('DepotClass',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('出库类型不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('P_ChnName',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('品名不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('Quantity',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('数量不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.IsEmpty then Exit;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOut.v1DepotClassPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmItemManageNew:=TfrmItemManageNew.Create(Application);
|
||||||
|
with frmItemManageNew do
|
||||||
|
begin
|
||||||
|
flag:='BSOutType';
|
||||||
|
flagname:='贝斯出库类型';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('DepotClass').Value:=Trim(ClientDataSet1.fieldbyname('name').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmItemManageNew.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
465
样品(YPGL.dll)/U_BaseOutList.dfm
Normal file
465
样品(YPGL.dll)/U_BaseOutList.dfm
Normal file
|
|
@ -0,0 +1,465 @@
|
||||||
|
object frmBaseOutList: TfrmBaseOutList
|
||||||
|
Left = 83
|
||||||
|
Top = 124
|
||||||
|
Width = 1024
|
||||||
|
Height = 618
|
||||||
|
Caption = #20986#24211#21015#34920
|
||||||
|
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 = 1016
|
||||||
|
Height = 23
|
||||||
|
ButtonWidth = 75
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = ADODBMD_BSCK.ImageList24
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 30
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 55
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 110
|
||||||
|
Top = 0
|
||||||
|
Caption = #39640#32423#36807#28388
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 185
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 240
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 15
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 295
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 7
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 350
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 47
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 405
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 4
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 460
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 10
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 23
|
||||||
|
Width = 1016
|
||||||
|
Height = 73
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 28
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26102#38388
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 64
|
||||||
|
Top = 36
|
||||||
|
Width = 12
|
||||||
|
Height = 12
|
||||||
|
Caption = #33267
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 184
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25209' '#21495
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 344
|
||||||
|
Top = 12
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517#20108
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 184
|
||||||
|
Top = 36
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #22522#24067#21517#31216
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 509
|
||||||
|
Top = 36
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 344
|
||||||
|
Top = 36
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 509
|
||||||
|
Top = 12
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21402#24230
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 645
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #21367' '#21495
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 645
|
||||||
|
Top = 36
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #36125#26031#31867#21035
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 77
|
||||||
|
Top = 9
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Date = 40768.458268587970000000
|
||||||
|
Time = 40768.458268587970000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 77
|
||||||
|
Top = 33
|
||||||
|
Width = 87
|
||||||
|
Height = 20
|
||||||
|
Date = 40768.458268587970000000
|
||||||
|
Time = 40768.458268587970000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object PlanNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 233
|
||||||
|
Top = 9
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object P_ChnName20: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 382
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object P_ChnName10: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 233
|
||||||
|
Top = 33
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object DefStr3: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 535
|
||||||
|
Top = 33
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object ShorName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 382
|
||||||
|
Top = 33
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object HD: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 534
|
||||||
|
Top = 9
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object batchnum: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 695
|
||||||
|
Top = 9
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
object BSTypeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 695
|
||||||
|
Top = 33
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = PlanNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 28
|
||||||
|
Top = 100
|
||||||
|
Width = 925
|
||||||
|
Height = 357
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Quantity
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.Kind = ckDateTime
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1DepotClass: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'DepotClass'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #29677#27425
|
||||||
|
DataBinding.FieldName = 'defstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #29677#32452
|
||||||
|
DataBinding.FieldName = 'defstr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
end
|
||||||
|
object v1batchnum: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'batchnum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v1PlanNo: TcxGridDBColumn
|
||||||
|
Caption = #25209#21495
|
||||||
|
DataBinding.FieldName = 'PlanNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1P_ChnName: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517#19968
|
||||||
|
DataBinding.FieldName = 'P_ChnName20'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1P_Spec10: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517#20108
|
||||||
|
DataBinding.FieldName = 'P_Spec10'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1BSTypeName: TcxGridDBColumn
|
||||||
|
Caption = #36125#26031#31867#21035
|
||||||
|
DataBinding.FieldName = 'BSTypeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1P_ChnName10: TcxGridDBColumn
|
||||||
|
Caption = #22522#24067#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_ChnName10'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1ShortName: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'ShortName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1DefStr3: TcxGridDBColumn
|
||||||
|
Caption = #22522#24067#39068#33394
|
||||||
|
DataBinding.FieldName = 'DefStr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1DefFlt1: TcxGridDBColumn
|
||||||
|
Caption = #21402#24230
|
||||||
|
DataBinding.FieldName = 'HD'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1Quantity: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'Quantity'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v1UnitName: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'UnitName'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1DefStr4: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DefStr4'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 496
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = ADODBMD_BSCK.ADOCon
|
||||||
|
Parameters = <>
|
||||||
|
Left = 664
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = ADODBMD_BSCK.ADOCon
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 736
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = ADODBMD_BSCK.ADOCon
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 848
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryMain
|
||||||
|
Left = 800
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
end
|
||||||
267
样品(YPGL.dll)/U_BaseOutList.pas
Normal file
267
样品(YPGL.dll)/U_BaseOutList.pas
Normal file
|
|
@ -0,0 +1,267 @@
|
||||||
|
unit U_BaseOutList;
|
||||||
|
|
||||||
|
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, cxCalendar, cxButtonEdit, cxDropDownEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBaseOutList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
PlanNo: TEdit;
|
||||||
|
P_ChnName20: TEdit;
|
||||||
|
P_ChnName10: TEdit;
|
||||||
|
DefStr3: TEdit;
|
||||||
|
ShorName: TEdit;
|
||||||
|
HD: TEdit;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PlanNo: TcxGridDBColumn;
|
||||||
|
v1P_ChnName: TcxGridDBColumn;
|
||||||
|
v1P_ChnName10: TcxGridDBColumn;
|
||||||
|
v1ShortName: TcxGridDBColumn;
|
||||||
|
v1DefStr3: TcxGridDBColumn;
|
||||||
|
v1DefFlt1: TcxGridDBColumn;
|
||||||
|
v1Quantity: TcxGridDBColumn;
|
||||||
|
v1UnitName: TcxGridDBColumn;
|
||||||
|
v1DefStr4: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1P_Spec10: TcxGridDBColumn;
|
||||||
|
v1BSTypeName: TcxGridDBColumn;
|
||||||
|
v1DepotClass: TcxGridDBColumn;
|
||||||
|
v1batchnum: TcxGridDBColumn;
|
||||||
|
Label9: TLabel;
|
||||||
|
batchnum: TEdit;
|
||||||
|
Label10: TLabel;
|
||||||
|
BSTypeName: TEdit;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
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 TBAddClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure PlanNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBaseOutList: TfrmBaseOutList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_adodbmd,U_SelfForm,U_CxGridSet,U_FormPas,U_BaseOut,U_global;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBaseOutList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxgrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('出库列表',Tv1,'贝斯仓库');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_ClothInOutList :begdate,:enddate,:DepotNo,:DepotCode,:PState,:CRK');
|
||||||
|
Parameters.ParamByName('DepotCode').Value:=Trim(gDef1);
|
||||||
|
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime));
|
||||||
|
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1));
|
||||||
|
Parameters.ParamByName('PState').Value:=1;
|
||||||
|
Parameters.ParamByName('CRK').Value:=0;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid('出库列表',Tv1,'贝斯仓库');
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
EndDate.DateTime:=BegDate.DateTime;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmBaseOut:=TfrmBaseOut.Create(Application);
|
||||||
|
with frmBaseOut do
|
||||||
|
begin
|
||||||
|
DepotNo:=Trim(self.ADOQueryMain.fieldbyname('DepotNo').AsString);
|
||||||
|
QuantityCK:=Trim(self.ADOQueryMain.fieldbyname('Quantity').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.TBFind.Click;
|
||||||
|
Self.ADOQueryMain.Locate('DepotNo',DepotNo,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmBaseOut.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
TBFind.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmBaseOutList.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete WC_ClothInout_Info where depotno='''+Trim(ADOQueryMain.fieldbyname('depotno').AsString)+'''');
|
||||||
|
sql.Add(' delete WC_ClothInout where depotno='''+Trim(ADOQueryMain.fieldbyname('depotno').AsString)+'''');
|
||||||
|
SQL.Add(' Update WC_ClothClothing Set Quantity=Quantity+'+Trim(ADOQueryMain.fieldbyname('Quantity').AsString));
|
||||||
|
sql.Add(' where KCID='+Trim(ADOQueryMain.fieldbyname('KCID').AsString));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('入库列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBPrintClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmBaseOut:=TfrmBaseOut.Create(Application);
|
||||||
|
with frmBaseOut do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.TBFind.Click;
|
||||||
|
Self.ADOQueryMain.Locate('DepotNo',DepotNo,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmBaseOut.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.PlanNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBaseOutList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SeniorFilter(Tv1,ADOQueryMain);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
743
样品(YPGL.dll)/U_CPAdd.dfm
Normal file
743
样品(YPGL.dll)/U_CPAdd.dfm
Normal file
|
|
@ -0,0 +1,743 @@
|
||||||
|
object frmCPAdd: TfrmCPAdd
|
||||||
|
Left = 432
|
||||||
|
Top = 240
|
||||||
|
Width = 1021
|
||||||
|
Height = 498
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1005
|
||||||
|
Height = 30
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ComboBox1: TComboBox
|
||||||
|
Left = 213
|
||||||
|
Top = 3
|
||||||
|
Width = 166
|
||||||
|
Height = 24
|
||||||
|
Style = csDropDownList
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 16
|
||||||
|
ItemIndex = 0
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
Text = #26679#21697#26631#31614
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#26631#31614
|
||||||
|
#23567#26679#26631#31614
|
||||||
|
#25968#30721#31859#26679
|
||||||
|
#33337#26679#26631#31614
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 379
|
||||||
|
Top = 0
|
||||||
|
Width = 304
|
||||||
|
Height = 30
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 0
|
||||||
|
object Label21: TLabel
|
||||||
|
Left = 173
|
||||||
|
Top = 10
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20221#25968
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 26
|
||||||
|
Top = 7
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #38376#24133#21333#20301#33521#23544
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 131
|
||||||
|
Top = 6
|
||||||
|
Width = 38
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 30
|
||||||
|
Width = 1005
|
||||||
|
Height = 429
|
||||||
|
Align = alClient
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 41
|
||||||
|
Top = 26
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #20135#21697#32534#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 687
|
||||||
|
Top = 26
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Caption = #35268' '#26684#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 39
|
||||||
|
Top = 68
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Caption = #20811' '#37325#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 371
|
||||||
|
Top = 237
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Caption = #33457' '#22411#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 687
|
||||||
|
Top = 68
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Caption = #26550' '#20301#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 41
|
||||||
|
Top = 237
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #20013#25991#21697#21517#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 41
|
||||||
|
Top = 195
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #20013#25991#25104#20998#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 373
|
||||||
|
Top = 68
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #26377#25928#38376#24133#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 689
|
||||||
|
Top = 153
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #20013#25991#39068#33394#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 371
|
||||||
|
Top = 280
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Caption = #22791' '#27880#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label18: TLabel
|
||||||
|
Left = 373
|
||||||
|
Top = 26
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #33521#25991#25104#20998#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label20: TLabel
|
||||||
|
Left = 373
|
||||||
|
Top = 151
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #33521#25991#39068#33394#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 423
|
||||||
|
Top = 195
|
||||||
|
Width = 35
|
||||||
|
Height = 16
|
||||||
|
Caption = 'PO'#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 356
|
||||||
|
Top = 110
|
||||||
|
Width = 102
|
||||||
|
Height = 16
|
||||||
|
Caption = #20379#24212#21830#32534#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 688
|
||||||
|
Top = 110
|
||||||
|
Width = 86
|
||||||
|
Height = 16
|
||||||
|
Caption = #20379' '#24212' '#21830#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 689
|
||||||
|
Top = 193
|
||||||
|
Width = 85
|
||||||
|
Height = 16
|
||||||
|
Caption = #24037#21378#32593#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label15: TLabel
|
||||||
|
Left = 39
|
||||||
|
Top = 153
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Caption = #20215' '#26684#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label16: TLabel
|
||||||
|
Left = 39
|
||||||
|
Top = 110
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Caption = #25968' '#37327#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 318
|
||||||
|
Width = 137
|
||||||
|
Height = 16
|
||||||
|
Caption = #31859#25968'/'#24211#20301'/'#39068#33394#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label19: TLabel
|
||||||
|
Left = 686
|
||||||
|
Top = 233
|
||||||
|
Width = 102
|
||||||
|
Height = 16
|
||||||
|
Caption = #23458#25143#35746#21333#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label22: TLabel
|
||||||
|
Left = 41
|
||||||
|
Top = 276
|
||||||
|
Width = 68
|
||||||
|
Height = 16
|
||||||
|
Caption = #27611#38376#24133#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CYNo: TEdit
|
||||||
|
Left = 121
|
||||||
|
Top = 22
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
OnKeyPress = CYNoKeyPress
|
||||||
|
end
|
||||||
|
object CYSpec: TEdit
|
||||||
|
Left = 769
|
||||||
|
Top = 22
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYKZ: TEdit
|
||||||
|
Left = 121
|
||||||
|
Top = 64
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYHX: TEdit
|
||||||
|
Left = 453
|
||||||
|
Top = 233
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 16
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object KuWei: TEdit
|
||||||
|
Left = 769
|
||||||
|
Top = 64
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYName: TEdit
|
||||||
|
Left = 121
|
||||||
|
Top = 233
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 15
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYECF: TEdit
|
||||||
|
Left = 453
|
||||||
|
Top = 22
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYMF: TEdit
|
||||||
|
Left = 453
|
||||||
|
Top = 64
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYColor: TEdit
|
||||||
|
Left = 769
|
||||||
|
Top = 149
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 10
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYEColor: TEdit
|
||||||
|
Left = 453
|
||||||
|
Top = 147
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 11
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object Note: TEdit
|
||||||
|
Left = 453
|
||||||
|
Top = 276
|
||||||
|
Width = 532
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 17
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYCF: TBtnEditC
|
||||||
|
Left = 121
|
||||||
|
Top = 190
|
||||||
|
Width = 201
|
||||||
|
Height = 25
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 12
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
OnBtnUpClick = CYCFBtnUpClick
|
||||||
|
OnBtnDnClick = CYCFBtnDnClick
|
||||||
|
end
|
||||||
|
object CYPO: TEdit
|
||||||
|
Left = 453
|
||||||
|
Top = 191
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 13
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYFacNO: TEdit
|
||||||
|
Left = 453
|
||||||
|
Top = 106
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 7
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object MGNO: TEdit
|
||||||
|
Left = 769
|
||||||
|
Top = 189
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 14
|
||||||
|
OnExit = CYMFExit
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYPrice: TEdit
|
||||||
|
Left = 121
|
||||||
|
Top = 149
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 9
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object Qty: TEdit
|
||||||
|
Left = 121
|
||||||
|
Top = 106
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 6
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object CYFacName: TBtnEditC
|
||||||
|
Left = 769
|
||||||
|
Top = 106
|
||||||
|
Width = 201
|
||||||
|
Height = 25
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 8
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
OnBtnUpClick = CYFacNameBtnUpClick
|
||||||
|
end
|
||||||
|
object MSKWYS: TcxMemo
|
||||||
|
Left = 144
|
||||||
|
Top = 305
|
||||||
|
TabOrder = 18
|
||||||
|
Height = 93
|
||||||
|
Width = 829
|
||||||
|
end
|
||||||
|
object KHorderno: TEdit
|
||||||
|
Left = 777
|
||||||
|
Top = 229
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 19
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
object MMF: TEdit
|
||||||
|
Left = 121
|
||||||
|
Top = 272
|
||||||
|
Width = 200
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 20
|
||||||
|
OnKeyPress = CYECFKeyPress
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 521
|
||||||
|
Top = 37
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 573
|
||||||
|
Top = 33
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 613
|
||||||
|
Top = 45
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 964
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 325
|
||||||
|
Top = 117
|
||||||
|
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 = 964
|
||||||
|
Top = 140
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
519
样品(YPGL.dll)/U_CPAdd.pas
Normal file
519
样品(YPGL.dll)/U_CPAdd.pas
Normal file
|
|
@ -0,0 +1,519 @@
|
||||||
|
unit U_CPAdd;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||||
|
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||||
|
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
|
||||||
|
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, cxDropDownEdit, cxCalendar,
|
||||||
|
BtnEdit, RM_Class, RM_System, RM_Dataset, RM_Common, RM_GridReport,
|
||||||
|
cxLookAndFeels, cxLookAndFeelPainters, cxContainer, cxMemo;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPAdd = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
Label10: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
Label12: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label18: TLabel;
|
||||||
|
Label20: TLabel;
|
||||||
|
CYNo: TEdit;
|
||||||
|
CYSpec: TEdit;
|
||||||
|
CYKZ: TEdit;
|
||||||
|
CYHX: TEdit;
|
||||||
|
KuWei: TEdit;
|
||||||
|
CYName: TEdit;
|
||||||
|
CYECF: TEdit;
|
||||||
|
CYMF: TEdit;
|
||||||
|
CYColor: TEdit;
|
||||||
|
CYEColor: TEdit;
|
||||||
|
Note: TEdit;
|
||||||
|
CYCF: TBtnEditC;
|
||||||
|
Label6: TLabel;
|
||||||
|
CYPO: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
CYFacNO: TEdit;
|
||||||
|
Label14: TLabel;
|
||||||
|
Label15: TLabel;
|
||||||
|
MGNO: TEdit;
|
||||||
|
CYPrice: TEdit;
|
||||||
|
Label16: TLabel;
|
||||||
|
Qty: TEdit;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ComboBox1: TComboBox;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
CYFacName: TBtnEditC;
|
||||||
|
Label21: TLabel;
|
||||||
|
Edit1: TEdit;
|
||||||
|
Label17: TLabel;
|
||||||
|
MSKWYS: TcxMemo;
|
||||||
|
Label19: TLabel;
|
||||||
|
KHorderno: TEdit;
|
||||||
|
Label22: TLabel;
|
||||||
|
MMF: TEdit;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure v1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure v1Column46PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure CYMFExit(Sender: TObject);
|
||||||
|
procedure CYKZExit(Sender: TObject);
|
||||||
|
procedure CYCFBtnDnClick(Sender: TObject);
|
||||||
|
procedure CYCFBtnUpClick(Sender: TObject);
|
||||||
|
procedure CYNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure CYECFKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure CYFacNameBtnUpClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
canshu1: string;
|
||||||
|
Fint: Integer;
|
||||||
|
procedure InitSubGrid();
|
||||||
|
function SaveData(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FCYID, FCPID: string;
|
||||||
|
CopyInt: Integer;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPAdd: TfrmCPAdd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_iniParam, U_ZDYHelp, U_ZdyAttachGYS;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.InitSubGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(' select * from CP_YDang where CYID=''' + Trim(FCYID) + ''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCSHDataNew(ADOQueryMain, Panel2, 0);
|
||||||
|
mskwys.Text := ADOQueryMain.fieldbyname('mskwys').AsString;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitSubGrid();
|
||||||
|
if CopyInt = 1 then
|
||||||
|
begin
|
||||||
|
FCYID := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CheckBox1.Checked = True then
|
||||||
|
begin
|
||||||
|
canshu1 := '英寸';
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
canshu1 := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FCYID = '' then
|
||||||
|
begin
|
||||||
|
ToolButton2.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmCPAdd.SaveData(): Boolean;
|
||||||
|
var
|
||||||
|
maxId: string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd, maxId, '', 'CP_YDang', 3, 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 CP_YDang where CYID=''' + Trim(FCYID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID) = '' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CYType').Value := Trim(FCPID);
|
||||||
|
FieldByName('CYID').Value := Trim(maxId);
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value := Trim(DName);
|
||||||
|
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
SSetsavedataNew(ADOQueryCmd, 'CP_YDang', Panel2, 0);
|
||||||
|
FieldByName('CYCF').Value := Trim(CYCF.Text);
|
||||||
|
FieldByName('CYFacName').Value := Trim(CYFacName.Text);
|
||||||
|
FieldByName('MSKWYS').Value := MSKWYS.Text;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
// with ADOQueryTemp do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add(' select count(CYNO) as AA from CP_YDang where CYNo=''' + Trim(CYNo.Text) + ''' and Status=''0'' ');
|
||||||
|
//// ShowMessage(SQL.text);
|
||||||
|
// Open;
|
||||||
|
// if FieldByName('AA').AsInteger > 1 then
|
||||||
|
// begin
|
||||||
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
// Result := False;
|
||||||
|
// Application.MessageBox('产品编号重复!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
FCYID := Trim(maxId);
|
||||||
|
Result := True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result := False;
|
||||||
|
Application.MessageBox('保存失败!', '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if (Trim(CYNo.Text) = '') then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('产品编号不能为空!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
// if (Trim(CYName.Text) = '') then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('中文品名不能为空!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!', '提示', 0);
|
||||||
|
// ModalResult := 1;
|
||||||
|
ToolButton2.Enabled := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
{ try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='YPName';
|
||||||
|
flagname:='样品名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('CYName').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CheckBox1.Checked = True then
|
||||||
|
begin
|
||||||
|
canshu1 := '英寸';
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
canshu1 := '';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column46PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
{ try
|
||||||
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('defstr19').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CYMFExit(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue: string;
|
||||||
|
FReal: Double;
|
||||||
|
begin
|
||||||
|
mvalue := Trim(TcxTextEdit(Sender).EditingText);
|
||||||
|
if (TryStrToFloat(mvalue, FReal)) then
|
||||||
|
begin
|
||||||
|
if Trim(canshu1) = '英寸' then
|
||||||
|
mvalue := mvalue + '"'
|
||||||
|
else
|
||||||
|
mvalue := mvalue + 'CM';
|
||||||
|
end;
|
||||||
|
TEdit(Sender).Text := mvalue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CYKZExit(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue: string;
|
||||||
|
FReal: Double;
|
||||||
|
begin
|
||||||
|
mvalue := Trim(TcxTextEdit(Sender).EditingText);
|
||||||
|
if (TryStrToFloat(mvalue, FReal)) then
|
||||||
|
begin
|
||||||
|
mvalue := mvalue + 'GSM';
|
||||||
|
end;
|
||||||
|
TEdit(Sender).Text := mvalue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CYCFBtnDnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBtnEditC(Sender).Text := '';
|
||||||
|
TBtnEditC(Sender).TxtCode := '';
|
||||||
|
CYECF.Text := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CYCFBtnUpClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
FieldName: string;
|
||||||
|
begin
|
||||||
|
// if Trim(CYNo.Text)='' then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('请先输入产品编号!','提示',0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// frmCFAdd:=TfrmCFAdd.Create(Application);
|
||||||
|
// with frmCFAdd do
|
||||||
|
// begin
|
||||||
|
// FCYID:='';
|
||||||
|
// FCPID:=Trim(CYNo.Text);
|
||||||
|
// Label1.Caption:=trim(CYNo.Text);
|
||||||
|
// if ShowModal=1 then
|
||||||
|
// begin
|
||||||
|
// with ADOQueryTemp do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
// sql.add('exec P_Get_CF :mainid') ;
|
||||||
|
// Parameters.ParamByName('mainid').Value:=CYNo.Text;
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
// CYCF.Text:=ADOQueryTemp.fieldbyname('CF').AsString;
|
||||||
|
// CYECF.Text:=ADOQueryTemp.fieldbyname('ECF').AsString;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CYNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key = #13 then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.add('select * from CP_YDang where CYNO =''' + cyno.Text + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox('产品编号重复!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Key := #0;
|
||||||
|
SelectNext(ActiveControl as TWinControl, True, True);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.ToolButton2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile, FFCYID: string;
|
||||||
|
DPS, i, j: Integer;
|
||||||
|
Txt, fImagePath: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
CYNo.SetFocus;
|
||||||
|
if FCYID = '' then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
if trim(ComboBox1.Text) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('样品标签不能为空!', '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Trim(Edit1.Text) <> '' then
|
||||||
|
begin
|
||||||
|
if TryStrToInt(Edit1.Text, i) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('份数录入错误!', '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + trim(ComboBox1.Text) + '.rmf';
|
||||||
|
|
||||||
|
DPS := 0;
|
||||||
|
FFCYID := '';
|
||||||
|
i := 1;
|
||||||
|
if Trim(Edit1.Text) = '' then
|
||||||
|
begin
|
||||||
|
j := 1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
j := StrToInt(Edit1.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
Txt := Trim(FCYID);
|
||||||
|
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;
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_YDang where CYID=''' + trim(FCYID) + ''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
for i := 1 to j do
|
||||||
|
begin
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.PrintReport;
|
||||||
|
// RM1.ShowReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\样品标签.rmf'), '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CYECFKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key = #13 then
|
||||||
|
begin
|
||||||
|
Key := #0;
|
||||||
|
SelectNext(ActiveControl as TWinControl, True, True);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CYFacNameBtnUpClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachGYS := TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if self.canshu1 <> '高权限' then
|
||||||
|
canshu1 := '业务员';
|
||||||
|
FZSD := '1';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
CYFacName.Text := Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||||
|
// JGFactoryName.TxtCode := Trim(CDS_HZ.fieldbyname('ZDYCode').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
934
样品(YPGL.dll)/U_CPManage.dfm
Normal file
934
样品(YPGL.dll)/U_CPManage.dfm
Normal file
|
|
@ -0,0 +1,934 @@
|
||||||
|
object frmCPManage: TfrmCPManage
|
||||||
|
Left = 270
|
||||||
|
Top = 141
|
||||||
|
Width = 1287
|
||||||
|
Height = 668
|
||||||
|
Caption = #20135#21697#26723#26696
|
||||||
|
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 = 1271
|
||||||
|
Height = 62
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 89
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBCopy: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22797#21046
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = TBCopyClick
|
||||||
|
end
|
||||||
|
object TBedit: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBeditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object Tchk: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20316#24223
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TchkClick
|
||||||
|
end
|
||||||
|
object Tnochk: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #24674#22797
|
||||||
|
ImageIndex = 129
|
||||||
|
OnClick = TnochkClick
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 504
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913#30446#24405
|
||||||
|
ImageIndex = 57
|
||||||
|
Wrap = True
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986'Excel'
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 93
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton8: TToolButton
|
||||||
|
Left = 180
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#39044#35272
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton8Click
|
||||||
|
end
|
||||||
|
object TBSC: TToolButton
|
||||||
|
Left = 267
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22270#29255#19978#20256
|
||||||
|
ImageIndex = 109
|
||||||
|
OnClick = TBSCClick
|
||||||
|
end
|
||||||
|
object TBXZ: TToolButton
|
||||||
|
Left = 354
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22270#29255#19979#36733
|
||||||
|
ImageIndex = 104
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBXZClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #38468#20214#19978#20256
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 528
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object ComboBox1: TComboBox
|
||||||
|
Left = 591
|
||||||
|
Top = 33
|
||||||
|
Width = 166
|
||||||
|
Height = 24
|
||||||
|
Style = csDropDownList
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 16
|
||||||
|
ItemIndex = 0
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
Text = #26679#21697#26631#31614
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#26631#31614
|
||||||
|
#23567#26679#26631#31614
|
||||||
|
#25968#30721#31859#26679
|
||||||
|
#33337#26679#26631#31614
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter1: TcxSplitter
|
||||||
|
Left = 220
|
||||||
|
Top = 129
|
||||||
|
Width = 8
|
||||||
|
Height = 500
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
Control = Panel5
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 62
|
||||||
|
Width = 1271
|
||||||
|
Height = 67
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 2
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25195#25551#20837#21475
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 352
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 216
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 109
|
||||||
|
Top = 43
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20221#25968
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 729
|
||||||
|
Top = 43
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20811' '#37325
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 480
|
||||||
|
Top = 43
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#25104#20998
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 480
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 601
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26377#25928#38376#24133
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 216
|
||||||
|
Top = 43
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268' '#26684
|
||||||
|
end
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 729
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33457' '#22411
|
||||||
|
end
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 601
|
||||||
|
Top = 43
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20840' '#24133
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 352
|
||||||
|
Top = 43
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 857
|
||||||
|
Top = 15
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 997
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25551#31295#32534#21495
|
||||||
|
end
|
||||||
|
object Label15: TLabel
|
||||||
|
Left = 857
|
||||||
|
Top = 43
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
end
|
||||||
|
object CYID: TEdit
|
||||||
|
Tag = 3
|
||||||
|
Left = 72
|
||||||
|
Top = 11
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnKeyPress = CYIDKeyPress
|
||||||
|
end
|
||||||
|
object CYName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 402
|
||||||
|
Top = 11
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYNO: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 265
|
||||||
|
Top = 11
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = CYNoChange
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 67
|
||||||
|
Top = 39
|
||||||
|
Width = 38
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object CYKZ: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 779
|
||||||
|
Top = 39
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYCF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 530
|
||||||
|
Top = 39
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYECF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 530
|
||||||
|
Top = 11
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYMF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 651
|
||||||
|
Top = 11
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYSpec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 265
|
||||||
|
Top = 39
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYHX: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 779
|
||||||
|
Top = 11
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYQF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 651
|
||||||
|
Top = 39
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 10
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYEName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 402
|
||||||
|
Top = 39
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 11
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYFacNO: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 919
|
||||||
|
Top = 11
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 12
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object MGNO: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 1047
|
||||||
|
Top = 11
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 13
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYFacName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 919
|
||||||
|
Top = 39
|
||||||
|
Width = 70
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 14
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel5: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 129
|
||||||
|
Width = 220
|
||||||
|
Height = 500
|
||||||
|
Align = alLeft
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 4
|
||||||
|
object cxDBTreeList1: TcxDBTreeList
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 216
|
||||||
|
Height = 496
|
||||||
|
Align = alClient
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
end>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.ParentField = 'CPParent'
|
||||||
|
DataController.KeyField = 'CPID'
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OptionsBehavior.ExpandOnDblClick = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.CellAutoHeight = True
|
||||||
|
OptionsView.Headers = False
|
||||||
|
RootValue = -1
|
||||||
|
Styles.Inactive = DataLink_YPGL.Red
|
||||||
|
Styles.Selection = DataLink_YPGL.Red
|
||||||
|
Styles.IncSearch = DataLink_YPGL.Red
|
||||||
|
TabOrder = 0
|
||||||
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
Width = 210
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Summary.FooterSummaryItems = <>
|
||||||
|
Summary.GroupFooterSummaryItems = <>
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 228
|
||||||
|
Top = 129
|
||||||
|
Width = 1043
|
||||||
|
Height = 500
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Panel3'
|
||||||
|
TabOrder = 5
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 21
|
||||||
|
Width = 1039
|
||||||
|
Height = 314
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnKeyDown = Tv1KeyDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
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_YPGL.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 40
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column15: TcxGridDBColumn
|
||||||
|
Caption = #24211#20301#20301#32622
|
||||||
|
DataBinding.FieldName = 'KuWei'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'CYNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21697#21517
|
||||||
|
DataBinding.FieldName = 'CYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'CYSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYEName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYECF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'CYKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #26377#25928#38376#24133
|
||||||
|
DataBinding.FieldName = 'CYMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column42: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYEColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column16: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411
|
||||||
|
DataBinding.FieldName = 'CYHX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column14: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255#19978#20256
|
||||||
|
DataBinding.FieldName = 'TPFlag'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Caption = #31859#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceM'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 54
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #38468#20214#19978#20256
|
||||||
|
DataBinding.FieldName = 'FJFlag'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column41: TcxGridDBColumn
|
||||||
|
Caption = #20840#24133
|
||||||
|
DataBinding.FieldName = 'CYQF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = 'PO'
|
||||||
|
DataBinding.FieldName = 'CYPO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'CYFacNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'CYFacName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column5: TcxGridDBColumn
|
||||||
|
Caption = #20215#26684
|
||||||
|
DataBinding.FieldName = 'CYPrice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column6: TcxGridDBColumn
|
||||||
|
Caption = #24037#21378#32593#21495
|
||||||
|
DataBinding.FieldName = 'MGNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column7: TcxGridDBColumn
|
||||||
|
Caption = #30331#35760#26102#38388
|
||||||
|
DataBinding.FieldName = 'Filltime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column8: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'EditTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column9: TcxGridDBColumn
|
||||||
|
Caption = #31859#25968'/'#24211#20301'/'#39068#33394
|
||||||
|
DataBinding.FieldName = 'MSKWYS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object Tv1Column10: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'KHorderno'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object Tv1Column11: TcxGridDBColumn
|
||||||
|
Caption = #27611#38376#24133
|
||||||
|
DataBinding.FieldName = 'MMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 2
|
||||||
|
Top = 335
|
||||||
|
Width = 1039
|
||||||
|
Height = 163
|
||||||
|
Align = alBottom
|
||||||
|
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||||
|
TabOrder = 1
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 2
|
||||||
|
Top = 14
|
||||||
|
Width = 1035
|
||||||
|
Height = 147
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvLowered
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 1039
|
||||||
|
Height = 19
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 0
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#20840#37096
|
||||||
|
#22403#22334#31665)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectRight = 0
|
||||||
|
ClientRectTop = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 512
|
||||||
|
Top = 232
|
||||||
|
Width = 185
|
||||||
|
Height = 41
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||||
|
Color = clSkyBlue
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryTree
|
||||||
|
Left = 91
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object ADOQueryTree20: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 61
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 525
|
||||||
|
Top = 253
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1029
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 432
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 739
|
||||||
|
Top = 371
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 493
|
||||||
|
Top = 193
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 712
|
||||||
|
Top = 368
|
||||||
|
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 = 344
|
||||||
|
Top = 188
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 312
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object ODPat: TOpenDialog
|
||||||
|
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||||
|
Left = 364
|
||||||
|
Top = 253
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 461
|
||||||
|
Top = 188
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
Left = 393
|
||||||
|
Top = 253
|
||||||
|
end
|
||||||
|
object DSCYNO: TDataSource
|
||||||
|
DataSet = CDS_CYNO
|
||||||
|
Left = 771
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_CYNO: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 712
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 32
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object adoqueryPicture: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 479
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 476
|
||||||
|
Top = 344
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #20840#36873
|
||||||
|
OnClick = N1Click
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #20840#24323
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
1152
样品(YPGL.dll)/U_CPManage.pas
Normal file
1152
样品(YPGL.dll)/U_CPManage.pas
Normal file
File diff suppressed because it is too large
Load Diff
836
样品(YPGL.dll)/U_CPManageCX.dfm
Normal file
836
样品(YPGL.dll)/U_CPManageCX.dfm
Normal file
|
|
@ -0,0 +1,836 @@
|
||||||
|
object frmCPManageCX: TfrmCPManageCX
|
||||||
|
Left = -8
|
||||||
|
Top = -8
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #20135#21697#26723#26696
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnKeyDown = FormKeyDown
|
||||||
|
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_YPGL.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object ToolButton7: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22797#21046
|
||||||
|
ImageIndex = 57
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton7Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton10: TToolButton
|
||||||
|
Left = 528
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#39044#35272
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton10Click
|
||||||
|
end
|
||||||
|
object ToolButton8: TToolButton
|
||||||
|
Left = 615
|
||||||
|
Top = 0
|
||||||
|
Caption = #26679#21697#20837#24211
|
||||||
|
ImageIndex = 103
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton8Click
|
||||||
|
end
|
||||||
|
object ToolButton9: TToolButton
|
||||||
|
Left = 698
|
||||||
|
Top = 0
|
||||||
|
Caption = #26679#21697#20986#24211
|
||||||
|
ImageIndex = 107
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton9Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 781
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22270#29255#19978#20256
|
||||||
|
ImageIndex = 109
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 868
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22270#29255#19979#36733
|
||||||
|
ImageIndex = 104
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 955
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object ComboBox1: TComboBox
|
||||||
|
Left = 1018
|
||||||
|
Top = 5
|
||||||
|
Width = 112
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 0
|
||||||
|
Text = #26679#21697#26631#31614
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#26631#31614
|
||||||
|
#26679#21697#26631#31614'1')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxDBTreeList1: TcxDBTreeList
|
||||||
|
Left = 0
|
||||||
|
Top = 73
|
||||||
|
Width = 121
|
||||||
|
Height = 643
|
||||||
|
Align = alLeft
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
end>
|
||||||
|
BufferedPaint = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.ParentField = 'CPParent'
|
||||||
|
DataController.KeyField = 'CPID'
|
||||||
|
OptionsBehavior.ExpandOnDblClick = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.CellAutoHeight = True
|
||||||
|
OptionsView.Headers = False
|
||||||
|
RootValue = -1
|
||||||
|
Styles.Inactive = DataLink_YPGL.Red
|
||||||
|
Styles.Selection = DataLink_YPGL.Red
|
||||||
|
Styles.IncSearch = DataLink_YPGL.Red
|
||||||
|
TabOrder = 1
|
||||||
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
Width = 210
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter1: TcxSplitter
|
||||||
|
Left = 121
|
||||||
|
Top = 73
|
||||||
|
Width = 8
|
||||||
|
Height = 643
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
Control = cxDBTreeList1
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 3
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25195#25551#20837#21475
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 361
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #24120#35268#21517#31216
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 471
|
||||||
|
Top = 15
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 1247
|
||||||
|
Top = 67
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #32433#25903
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 216
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 1046
|
||||||
|
Top = 16
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20221#25968
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 615
|
||||||
|
Top = 15
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 738
|
||||||
|
Top = 15
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #32769#32534#21495
|
||||||
|
end
|
||||||
|
object CYID: TEdit
|
||||||
|
Tag = 3
|
||||||
|
Left = 72
|
||||||
|
Top = 11
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnKeyPress = CYIDKeyPress
|
||||||
|
end
|
||||||
|
object CYName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 411
|
||||||
|
Top = 11
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object DefStr6: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 532
|
||||||
|
Top = 11
|
||||||
|
Width = 59
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object defnote5: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 1273
|
||||||
|
Top = 63
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = defnote5Change
|
||||||
|
end
|
||||||
|
object CYNO: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 262
|
||||||
|
Top = 11
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 1004
|
||||||
|
Top = 11
|
||||||
|
Width = 38
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object DefStr7: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 649
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = defnote5Change
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 776
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = defnote5Change
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 512
|
||||||
|
Top = 232
|
||||||
|
Width = 193
|
||||||
|
Height = 41
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||||
|
Color = clSkyBlue
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 127
|
||||||
|
Top = 83
|
||||||
|
Width = 1073
|
||||||
|
Height = 609
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Panel3'
|
||||||
|
TabOrder = 5
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 2
|
||||||
|
Top = 412
|
||||||
|
Width = 1069
|
||||||
|
Height = 195
|
||||||
|
Align = alBottom
|
||||||
|
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||||
|
TabOrder = 0
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 2
|
||||||
|
Top = 14
|
||||||
|
Width = 1065
|
||||||
|
Height = 179
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvLowered
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 1069
|
||||||
|
Height = 410
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnKeyDown = Tv1KeyDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
OnCellClick = Tv1CellClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
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_YPGL.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 40
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column15: TcxGridDBColumn
|
||||||
|
Caption = #24211#20301#20301#32622
|
||||||
|
DataBinding.FieldName = 'DefStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'CYNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21697#21517
|
||||||
|
DataBinding.FieldName = 'CYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'CYSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYEName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYECF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'CYKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'CYMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column42: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColorEng'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column16: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411
|
||||||
|
DataBinding.FieldName = 'CYHX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column37: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#32463#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr10'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column38: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#32428#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr11'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column39: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#32463#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr12'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column40: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#32428#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr13'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column17: TcxGridDBColumn
|
||||||
|
Caption = #32769#32534#21495
|
||||||
|
DataBinding.FieldName = 'defstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column25: TcxGridDBColumn
|
||||||
|
Caption = #24037#21378#32534#21495
|
||||||
|
DataBinding.FieldName = 'defnote4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column23: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'DefStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column34: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'DefStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column14: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255#19978#20256
|
||||||
|
DataBinding.FieldName = 'TPFlag'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBColumn
|
||||||
|
Caption = #20844#26020#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceKg'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Caption = #31859#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceM'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 54
|
||||||
|
end
|
||||||
|
object v1Column26: TcxGridDBColumn
|
||||||
|
Caption = #32553#29575
|
||||||
|
DataBinding.FieldName = 'price1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column27: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#36153
|
||||||
|
DataBinding.FieldName = 'Price2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column28: TcxGridDBColumn
|
||||||
|
Caption = #26579#36153
|
||||||
|
DataBinding.FieldName = 'price3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Caption = #23494#24230
|
||||||
|
DataBinding.FieldName = 'defstr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column29: TcxGridDBColumn
|
||||||
|
Caption = 'FOB'#36816#36153'+'#21253#35013
|
||||||
|
DataBinding.FieldName = 'price4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v1Column31: TcxGridDBColumn
|
||||||
|
Caption = #20215#26684
|
||||||
|
DataBinding.FieldName = 'price6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column30: TcxGridDBColumn
|
||||||
|
Caption = #21518#21152#24037#36153
|
||||||
|
DataBinding.FieldName = 'price5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Caption = #32463#32428#25467#24230
|
||||||
|
DataBinding.FieldName = 'defstr4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'defstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column24: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#26469#28304
|
||||||
|
DataBinding.FieldName = 'defnote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column22: TcxGridDBColumn
|
||||||
|
Caption = #32433#25903
|
||||||
|
DataBinding.FieldName = 'defnote5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column32: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#38376#24133
|
||||||
|
DataBinding.FieldName = 'PBMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column33: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#20811#37325
|
||||||
|
DataBinding.FieldName = 'PBKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column35: TcxGridDBColumn
|
||||||
|
Caption = #21407#26009#32452#25104
|
||||||
|
DataBinding.FieldName = 'DefStr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column36: TcxGridDBColumn
|
||||||
|
Caption = #19978#26426#35268#26684
|
||||||
|
DataBinding.FieldName = 'DefStr9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'CYNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryTree
|
||||||
|
Left = 91
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 909
|
||||||
|
Top = 17
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 877
|
||||||
|
Top = 17
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 456
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 451
|
||||||
|
Top = 155
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 429
|
||||||
|
Top = 185
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 392
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 392
|
||||||
|
Top = 152
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 424
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object ODPat: TOpenDialog
|
||||||
|
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||||
|
Left = 484
|
||||||
|
Top = 157
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 485
|
||||||
|
Top = 188
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
Left = 521
|
||||||
|
Top = 157
|
||||||
|
end
|
||||||
|
object adoqueryPicture: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 479
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
end
|
||||||
818
样品(YPGL.dll)/U_CPManageCX.pas
Normal file
818
样品(YPGL.dll)/U_CPManageCX.pas
Normal file
|
|
@ -0,0 +1,818 @@
|
||||||
|
unit U_CPManageCX;
|
||||||
|
|
||||||
|
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,jpeg,U_SLT;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPManageCX = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxDBTreeList1: TcxDBTreeList;
|
||||||
|
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOQueryTree: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
cxSplitter1: TcxSplitter;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label2: TLabel;
|
||||||
|
CYID: TEdit;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
ODPat: TOpenDialog;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
ToolButton7: TToolButton;
|
||||||
|
ToolButton8: TToolButton;
|
||||||
|
ToolButton9: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
CYName: TEdit;
|
||||||
|
DefStr6: TEdit;
|
||||||
|
defnote5: TEdit;
|
||||||
|
CYNO: TEdit;
|
||||||
|
Edit1: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
DefStr7: TEdit;
|
||||||
|
defstr1: TEdit;
|
||||||
|
Label13: TLabel;
|
||||||
|
ComboBox1: TComboBox;
|
||||||
|
Panel3: TPanel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
adoqueryPicture: TADOQuery;
|
||||||
|
ToolButton10: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column19: TcxGridDBColumn;
|
||||||
|
v1Column12: TcxGridDBColumn;
|
||||||
|
v1Column15: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1Column9: TcxGridDBColumn;
|
||||||
|
v1Column42: TcxGridDBColumn;
|
||||||
|
v1Column16: TcxGridDBColumn;
|
||||||
|
v1Column37: TcxGridDBColumn;
|
||||||
|
v1Column38: TcxGridDBColumn;
|
||||||
|
v1Column39: TcxGridDBColumn;
|
||||||
|
v1Column40: TcxGridDBColumn;
|
||||||
|
v1Column17: TcxGridDBColumn;
|
||||||
|
v1Column25: TcxGridDBColumn;
|
||||||
|
v1Column23: TcxGridDBColumn;
|
||||||
|
v1Column34: TcxGridDBColumn;
|
||||||
|
v1Column14: TcxGridDBColumn;
|
||||||
|
v1Column10: TcxGridDBColumn;
|
||||||
|
v1Column13: TcxGridDBColumn;
|
||||||
|
v1Column26: TcxGridDBColumn;
|
||||||
|
v1Column27: TcxGridDBColumn;
|
||||||
|
v1Column28: TcxGridDBColumn;
|
||||||
|
v1Column18: TcxGridDBColumn;
|
||||||
|
v1Column29: TcxGridDBColumn;
|
||||||
|
v1Column31: TcxGridDBColumn;
|
||||||
|
v1Column30: TcxGridDBColumn;
|
||||||
|
v1Column20: TcxGridDBColumn;
|
||||||
|
v1Column21: TcxGridDBColumn;
|
||||||
|
v1Column24: TcxGridDBColumn;
|
||||||
|
v1Column22: TcxGridDBColumn;
|
||||||
|
v1Column32: TcxGridDBColumn;
|
||||||
|
v1Column33: TcxGridDBColumn;
|
||||||
|
v1Column35: TcxGridDBColumn;
|
||||||
|
v1Column36: TcxGridDBColumn;
|
||||||
|
v1Column11: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure CYIDKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure CYNoChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure FormKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
procedure Tv1KeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
procedure ToolButton7Click(Sender: TObject);
|
||||||
|
procedure ToolButton8Click(Sender: TObject);
|
||||||
|
procedure ToolButton9Click(Sender: TObject);
|
||||||
|
procedure defnote5Change(Sender: TObject);
|
||||||
|
procedure ToolButton10Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
CPID:string;
|
||||||
|
PState:Integer;
|
||||||
|
FCPID,FTopID:String;
|
||||||
|
procedure InitTree();
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure ReadINIFile();
|
||||||
|
procedure InitImage();
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPManageCX: TfrmCPManageCX;
|
||||||
|
Mach: array of TfrmSlt;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_CPAdd,U_FileUp,U_YPCR;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.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);
|
||||||
|
|
||||||
|
try
|
||||||
|
with adoqueryPicture do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select A.TFID,A.WBID,A.FilesOther,B.FileName from TP_File A,XD_File B where A.TFID =B.XFID and A.WBID='+quotedstr(trim(CDS_Main.fieldbyname('CYID').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 TfrmCPManageCX.InitTree();
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
with ADOQueryTree do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from CP_Type order by CPlevel,CPOrder,CPName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
cxDBTreeList1.Items[0].Expand(false);
|
||||||
|
//cxDBTreeList1.Items[1].Expand(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.InitGrid();
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=True;
|
||||||
|
Panel2.Refresh;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('exec P_Select_CP_YDang :Code,:PState,:CYType');
|
||||||
|
Parameters.ParamByName('Code').Value:='';
|
||||||
|
Parameters.ParamByName('PState').Value:=0;
|
||||||
|
Parameters.ParamByName('CYType').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
Panel2.Visible:=False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPManageCX:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
var
|
||||||
|
i,j:integer;
|
||||||
|
begin
|
||||||
|
j:=length(Mach);
|
||||||
|
if j>0 then
|
||||||
|
begin
|
||||||
|
for i:=0 to j-1 do
|
||||||
|
begin
|
||||||
|
Mach[i].free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
SetLength(Mach, 0);
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('样品列表查询',Tv1,'样品管理');
|
||||||
|
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
|
||||||
|
winexec('cmd /c rd /s /q D:\Right1209',sw_hide);
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmCPManageCX.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_Main.fieldbyname('CYID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel3.Align:=alclient;
|
||||||
|
InitTree();
|
||||||
|
ReadCxGrid('样品列表查询',Tv1,'样品管理');
|
||||||
|
if DParameters1='1' then
|
||||||
|
begin
|
||||||
|
TBAdd.Visible:=False;
|
||||||
|
TBDel.Visible:=False;
|
||||||
|
ToolButton3.Visible:=False;
|
||||||
|
ToolButton5.Visible:=False;
|
||||||
|
end;
|
||||||
|
//InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPAdd:=TfrmCPAdd.Create(Application);
|
||||||
|
with frmCPAdd do
|
||||||
|
begin
|
||||||
|
CopyInt:=0;
|
||||||
|
FCYID:='';
|
||||||
|
FCPID:=Trim(Self.ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPAdd.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPAdd:=TfrmCPAdd.Create(Application);
|
||||||
|
with frmCPAdd do
|
||||||
|
begin
|
||||||
|
CopyInt:=0;
|
||||||
|
FCYID:=Trim(Self.CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
FCPID:=Trim(Self.ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.CDS_Main.Locate('CYID',FCYID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPAdd.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.CYIDKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_YDang where CYID='''+Trim(CYID.Text)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CPID:=Trim(ADOQueryTemp.fieldbyname('CYType').AsString);
|
||||||
|
if Trim(CYID.Text)='' then Exit;
|
||||||
|
SDofilter(ADOQueryMain,' CYID='''+Trim(CYID.Text)+''' ');
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
CYID.Text:='';
|
||||||
|
ADOQueryTree.Locate('CPID',CPID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.CYNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// if Length(Trim(CYNO.Text))<4 then Exit;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('样品档案',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton4Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FFCYID:string;
|
||||||
|
DPS,i,j:Integer;
|
||||||
|
Txt,fImagePath:string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar:TMakebar;
|
||||||
|
Mixtext:TMixtext;
|
||||||
|
begin
|
||||||
|
CYID.SetFocus;
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
//if CDS_CYNO.IsEmpty then Exit;
|
||||||
|
IF trim(ComboBox1.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('样品标签不能为空!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if Trim(Edit1.Text)<>'' then
|
||||||
|
begin
|
||||||
|
if TryStrToInt(Edit1.Text,i)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('份数录入错误!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\'+trim(ComboBox1.Text)+'.rmf';
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
DPS:=0;
|
||||||
|
FFCYID:='';
|
||||||
|
i:=1;
|
||||||
|
if Trim(Edit1.Text)='' then
|
||||||
|
begin
|
||||||
|
j:=1;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
j:=StrToInt(Edit1.Text);
|
||||||
|
end;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.FieldByName('SSel').AsBoolean=True then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||||
|
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||||
|
Txt:=Trim(CDS_Main.fieldbyname('CYID').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;
|
||||||
|
RMVariables['QRBARCODE']:=fImagePath;
|
||||||
|
for i:=1 to j do
|
||||||
|
begin
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.PrintReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\样品标签.rmf'),'提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if DPS=0 then
|
||||||
|
begin
|
||||||
|
FFCYID:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//CDS_Main.Locate('CYID',Trim(CDS_CYNO.fieldbyname('CYID').AsString),[]);
|
||||||
|
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
CDS_Main.Locate('CYID',FFCYID,[]);
|
||||||
|
Edit1.Text:='1';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmFileUp:=TfrmFileUp.Create(Application);
|
||||||
|
with frmFileUp do
|
||||||
|
begin
|
||||||
|
Code.Text:=Trim(Self.CDS_Main.fieldbyname('CYNO').AsString);
|
||||||
|
CYID:=Trim(Self.CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.CDS_Main.Locate('CYID',CYID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmFileUp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton6Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fHandle:THandle;
|
||||||
|
FInt:Integer;
|
||||||
|
FFName,FPath:String;
|
||||||
|
begin
|
||||||
|
{FPath:='C:\HTTP1209\';
|
||||||
|
if DirectoryExists(ExtractFileDir(FPath)) then
|
||||||
|
winexec('cmd /c rd /s /q C:\HTTP1209',sw_hide);}
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from XD_File where CYNO='''+Trim(CDS_Main.fieldbyname('CYNO').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('样品图片未上传!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ReadINIFile();
|
||||||
|
server:=ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||||
|
if Length(server)<6 then
|
||||||
|
begin
|
||||||
|
server:='127.0.0.1';
|
||||||
|
end;
|
||||||
|
IdFTP1.Host :=server;//PicSvr;
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
except
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
FPath:='D:\Right1209\';
|
||||||
|
if not DirectoryExists(ExtractFileDir(FPath)) then
|
||||||
|
CreateDir(ExtractFileDir(FPath));
|
||||||
|
FFName:=Trim(ADOQueryTemp.fieldbyname('FileName').AsString);
|
||||||
|
FFName:=FPath+FFName;
|
||||||
|
if FileExists(FFName) then
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
if FInt<>1 then
|
||||||
|
IdFTP1.Get('YP\'+Trim(ADOQueryTemp.fieldbyname('FileName').AsString),
|
||||||
|
FPath+Trim(ADOQueryTemp.fieldbyname('FileName').AsString)
|
||||||
|
);
|
||||||
|
if IdFTP1.Connected then IdFTP1.Quit;
|
||||||
|
ShellExecute(Handle, 'open',PChar(FPath+Trim(ADOQueryTemp.fieldbyname('FileName').AsString)),'', '', SW_SHOWNORMAL);
|
||||||
|
|
||||||
|
end;
|
||||||
|
procedure TfrmCPManageCX.ReadINIFile();
|
||||||
|
var
|
||||||
|
programIni:Tinifile; //配置文件名
|
||||||
|
FileName:string;
|
||||||
|
begin
|
||||||
|
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||||
|
programIni:=Tinifile.create(FileName);
|
||||||
|
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||||
|
programIni.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
{ with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').asstring)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CPID:=Trim(ADOQueryTemp.fieldbyname('CYType').AsString);
|
||||||
|
ADOQueryTree.Locate('CPID',CPID,[]); }
|
||||||
|
initimage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.FormKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
{if Key= then
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定6666要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_Main.fieldbyname('CYID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.Tv1KeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
if Key=46 then
|
||||||
|
begin
|
||||||
|
TBDel.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton7Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPAdd:=TfrmCPAdd.Create(Application);
|
||||||
|
with frmCPAdd do
|
||||||
|
begin
|
||||||
|
CopyInt:=1;
|
||||||
|
FCYID:=Trim(Self.CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
FCPID:=Trim(Self.ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.CDS_Main.Locate('CYID',FCYID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPAdd.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton8Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmYPCR:=TfrmYPCR.Create(Application);
|
||||||
|
with frmYPCR do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
RKFlag:='入库';
|
||||||
|
frmYPCR.InitGrid();
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CYID').Value:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
FieldByName('CYName').Value:=Trim(CDS_Main.fieldbyname('CYName').AsString);
|
||||||
|
FieldByName('CYSpec').Value:=Trim(CDS_Main.fieldbyname('CYSpec').AsString);
|
||||||
|
FieldByName('KCUnit').Value:=Trim(CDS_Main.fieldbyname('KCUnit').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
frmYPCR.SaveData();
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmYPCR.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton9Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmYPCR:=TfrmYPCR.Create(Application);
|
||||||
|
with frmYPCR do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
RKFlag:='出库';
|
||||||
|
frmYPCR.InitGrid();
|
||||||
|
frmYPCR.cxGridDBColumn1.Caption:='出库日期';
|
||||||
|
frmYPCR.cxGridDBColumn5.Caption:='出库数量';
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CYID').Value:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
FieldByName('CYName').Value:=Trim(CDS_Main.fieldbyname('CYName').AsString);
|
||||||
|
FieldByName('CYSpec').Value:=Trim(CDS_Main.fieldbyname('CYSpec').AsString);
|
||||||
|
FieldByName('KCUnit').Value:=Trim(CDS_Main.fieldbyname('KCUnit').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
frmYPCR.SaveData();
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmYPCR.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.defnote5Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// if Length(Trim(CYSpec.Text))<3 then Exit;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageCX.ToolButton10Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FFCYID:string;
|
||||||
|
DPS,i,j:Integer;
|
||||||
|
Txt,fImagePath:string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar:TMakebar;
|
||||||
|
Mixtext:TMixtext;
|
||||||
|
begin
|
||||||
|
CYID.SetFocus;
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
//if CDS_CYNO.IsEmpty then Exit;
|
||||||
|
IF trim(ComboBox1.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('样品标签不能为空!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if Trim(Edit1.Text)<>'' then
|
||||||
|
begin
|
||||||
|
if TryStrToInt(Edit1.Text,i)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('份数录入错误!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\'+trim(ComboBox1.Text)+'.rmf';
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
DPS:=0;
|
||||||
|
FFCYID:='';
|
||||||
|
i:=1;
|
||||||
|
if Trim(Edit1.Text)='' then
|
||||||
|
begin
|
||||||
|
j:=1;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
j:=StrToInt(Edit1.Text);
|
||||||
|
end;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.FieldByName('SSel').AsBoolean=True then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||||
|
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||||
|
Txt:=Trim(CDS_Main.fieldbyname('CYID').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;
|
||||||
|
RMVariables['QRBARCODE']:=fImagePath;
|
||||||
|
for i:=1 to j do
|
||||||
|
begin
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
// RM1.PrintReport;
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\样品标签.rmf'),'提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if DPS=0 then
|
||||||
|
begin
|
||||||
|
FFCYID:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//CDS_Main.Locate('CYID',Trim(CDS_CYNO.fieldbyname('CYID').AsString),[]);
|
||||||
|
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
CDS_Main.Locate('CYID',FFCYID,[]);
|
||||||
|
Edit1.Text:='1';
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
703
样品(YPGL.dll)/U_CPManageSel.dfm
Normal file
703
样品(YPGL.dll)/U_CPManageSel.dfm
Normal file
|
|
@ -0,0 +1,703 @@
|
||||||
|
object frmCPManageSel: TfrmCPManageSel
|
||||||
|
Left = -8
|
||||||
|
Top = -8
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #20135#21697#21015#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnKeyDown = FormKeyDown
|
||||||
|
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_YPGL.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton7: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 57
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 339
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object ComboBox1: TComboBox
|
||||||
|
Left = 402
|
||||||
|
Top = 5
|
||||||
|
Width = 112
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 0
|
||||||
|
Text = #26679#21697#26631#31614
|
||||||
|
Visible = False
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#26631#31614
|
||||||
|
#26679#21697#26631#31614'1')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxDBTreeList1: TcxDBTreeList
|
||||||
|
Left = 0
|
||||||
|
Top = 73
|
||||||
|
Width = 121
|
||||||
|
Height = 643
|
||||||
|
Align = alLeft
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
end>
|
||||||
|
BufferedPaint = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.ParentField = 'CPParent'
|
||||||
|
DataController.KeyField = 'CPID'
|
||||||
|
OptionsBehavior.ExpandOnDblClick = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.CellAutoHeight = True
|
||||||
|
OptionsView.Headers = False
|
||||||
|
RootValue = -1
|
||||||
|
Styles.Inactive = DataLink_YPGL.Red
|
||||||
|
Styles.Selection = DataLink_YPGL.Red
|
||||||
|
Styles.IncSearch = DataLink_YPGL.Red
|
||||||
|
TabOrder = 1
|
||||||
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
Width = 210
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter1: TcxSplitter
|
||||||
|
Left = 121
|
||||||
|
Top = 73
|
||||||
|
Width = 8
|
||||||
|
Height = 643
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
Control = cxDBTreeList1
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 3
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 12
|
||||||
|
Top = 55
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25195#25551#20837#21475
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 177
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 295
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 419
|
||||||
|
Top = 15
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 1046
|
||||||
|
Top = 48
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20221#25968
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 539
|
||||||
|
Top = 15
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20811#37325
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 842
|
||||||
|
Top = 15
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #32769#32534#21495
|
||||||
|
end
|
||||||
|
object CYID: TEdit
|
||||||
|
Tag = 3
|
||||||
|
Left = 60
|
||||||
|
Top = 51
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnKeyPress = CYIDKeyPress
|
||||||
|
end
|
||||||
|
object CYName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 227
|
||||||
|
Top = 11
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYEName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 344
|
||||||
|
Top = 11
|
||||||
|
Width = 59
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYSpec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 445
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = CYSpecChange
|
||||||
|
end
|
||||||
|
object CYNO: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 78
|
||||||
|
Top = 11
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 1004
|
||||||
|
Top = 43
|
||||||
|
Width = 38
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object CYKZ: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 565
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = CYSpecChange
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 880
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = CYSpecChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 512
|
||||||
|
Top = 232
|
||||||
|
Width = 193
|
||||||
|
Height = 41
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||||
|
Color = clSkyBlue
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 127
|
||||||
|
Top = 83
|
||||||
|
Width = 1073
|
||||||
|
Height = 609
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Panel3'
|
||||||
|
TabOrder = 5
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 1069
|
||||||
|
Height = 410
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
OnCellClick = Tv1CellClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
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_YPGL.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YPGL.SHuangSe
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 40
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBColumn
|
||||||
|
Caption = #31867#21035
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column15: TcxGridDBColumn
|
||||||
|
Caption = #38472#21015#20301#32622
|
||||||
|
DataBinding.FieldName = 'DefStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'CYNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'CYSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYEName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYECF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#20811#37325
|
||||||
|
DataBinding.FieldName = 'CYKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#38376#24133
|
||||||
|
DataBinding.FieldName = 'CYMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1Column16: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411
|
||||||
|
DataBinding.FieldName = 'CYHX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column42: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColorEng'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'CYNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column14: TcxGridDBColumn
|
||||||
|
Caption = #22270#29255#19978#20256
|
||||||
|
DataBinding.FieldName = 'TPFlag'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBColumn
|
||||||
|
Caption = #20844#26020#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceKg'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Caption = #31859#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceM'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 54
|
||||||
|
end
|
||||||
|
object v1Column17: TcxGridDBColumn
|
||||||
|
Caption = #32769#32534#21495
|
||||||
|
DataBinding.FieldName = 'defstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#23494#24230
|
||||||
|
DataBinding.FieldName = 'defstr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Caption = #32463#32428#25467#24230
|
||||||
|
DataBinding.FieldName = 'defstr4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Caption = #25346#38057#25968
|
||||||
|
DataBinding.FieldName = 'defstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column24: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#26469#28304
|
||||||
|
DataBinding.FieldName = 'defnote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column25: TcxGridDBColumn
|
||||||
|
Caption = #26222#36890#26469#28304
|
||||||
|
DataBinding.FieldName = 'defnote4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column26: TcxGridDBColumn
|
||||||
|
Caption = #32553#29575
|
||||||
|
DataBinding.FieldName = 'price1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column27: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#36153
|
||||||
|
DataBinding.FieldName = 'Price2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column28: TcxGridDBColumn
|
||||||
|
Caption = #26579#36153
|
||||||
|
DataBinding.FieldName = 'price3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column29: TcxGridDBColumn
|
||||||
|
Caption = 'FOB'#36816#36153'+'#21253#35013
|
||||||
|
DataBinding.FieldName = 'price4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v1Column30: TcxGridDBColumn
|
||||||
|
Caption = #21518#21152#24037#36153
|
||||||
|
DataBinding.FieldName = 'price5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column31: TcxGridDBColumn
|
||||||
|
Caption = #21442#32771#20215
|
||||||
|
DataBinding.FieldName = 'price6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column32: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#38376#24133
|
||||||
|
DataBinding.FieldName = 'PBMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column33: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#20811#37325
|
||||||
|
DataBinding.FieldName = 'PBKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 2
|
||||||
|
Top = 412
|
||||||
|
Width = 1069
|
||||||
|
Height = 195
|
||||||
|
Align = alBottom
|
||||||
|
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||||
|
TabOrder = 1
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 2
|
||||||
|
Top = 14
|
||||||
|
Width = 1065
|
||||||
|
Height = 179
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvLowered
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryTree
|
||||||
|
Left = 91
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 909
|
||||||
|
Top = 17
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 877
|
||||||
|
Top = 17
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 456
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 451
|
||||||
|
Top = 155
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 429
|
||||||
|
Top = 185
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 392
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 392
|
||||||
|
Top = 152
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 424
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object ODPat: TOpenDialog
|
||||||
|
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||||
|
Left = 484
|
||||||
|
Top = 157
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 485
|
||||||
|
Top = 188
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
Left = 521
|
||||||
|
Top = 157
|
||||||
|
end
|
||||||
|
object adoqueryPicture: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 479
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
end
|
||||||
475
样品(YPGL.dll)/U_CPManageSel.pas
Normal file
475
样品(YPGL.dll)/U_CPManageSel.pas
Normal file
|
|
@ -0,0 +1,475 @@
|
||||||
|
unit U_CPManageSel;
|
||||||
|
|
||||||
|
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,jpeg,U_SLT;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPManageSel = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxDBTreeList1: TcxDBTreeList;
|
||||||
|
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOQueryTree: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
cxSplitter1: TcxSplitter;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label2: TLabel;
|
||||||
|
CYID: TEdit;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
ODPat: TOpenDialog;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
|
ToolButton7: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
CYName: TEdit;
|
||||||
|
CYEName: TEdit;
|
||||||
|
CYSpec: TEdit;
|
||||||
|
CYNO: TEdit;
|
||||||
|
Edit1: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
CYKZ: TEdit;
|
||||||
|
defstr1: TEdit;
|
||||||
|
Label13: TLabel;
|
||||||
|
ComboBox1: TComboBox;
|
||||||
|
Panel3: TPanel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column19: TcxGridDBColumn;
|
||||||
|
v1Column12: TcxGridDBColumn;
|
||||||
|
v1Column15: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1Column16: TcxGridDBColumn;
|
||||||
|
v1Column9: TcxGridDBColumn;
|
||||||
|
v1Column42: TcxGridDBColumn;
|
||||||
|
v1Column11: TcxGridDBColumn;
|
||||||
|
v1Column14: TcxGridDBColumn;
|
||||||
|
v1Column10: TcxGridDBColumn;
|
||||||
|
v1Column13: TcxGridDBColumn;
|
||||||
|
v1Column17: TcxGridDBColumn;
|
||||||
|
v1Column18: TcxGridDBColumn;
|
||||||
|
v1Column20: TcxGridDBColumn;
|
||||||
|
v1Column21: TcxGridDBColumn;
|
||||||
|
v1Column24: TcxGridDBColumn;
|
||||||
|
v1Column25: TcxGridDBColumn;
|
||||||
|
v1Column26: TcxGridDBColumn;
|
||||||
|
v1Column27: TcxGridDBColumn;
|
||||||
|
v1Column28: TcxGridDBColumn;
|
||||||
|
v1Column29: TcxGridDBColumn;
|
||||||
|
v1Column30: TcxGridDBColumn;
|
||||||
|
v1Column31: TcxGridDBColumn;
|
||||||
|
v1Column32: TcxGridDBColumn;
|
||||||
|
v1Column33: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
adoqueryPicture: TADOQuery;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure CYIDKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure CYNoChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure FormKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
procedure CYSpecChange(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
CPID:string;
|
||||||
|
PState:Integer;
|
||||||
|
FCPID,FTopID:String;
|
||||||
|
procedure InitTree();
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure ReadINIFile();
|
||||||
|
procedure InitImage();
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPManageSel: TfrmCPManageSel;
|
||||||
|
Mach: array of TfrmSlt;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.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);
|
||||||
|
|
||||||
|
try
|
||||||
|
with adoqueryPicture do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select A.TFID,A.WBID,A.FilesOther,B.FileName from TP_File A,XD_File B where A.TFID =B.XFID and A.WBID='+quotedstr(trim(CDS_Main.fieldbyname('CYID').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 TfrmCPManageSel.InitTree();
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
with ADOQueryTree do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from CP_Type order by CPlevel,CPOrder,CPName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
cxDBTreeList1.Items[0].Expand(false);
|
||||||
|
//cxDBTreeList1.Items[1].Expand(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.InitGrid();
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=True;
|
||||||
|
Panel2.Refresh;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('exec P_Select_CP_YDang :Code,:PState,:CYType');
|
||||||
|
Parameters.ParamByName('Code').Value:='';
|
||||||
|
Parameters.ParamByName('PState').Value:=0;
|
||||||
|
Parameters.ParamByName('CYType').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
Panel2.Visible:=False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPManageSel:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
var
|
||||||
|
i,j:integer;
|
||||||
|
begin
|
||||||
|
j:=length(Mach);
|
||||||
|
if j>0 then
|
||||||
|
begin
|
||||||
|
for i:=0 to j-1 do
|
||||||
|
begin
|
||||||
|
Mach[i].free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
SetLength(Mach, 0);
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'样品管理');
|
||||||
|
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
|
||||||
|
winexec('cmd /c rd /s /q D:\Right1209',sw_hide);
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmCPManageSel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel3.Align:=alclient;
|
||||||
|
InitTree();
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'样品管理');
|
||||||
|
//InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.CYIDKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_YDang where CYID='''+Trim(CYID.Text)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CPID:=Trim(ADOQueryTemp.fieldbyname('CYType').AsString);
|
||||||
|
if Trim(CYID.Text)='' then Exit;
|
||||||
|
SDofilter(ADOQueryMain,' CYID='''+Trim(CYID.Text)+''' ');
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
CYID.Text:='';
|
||||||
|
ADOQueryTree.Locate('CPID',CPID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.CYNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// if Length(Trim(CYNO.Text))<4 then Exit;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('样品档案',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.ToolButton4Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FFCYID:string;
|
||||||
|
DPS,i,j:Integer;
|
||||||
|
Txt,fImagePath:string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar:TMakebar;
|
||||||
|
Mixtext:TMixtext;
|
||||||
|
begin
|
||||||
|
CYID.SetFocus;
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
//if CDS_CYNO.IsEmpty then Exit;
|
||||||
|
IF trim(ComboBox1.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('样品标签不能为空!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if Trim(Edit1.Text)<>'' then
|
||||||
|
begin
|
||||||
|
if TryStrToInt(Edit1.Text,i)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('份数录入错误!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\'+trim(ComboBox1.Text)+'.rmf';
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
DPS:=0;
|
||||||
|
FFCYID:='';
|
||||||
|
i:=1;
|
||||||
|
if Trim(Edit1.Text)='' then
|
||||||
|
begin
|
||||||
|
j:=1;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
j:=StrToInt(Edit1.Text);
|
||||||
|
end;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.FieldByName('SSel').AsBoolean=True then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar:=GetProcAddress(Moudle,'Make');
|
||||||
|
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
||||||
|
Txt:=Trim(CDS_Main.fieldbyname('CYID').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;
|
||||||
|
RMVariables['QRBARCODE']:=fImagePath;
|
||||||
|
for i:=1 to j do
|
||||||
|
begin
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.PrintReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\样品标签.rmf'),'提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if DPS=0 then
|
||||||
|
begin
|
||||||
|
FFCYID:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//CDS_Main.Locate('CYID',Trim(CDS_CYNO.fieldbyname('CYID').AsString),[]);
|
||||||
|
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
CDS_Main.Locate('CYID',FFCYID,[]);
|
||||||
|
Edit1.Text:='1';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.ReadINIFile();
|
||||||
|
var
|
||||||
|
programIni:Tinifile; //配置文件名
|
||||||
|
FileName:string;
|
||||||
|
begin
|
||||||
|
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||||
|
programIni:=Tinifile.create(FileName);
|
||||||
|
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||||
|
programIni.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
{ with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').asstring)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CPID:=Trim(ADOQueryTemp.fieldbyname('CYType').AsString);
|
||||||
|
ADOQueryTree.Locate('CPID',CPID,[]); }
|
||||||
|
initimage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.FormKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
{if Key= then
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定6666要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_Main.fieldbyname('CYID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.CYSpecChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// if Length(Trim(CYSpec.Text))<3 then Exit;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
183
样品(YPGL.dll)/U_CPType.dfm
Normal file
183
样品(YPGL.dll)/U_CPType.dfm
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
object frmCPType: TfrmCPType
|
||||||
|
Left = 281
|
||||||
|
Top = 184
|
||||||
|
Width = 870
|
||||||
|
Height = 505
|
||||||
|
Caption = #20135#21697#31867#21035
|
||||||
|
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 = 862
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object 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 TBClose: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxDBTreeList1: TcxDBTreeList
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 249
|
||||||
|
Height = 435
|
||||||
|
Align = alLeft
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
end>
|
||||||
|
BufferedPaint = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.ParentField = 'CPParent'
|
||||||
|
DataController.KeyField = 'CPID'
|
||||||
|
OptionsBehavior.ExpandOnDblClick = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.CellAutoHeight = True
|
||||||
|
OptionsView.Headers = False
|
||||||
|
RootValue = -1
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxDBTreeList1Click
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
Width = 210
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 270
|
||||||
|
Top = 54
|
||||||
|
Width = 315
|
||||||
|
Height = 150
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 24
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #29238' '#31867
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 65
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#21035#21517#31216
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 105
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#21035#32534#30721
|
||||||
|
end
|
||||||
|
object CPTopName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 21
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object CPName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 61
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnKeyPress = CPNameKeyPress
|
||||||
|
end
|
||||||
|
object CPNo: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 101
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryTree
|
||||||
|
Left = 91
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 709
|
||||||
|
Top = 209
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 677
|
||||||
|
Top = 137
|
||||||
|
end
|
||||||
|
end
|
||||||
239
样品(YPGL.dll)/U_CPType.pas
Normal file
239
样品(YPGL.dll)/U_CPType.pas
Normal file
|
|
@ -0,0 +1,239 @@
|
||||||
|
unit U_CPType;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPType = 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;
|
||||||
|
CPTopName: TEdit;
|
||||||
|
CPName: TEdit;
|
||||||
|
CPNo: TEdit;
|
||||||
|
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 CPNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
PState:Integer;
|
||||||
|
FCPID,FTopID:String;
|
||||||
|
procedure InitTree();
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPType: TfrmCPType;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPType.InitTree();
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
with ADOQueryTree do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from CP_Type order by CPlevel,CPOrder,CPName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
cxDBTreeList1.Items[0].Expand(false);
|
||||||
|
//cxDBTreeList1.Items[1].Expand(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPType:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PState:=11;
|
||||||
|
CPTopName.Text:=Trim(ADOQueryTree.fieldbyname('CPName').AsString);
|
||||||
|
//FTopID:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
FCPID:='';
|
||||||
|
CPName.Text:='';
|
||||||
|
CPNo.Text:='';
|
||||||
|
CPName.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.cxDBTreeList1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PState:=22;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_Type where CPID='''+Trim(ADOQueryTree.fieldbyname('CPParent').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
FCPID:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
CPTopName.Text:=Trim(ADOQueryTemp.fieldbyname('CPName').AsString);
|
||||||
|
CPName.Text:=Trim(ADOQueryTree.fieldbyname('CPName').AsString);
|
||||||
|
CPNo.Text:=Trim(ADOQueryTree.fieldbyname('CPNo').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.ToolButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxId:String;
|
||||||
|
begin
|
||||||
|
if Trim(CPName.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('类别名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(CPNo.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('类别编码不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if PState=11 then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'CP','CP_Type',4,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 CP_Type where CPID='''+Trim(FCPID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if PState=11 then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CPID').Value:=Trim(maxId);
|
||||||
|
FieldByName('CPName').Value:=Trim(CPName.Text);
|
||||||
|
FieldByName('CPNo').Value:=Trim(CPNo.Text);
|
||||||
|
FieldByName('CPParent').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
FieldByName('CPLevel').Value:=ADOQueryTree.fieldbyname('CPLevel').AsInteger+1;
|
||||||
|
Post;
|
||||||
|
end else
|
||||||
|
if PState=22 then
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('CPID').Value:=Trim(maxId);
|
||||||
|
FieldByName('CPName').Value:=Trim(CPName.Text);
|
||||||
|
FieldByName('CPNo').Value:=Trim(CPNo.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 TfrmCPType.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTree.FieldByName('CPLevel').AsInteger=0 then Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_Type where CPParent='''+Trim(ADOQueryTree.fieldbyname('CPID').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已经定义子类不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_YDang where CYType='''+Trim(ADOQueryTree.fieldbyname('CPID').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 CP_Type where CPID='''+Trim(ADOQueryTree.fieldbyname('CPID').AsString)+'''');
|
||||||
|
sql.Add('delete CP_Type where CPParent='''+Trim(ADOQueryTree.fieldbyname('CPID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.CPNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
CPNo.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPType.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
513
样品(YPGL.dll)/U_ClothContractInPut.dfm
Normal file
513
样品(YPGL.dll)/U_ClothContractInPut.dfm
Normal file
|
|
@ -0,0 +1,513 @@
|
||||||
|
object frmClothContractInPut: TfrmClothContractInPut
|
||||||
|
Left = 198
|
||||||
|
Top = 87
|
||||||
|
Width = 829
|
||||||
|
Height = 625
|
||||||
|
Caption = #22383#24067#35746#36141#21512#21516#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 821
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_OrderManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 29
|
||||||
|
Width = 821
|
||||||
|
Height = 281
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvNone
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Ctl3D = False
|
||||||
|
ParentCtl3D = False
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 15
|
||||||
|
Width = 66
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746' '#21333' '#21495#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 617
|
||||||
|
Top = 15
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #20132#36135#26085#26399#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 312
|
||||||
|
Top = 16
|
||||||
|
Width = 66
|
||||||
|
Height = 12
|
||||||
|
Caption = #22383' '#24067' '#21378#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 46
|
||||||
|
Top = 53
|
||||||
|
Width = 13
|
||||||
|
Height = 84
|
||||||
|
Caption = #20184#13#10#13#10#27454#13#10#13#10#26041#13#10#13#10#24335
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 425
|
||||||
|
Top = 53
|
||||||
|
Width = 13
|
||||||
|
Height = 84
|
||||||
|
Caption = #20132#13#10#13#10#26399#13#10#13#10#35201#13#10#13#10#27714
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 46
|
||||||
|
Top = 165
|
||||||
|
Width = 13
|
||||||
|
Height = 84
|
||||||
|
Caption = #36136#13#10#13#10#37327#13#10#13#10#26631#13#10#13#10#20934
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 165
|
||||||
|
Width = 26
|
||||||
|
Height = 84
|
||||||
|
Caption = #35299#20915#13#10#13#10#21512#21516#13#10#13#10#32416#32439#13#10#13#10#26041#24335
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Left = 86
|
||||||
|
Top = 13
|
||||||
|
Width = 100
|
||||||
|
Height = 18
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DeliveryDate: TDateTimePicker
|
||||||
|
Left = 679
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
BevelInner = bvNone
|
||||||
|
Date = 40916.670856296290000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40916.670856296290000000
|
||||||
|
ShowCheckbox = True
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object FactoryNoName: TcxButtonEdit
|
||||||
|
Left = 375
|
||||||
|
Top = 10
|
||||||
|
Hint = 'FactoryNo'
|
||||||
|
BeepOnEnter = False
|
||||||
|
ParentShowHint = False
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = FactoryNoNamePropertiesButtonClick
|
||||||
|
Properties.OnChange = FactoryNoNamePropertiesChange
|
||||||
|
ShowHint = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnKeyDown = PRTCodeNameKeyDown
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object ConTK1: TRichEdit
|
||||||
|
Left = 86
|
||||||
|
Top = 48
|
||||||
|
Width = 291
|
||||||
|
Height = 98
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object ConTK2: TRichEdit
|
||||||
|
Left = 472
|
||||||
|
Top = 48
|
||||||
|
Width = 305
|
||||||
|
Height = 98
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object ConTK3: TRichEdit
|
||||||
|
Left = 86
|
||||||
|
Top = 160
|
||||||
|
Width = 291
|
||||||
|
Height = 98
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object ConTK4: TRichEdit
|
||||||
|
Left = 472
|
||||||
|
Top = 160
|
||||||
|
Width = 305
|
||||||
|
Height = 98
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object PanZDY: TPanel
|
||||||
|
Left = 617
|
||||||
|
Top = 112
|
||||||
|
Width = 202
|
||||||
|
Height = 153
|
||||||
|
TabOrder = 7
|
||||||
|
Visible = False
|
||||||
|
object CXGridZDY: TcxGrid
|
||||||
|
Left = 3
|
||||||
|
Top = 4
|
||||||
|
Width = 197
|
||||||
|
Height = 113
|
||||||
|
TabOrder = 0
|
||||||
|
object TVZDY: TcxGridDBTableView
|
||||||
|
OnKeyPress = TVZDYKeyPress
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellDblClick = TVZDYCellDblClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object VHelpZDYName: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'ZDYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 163
|
||||||
|
IsCaptionAssigned = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CXGridZDYLevel1: TcxGridLevel
|
||||||
|
GridView = TVZDY
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 64
|
||||||
|
Top = 120
|
||||||
|
Width = 65
|
||||||
|
Height = 25
|
||||||
|
Caption = #20851#38381
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 310
|
||||||
|
Width = 821
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
EdgeInner = esNone
|
||||||
|
EdgeOuter = esNone
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_OrderManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 2
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 339
|
||||||
|
Width = 821
|
||||||
|
Height = 249
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1Column1
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column1PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #38754#26009#35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1PRTColor: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#20811#37325
|
||||||
|
DataBinding.FieldName = 'KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325#21333#20301
|
||||||
|
DataBinding.FieldName = 'KZUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1PRTMFPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 64
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #21487#35009#21098#38376#24133
|
||||||
|
DataBinding.FieldName = 'MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v1OrderQty: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133#21333#20301
|
||||||
|
DataBinding.FieldName = 'MFUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1OrderQtyPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 51
|
||||||
|
end
|
||||||
|
object v1ClothQty: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1ClothQtyPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1ClothUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column2PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #24635#20215
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOTemp: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 125
|
||||||
|
end
|
||||||
|
object ADOCmd: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 624
|
||||||
|
Top = 157
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Sub
|
||||||
|
Left = 344
|
||||||
|
Top = 376
|
||||||
|
end
|
||||||
|
object Order_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 384
|
||||||
|
Top = 376
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ADOZDY
|
||||||
|
Left = 240
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOZDY: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 280
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object CDS_ZDY: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 208
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 576
|
||||||
|
Top = 173
|
||||||
|
end
|
||||||
|
end
|
||||||
580
样品(YPGL.dll)/U_ClothContractInPut.pas
Normal file
580
样品(YPGL.dll)/U_ClothContractInPut.pas
Normal file
|
|
@ -0,0 +1,580 @@
|
||||||
|
unit U_ClothContractInPut;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, cxMemo, cxRichEdit, ComCtrls, cxContainer,
|
||||||
|
cxTextEdit, cxMaskEdit, cxButtonEdit, StdCtrls, ToolWin, DBClient, ADODB,
|
||||||
|
ExtCtrls, BtnEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractInPut = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBSave: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
Label1: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
DeliveryDate: TDateTimePicker;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTColor: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1OrderQty: TcxGridDBColumn;
|
||||||
|
v1ClothQty: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1ClothUnit: TcxGridDBColumn;
|
||||||
|
ADOTemp: TADOQuery;
|
||||||
|
ADOCmd: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Order_Sub: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
ADOZDY: TADOQuery;
|
||||||
|
CDS_ZDY: TClientDataSet;
|
||||||
|
FactoryNoName: TcxButtonEdit;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
ConTK1: TRichEdit;
|
||||||
|
ConTK2: TRichEdit;
|
||||||
|
ConTK3: TRichEdit;
|
||||||
|
ConTK4: TRichEdit;
|
||||||
|
PanZDY: TPanel;
|
||||||
|
CXGridZDY: TcxGrid;
|
||||||
|
TVZDY: TcxGridDBTableView;
|
||||||
|
VHelpZDYName: TcxGridDBColumn;
|
||||||
|
CXGridZDYLevel1: TcxGridLevel;
|
||||||
|
Button1: TButton;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TVZDYCellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure Button1Click(Sender: TObject);
|
||||||
|
procedure PRTCodeNameKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
procedure TVZDYKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBSaveClick(Sender: TObject);
|
||||||
|
procedure v1OrderUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1PRTUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1PRTColorPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure FactoryNoNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1Column1PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1PRTMFPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1OrderQtyPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1ClothQtyPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1Column2PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure FactoryNoNamePropertiesChange(Sender: TObject);
|
||||||
|
private
|
||||||
|
FXS:Integer;
|
||||||
|
procedure InitData();
|
||||||
|
procedure ZDYHelp(FButn:TcxButtonEdit;LType:string);
|
||||||
|
function SaveData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
PState:Integer;
|
||||||
|
FMainId:String;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractInPut: TfrmClothContractInPut;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_ZDYHelp,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.InitData();
|
||||||
|
begin
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
if PState=1 then
|
||||||
|
begin
|
||||||
|
ADOQuery1.Parameters.ParamByName('MainId').Value:=Trim(FMainId);
|
||||||
|
ADOQuery1.Parameters.ParamByName('WSQl').Value:='';
|
||||||
|
end;
|
||||||
|
if PState=0 then
|
||||||
|
begin
|
||||||
|
ADOQuery1.Parameters.ParamByName('MainId').Value:=Trim(FMainId);
|
||||||
|
ADOQuery1.Parameters.ParamByName('WSql').Value:=' and 1<>1 ';
|
||||||
|
end;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQuery1,Order_Sub);
|
||||||
|
SInitCDSData20(ADOQuery1,Order_Sub);
|
||||||
|
SCSHData(ADOQuery1,ScrollBox1,0);
|
||||||
|
if PState=0 then
|
||||||
|
begin
|
||||||
|
with ADOTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select Top 1* from Contract_Main order by FillTime desc ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ConTK1.Text:=ADOTemp.fieldbyname('ConTK1').AsString;
|
||||||
|
ConTK2.Text:=ADOTemp.fieldbyname('ConTK2').AsString;
|
||||||
|
ConTK3.Text:=ADOTemp.fieldbyname('ConTK3').AsString;
|
||||||
|
ConTK4.Text:=ADOTemp.fieldbyname('ConTK4').AsString;
|
||||||
|
end;
|
||||||
|
PanZDY.Visible:=False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.ZDYHelp(FButn:TcxButtonEdit;LType:string);
|
||||||
|
var
|
||||||
|
FType,ZDYName,FText:String;
|
||||||
|
begin
|
||||||
|
PanZDY.Visible:=True;
|
||||||
|
PanZDY.Left:=FButn.Left;
|
||||||
|
PanZDY.Top:=FButn.Top+FButn.Height;
|
||||||
|
with ADOZDY do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select RTrim(ZDYNo) ZDYNo,RTrim(ZDYName) ZDYName from KH_ZDY where Type='''+Trim(LType)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
FText:=Trim(FButn.Text);
|
||||||
|
if FText<>'' then
|
||||||
|
SDofilter(ADOZDY,' ZDYName like '+QuotedStr('%'+Trim(FText)+'%'))
|
||||||
|
else
|
||||||
|
SDofilter(ADOZDY,'');
|
||||||
|
VHelpZDYName.Summary.GroupFormat:=Trim(FButn.Name);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.TVZDYCellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
var
|
||||||
|
FName:string;
|
||||||
|
begin
|
||||||
|
if ADOZDY.IsEmpty then Exit;
|
||||||
|
FName:=Trim(VHelpZDYName.Summary.GroupFormat);
|
||||||
|
TcxButtonEdit(FindComponent(FName)).Text:=Trim(ADOZDY.fieldbyname('ZDYName').AsString);
|
||||||
|
TcxButtonEdit(FindComponent(FName)).Hint:=Trim(ADOZDY.fieldbyname('ZDYNO').AsString);
|
||||||
|
PanZDY.Visible:=False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.Button1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PanZDY.Visible:=False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.PRTCodeNameKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
if (key=vk_return) or (Key=vk_Down) then
|
||||||
|
begin
|
||||||
|
if ADOZDY.Active then
|
||||||
|
CXGridZDY.SetFocus;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.TVZDYKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
if ADOZDY.IsEmpty then Exit;
|
||||||
|
TcxButtonEdit(FindComponent(VHelpZDYName.Summary.GroupFormat)).Text:=Trim(ADOZDY.fieldbyname('ZDYName').AsString);
|
||||||
|
TcxButtonEdit(FindComponent(VHelpZDYName.Summary.GroupFormat)).Hint:=Trim(ADOZDY.fieldbyname('ZDYNO').AsString);
|
||||||
|
PanZDY.Visible:=False;
|
||||||
|
ADOZDY.Active:=False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Trim(DParameters1)='1' then
|
||||||
|
begin
|
||||||
|
v1Price.Visible:=False;
|
||||||
|
v1ClothQty.Visible:=False;
|
||||||
|
v1PRTQty.Visible:=False;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
v1Price.Visible:=True;
|
||||||
|
v1ClothQty.Visible:=True;
|
||||||
|
v1PRTQty.Visible:=True;
|
||||||
|
end;
|
||||||
|
InitData();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractInPut.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxno:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOCmd.Connection.BeginTrans;
|
||||||
|
///保存主表
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from Contract_Main where MainId='''+Trim(FMainId)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FMainId)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
if GetLSNo(ADOTemp,maxno,'CM','Contract_Main',2,1)=False then
|
||||||
|
begin
|
||||||
|
ADOCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('生成流水号异常!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
maxno:=Trim(FMainId);
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('MainId').Value:=Trim(maxno);
|
||||||
|
SSetsaveSql(ADOCmd,'Contract_Main',ScrollBox1,0);
|
||||||
|
if Trim(FMainId)='' then
|
||||||
|
begin
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('EditTime').Value:=SGetServerDateTime(ADOTemp);
|
||||||
|
end;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
FMainId:=Trim(maxno);
|
||||||
|
///保存子表
|
||||||
|
with Order_Sub do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if Trim(Order_Sub.fieldbyname('SubId').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOTemp,maxno,'CS','Contract_Sub',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取子流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(Order_Sub.fieldbyname('SubId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId='''+Trim(FMainId)+'''');
|
||||||
|
sql.Add(' and SubId='''+Trim(maxno)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
if Trim(Order_Sub.fieldbyname('SubId').AsString)='' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MainId').Value:=Trim(FMainId);
|
||||||
|
FieldByName('SubId').Value:=Trim(maxno);
|
||||||
|
SSetSaveDataCDSNew(ADOCmd,Tv1,Order_Sub,'Contract_Sub',0);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Order_Sub.Edit;
|
||||||
|
Order_Sub.FieldByName('SubId').Value:=Trim(maxno);
|
||||||
|
//Order_Sub.Post;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=False;
|
||||||
|
ADOCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.TBSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DeliveryDate.SetFocus;
|
||||||
|
if Trim(ConNo.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('订单编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(FactoryNoName.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('坯布厂不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Order_Sub.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('明细不能为空!','提示',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1OrderUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='OrdUnit';
|
||||||
|
flagname:='单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('OrderUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1PRTUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='OrdUnit';
|
||||||
|
flagname:='单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('PRTUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1PRTColorPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='OrdColor';
|
||||||
|
flagname:='颜色';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('PRTColor').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with Order_Sub do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Sub.IsEmpty then Exit;
|
||||||
|
if Trim(Order_Sub.fieldbyname('SubId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
with ADOCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId='''+Trim(Order_Sub.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Order_Sub.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.FactoryNoNamePropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='FactoryNo1Name';
|
||||||
|
flagname:='坯布厂名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
FXS:=99;
|
||||||
|
FactoryNoName.Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
FactoryNoName.Hint:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1Column1PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='Cloth';
|
||||||
|
flagname:='坯布名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('C_CodeName').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.Order_Sub.FieldByName('C_Code').Value:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1PRTMFPropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='KZ';
|
||||||
|
flagname:='克重单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('KZUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1OrderQtyPropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='MF';
|
||||||
|
flagname:='门幅单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('MFUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1ClothQtyPropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='PriceUnit';
|
||||||
|
flagname:='计价单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('PriceUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.v1Column2PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='OrdUnit';
|
||||||
|
flagname:='单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.Order_Sub.Edit;
|
||||||
|
Self.Order_Sub.FieldByName('C_Unit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractInPut.FactoryNoNamePropertiesChange(
|
||||||
|
Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FXS=99 then
|
||||||
|
begin
|
||||||
|
PanZDY.Visible:=False;
|
||||||
|
FXS:=0;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
ZDYHelp(FactoryNoName,'FactoryNo1Name');
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
672
样品(YPGL.dll)/U_ClothContractList.dfm
Normal file
672
样品(YPGL.dll)/U_ClothContractList.dfm
Normal file
|
|
@ -0,0 +1,672 @@
|
||||||
|
object frmClothContractList: TfrmClothContractList
|
||||||
|
Left = 113
|
||||||
|
Top = 123
|
||||||
|
Width = 1280
|
||||||
|
Height = 554
|
||||||
|
Caption = #22383#24067#37319#36141#21512#21516
|
||||||
|
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 = 1272
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_OrderManage.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
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
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
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
Width = 48
|
||||||
|
Caption = 'ToolButton6'
|
||||||
|
ImageIndex = 115
|
||||||
|
Style = tbsSeparator
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 489
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 552
|
||||||
|
Top = 0
|
||||||
|
Width = 41
|
||||||
|
Caption = 'ToolButton1'
|
||||||
|
ImageIndex = 60
|
||||||
|
Style = tbsSeparator
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 593
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 656
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 719
|
||||||
|
Top = 0
|
||||||
|
Caption = #21040#22383#30830#23450
|
||||||
|
ImageIndex = 113
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 802
|
||||||
|
Top = 0
|
||||||
|
Caption = #22383#24067#23433#25490
|
||||||
|
ImageIndex = 114
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1272
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
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 = 15
|
||||||
|
Width = 18
|
||||||
|
Height = 12
|
||||||
|
Caption = '---'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 283
|
||||||
|
Top = 15
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#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 = 430
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 574
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #38754#26009#35268#26684
|
||||||
|
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 = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 179
|
||||||
|
Top = 11
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 323
|
||||||
|
Top = 11
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_CodeNameM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 459
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 627
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = -172
|
||||||
|
Top = 112
|
||||||
|
Width = 1366
|
||||||
|
Height = 369
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 777
|
||||||
|
Height = 369
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||||
|
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
|
||||||
|
Styles.Inactive = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.IncSearch = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.Selection = DataLink_OrderManage.cxBlue
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#21378
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #38754#26009#35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #21487#35009#38376#24133
|
||||||
|
DataBinding.FieldName = 'MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133#21333#20301
|
||||||
|
DataBinding.FieldName = 'MFUnit'
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#20811#37325
|
||||||
|
DataBinding.FieldName = 'KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1ClothUnit: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325#21333#20301
|
||||||
|
DataBinding.FieldName = 'KZUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object v1PRTUnit: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Caption = #24635#20215
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 785
|
||||||
|
Top = 0
|
||||||
|
Width = 320
|
||||||
|
Height = 369
|
||||||
|
Align = alRight
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv2MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellClick = Tv2CellClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2MxQty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.IncSearch = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.Selection = DataLink_OrderManage.cxBlue
|
||||||
|
object v2ComeDate: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'ComeDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2BatchNo: TcxGridDBColumn
|
||||||
|
Caption = #25209#21495
|
||||||
|
DataBinding.FieldName = 'BatchNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 44
|
||||||
|
end
|
||||||
|
object v2MxQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'MxQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 48
|
||||||
|
end
|
||||||
|
object v2MxNote: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'MxNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2Level1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid3: TcxGrid
|
||||||
|
Left = 1113
|
||||||
|
Top = 0
|
||||||
|
Width = 253
|
||||||
|
Height = 369
|
||||||
|
Align = alRight
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv3: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv3MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource3
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object cxGridDBColumn1: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#32534#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = cxGridDBColumn1PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v3Column1: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'PRTCodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_OrderManage.handBlack
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object cxPRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517'/'#35268#26684
|
||||||
|
DataBinding.FieldName = 'PRTSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object cxGridDBPRTColor: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'PRTColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 36
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter1: TcxSplitter
|
||||||
|
Left = 1105
|
||||||
|
Top = 0
|
||||||
|
Width = 8
|
||||||
|
Height = 369
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
AlignSplitter = salRight
|
||||||
|
Control = cxGrid3
|
||||||
|
end
|
||||||
|
object cxSplitter2: TcxSplitter
|
||||||
|
Left = 777
|
||||||
|
Top = 0
|
||||||
|
Width = 8
|
||||||
|
Height = 369
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
AlignSplitter = salRight
|
||||||
|
Control = cxGrid2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 656
|
||||||
|
Top = 96
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 640
|
||||||
|
Top = 72
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 672
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 704
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 96
|
||||||
|
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 = Order_Main
|
||||||
|
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
|
||||||
|
end
|
||||||
652
样品(YPGL.dll)/U_ClothContractList.pas
Normal file
652
样品(YPGL.dll)/U_ClothContractList.pas
Normal file
|
|
@ -0,0 +1,652 @@
|
||||||
|
unit U_ClothContractList;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractList = 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;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1ClothUnit: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PRTUnit: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2ComeDate: TcxGridDBColumn;
|
||||||
|
v2BatchNo: TcxGridDBColumn;
|
||||||
|
v2MxQty: TcxGridDBColumn;
|
||||||
|
v2MxNote: TcxGridDBColumn;
|
||||||
|
cxGrid2Level1: TcxGridLevel;
|
||||||
|
cxGrid3: TcxGrid;
|
||||||
|
Tv3: TcxGridDBTableView;
|
||||||
|
cxGridDBColumn1: TcxGridDBColumn;
|
||||||
|
cxPRTSpec: TcxGridDBColumn;
|
||||||
|
cxGridDBPRTColor: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v3Column1: TcxGridDBColumn;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
cxSplitter1: TcxSplitter;
|
||||||
|
cxSplitter2: TcxSplitter;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
v2Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
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 ToolButton2Click(Sender: TObject);
|
||||||
|
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure Tv2CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt:Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractList: TfrmClothContractList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_ClothContractInPut,U_Fun,U_ProductOrderList;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align:=alClient;
|
||||||
|
//BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp)-7;
|
||||||
|
//EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('坯布合同订单列表',Tv1,'指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain 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))+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid('坯布合同订单列表',Tv1,'指示单管理');
|
||||||
|
if Trim(DParameters1)='1' then
|
||||||
|
begin
|
||||||
|
TBPrint.Visible:=False;
|
||||||
|
v1Column1.Visible:=False;
|
||||||
|
v1Column1.Hidden:=True;
|
||||||
|
v1PRTUnit.Visible:=False;
|
||||||
|
v1PRTUnit.Hidden:=True;
|
||||||
|
v1PRTQty.Visible:=False;
|
||||||
|
v1PRTQty.Hidden:=True;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
v1Column1.Visible:=True;
|
||||||
|
v1Column1.Hidden:=False;
|
||||||
|
v1PRTUnit.Visible:=True;
|
||||||
|
v1PRTUnit.Hidden:=False;
|
||||||
|
v1PRTQty.Visible:=True;
|
||||||
|
v1PRTQty.Hidden:=False;
|
||||||
|
TBPrint.Visible:=True;
|
||||||
|
end;
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.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.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmClothContractInPut:=TfrmClothContractInPut.Create(Application);
|
||||||
|
with frmClothContractInPut do
|
||||||
|
begin
|
||||||
|
PState:=1;
|
||||||
|
FMainId:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
//TBRafresh.Click;
|
||||||
|
//TBFind.Click;
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractList.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
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.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\坯布订购合同.rmf' ;
|
||||||
|
FConNoM:=Trim(Order_Main.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.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractInPut:=TfrmClothContractInPut.Create(Application);
|
||||||
|
with frmClothContractInPut do
|
||||||
|
begin
|
||||||
|
PState:=0;
|
||||||
|
FMainId:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.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.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
ClientDataSet2.Append;
|
||||||
|
ClientDataSet2.Post;
|
||||||
|
end else
|
||||||
|
if FInt=3 then
|
||||||
|
begin
|
||||||
|
ClientDataSet3.Append;
|
||||||
|
ClientDataSet3.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.Tv1FocusedRecordChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||||
|
AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from Contract_Sub_Mx where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||||
|
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select A.*,B.PRTSpec,B.PRTColor,C.PRTCodeName,C.OrderNo from Contract_Sub_MxTo A inner join Order_Sub B on A.OrdSubId=B.SubId');
|
||||||
|
SQL.Add(' inner join Order_Main C on C.MainId=B.MainId ');
|
||||||
|
sql.Add('where A.MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
SInitCDSData20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.Tv2MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.Tv1MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.Tv3MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=3;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.ToolButton4Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.Locate('ComeDate',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货日期不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet2.Locate('BatchNo',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('批号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet2.Locate('MxQty',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存明细表
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'MX','Contract_Sub_Mx',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取明细流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet2.fieldbyname('MXId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_Mx where MxId='''+Trim(ClientDataSet2.fieldbyname('MXId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value:=Trim(maxno);
|
||||||
|
FieldByName('SubId').Value:=Trim(Order_Main.fieldbyname('SubId').AsString);
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd,Tv2,ClientDataSet2,'Contract_Sub_Mx',0);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').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.cxGridDBColumn1PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductOrderList:=TfrmProductOrderList.Create(Application);
|
||||||
|
with frmProductOrderList do
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
frmProductOrderList.TBAdd.Visible:=False;
|
||||||
|
frmProductOrderList.TBEdit.Visible:=False;
|
||||||
|
frmProductOrderList.TBDel.Visible:=False;
|
||||||
|
frmProductOrderList.TBExport.Visible:=False;
|
||||||
|
frmProductOrderList.TBPrint.Visible:=False;
|
||||||
|
frmProductOrderList.TBTP.Visible:=False;
|
||||||
|
frmProductOrderList.cxGrid2.Visible:=False;
|
||||||
|
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('OrdSubId').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('SubId').AsString);
|
||||||
|
FieldByName('OrderNo').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('OrderNo').AsString);
|
||||||
|
FieldByName('PRTCodeName').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('PRTCodeName').AsString);
|
||||||
|
FieldByName('PRTSpec').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('PRTSpec').AsString);
|
||||||
|
FieldByName('PRTColor').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('PRTColor').AsString);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductOrderList.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.Tv2CellClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select A.*,B.PRTSpec,B.PRTColor,C.PRTCodeName,C.OrderNo from Contract_Sub_MxTo A inner join Order_Sub B on A.OrdSubId=B.SubId');
|
||||||
|
SQL.Add(' inner join Order_Main C on C.MainId=B.MainId ');
|
||||||
|
sql.Add('where A.MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
SInitCDSData20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList.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);
|
||||||
|
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.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
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;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
587
样品(YPGL.dll)/U_ClothContractPay.dfm
Normal file
587
样品(YPGL.dll)/U_ClothContractPay.dfm
Normal file
|
|
@ -0,0 +1,587 @@
|
||||||
|
object frmClothContractPay: TfrmClothContractPay
|
||||||
|
Left = -6
|
||||||
|
Top = 129
|
||||||
|
Width = 1292
|
||||||
|
Height = 554
|
||||||
|
Caption = #22383#24067#23545#36134#21333
|
||||||
|
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 = 1284
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_OrderManage.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 TBExport: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #22383#24067#20184#27454
|
||||||
|
ImageIndex = 113
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 272
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 335
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 398
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 461
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1284
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
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 = 15
|
||||||
|
Width = 18
|
||||||
|
Height = 12
|
||||||
|
Caption = '---'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 283
|
||||||
|
Top = 15
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#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 = 430
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 574
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #38754#26009#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 = 734
|
||||||
|
Top = 15
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #22383#24067#21378
|
||||||
|
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 = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 179
|
||||||
|
Top = 11
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 323
|
||||||
|
Top = 11
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_CodeNameM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 459
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 627
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 787
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = -172
|
||||||
|
Top = 112
|
||||||
|
Width = 1366
|
||||||
|
Height = 369
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1083
|
||||||
|
Height = 369
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||||
|
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
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column5
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column4
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column9
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.IncSearch = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.Selection = DataLink_OrderManage.cxBlue
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#21378
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #38754#26009#35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #21487#35009#38376#24133
|
||||||
|
DataBinding.FieldName = 'MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133#21333#20301
|
||||||
|
DataBinding.FieldName = 'MFUnit'
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#20811#37325
|
||||||
|
DataBinding.FieldName = 'KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1ClothUnit: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325#21333#20301
|
||||||
|
DataBinding.FieldName = 'KZUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PQty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 64
|
||||||
|
end
|
||||||
|
object v1PRTUnit: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Caption = #24635#20215
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #25209#21495
|
||||||
|
DataBinding.FieldName = 'BatchNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 55
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#25968#37327
|
||||||
|
DataBinding.FieldName = 'MxQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'ComeDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Caption = #23454#38469#37329#39069
|
||||||
|
DataBinding.FieldName = 'SJMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 1091
|
||||||
|
Top = 0
|
||||||
|
Width = 275
|
||||||
|
Height = 369
|
||||||
|
Align = alRight
|
||||||
|
TabOrder = 1
|
||||||
|
Visible = False
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv2MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellClick = Tv2CellClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_OrderManage.SkyBlue
|
||||||
|
Styles.IncSearch = DataLink_OrderManage.SkyBlue
|
||||||
|
Styles.Selection = DataLink_OrderManage.SkyBlue
|
||||||
|
object v2ComeDate: TcxGridDBColumn
|
||||||
|
Caption = #20184#27454#26085#26399
|
||||||
|
DataBinding.FieldName = 'ComeDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2BatchNo: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#21378
|
||||||
|
DataBinding.FieldName = 'BatchNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Qty1: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 44
|
||||||
|
end
|
||||||
|
object v2MxNote: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'MxNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2Level1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter2: TcxSplitter
|
||||||
|
Left = 1083
|
||||||
|
Top = 0
|
||||||
|
Width = 8
|
||||||
|
Height = 369
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
AlignSplitter = salRight
|
||||||
|
Control = cxGrid2
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 648
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 576
|
||||||
|
Top = 80
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 80
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 512
|
||||||
|
Top = 80
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 480
|
||||||
|
Top = 80
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 544
|
||||||
|
Top = 80
|
||||||
|
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
|
||||||
|
end
|
||||||
472
样品(YPGL.dll)/U_ClothContractPay.pas
Normal file
472
样品(YPGL.dll)/U_ClothContractPay.pas
Normal file
|
|
@ -0,0 +1,472 @@
|
||||||
|
unit U_ClothContractPay;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractPay = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: 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;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1ClothUnit: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PRTUnit: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2ComeDate: TcxGridDBColumn;
|
||||||
|
v2BatchNo: TcxGridDBColumn;
|
||||||
|
v2MxNote: TcxGridDBColumn;
|
||||||
|
cxGrid2Level1: TcxGridLevel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
cxSplitter2: TcxSplitter;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
v2Qty1: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
v1Column9: TcxGridDBColumn;
|
||||||
|
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 TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ConNoMChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||||
|
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure Tv2CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt:Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractPay: TfrmClothContractPay;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_ClothContractInPut,U_Fun,U_ProductOrderList;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractPay:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align:=alClient;
|
||||||
|
//BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp)-7;
|
||||||
|
//EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('坯布合同对账单',Tv1,'指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryPayList :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))+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid('坯布合同对账单',Tv1,'指示单管理');
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.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;
|
||||||
|
|
||||||
|
function TfrmClothContractPay.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
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 TfrmClothContractPay.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('坯布合同对账单',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.TBPrintClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.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 TfrmClothContractPay.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
ClientDataSet2.Append;
|
||||||
|
ClientDataSet2.Post;
|
||||||
|
end else
|
||||||
|
if FInt=3 then
|
||||||
|
begin
|
||||||
|
ClientDataSet3.Append;
|
||||||
|
ClientDataSet3.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.Tv1FocusedRecordChanged(
|
||||||
|
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||||
|
AFocusedRecord: TcxCustomGridRecord;
|
||||||
|
ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from Contract_Sub_Mx where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||||
|
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select A.*,B.PRTSpec,B.PRTColor,C.PRTCodeName,C.OrderNo from Contract_Sub_MxTo A inner join Order_Sub B on A.OrdSubId=B.SubId');
|
||||||
|
SQL.Add(' inner join Order_Main C on C.MainId=B.MainId ');
|
||||||
|
sql.Add('where A.MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
SInitCDSData20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.Tv2MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.Tv1MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.Tv3MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=3;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.ToolButton4Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.Locate('ComeDate',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货日期不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet2.Locate('BatchNo',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('批号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet2.Locate('MxQty',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存明细表
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'MX','Contract_Sub_Mx',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取明细流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet2.fieldbyname('MXId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_Mx where MxId='''+Trim(ClientDataSet2.fieldbyname('MXId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value:=Trim(maxno);
|
||||||
|
FieldByName('SubId').Value:=Trim(Order_Main.fieldbyname('SubId').AsString);
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd,Tv2,ClientDataSet2,'Contract_Sub_Mx',0);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value:=Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('确定成功!','提示',0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('确定异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.cxGridDBColumn1PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductOrderList:=TfrmProductOrderList.Create(Application);
|
||||||
|
with frmProductOrderList do
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
frmProductOrderList.TBAdd.Visible:=False;
|
||||||
|
frmProductOrderList.TBEdit.Visible:=False;
|
||||||
|
frmProductOrderList.TBDel.Visible:=False;
|
||||||
|
frmProductOrderList.TBExport.Visible:=False;
|
||||||
|
frmProductOrderList.TBPrint.Visible:=False;
|
||||||
|
frmProductOrderList.TBTP.Visible:=False;
|
||||||
|
frmProductOrderList.cxGrid2.Visible:=False;
|
||||||
|
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('OrdSubId').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('SubId').AsString);
|
||||||
|
FieldByName('OrderNo').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('OrderNo').AsString);
|
||||||
|
FieldByName('PRTCodeName').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('PRTCodeName').AsString);
|
||||||
|
FieldByName('PRTSpec').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('PRTSpec').AsString);
|
||||||
|
FieldByName('PRTColor').Value:=Trim(frmProductOrderList.Order_Main.fieldbyname('PRTColor').AsString);
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductOrderList.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.Tv2CellClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select A.*,B.PRTSpec,B.PRTColor,C.PRTCodeName,C.OrderNo from Contract_Sub_MxTo A inner join Order_Sub B on A.OrdSubId=B.SubId');
|
||||||
|
SQL.Add(' inner join Order_Main C on C.MainId=B.MainId ');
|
||||||
|
sql.Add('where A.MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
SInitCDSData20(ADOQueryTemp,ClientDataSet3);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractPay.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
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;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
467
样品(YPGL.dll)/U_ClothKCQty.dfm
Normal file
467
样品(YPGL.dll)/U_ClothKCQty.dfm
Normal file
|
|
@ -0,0 +1,467 @@
|
||||||
|
object frmClothKCQty: TfrmClothKCQty
|
||||||
|
Left = 184
|
||||||
|
Top = 155
|
||||||
|
Width = 1014
|
||||||
|
Height = 500
|
||||||
|
Caption = #22383#24067#20986#20837#23384
|
||||||
|
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 = 1006
|
||||||
|
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_OrderManage.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 TBExport: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1006
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#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 = 15
|
||||||
|
Width = 18
|
||||||
|
Height = 12
|
||||||
|
Caption = '---'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 283
|
||||||
|
Top = 15
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#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 = 430
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 574
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #38754#26009#35268#26684
|
||||||
|
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 = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 179
|
||||||
|
Top = 11
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 323
|
||||||
|
Top = 11
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_CodeNameM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 459
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 627
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 24
|
||||||
|
Top = 112
|
||||||
|
Width = 897
|
||||||
|
Height = 200
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1DBTableView1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
end
|
||||||
|
object Tv1: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column15
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column14
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column13
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column12
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column11
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column10
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column9
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column8
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.IncSearch = DataLink_OrderManage.cxBlue
|
||||||
|
Styles.Selection = DataLink_OrderManage.cxBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #22522#26412#20449#24687
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = #19978#26399#32467#23384
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = #26412#26399#20837#24211
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = #26412#26399#20986#24211
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Caption = #26412#26399#32467#23384
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
end>
|
||||||
|
object v1Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNoM'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 63
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 58
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #38754#26009#35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 62
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBBandedColumn
|
||||||
|
Caption = #22383#24067#21378
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 60
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBBandedColumn
|
||||||
|
Caption = #25209#21495
|
||||||
|
DataBinding.FieldName = 'BatchNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 62
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 5
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBBandedColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'JCS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 62
|
||||||
|
Position.BandIndex = 4
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PJCS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
Position.BandIndex = 4
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBBandedColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'CKS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 60
|
||||||
|
Position.BandIndex = 3
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PCKS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
Position.BandIndex = 3
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBBandedColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'RKS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 59
|
||||||
|
Position.BandIndex = 2
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PRKS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
Position.BandIndex = 2
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column14: TcxGridDBBandedColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'QCS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 59
|
||||||
|
Position.BandIndex = 1
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column15: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PQCS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Moving = False
|
||||||
|
Styles.Header = DataLink_OrderManage.Default
|
||||||
|
Width = 61
|
||||||
|
Position.BandIndex = 1
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 648
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_OrderManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 736
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryMain
|
||||||
|
Left = 584
|
||||||
|
Top = 120
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 544
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
end
|
||||||
157
样品(YPGL.dll)/U_ClothKCQty.pas
Normal file
157
样品(YPGL.dll)/U_ClothKCQty.pas
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|
unit U_ClothKCQty;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||||
|
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||||
|
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, ADODB;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothKCQty = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
ConNoM: TEdit;
|
||||||
|
C_CodeNameM: TEdit;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
cxGrid1DBTableView1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBBandedTableView;
|
||||||
|
v1Column1: TcxGridDBBandedColumn;
|
||||||
|
v1Column2: TcxGridDBBandedColumn;
|
||||||
|
v1Column3: TcxGridDBBandedColumn;
|
||||||
|
v1Column4: TcxGridDBBandedColumn;
|
||||||
|
v1Column5: TcxGridDBBandedColumn;
|
||||||
|
v1Column6: TcxGridDBBandedColumn;
|
||||||
|
v1Column8: TcxGridDBBandedColumn;
|
||||||
|
v1Column9: TcxGridDBBandedColumn;
|
||||||
|
v1Column10: TcxGridDBBandedColumn;
|
||||||
|
v1Column11: TcxGridDBBandedColumn;
|
||||||
|
v1Column12: TcxGridDBBandedColumn;
|
||||||
|
v1Column13: TcxGridDBBandedColumn;
|
||||||
|
v1Column14: TcxGridDBBandedColumn;
|
||||||
|
v1Column15: TcxGridDBBandedColumn;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ConNoMChange(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothKCQty: TfrmClothKCQty;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothKCQty:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp)
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec Cloth_KCQty :begdate,:enddate');
|
||||||
|
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime));
|
||||||
|
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.ConNoMChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxBandedGrid('Å÷²¼¿â´æ',Tv1,'Å÷²¼');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxBandedGrid('Å÷²¼¿â´æ',Tv1,'Å÷²¼');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then exit;
|
||||||
|
TcxGridToExcel('Å÷²¼¿â´æ',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothKCQty.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
17974
样品(YPGL.dll)/U_DataLink.dfm
Normal file
17974
样品(YPGL.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
75
样品(YPGL.dll)/U_DataLink.pas
Normal file
75
样品(YPGL.dll)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
unit U_DataLink;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||||
|
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses;
|
||||||
|
var
|
||||||
|
DConString:String; {全局连接字符串}
|
||||||
|
server, dtbase, user, pswd: String; {数据库连接参数}
|
||||||
|
DCurHandle:hwnd; //当前窗体句柄
|
||||||
|
PicSvr:string;
|
||||||
|
DName:string ; //#用户名#//
|
||||||
|
DCode:string ; //#用户编号#//
|
||||||
|
Ddatabase:string; //#数据库名称#//
|
||||||
|
DTitCaption:string; //#主窗体名称#//
|
||||||
|
UserDataFlag: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; //公司
|
||||||
|
IpCall:Integer;
|
||||||
|
IpWLDZStr:String;
|
||||||
|
type
|
||||||
|
TDataLink_YPGL = 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_YPGL: TDataLink_YPGL;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
procedure TDataLink_YPGL.DataModuleDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DataLink_YPGL:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
188
样品(YPGL.dll)/U_FileUp.dfm
Normal file
188
样品(YPGL.dll)/U_FileUp.dfm
Normal file
|
|
@ -0,0 +1,188 @@
|
||||||
|
object frmFileUp: TfrmFileUp
|
||||||
|
Left = 247
|
||||||
|
Top = 162
|
||||||
|
Width = 660
|
||||||
|
Height = 441
|
||||||
|
Caption = #19978#20256#25991#20214
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object cxGrid7: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 41
|
||||||
|
Width = 585
|
||||||
|
Height = 361
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object TV7: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
object FileName: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #25991#20214#21517#31216
|
||||||
|
DataBinding.FieldName = 'FileName'
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
object FileDate: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #19978#20256#26085#26399
|
||||||
|
DataBinding.FieldName = 'FileDate'
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel6: TcxGridLevel
|
||||||
|
GridView = TV7
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel16: TPanel
|
||||||
|
Left = 190
|
||||||
|
Top = 126
|
||||||
|
Width = 138
|
||||||
|
Height = 30
|
||||||
|
BevelInner = bvRaised
|
||||||
|
Caption = #27491#22312#19978#20256#12290#12290#12290
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolBar6: TToolBar
|
||||||
|
Left = 585
|
||||||
|
Top = 41
|
||||||
|
Width = 59
|
||||||
|
Height = 361
|
||||||
|
Align = alRight
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 2
|
||||||
|
object FileUp: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #19978#20256
|
||||||
|
ImageIndex = 109
|
||||||
|
Wrap = True
|
||||||
|
OnClick = FileUpClick
|
||||||
|
end
|
||||||
|
object FileDel: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Wrap = True
|
||||||
|
OnClick = FileDelClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 644
|
||||||
|
Height = 41
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 3
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 14
|
||||||
|
Width = 68
|
||||||
|
Height = 16
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Image2: TImage
|
||||||
|
Left = 445
|
||||||
|
Top = 9
|
||||||
|
Width = 60
|
||||||
|
Height = 28
|
||||||
|
end
|
||||||
|
object Code: TEdit
|
||||||
|
Left = 78
|
||||||
|
Top = 9
|
||||||
|
Width = 211
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ODPat: TOpenDialog
|
||||||
|
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||||
|
Left = 404
|
||||||
|
Top = 197
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 405
|
||||||
|
Top = 236
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
Left = 409
|
||||||
|
Top = 285
|
||||||
|
end
|
||||||
|
object ADOQueryFile: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 488
|
||||||
|
Top = 144
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryFile
|
||||||
|
Left = 392
|
||||||
|
Top = 168
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 496
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
end
|
||||||
359
样品(YPGL.dll)/U_FileUp.pas
Normal file
359
样品(YPGL.dll)/U_FileUp.pas
Normal file
|
|
@ -0,0 +1,359 @@
|
||||||
|
unit U_FileUp;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls,
|
||||||
|
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, IdBaseComponent,
|
||||||
|
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB,jpeg,
|
||||||
|
BtnEdit,IniFiles,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
|
||||||
|
TfrmFileUp = class(TForm)
|
||||||
|
cxGrid7: TcxGrid;
|
||||||
|
TV7: TcxGridDBTableView;
|
||||||
|
FileName: TcxGridDBColumn;
|
||||||
|
FileDate: TcxGridDBColumn;
|
||||||
|
cxGridLevel6: TcxGridLevel;
|
||||||
|
Panel16: TPanel;
|
||||||
|
ToolBar6: TToolBar;
|
||||||
|
FileUp: TToolButton;
|
||||||
|
FileDel: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Code: TEdit;
|
||||||
|
ODPat: TOpenDialog;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
|
ADOQueryFile: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
Image2: TImage;
|
||||||
|
procedure FileUpClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FileDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
private
|
||||||
|
lstPat: TStringList;
|
||||||
|
AJpeg: TJPEGImage;
|
||||||
|
procedure CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||||
|
procedure SaveImageOther(FTFID:string);
|
||||||
|
procedure ReadINIFile10();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
CYID:String;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmFileUp: TfrmFileUp;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmFileUp.ReadINIFile10();
|
||||||
|
var
|
||||||
|
programIni:Tinifile; //配置文件名
|
||||||
|
FileName:string;
|
||||||
|
begin
|
||||||
|
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||||
|
programIni:=Tinifile.create(FileName);
|
||||||
|
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||||
|
programIni.Free;
|
||||||
|
end;
|
||||||
|
procedure TfrmFileUp.FileUpClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i,j: Integer;
|
||||||
|
PatFile: String;
|
||||||
|
FTPPath,FConNo,MaxNo:string;
|
||||||
|
AJpeg: TJPEGImage;
|
||||||
|
myStream: TADOBlobStream;
|
||||||
|
begin
|
||||||
|
if Trim(Code.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
lstPat.Clear;
|
||||||
|
if ODPat.Execute then
|
||||||
|
begin
|
||||||
|
lstPat.AddStrings(ODPat.Files);
|
||||||
|
end;
|
||||||
|
if lstPat.Count > 0 then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1.Host :=PicSvr;//PicSvr;
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
except
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Panel16.Visible:=True;
|
||||||
|
Panel16.Refresh;
|
||||||
|
|
||||||
|
try
|
||||||
|
AJpeg:=TJpegImage.Create();
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
for i:=0 to lstPat.Count - 1 do
|
||||||
|
begin
|
||||||
|
{
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select isnull(max(abs(cast(right(left(FileName,charindex(''.'',FileName)-1),2) as int))),0)+1 as BH from XD_File');
|
||||||
|
sql.Add('where CYID='''+trim(CYID)+''' ');
|
||||||
|
open;
|
||||||
|
end; }
|
||||||
|
// PatFile:=Copy(ExtractFileName(lstPat[i]),(Pos('.',ExtractFileName(lstPat[i]))+1),(Length(ExtractFileName(lstPat[i]))-Pos('.',ExtractFileName(lstPat[i]))) ) ;
|
||||||
|
// PatFile:=trim(Code.Text)+'-'+inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger)+'.'+Copy(ExtractFileName(lstPat[i]),(Pos('.',ExtractFileName(lstPat[i]))+1),(Length(ExtractFileName(lstPat[i]))-Pos('.',ExtractFileName(lstPat[i]))) ) ;
|
||||||
|
PatFile:=ExtractFileName(lstPat[i]);
|
||||||
|
AJpeg.LoadFromFile(ExtractFileName(lstPat[i]));
|
||||||
|
CreThumb(AJpeg,Image2,160, 120);
|
||||||
|
|
||||||
|
if IdFTP1.Connected then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1.Put(lstPat[i], Trim(UserDataFlag+'YP')+'\'+Trim(PatFile));
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd,MaxNo,'YP','XD_File',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取图片最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('XFID').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('CYID').Value:=Trim(CYID);
|
||||||
|
FieldByName('CYNO').Value:=Trim(Code.Text);
|
||||||
|
FieldByName('filename').Value:=Trim(PatFile);
|
||||||
|
FieldByName('FileDate').Value:=SGetServerDate(ADOQueryTemp);
|
||||||
|
fieldbyname('FileType').value:=Trim('YP');
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from TP_File where TFID='''+Trim(MaxNo)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('TFID').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('WBID').Value:=Trim(CYID);
|
||||||
|
FieldByName('TFType').Value:='样品';
|
||||||
|
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||||
|
AJpeg.Assign(Image2.Picture.Graphic);
|
||||||
|
AJpeg.SaveToStream(myStream);
|
||||||
|
myStream.Free;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update CP_YDang Set TPFlag=1 where CYID='''+Trim(CYID)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
AJpeg.Free;
|
||||||
|
except
|
||||||
|
AJpeg.Free;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('图片上传失败!','提示',0);
|
||||||
|
end;
|
||||||
|
if IdFTP1.Connected then IdFTP1.Quit;
|
||||||
|
with ADOQueryFile do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
Panel16.Visible:=False;
|
||||||
|
if i>0 then
|
||||||
|
Application.MessageBox(PChar(inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||||
|
var
|
||||||
|
Bitmap: TBitmap;
|
||||||
|
Ratio: Double;
|
||||||
|
ARect: TRect;
|
||||||
|
AHeight, AHeightOffset: Integer;
|
||||||
|
AWidth, AWidthOffset: Integer;
|
||||||
|
begin
|
||||||
|
Bitmap := TBitmap.Create;
|
||||||
|
try
|
||||||
|
Ratio := AJPeg.Width /AJPeg.Height;
|
||||||
|
if Ratio > 1.333 then
|
||||||
|
begin
|
||||||
|
AHeight := Round(Width / Ratio);
|
||||||
|
AHeightOffset := (Height - AHeight) div 2;
|
||||||
|
AWidth := Width;
|
||||||
|
AWidthOffset := 0;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AWidth := Round(Height * Ratio);
|
||||||
|
AWidthOffset := (Width - AWidth) div 2;
|
||||||
|
AHeight := Height;
|
||||||
|
AHeightOffset := 0;
|
||||||
|
end;
|
||||||
|
Bitmap.Width := Width;
|
||||||
|
Bitmap.Height := Height;
|
||||||
|
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||||
|
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||||
|
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||||
|
Bitmap.Canvas.StretchDraw(ARect, AJPeg);
|
||||||
|
Image1.Picture.Assign(BitMap);
|
||||||
|
finally
|
||||||
|
Bitmap.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmFileUp.SaveImageOther(FTFID:string);
|
||||||
|
var
|
||||||
|
AJpeg: TJPEGImage;
|
||||||
|
myStream: TADOBlobStream;
|
||||||
|
ImgMaxNo:String;
|
||||||
|
i,j: Integer;
|
||||||
|
PatFile: String;
|
||||||
|
FConNo,MaxNo:string;
|
||||||
|
begin
|
||||||
|
if Image2.Picture=nil then Exit;
|
||||||
|
AJpeg:=TJpegImage.Create();
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from TP_File where TFID='''+Trim(FTFID)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FTFID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('TFID').Value:=Trim(FTFID);
|
||||||
|
FieldByName('WBID').Value:=Trim(CYID);
|
||||||
|
FieldByName('TFType').Value:='样品';
|
||||||
|
AJpeg.Assign(Image2.Picture.Graphic);
|
||||||
|
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||||
|
AJpeg.Assign(Image2.Picture.Graphic);
|
||||||
|
AJpeg.SaveToStream(myStream);
|
||||||
|
myStream.Free;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
lstPat := TStringList.Create;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.FileDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add(' Delete XD_File where XFID='''+Trim(ADOQueryFile.fieldbyname('XFID').AsString)+'''');
|
||||||
|
SQL.Add(' Delete TP_File where TFID='''+Trim(ADOQueryFile.fieldbyname('XFID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryFile do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||||
|
SQL.Add(' and FileType=''YP''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryFile.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update CP_YDang Set TPFlag=0 where CYID='''+Trim(CYID)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFileUp.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOQueryFile do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||||
|
SQL.Add(' and FileType=''YP''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
225
样品(YPGL.dll)/U_GetDllForm.pas
Normal file
225
样品(YPGL.dll)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,225 @@
|
||||||
|
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_CPType, U_CPManage, U_KHGetCPManage, U_iniParam, U_CPManageCX;
|
||||||
|
|
||||||
|
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 := GName;
|
||||||
|
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:='121.40.233.100,7781'; //192.168.1.113
|
||||||
|
// server:='192.168.2.99,7781';
|
||||||
|
server := '101.132.143.144,7781';
|
||||||
|
dtbase := 'lingyaoypdata';
|
||||||
|
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:='录入';
|
||||||
|
// DParameters2:='门幅无单位';
|
||||||
|
// DParameters5:='工艺';
|
||||||
|
if not ConnData() then
|
||||||
|
begin
|
||||||
|
result := 0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if IsINIFile() then
|
||||||
|
ReadINIFile()
|
||||||
|
else
|
||||||
|
WriteINIFile;
|
||||||
|
// 定义窗口类型 、状态
|
||||||
|
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 frmCPType = nil then
|
||||||
|
begin
|
||||||
|
frmCPType := TfrmCPType.Create(application.MainForm);
|
||||||
|
with frmCPType do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPType.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmCPType.Handle;
|
||||||
|
end;
|
||||||
|
|
||||||
|
2: // 样品档案
|
||||||
|
begin
|
||||||
|
// IF frmCPManage<>nil then frmCPManage.Free;
|
||||||
|
if frmCPManage = nil then
|
||||||
|
begin
|
||||||
|
frmCPManage := TfrmCPManage.Create(application.MainForm);
|
||||||
|
with frmCPManage do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPManage.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmCPManage.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
3: // 客户取样
|
||||||
|
begin
|
||||||
|
if frmKHGetCPManage = nil then
|
||||||
|
begin
|
||||||
|
frmKHGetCPManage := TfrmKHGetCPManage.Create(application.MainForm);
|
||||||
|
with frmKHGetCPManage do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmKHGetCPManage.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmKHGetCPManage.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
4: // 样品查询
|
||||||
|
begin
|
||||||
|
if frmCPManageCX = nil then
|
||||||
|
begin
|
||||||
|
frmCPManageCX := TfrmCPManageCX.Create(application.MainForm);
|
||||||
|
with frmCPManageCX do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPManageCX.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmCPManageCX.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_YPGL) then
|
||||||
|
DataLink_YPGL := TDataLink_YPGL.Create(Application);
|
||||||
|
try
|
||||||
|
with DataLink_YPGL.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_YPGL.Free;
|
||||||
|
application := NewDllApp;
|
||||||
|
dxUnitsLoader.Finalize;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
240
样品(YPGL.dll)/U_JWLIn.dfm
Normal file
240
样品(YPGL.dll)/U_JWLIn.dfm
Normal file
|
|
@ -0,0 +1,240 @@
|
||||||
|
object frmJWLIn: TfrmJWLIn
|
||||||
|
Left = 221
|
||||||
|
Top = 143
|
||||||
|
Width = 910
|
||||||
|
Height = 461
|
||||||
|
Caption = #20837#24211#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 902
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_JWLCK.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
Transparent = True
|
||||||
|
Wrapable = False
|
||||||
|
object BtnSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = BtnSaveClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22797#21046#22686#34892
|
||||||
|
ImageIndex = 105
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20840#37096#26367#25442
|
||||||
|
ImageIndex = 104
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 300
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object BtnExit: TToolButton
|
||||||
|
Left = 363
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = BtnExitClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 16
|
||||||
|
Top = 48
|
||||||
|
Width = 857
|
||||||
|
Height = 353
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'DefStr1'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'GYS'
|
||||||
|
Column = v1ShortName
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = 'YCLCode'
|
||||||
|
Column = v1P_ChnName
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = '1'
|
||||||
|
Position = spFooter
|
||||||
|
Column = v1ShortName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Quantity
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#26102#38388
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.Kind = ckDateTime
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v1DepotClass: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CRType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#27491#24120#20837#24211
|
||||||
|
#26399#21021#20837#24211
|
||||||
|
#36710#38388#36864#22238
|
||||||
|
#20854#23427#20837#24211)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v1P_ChnName: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #29289#26009#21517#31216
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1P_ChnNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'YCLSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 131
|
||||||
|
end
|
||||||
|
object v1ShortName: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'GYSName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1ShortNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v1Quantity: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #20837#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1UnitName: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v1UnitNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 48
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'SNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Sub
|
||||||
|
Left = 192
|
||||||
|
Top = 168
|
||||||
|
end
|
||||||
|
object CDS_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 232
|
||||||
|
Top = 168
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_JWLCK.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 296
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_JWLCK.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 264
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_JWLCK.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 224
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
end
|
||||||
373
样品(YPGL.dll)/U_JWLIn.pas
Normal file
373
样品(YPGL.dll)/U_JWLIn.pas
Normal file
|
|
@ -0,0 +1,373 @@
|
||||||
|
unit U_JWLIn;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, ADODB, DBClient,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxCalendar;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmJWLIn = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
BtnSave: TToolButton;
|
||||||
|
BtnExit: TToolButton;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
v1P_ChnName: TcxGridDBColumn;
|
||||||
|
v1ShortName: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
v1Quantity: TcxGridDBColumn;
|
||||||
|
v1UnitName: TcxGridDBColumn;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Sub: TClientDataSet;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
v1DepotClass: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure BtnExitClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure BtnSaveClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure v1P_ChnNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1ShortNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1UnitNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FMainID:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmJWLIn: TfrmJWLIn;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.BtnExitClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmJWLIn.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.*,GYSName=C.ZDYName from CK_YCL_Main A inner join CK_YCL_Sub B on A.MainId=B.MainId ');
|
||||||
|
sql.Add(' left join KH_ZDY C on A.GYS=C.ZDYNO');
|
||||||
|
SQL.Add(' where A.MainId='''+Trim(FMainID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Sub);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Sub);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Sub.IsEmpty then Exit;
|
||||||
|
if Trim(CDS_Sub.fieldbyname('CRNo').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('不能在此删除已经保存的数据!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CopyAddRow(tv1,CDS_Sub);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
OneKeyPost(Tv1,CDS_Sub);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmJWLIn.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
MaxNo,SubId,strSQL,LQuantity,LQty:string;
|
||||||
|
KID,i,PStatus,KID1:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
CDS_Sub.First;
|
||||||
|
while not CDS_Sub.Eof do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.FieldByName('CRQty').AsString)='' then
|
||||||
|
begin
|
||||||
|
CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('CRQty').Value:='0';
|
||||||
|
CDS_Sub.Post;
|
||||||
|
end;
|
||||||
|
if Trim(CDS_Sub.fieldbyname('MainId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
MaxNo:=Trim(CDS_Sub.fieldbyname('MainId').AsString);
|
||||||
|
SubId:=Trim(CDS_Sub.fieldbyname('SubId').AsString);
|
||||||
|
KID:=CDS_Sub.fieldbyname('CRID').AsInteger;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,MaxNo,'MR','CK_YCL_Main',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if GetLSNo(ADOQueryCmd,SubId,'SR','CK_YCL_Sub',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('UPDATE CK_CRID SET CRID = CRID+1');
|
||||||
|
SQL.Add('SELECT CRID FROM CK_CRID');
|
||||||
|
Open;
|
||||||
|
KID:=fieldbyname('CRID').AsInteger;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CK_YCL_Sub where MainId='''+Trim(MaxNo)+'''');
|
||||||
|
SQL.Add(' and CRID='+Inttostr(KID));
|
||||||
|
Open;
|
||||||
|
if not ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
LQuantity:=ADOQueryTemp.fieldbyname('CRQty').AsString;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
LQuantity:='0.00';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//保存主表
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from CK_YCL_Main where MainId='''+Trim(MaxNo)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('MainId').AsString)<>'' then
|
||||||
|
Edit
|
||||||
|
else
|
||||||
|
Append;
|
||||||
|
FieldByName('MainId').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('CRFlag').Value:='入库';
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('FillTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
FieldByName('CRTime').Value:=Trim(CDS_Sub.fieldbyname('CRTime').AsString);
|
||||||
|
FieldByName('CRType').Value:=Trim(CDS_Sub.fieldbyname('CRType').AsString);
|
||||||
|
FieldByName('GYS').Value:=Trim(CDS_Sub.fieldbyname('GYS').AsString);
|
||||||
|
FieldByName('CKName').Value:=Trim(DParameters1);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
//保存从表
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from CK_YCL_Sub where SubId='''+Trim(SubId)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_Sub.fieldbyname('SubId').AsString)<>'' then
|
||||||
|
Edit
|
||||||
|
else
|
||||||
|
Append;
|
||||||
|
FieldByName('MainId').Value:=Trim(MaxNo);
|
||||||
|
FieldByName('SubId').Value:=Trim(SubId);
|
||||||
|
FieldByName('CRID').Value:=KID;
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd,Tv1,CDS_Sub,'CK_YCL_Sub',2);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
//保存到库存表
|
||||||
|
if Trim(CDS_Sub.fieldbyname('MainId').AsString)='' then
|
||||||
|
begin
|
||||||
|
strSQL := 'INSERT CK_YCL_KC ('
|
||||||
|
+ 'CRID,'
|
||||||
|
+ 'RKNo,'
|
||||||
|
+ 'KCQty'
|
||||||
|
+ ') VALUES ('
|
||||||
|
+ IntToStr(KID) + ','
|
||||||
|
+ QuotedStr(Trim(SubId)) + ','
|
||||||
|
+ QuotedStr(Trim(CDS_Sub.fieldbyname('CRQty').AsString)) + ''
|
||||||
|
+ ')';
|
||||||
|
|
||||||
|
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
//更新到库存表
|
||||||
|
strSQL := 'UPDATE CK_YCL_KC SET '
|
||||||
|
+ 'RKNo = ' + QuotedStr(Trim(SubId)) + ','
|
||||||
|
+ 'KCQty =KCQty-'+LQuantity+'+'+ CDS_Sub.fieldbyname('CRQty').AsString+ ' '
|
||||||
|
+ 'WHERE CRID = ' + IntToStr(KID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add(strSQL);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Next;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
FMainID:=MaxNo;
|
||||||
|
ModalResult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.BtnSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Sub.IsEmpty then Exit;
|
||||||
|
if CDS_Sub.Locate('CRTime',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('入库时间不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('YCLName',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('物料名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('CRType',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('入库类型不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if CDS_Sub.Locate('CRQty',Null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('数量不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.v1P_ChnNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='YCL';
|
||||||
|
flagname:='原材料名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('YCLCode').Value:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
Self.CDS_Sub.FieldByName('YCLName').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.v1ShortNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='GYS';
|
||||||
|
flagname:='供应商名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('GYS').Value:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
Self.CDS_Sub.FieldByName('GYSName').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLIn.v1UnitNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DW';
|
||||||
|
flagname:='单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Sub.Edit;
|
||||||
|
Self.CDS_Sub.FieldByName('CRUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
137
样品(YPGL.dll)/U_JWLInList.dfm
Normal file
137
样品(YPGL.dll)/U_JWLInList.dfm
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
object frmJWLInList: TfrmJWLInList
|
||||||
|
Left = 75
|
||||||
|
Top = 155
|
||||||
|
Width = 1165
|
||||||
|
Height = 618
|
||||||
|
Caption = #20837#24211#21015#34920
|
||||||
|
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 = 1157
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object 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
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
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
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 496
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 552
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 600
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 672
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 504
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 588
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
257
样品(YPGL.dll)/U_JWLInList.pas
Normal file
257
样品(YPGL.dll)/U_JWLInList.pas
Normal file
|
|
@ -0,0 +1,257 @@
|
||||||
|
unit U_JWLInList;
|
||||||
|
|
||||||
|
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, cxCalendar, cxButtonEdit, cxDropDownEdit,
|
||||||
|
DBClient;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmJWLInList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
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 TBAddClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure YCLNameChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmJWLInList: TfrmJWLInList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_JWLIn;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmJWLInList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxgrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('入库列表',Tv1,'贝斯仓库');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.*,GYSName=C.ZDYName from CK_YCL_Main A inner join CK_YCL_Sub B on A.MainId=B.MainId ');
|
||||||
|
sql.Add(' left join KH_ZDY C on A.GYS=C.ZDYNO');
|
||||||
|
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='''+Trim(DParameters1)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid('入库列表',Tv1,'原材料仓库');
|
||||||
|
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
BegDate.DateTime:=EndDate.DateTime-7;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from CK_YCL_Sub where CRID='+Trim(ADOQueryMain.fieldbyname('CRID').AsString));
|
||||||
|
sql.Add(' and MainId like ''MC%'' ');
|
||||||
|
open;
|
||||||
|
if ADOQueryTemp.RecordCount>0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('此物品已经有出库记录,不能进行操作!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
frmJWLIn:=TfrmJWLIn.Create(Application);
|
||||||
|
with frmJWLIn do
|
||||||
|
begin
|
||||||
|
FMainId:=Trim(self.CDS_Main.fieldbyname('MainId').AsString);
|
||||||
|
ToolButton1.Visible:=False;
|
||||||
|
ToolButton2.Visible:=False;
|
||||||
|
ToolButton3.Visible:=False;
|
||||||
|
ToolButton4.Visible:=False;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.TBFind.Click;
|
||||||
|
Self.CDS_Main.Locate('MainId',FMainID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmJWLIn.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from CK_YCL_Sub where CRID='+Trim(ADOQueryMain.fieldbyname('CRID').AsString));
|
||||||
|
sql.Add(' and MainId like ''MC%'' ');
|
||||||
|
open;
|
||||||
|
if ADOQueryTemp.RecordCount>0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('此物品已经有出库记录,不能进行操作!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmJWLInList.DelData():Boolean;
|
||||||
|
var
|
||||||
|
FInt:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete CK_YCL_Main where MainId='''+Trim(CDS_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
sql.Add(' delete CK_YCL_Sub where MainId='''+Trim(CDS_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
sql.Add(' delete CK_YCL_KC where CRID='+Trim(CDS_Main.fieldbyname('CRID').AsString));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('入库列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBPrintClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmJWLIn:=TfrmJWLIn.Create(Application);
|
||||||
|
with frmJWLIn do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.InitGrid();
|
||||||
|
Self.TBFind.Click;
|
||||||
|
Self.CDS_Main.Locate('MainId',FMainID,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmJWLIn.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.YCLNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmJWLInList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
450
样品(YPGL.dll)/U_KHGetCPAdd.dfm
Normal file
450
样品(YPGL.dll)/U_KHGetCPAdd.dfm
Normal file
|
|
@ -0,0 +1,450 @@
|
||||||
|
object frmKHGetCPAdd: TfrmKHGetCPAdd
|
||||||
|
Left = 21
|
||||||
|
Top = 103
|
||||||
|
Width = 1254
|
||||||
|
Height = 625
|
||||||
|
Align = alClient
|
||||||
|
Caption = #25343#26679#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1238
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGL.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGL.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 129
|
||||||
|
Width = 1238
|
||||||
|
Height = 458
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
Column = v1Column16
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
Column = v1Column10
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
Column = v1Column12
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'CYNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 102
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYEName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'CYSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20013#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYECF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'CYMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'CYKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColorEng'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column14: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20215#26684#31867#22411
|
||||||
|
DataBinding.FieldName = 'PriceType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#20844#26020#20215
|
||||||
|
#31859#20215
|
||||||
|
#30721#20215)
|
||||||
|
Properties.OnEditValueChanged = v1Column14PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column16: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
DataBinding.FieldName = 'CIF'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column16PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Column17: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #27719#29575
|
||||||
|
DataBinding.FieldName = 'HuiLv'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column16PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 48
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #31995#25968
|
||||||
|
DataBinding.FieldName = 'LiRunLv'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column16PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 51
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20154#27665#24065#20215#26684
|
||||||
|
DataBinding.FieldName = 'RMBPrice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #32654#37329#20215#26684
|
||||||
|
DataBinding.FieldName = 'USDPrice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'CKNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 110
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1238
|
||||||
|
Height = 96
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 51
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #26679#21697#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 16
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 528
|
||||||
|
Top = 16
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25343#26679#26102#38388
|
||||||
|
end
|
||||||
|
object TLabel
|
||||||
|
Left = 51
|
||||||
|
Top = 48
|
||||||
|
Width = 18
|
||||||
|
Height = 12
|
||||||
|
Caption = 'CIF'
|
||||||
|
end
|
||||||
|
object TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 48
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #27719' '#29575
|
||||||
|
end
|
||||||
|
object TLabel
|
||||||
|
Left = 528
|
||||||
|
Top = 48
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #31995' '#25968
|
||||||
|
end
|
||||||
|
object TLabel
|
||||||
|
Left = 776
|
||||||
|
Top = 16
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20215#26684#31867#22411
|
||||||
|
end
|
||||||
|
object TLabel
|
||||||
|
Left = 776
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25343#26679#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object TLabel
|
||||||
|
Left = 51
|
||||||
|
Top = 72
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
end
|
||||||
|
object CYID: TEdit
|
||||||
|
Left = 105
|
||||||
|
Top = 12
|
||||||
|
Width = 131
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnKeyPress = CYIDKeyPress
|
||||||
|
end
|
||||||
|
object KHName: TEdit
|
||||||
|
Left = 340
|
||||||
|
Top = 12
|
||||||
|
Width = 126
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object CKDate: TcxDateEdit
|
||||||
|
Left = 578
|
||||||
|
Top = 12
|
||||||
|
Properties.Kind = ckDateTime
|
||||||
|
TabOrder = 2
|
||||||
|
Width = 147
|
||||||
|
end
|
||||||
|
object CIF: TEdit
|
||||||
|
Left = 105
|
||||||
|
Top = 44
|
||||||
|
Width = 131
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object HuiLv: TEdit
|
||||||
|
Left = 340
|
||||||
|
Top = 44
|
||||||
|
Width = 126
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object LiRunLv: TEdit
|
||||||
|
Left = 578
|
||||||
|
Top = 44
|
||||||
|
Width = 146
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object PriceType: TComboBox
|
||||||
|
Left = 830
|
||||||
|
Top = 12
|
||||||
|
Width = 145
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 6
|
||||||
|
Text = #20844#26020#20215
|
||||||
|
Items.Strings = (
|
||||||
|
#20844#26020#20215
|
||||||
|
#31859#20215
|
||||||
|
#30721#20215)
|
||||||
|
end
|
||||||
|
object CKNO: TEdit
|
||||||
|
Left = 828
|
||||||
|
Top = 44
|
||||||
|
Width = 146
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 976
|
||||||
|
Top = 12
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
Caption = #19968#38190#26367#25442
|
||||||
|
TabOrder = 8
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
object CKYwy: TEdit
|
||||||
|
Left = 105
|
||||||
|
Top = 72
|
||||||
|
Width = 131
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CDS_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 416
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 453
|
||||||
|
Top = 193
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = CDS_Sub
|
||||||
|
Left = 491
|
||||||
|
Top = 195
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 389
|
||||||
|
Top = 193
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 565
|
||||||
|
Top = 193
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
end
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user