~
This commit is contained in:
commit
15b7778733
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
|
||||||
58
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
58
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
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_ZdyInput in 'U_ZdyInput.pas' {frmZdyInput},
|
||||||
|
U_HZViewList in 'U_HZViewList.pas' {frmHZViewList},
|
||||||
|
U_NengHaoInput in 'U_NengHaoInput.pas' {frmNengHaoInput},
|
||||||
|
U_CPKWList in 'U_CPKWList.pas' {frmCPKWList},
|
||||||
|
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||||
|
U_ZdyAttInputCP10 in 'U_ZdyAttInputCP10.pas' {frmZdyAttInputCP10};
|
||||||
|
|
||||||
|
// 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
|
||||||
|
软件名称=欣戈纺织
|
||||||
201
基础资料维护(BaseInfo.dll)/U_CPKWEdit.dfm
Normal file
201
基础资料维护(BaseInfo.dll)/U_CPKWEdit.dfm
Normal file
|
|
@ -0,0 +1,201 @@
|
||||||
|
object frmCPKWEdit: TfrmCPKWEdit
|
||||||
|
Left = 215
|
||||||
|
Top = 191
|
||||||
|
Width = 920
|
||||||
|
Height = 370
|
||||||
|
Caption = #20179#20301#36755#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 904
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 904
|
||||||
|
Height = 301
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 130
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 89
|
||||||
|
end
|
||||||
|
object v2DEFStr6: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2DEFStr6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 135
|
||||||
|
end
|
||||||
|
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
|
||||||
300
基础资料维护(BaseInfo.dll)/U_CPKWEdit.pas
Normal file
300
基础资料维护(BaseInfo.dll)/U_CPKWEdit.pas
Normal file
|
|
@ -0,0 +1,300 @@
|
||||||
|
unit U_CPKWEdit;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit,strutils;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPKWEdit = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2DEFStr6: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2DEFStr6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWEdit: TfrmCPKWEdit;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWEdit:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmCPKWEdit.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmCPKWEdit.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID,fzdyCode:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'KW','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment X where ATID='''+Trim(FCYID)+''' and defstr3=''固定架'' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('UPDATE CK_BanCP_KC set kckw='''' ');
|
||||||
|
sql.Add('where kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('UPDATE CK_BanCP_CR set kckw='''' ');
|
||||||
|
sql.Add('where kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('zdyCode').Value:=Trim(fzdyCode);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'',0);
|
||||||
|
FieldByName('Type').Value:='CPKW';
|
||||||
|
FieldByName('mrate').Value:=CDS_HZ.fieldbyname('mrate').AsFloat;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment X where ATID='''+Trim(FCYID)+''' and defstr3=''固定架'' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('UPDATE CK_BanCP_KC set kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('where C_CodeName='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr1').AsString)));
|
||||||
|
sql.Add('and C_color='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr2').AsString)));
|
||||||
|
sql.Add('UPDATE CK_BanCP_CR set kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('where C_CodeName='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr1').AsString)));
|
||||||
|
sql.Add('and C_color='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr2').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyCode').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('仓位编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.v2Column8PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr1').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.v2DEFStr6PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr2').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
339
基础资料维护(BaseInfo.dll)/U_CPKWList.dfm
Normal file
339
基础资料维护(BaseInfo.dll)/U_CPKWList.dfm
Normal file
|
|
@ -0,0 +1,339 @@
|
||||||
|
object frmCPKWList: TfrmCPKWList
|
||||||
|
Left = 154
|
||||||
|
Top = 77
|
||||||
|
Width = 1038
|
||||||
|
Height = 618
|
||||||
|
Caption = #20379#24212#21830#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1022
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 311
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 374
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1022
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 203
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 559
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 378
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 235
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 83
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object DEFstr3: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 588
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550)
|
||||||
|
end
|
||||||
|
object defstr2: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 408
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1022
|
||||||
|
Height = 335
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 97
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'CPNUm'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 153
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 888
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
212
基础资料维护(BaseInfo.dll)/U_CPKWList.pas
Normal file
212
基础资料维护(BaseInfo.dll)/U_CPKWList.pas
Normal file
|
|
@ -0,0 +1,212 @@
|
||||||
|
unit U_CPKWList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPKWList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
defstr1: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr3: TComboBox;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
defstr2: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure defstr1Change(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWList: TfrmCPKWList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_CPKWEdit;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select A.*, ');
|
||||||
|
sql.Add(' cpNum=(select count(MJID) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0)');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add(' where Type=''CPKW'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmCPKWList.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 TfrmCPKWList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.Align:=alclient;
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.defstr1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'供应商资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit:=TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit:=TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
535
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.dfm
Normal file
535
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.dfm
Normal file
|
|
@ -0,0 +1,535 @@
|
||||||
|
object frmClothContractList_CG_help: TfrmClothContractList_CG_help
|
||||||
|
Left = 133
|
||||||
|
Top = 0
|
||||||
|
Width = 1217
|
||||||
|
Height = 738
|
||||||
|
Caption = #22383#24067#37319#36141#35745#21010#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1201
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1201
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 267
|
||||||
|
Top = 22
|
||||||
|
Width = 78
|
||||||
|
Height = 12
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 592
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 720
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 349
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeNameM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 493
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 624
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 756
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTQty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #20379#26041
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MFQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object v1PRTUnit: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Caption = #24635#20215
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#22320#22336
|
||||||
|
DataBinding.FieldName = 'QDPalce'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
end
|
||||||
576
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.pas
Normal file
576
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.pas
Normal file
|
|
@ -0,0 +1,576 @@
|
||||||
|
unit U_ClothContractList_CG_help;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter,
|
||||||
|
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
|
||||||
|
cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractList_CG_help = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNoM: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeNameM: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PRTUnit: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoMChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
FInt,PFInt:Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractList_CG_help: TfrmClothContractList_CG_help;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_ClothContractInPut_CG,U_Fun,U_ProductOrderList,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractList_CG_help:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= '''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''' ');
|
||||||
|
sql.Add('and A.FillTime< '''+Trim(FormatDateTime('yyyy-MM-dd',endDate.DateTime+1))+''' ');
|
||||||
|
sql.Add('and A.conType=''坯布采购计划'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
with frmClothContractInPut_CG do
|
||||||
|
begin
|
||||||
|
PState:=1;
|
||||||
|
FMainId:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_CG.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已到坯,不能删除坯布合同!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString)='CM001' then exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractList_CG_help.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID='''+Trim(Order_Main.fieldbyname('MainID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString)='' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\坯布订购合同.rmf' ;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||||
|
+' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''';
|
||||||
|
Parameters.ParamByName('MainId').Value:=Trim(Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
Parameters.ParamByName('WSql').Value:='';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||||
|
FConNoM:=Trim(CDS_PRT.fieldbyname('ConNoM').AsString);
|
||||||
|
//SDofilter(ADOQueryMain,' ConNoM='''+Trim(Order_Main.fieldbyname('ConNoM').AsString)+'''');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\坯布订购合同.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
//SDofilter(ADOQueryMain,'');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
//Order_Main.Locate('ConNoM',FConNoM,[]);
|
||||||
|
//SelPrintData(TV4,ADOQueryMain,'合同查询报表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
with frmClothContractInPut_CG do
|
||||||
|
begin
|
||||||
|
PState:=0;
|
||||||
|
FMainId:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_CG.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ConNoMChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv2MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'To','Contract_Sub_MxTo',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value:=Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value:=Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value:=ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value:=ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value:=ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString)<>'' then
|
||||||
|
FieldByName('TPQty').Value:=ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString)<>'' then
|
||||||
|
FieldByName('Qty1').Value:=ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString)<>'' then
|
||||||
|
FieldByName('Qty2').Value:=ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString)<>'' then
|
||||||
|
FieldByName('Qty3').Value:=ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value:=0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!','提示',0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if ClientDataSet3.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end else
|
||||||
|
if FInt=3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty=False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.v2Column3PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='RKPlace';
|
||||||
|
flagname:='入库地点';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.conPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
IF Order_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
17974
基础资料维护(BaseInfo.dll)/U_DataLink.dfm
Normal file
17974
基础资料维护(BaseInfo.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
68
基础资料维护(BaseInfo.dll)/U_DataLink.pas
Normal file
68
基础资料维护(BaseInfo.dll)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
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; //#主窗体名称#//
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
293
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
293
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,293 @@
|
||||||
|
|
||||||
|
unit U_GetDllForm;
|
||||||
|
interface
|
||||||
|
uses
|
||||||
|
Windows,Messages,forms,OleCtnrs,DateUtils,SysUtils,ADODB,Dxcore,activex;
|
||||||
|
function GetDllForm(App:Tapplication; FormH:hwnd; FormID:integer;
|
||||||
|
Language: integer; WinStyle:integer;
|
||||||
|
GCode: Pchar; GName: Pchar; DataBase:Pchar;Title:PChar;
|
||||||
|
Parameters1:PChar;Parameters2:PChar;Parameters3:PChar;Parameters4:PChar;
|
||||||
|
Parameters5:PChar;Parameters6:PChar;Parameters7:PChar;Parameters8:PChar;
|
||||||
|
Parameters9:PChar;Parameters10:PChar;DataBaseStr:PChar):hwnd;export;stdcall;
|
||||||
|
function ConnData():Boolean;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_KHInfo,U_ZdyAttachment,U_ZdyAttachGYS,U_ZdyAttachCP,U_NengHaoList,U_HZViewList,U_CPKWlist,
|
||||||
|
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';
|
||||||
|
// server:='.';
|
||||||
|
dtbase := 'qingzhoujydata';
|
||||||
|
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:='1';
|
||||||
|
// DataBase:='加工厂';
|
||||||
|
// DataBase:='';
|
||||||
|
if not ConnData() then
|
||||||
|
begin
|
||||||
|
result:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// 定义窗口类型 、状态
|
||||||
|
if WinStyle=0 then
|
||||||
|
begin
|
||||||
|
mstyle := fsMDIChild ;
|
||||||
|
mstate := wsMaximized ;
|
||||||
|
mborderstyle := bsSizeable;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
mstyle := fsNormal ;
|
||||||
|
mstate := wsNormal ;
|
||||||
|
mborderstyle := bsSizeable;
|
||||||
|
end;
|
||||||
|
/////////////////////
|
||||||
|
//调用子模块窗口
|
||||||
|
case FormId of
|
||||||
|
1: //客户资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachment=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachment:= TfrmZdyAttachment.Create(application.MainForm);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
// fkhType:=trim(DataBase);
|
||||||
|
Fmanage:=trim(Parameters1);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachment.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachment.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
2: //供应商资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachGYS=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachGYS:= TfrmZdyAttachGYS.Create(application.MainForm);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
// fDEFstr5:=trim('');
|
||||||
|
fDEFstr5:=trim(DataBase);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachGYS.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachGYS.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
3: //产品资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP:= TfrmZdyAttachCP.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
// fkhType:='';
|
||||||
|
fkhType:=trim(DataBase);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
31: //产品资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP10=nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP10:= TfrmZdyAttachCP10.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP10 do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP10.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmZdyAttachCP10.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
4: //能耗登记
|
||||||
|
begin
|
||||||
|
if frmNengHaoList=nil then
|
||||||
|
begin
|
||||||
|
frmNengHaoList:= TfrmNengHaoList.Create(application.MainForm);
|
||||||
|
with frmNengHaoList do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmNengHaoList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmNengHaoList.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
5: //统计汇总查询
|
||||||
|
begin
|
||||||
|
if frmHZViewList=nil then
|
||||||
|
begin
|
||||||
|
frmHZViewList:= TfrmHZViewList.Create(application.MainForm);
|
||||||
|
with frmHZViewList do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmHZViewList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmHZViewList.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
6: //统计汇总查询
|
||||||
|
begin
|
||||||
|
if frmCPKWList=nil then
|
||||||
|
begin
|
||||||
|
frmCPKWList:= TfrmCPKWList.Create(application.MainForm);
|
||||||
|
with frmCPKWList do
|
||||||
|
begin
|
||||||
|
caption:=Trim(Title);
|
||||||
|
FormStyle := mstyle ;
|
||||||
|
windowState := mstate ;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPKWList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mNewHandle:=frmCPKWList.Handle;
|
||||||
|
|
||||||
|
end ;
|
||||||
|
end ; // end case
|
||||||
|
|
||||||
|
Result:= mnewHandle;
|
||||||
|
NewDllApp:=Application ;
|
||||||
|
end;
|
||||||
|
//===========================================================
|
||||||
|
//建立数据库连接池
|
||||||
|
//===========================================================
|
||||||
|
function ConnData():Boolean;
|
||||||
|
begin
|
||||||
|
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.
|
||||||
|
|
||||||
797
基础资料维护(BaseInfo.dll)/U_HZViewList.dfm
Normal file
797
基础资料维护(BaseInfo.dll)/U_HZViewList.dfm
Normal file
|
|
@ -0,0 +1,797 @@
|
||||||
|
object frmHZViewList: TfrmHZViewList
|
||||||
|
Left = 49
|
||||||
|
Top = 51
|
||||||
|
Width = 1024
|
||||||
|
Height = 706
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1008
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 437
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1008
|
||||||
|
Height = 636
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvSpace
|
||||||
|
BevelKind = bkFlat
|
||||||
|
TabOrder = 1
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1000
|
||||||
|
Height = 48
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #36710#38388
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 21
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 171
|
||||||
|
Top = 22
|
||||||
|
Width = 12
|
||||||
|
Height = 12
|
||||||
|
Caption = '--'
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 184
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Chejian: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 328
|
||||||
|
Top = 16
|
||||||
|
Width = 137
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ChejianChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 48
|
||||||
|
Width = 1000
|
||||||
|
Height = 260
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 1
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 353
|
||||||
|
Height = 256
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_NH
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column4
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #33021#32791#32479#35745
|
||||||
|
Width = 338
|
||||||
|
end>
|
||||||
|
object v1Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'Chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'NHMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 96
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 355
|
||||||
|
Top = 2
|
||||||
|
Width = 345
|
||||||
|
Height = 256
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_JWL
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn2
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #26426#29289#26009#29992#37327#32479#35745
|
||||||
|
Width = 334
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn1: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn2: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'JWLMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn3: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #21407#26009#21697#21517
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 47
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid3: TcxGrid
|
||||||
|
Left = 700
|
||||||
|
Top = 2
|
||||||
|
Width = 298
|
||||||
|
Height = 256
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv3: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_RHL
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn6
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn5
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #26579#21270#26009#29992#37327#32479#35745
|
||||||
|
Width = 323
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn4: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn5: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'RHLMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn6: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v3Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #21407#26009#21697#21517
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
Width = 66
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v3Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 44
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel3: TcxGridLevel
|
||||||
|
GridView = Tv3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 308
|
||||||
|
Width = 1000
|
||||||
|
Height = 320
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid4: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 353
|
||||||
|
Height = 316
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv4: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_PB
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn9
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #22383#24067#29992#37327#32479#35745
|
||||||
|
Width = 338
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn8: TcxGridDBBandedColumn
|
||||||
|
Caption = #22383#24067#21517#31216
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn9: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 98
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'GYSName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 54
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 40
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel4: TcxGridLevel
|
||||||
|
GridView = Tv4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid5: TcxGrid
|
||||||
|
Left = 355
|
||||||
|
Top = 2
|
||||||
|
Width = 643
|
||||||
|
Height = 316
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv5: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_CP
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn12
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v5Column1
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #25104#21697#29983#20135#32479#35745
|
||||||
|
Width = 673
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn11: TcxGridDBBandedColumn
|
||||||
|
Caption = #25104#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'PCode'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn12: TcxGridDBBandedColumn
|
||||||
|
Caption = #29983#20135#25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 8
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'PSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 53
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'PCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 5
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 57
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column4: TcxGridDBBandedColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'KHName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column5: TcxGridDBBandedColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 6
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column6: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'JSL'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 54
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 7
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column7: TcxGridDBBandedColumn
|
||||||
|
Caption = #31867#21035
|
||||||
|
DataBinding.FieldName = 'MJType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v5Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'CPMoney'
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 10
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v5Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'LenUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 47
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 9
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel5: TcxGridLevel
|
||||||
|
GridView = Tv5
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 557
|
||||||
|
Top = 217
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 581
|
||||||
|
Top = 217
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 157
|
||||||
|
Top = 273
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 480
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
|
object DS_NH: TDataSource
|
||||||
|
DataSet = CDS_NH
|
||||||
|
Left = 187
|
||||||
|
Top = 227
|
||||||
|
end
|
||||||
|
object CDS_NH: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 248
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object CDS_JWL: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 448
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
|
object DS_JWL: TDataSource
|
||||||
|
DataSet = CDS_JWL
|
||||||
|
Left = 419
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object DS_RHL: TDataSource
|
||||||
|
DataSet = CDS_RHL
|
||||||
|
Left = 819
|
||||||
|
Top = 267
|
||||||
|
end
|
||||||
|
object CDS_RHL: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 848
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 880
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_PB: TDataSource
|
||||||
|
DataSet = CDS_PB
|
||||||
|
Left = 163
|
||||||
|
Top = 531
|
||||||
|
end
|
||||||
|
object CDS_PB: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 192
|
||||||
|
Top = 528
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu4: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 224
|
||||||
|
Top = 528
|
||||||
|
end
|
||||||
|
object DS_CP: TDataSource
|
||||||
|
DataSet = CDS_CP
|
||||||
|
Left = 611
|
||||||
|
Top = 547
|
||||||
|
end
|
||||||
|
object CDS_CP: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 640
|
||||||
|
Top = 544
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu5: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 672
|
||||||
|
Top = 544
|
||||||
|
end
|
||||||
|
object dxComponentPrinter1: TdxComponentPrinter
|
||||||
|
CurrentLink = dxComponentPrinter1Link1
|
||||||
|
Version = 0
|
||||||
|
Left = 472
|
||||||
|
Top = 281
|
||||||
|
object dxComponentPrinter1Link1: TdxCustomContainerReportLink
|
||||||
|
Active = True
|
||||||
|
Component = ScrollBox1
|
||||||
|
PrinterPage.DMPaper = 9
|
||||||
|
PrinterPage.Footer = 6350
|
||||||
|
PrinterPage.GrayShading = True
|
||||||
|
PrinterPage.Header = 6350
|
||||||
|
PrinterPage.Margins.Bottom = 12700
|
||||||
|
PrinterPage.Margins.Left = 12700
|
||||||
|
PrinterPage.Margins.Right = 12700
|
||||||
|
PrinterPage.Margins.Top = 12700
|
||||||
|
PrinterPage.Orientation = poLandscape
|
||||||
|
PrinterPage.PageSize.X = 210000
|
||||||
|
PrinterPage.PageSize.Y = 297000
|
||||||
|
PrinterPage._dxMeasurementUnits_ = 0
|
||||||
|
PrinterPage._dxLastMU_ = 2
|
||||||
|
ReportDocument.CreationDate = 45125.629154907410000000
|
||||||
|
ReportTitle.Text = #20135#20540#27719#24635#34920
|
||||||
|
BuiltInReportLink = True
|
||||||
|
HiddenComponents = {}
|
||||||
|
ExcludedComponents = {}
|
||||||
|
AggregatedReportLinks = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
322
基础资料维护(BaseInfo.dll)/U_HZViewList.pas
Normal file
322
基础资料维护(BaseInfo.dll)/U_HZViewList.pas
Normal file
|
|
@ -0,0 +1,322 @@
|
||||||
|
unit U_HZViewList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||||
|
dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev,
|
||||||
|
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, dxPSCore,
|
||||||
|
dxPScxCommon, dxPScxGridLnk, dxPSContainerLnk,
|
||||||
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxPSPDFExportCore,
|
||||||
|
dxPSPDFExport, cxDrawTextUtils, dxPSPrVwStd, dxPSPrVwAdv, dxPSPrVwRibbon,
|
||||||
|
dxPScxPageControlProducer, dxPScxGridLayoutViewLnk,
|
||||||
|
dxPScxEditorProducers, dxPScxExtEditorProducers;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmHZViewList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_NH: TDataSource;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
CDS_NH: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
CDS_JWL: TClientDataSet;
|
||||||
|
DS_JWL: TDataSource;
|
||||||
|
DS_RHL: TDataSource;
|
||||||
|
CDS_RHL: TClientDataSet;
|
||||||
|
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||||
|
DS_PB: TDataSource;
|
||||||
|
CDS_PB: TClientDataSet;
|
||||||
|
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||||
|
DS_CP: TDataSource;
|
||||||
|
CDS_CP: TClientDataSet;
|
||||||
|
cxGridPopupMenu5: TcxGridPopupMenu;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
dxComponentPrinter1: TdxComponentPrinter;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Chejian: TComboBox;
|
||||||
|
Panel2: TPanel;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv1: TcxGridDBBandedTableView;
|
||||||
|
v1Column1: TcxGridDBBandedColumn;
|
||||||
|
v1Column2: TcxGridDBBandedColumn;
|
||||||
|
v1Column3: TcxGridDBBandedColumn;
|
||||||
|
v1Column4: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv2: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn1: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn2: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn3: TcxGridDBBandedColumn;
|
||||||
|
v2Column1: TcxGridDBBandedColumn;
|
||||||
|
v2Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
cxGrid3: TcxGrid;
|
||||||
|
Tv3: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn4: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn5: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn6: TcxGridDBBandedColumn;
|
||||||
|
v3Column1: TcxGridDBBandedColumn;
|
||||||
|
v3Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel3: TcxGridLevel;
|
||||||
|
Panel3: TPanel;
|
||||||
|
cxGrid4: TcxGrid;
|
||||||
|
Tv4: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn8: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn9: TcxGridDBBandedColumn;
|
||||||
|
v4Column1: TcxGridDBBandedColumn;
|
||||||
|
v4Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel4: TcxGridLevel;
|
||||||
|
cxGrid5: TcxGrid;
|
||||||
|
Tv5: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn11: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn12: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column1: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column2: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column3: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column4: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column5: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column6: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column7: TcxGridDBBandedColumn;
|
||||||
|
v5Column1: TcxGridDBBandedColumn;
|
||||||
|
v5Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel5: TcxGridLevel;
|
||||||
|
dxComponentPrinter1Link1: TdxCustomContainerReportLink;
|
||||||
|
v4Column3: TcxGridDBBandedColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure NHBiaoNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ChejianChange(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmHZViewList: TfrmHZViewList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_NengHaoInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(Qty) Qty,sum(Qty*Price) NHMoney,CheJian, NHType from NengHao ');
|
||||||
|
sql.Add(' where NHDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and NHDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add('Group by CheJian ,NHType');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_NH);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_NH);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(CRQty*YCLPrice) JWLMoney,ZdyStr1 chejian,YCLName,CRUnit from CK_YCL_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' and CKName=''机物料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by ZdyStr1,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_JWL);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_JWL);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(CRQty*YCLPrice) RHLMoney,ZdyStr1 chejian,YCLName,CRUnit from CK_YCL_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' and CKName=''染化料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by ZdyStr1,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_RHL);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_RHL);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(PS) PS,YCLName,CRUnit,GYSName from CK_PB_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
//sql.Add(' and CKName=''染化料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by GYSName,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_PB);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_PB);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select sum(AA.Qty) Qty ,sum(AA.KgQty) KgQty,sum(AA.KgQtyP) KgQtyP,Count(*) JSL,LenUnit,PCode,ColorNo,MJDate,KHName,CKNO,OrderNo ');
|
||||||
|
sql.Add(',PSpec,PCF,PHuaNo,PColorNo ,MJFK,MJSJKZ,MJType,CPMoney=Sum(CPMoney)');
|
||||||
|
SQL.Add(' from(select A.Qty ,A.KgQty ,A.KgQtyP,A.CKNO,D.LenUnit,D.PCode,D.ColorNo,D.OrderNo,CPMoney=Qty*A.Price,');
|
||||||
|
sql.Add('MJDate=convert(varchar(10),A.CRTime,120),A.KHName');
|
||||||
|
sql.Add(',D.PSpec,D.PCF,D.PHuaNo,D.PColorNo,D.MJFK,D.MJSJKZ,D.MJType,D.BatchNo');
|
||||||
|
sql.add('from CK_BanCP_CR A ');
|
||||||
|
Sql.add(' inner join XH_MJJY D on A.MJId=D.MJId');
|
||||||
|
sql.add('where A.CRTime>=:begdate and A.CRTime<:enddate');
|
||||||
|
SQL.Add(' and CRType=''正常出库'' ) AA');
|
||||||
|
sql.Add(' Group by LenUnit,PCode,ColorNo,MJDate,KHName,CKNO,OrderNo,PSpec,PCF,PHuaNo,PColorNo ,MJFK,MJSJKZ,MJType,BatchNo');
|
||||||
|
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime));
|
||||||
|
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1));
|
||||||
|
Open;
|
||||||
|
//ShowMessage(SQL.Text);
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_CP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_CP);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmHZViewList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxBandedGrid('HZ查询1',Tv1,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询2',Tv2,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询3',Tv3,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询4',Tv4,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询5',Tv5,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmHZViewList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//ReadCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询1',Tv1,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询2',Tv2,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询3',Tv3,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询4',Tv4,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询5',Tv5,'客户自定义');
|
||||||
|
//InitGrid();
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Code=ZdyNo,Name=ZdyName from KH_Zdy where Type=''chejian'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
Chejian.Items.Clear;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
Chejian.Items.Add(Trim(ADOQueryTemp.fieldbyname('Name').AsString));
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Chejian.Items.Add('');
|
||||||
|
BegDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||||
|
EndDate.Date:=BegDate.Date;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.NHBiaoNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'能耗列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ChejianChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_NH.Active=True then
|
||||||
|
SDofilter10(CDS_NH,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_JWL.Active=True then
|
||||||
|
SDofilter10(CDS_JWL,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_RHL.Active=True then
|
||||||
|
SDofilter10(CDS_RHL,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_NH.Active=True then
|
||||||
|
SDofilter10(CDS_NH,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_JWL.Active=True then
|
||||||
|
SDofilter10(CDS_JWL,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_RHL.Active=True then
|
||||||
|
SDofilter10(CDS_RHL,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
dxComponentPrinter1.Preview(False,nil);
|
||||||
|
dxComponentPrinter1.ReportLink[0].Preview;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
262
基础资料维护(BaseInfo.dll)/U_KHAdd.dfm
Normal file
262
基础资料维护(BaseInfo.dll)/U_KHAdd.dfm
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
object frmKHAdd: TfrmKHAdd
|
||||||
|
Left = 93
|
||||||
|
Top = 232
|
||||||
|
Width = 1130
|
||||||
|
Height = 388
|
||||||
|
Caption = #23458#25143#36164#26009#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1122
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGLWT.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGLWT.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 111
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1122
|
||||||
|
Height = 320
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_BJ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #24402#23646#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'MainType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#21517#31216'('#20013#25991')'
|
||||||
|
DataBinding.FieldName = 'DEFstr9'
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column5PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#26469#28304
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20027#33829#24066#22330
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column12PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #20027#33829#20135#21697
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column13PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21306#22495
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column15PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#24773#20917
|
||||||
|
DataBinding.FieldName = 'DEFstr10'
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #20854#20182#20449#24687
|
||||||
|
DataBinding.FieldName = 'DEFNote3'
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DS_BJ: TDataSource
|
||||||
|
DataSet = CDS_SQ
|
||||||
|
Left = 435
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object CDS_SQ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 392
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 261
|
||||||
|
Top = 169
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 317
|
||||||
|
Top = 121
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 117
|
||||||
|
end
|
||||||
|
end
|
||||||
303
基础资料维护(BaseInfo.dll)/U_KHAdd.pas
Normal file
303
基础资料维护(BaseInfo.dll)/U_KHAdd.pas
Normal file
|
|
@ -0,0 +1,303 @@
|
||||||
|
unit U_KHAdd;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, BtnEdit, ComCtrls, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ToolWin,
|
||||||
|
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, cxCalendar, DBClient,
|
||||||
|
ADODB, cxButtonEdit, cxDropDownEdit, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHAdd = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
DS_BJ: TDataSource;
|
||||||
|
CDS_SQ: TClientDataSet;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column17: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure v2Column5PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column12PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column13PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column15PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
FCYID,FYSID,FPrice:String;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHAdd: TfrmKHAdd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHAdd:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
FBZType,fsj:string;
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户Add',Tv2,'基础数据');
|
||||||
|
fsj:='select UserId code,UserName Name from SY_User where UserId not in(''Admin'',''Test'')';
|
||||||
|
SInitCxGridComboBoxBySql(ADOQueryTemp,v2Column14,fsj,1,False,'');
|
||||||
|
fsj:='select UserId code,UserName Name from SY_User where UserId not in(''Admin'',''Test'')';
|
||||||
|
SInitCxGridComboBoxBySql(ADOQueryTemp,v2Column10,fsj,1,False,'');
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FYSID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_SQ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_SQ);
|
||||||
|
if CDS_SQ.IsEmpty then
|
||||||
|
begin
|
||||||
|
with CDS_SQ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('客户Add',Tv2,'基础数据');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.ToolButton6Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:String;
|
||||||
|
begin
|
||||||
|
if Trim(CDS_SQ.fieldbyname('ZdyCode').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('客户编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FYSID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取客户最大ID失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(FYSID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(maxno)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FYSID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxno);
|
||||||
|
FieldByName('Type').Value:='KHName';
|
||||||
|
FieldByName('ZdyName').Value:=CDS_SQ.fieldbyname('ZdyName').Value;
|
||||||
|
FieldByName('MainType').Value:=CDS_SQ.fieldbyname('MainType').Value;
|
||||||
|
FieldByName('ZdyCode').Value:=CDS_SQ.fieldbyname('ZdyCode').Value;
|
||||||
|
FieldByName('DEFstr1').Value:=CDS_SQ.fieldbyname('DEFstr1').Value;
|
||||||
|
FieldByName('DEFstr2').Value:=CDS_SQ.fieldbyname('DEFstr2').Value;
|
||||||
|
FieldByName('DEFstr3').Value:=CDS_SQ.fieldbyname('DEFstr3').Value;
|
||||||
|
FieldByName('DEFstr4').Value:=CDS_SQ.fieldbyname('DEFstr4').Value;
|
||||||
|
FieldByName('DEFstr5').Value:=CDS_SQ.fieldbyname('DEFstr5').Value;
|
||||||
|
FieldByName('DEFstr6').Value:=CDS_SQ.fieldbyname('DEFstr6').Value;
|
||||||
|
FieldByName('DEFstr7').Value:=CDS_SQ.fieldbyname('DEFstr7').Value;
|
||||||
|
FieldByName('DEFstr8').Value:=CDS_SQ.fieldbyname('DEFstr8').Value;
|
||||||
|
FieldByName('DEFstr9').Value:=CDS_SQ.fieldbyname('DEFstr9').Value;
|
||||||
|
FieldByName('DEFstr10').Value:=CDS_SQ.fieldbyname('DEFstr10').Value;
|
||||||
|
FieldByName('DEFNote1').Value:=CDS_SQ.fieldbyname('DEFNote1').Value;
|
||||||
|
FieldByName('DEFNote2').Value:=CDS_SQ.fieldbyname('DEFNote2').Value;
|
||||||
|
FieldByName('DEFNote3').Value:=CDS_SQ.fieldbyname('DEFNote3').Value;
|
||||||
|
FieldByName('DEFNote4').Value:=CDS_SQ.fieldbyname('DEFNote4').Value;
|
||||||
|
FieldByName('DEFNote5').Value:=CDS_SQ.fieldbyname('DEFNote5').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Count(*) FFCount from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_SQ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.FieldByName('FFCount').AsInteger>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//FYSID:='';
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
FYSID:=Trim(maxno);
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column5PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr4GSLX';
|
||||||
|
flagname:='公司类型';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr4').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column12PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr6ZYSC';
|
||||||
|
flagname:='主营市场';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr6').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column13PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr7ZYCP';
|
||||||
|
flagname:='主营产品';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr7').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column15PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr8KHQY';
|
||||||
|
flagname:='客户区域';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr8').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
17996
基础资料维护(BaseInfo.dll)/U_KHHelp.dfm
Normal file
17996
基础资料维护(BaseInfo.dll)/U_KHHelp.dfm
Normal file
File diff suppressed because it is too large
Load Diff
167
基础资料维护(BaseInfo.dll)/U_KHHelp.pas
Normal file
167
基础资料维护(BaseInfo.dll)/U_KHHelp.pas
Normal file
|
|
@ -0,0 +1,167 @@
|
||||||
|
unit U_KHHelp;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||||
|
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHHelp = class(TForm)
|
||||||
|
TV1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
V1Name: TcxGridDBColumn;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZDYName: TEdit;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
V1Column1: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ZDYNameChange(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
flag,flagname,snote,MainType:string;
|
||||||
|
fnote,forderno,fZdyFlag:Boolean;
|
||||||
|
PPSTE:integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHHelp: TfrmKHHelp;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.InitGrid();
|
||||||
|
var
|
||||||
|
CYType:String;
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_User where UserId='''+Trim(DCode)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CYType:=Trim(ADOQueryTemp.fieldbyname('DPID').AsString);
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Select_User_KHName :CYType');
|
||||||
|
Parameters.ParamByName('CYType').Value:=Trim(CYType);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult:=2;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
WriteCxGrid('客户名称',TV1,'基础数据');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
ReadCxGrid('客户名称',TV1,'基础数据');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if TV1.OptionsData.Editing=False then
|
||||||
|
begin
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.ZDYNameChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj:String;
|
||||||
|
begin
|
||||||
|
if Trim(ZDYName.Text)<>'' then
|
||||||
|
begin
|
||||||
|
fsj:=' zdyname like '''+'%'+Trim(ZDYName.Text)+'%'+''''
|
||||||
|
+' or ZJM like '''+'%'+Trim(ZDYName.Text)+'%'+'''';
|
||||||
|
end;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,fsj);
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHHelp:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
314
基础资料维护(BaseInfo.dll)/U_KHInfo.dfm
Normal file
314
基础资料维护(BaseInfo.dll)/U_KHInfo.dfm
Normal file
|
|
@ -0,0 +1,314 @@
|
||||||
|
object frmKHInfo: TfrmKHInfo
|
||||||
|
Left = 41
|
||||||
|
Top = 136
|
||||||
|
Width = 1154
|
||||||
|
Height = 577
|
||||||
|
Caption = #23458#25143#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1146
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_CPCK.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBTP: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #26356#26032
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = TBTPClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1146
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 27
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 174
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20195#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object OrderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 80
|
||||||
|
Top = 11
|
||||||
|
Width = 77
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = WFBCodeNameChange
|
||||||
|
end
|
||||||
|
object WFBCodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 203
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = WFBCodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 32
|
||||||
|
Top = 112
|
||||||
|
Width = 969
|
||||||
|
Height = 200
|
||||||
|
TabOrder = 2
|
||||||
|
object TV1: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Width = 174
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 99
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 157
|
||||||
|
end>
|
||||||
|
object V1Column1: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column2: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column3: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column4: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column5: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column6: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 5
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column7: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 6
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column8: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 7
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column9: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 8
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column10: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 9
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column11: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 10
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column12: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 11
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column13: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 12
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column14: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 13
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column15: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 14
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column16: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 15
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column17: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 16
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column18: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 17
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column19: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 18
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column20: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 19
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column21: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 20
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column22: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 21
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = TV1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 760
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 704
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 664
|
||||||
|
Top = 112
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_CPCK.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 648
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_CPCK.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
end
|
||||||
186
基础资料维护(BaseInfo.dll)/U_KHInfo.pas
Normal file
186
基础资料维护(BaseInfo.dll)/U_KHInfo.pas
Normal file
|
|
@ -0,0 +1,186 @@
|
||||||
|
unit U_KHInfo;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ADODB, DBClient,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, StdCtrls, ComCtrls, ExtCtrls,
|
||||||
|
ToolWin, cxCalendar, cxButtonEdit, cxCheckBox, cxGridBandedTableView,
|
||||||
|
cxGridDBBandedTableView;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHInfo = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
TBTP: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
OrderNo: TEdit;
|
||||||
|
WFBCodeName: TEdit;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
TV1: TcxGridDBBandedTableView;
|
||||||
|
V1Column1: TcxGridDBBandedColumn;
|
||||||
|
V1Column2: TcxGridDBBandedColumn;
|
||||||
|
V1Column3: TcxGridDBBandedColumn;
|
||||||
|
V1Column4: TcxGridDBBandedColumn;
|
||||||
|
V1Column5: TcxGridDBBandedColumn;
|
||||||
|
V1Column6: TcxGridDBBandedColumn;
|
||||||
|
V1Column7: TcxGridDBBandedColumn;
|
||||||
|
V1Column8: TcxGridDBBandedColumn;
|
||||||
|
V1Column9: TcxGridDBBandedColumn;
|
||||||
|
V1Column10: TcxGridDBBandedColumn;
|
||||||
|
V1Column11: TcxGridDBBandedColumn;
|
||||||
|
V1Column12: TcxGridDBBandedColumn;
|
||||||
|
V1Column13: TcxGridDBBandedColumn;
|
||||||
|
V1Column14: TcxGridDBBandedColumn;
|
||||||
|
V1Column15: TcxGridDBBandedColumn;
|
||||||
|
V1Column16: TcxGridDBBandedColumn;
|
||||||
|
V1Column17: TcxGridDBBandedColumn;
|
||||||
|
V1Column18: TcxGridDBBandedColumn;
|
||||||
|
V1Column19: TcxGridDBBandedColumn;
|
||||||
|
V1Column20: TcxGridDBBandedColumn;
|
||||||
|
V1Column21: TcxGridDBBandedColumn;
|
||||||
|
V1Column22: TcxGridDBBandedColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure WFBCodeNameChange(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBTPClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure v1Column16PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function DelData():Boolean;
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHInfo: TfrmKHInfo;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHInfo:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
procedure TfrmKHInfo.InitGrid();
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxBandedGrid('状态列表',Tv1,'无纺布订单');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.WFBCodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxBandedGrid('状态列表',Tv1,'无纺布订单');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBTPClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
except
|
||||||
|
Application.MessageBox('更新失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmKHInfo.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Order_Sub_KC where KCId='''+Trim(Order_Main.fieldbyname('KCId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('订单状态列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.v1Column16PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='hdmc';
|
||||||
|
flagname:='货代名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Order_Main.Edit;
|
||||||
|
Order_Main.FieldByName('OSStr1').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
240
基础资料维护(BaseInfo.dll)/U_NengHaoInput.dfm
Normal file
240
基础资料维护(BaseInfo.dll)/U_NengHaoInput.dfm
Normal file
|
|
@ -0,0 +1,240 @@
|
||||||
|
object frmNengHaoInput: TfrmNengHaoInput
|
||||||
|
Left = 292
|
||||||
|
Top = 254
|
||||||
|
Width = 697
|
||||||
|
Height = 370
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 681
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 681
|
||||||
|
Height = 300
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'NHDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v2Column4PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#27827#27700
|
||||||
|
#33258#26469#27700
|
||||||
|
#27745#27700
|
||||||
|
#22825#28982#27668
|
||||||
|
#33976#27773
|
||||||
|
#30005
|
||||||
|
#23792#30005
|
||||||
|
#23574#30005
|
||||||
|
#35895#30005
|
||||||
|
''
|
||||||
|
''
|
||||||
|
'')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #34920#21517
|
||||||
|
DataBinding.FieldName = 'NHBiaoName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v2Column8PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Width = 93
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
254
基础资料维护(BaseInfo.dll)/U_NengHaoInput.pas
Normal file
254
基础资料维护(BaseInfo.dll)/U_NengHaoInput.pas
Normal file
|
|
@ -0,0 +1,254 @@
|
||||||
|
unit U_NengHaoInput;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmNengHaoInput = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column8PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmNengHaoInput: TfrmNengHaoInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from NengHao where NHID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmNengHaoInput:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('能耗录入',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmNengHaoInput.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('能耗录入',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmNengHaoInput.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'NH','NengHao',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from NengHao where NHID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('NHID').Value:=Trim(maxId);
|
||||||
|
//FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'NengHao',0);
|
||||||
|
if Trim(CDS_HZ.fieldbyname('Price').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value:=CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value:=0;
|
||||||
|
end;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('NHID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Trim(CDS_HZ.FieldByName('NHDate').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('日期不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(CDS_HZ.FieldByName('NHType').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('能耗类别不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.v2Column4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='chejian';
|
||||||
|
flagname:='车间';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Edit;
|
||||||
|
CDS_HZ.FieldByName('chejian').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.v2Column8PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='NHBiaoName';
|
||||||
|
flagname:='表名';
|
||||||
|
MainType:=Trim(CDS_HZ.fieldbyname('chejian').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Edit;
|
||||||
|
CDS_HZ.FieldByName('NHBiaoName').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
359
基础资料维护(BaseInfo.dll)/U_NengHaoList.dfm
Normal file
359
基础资料维护(BaseInfo.dll)/U_NengHaoList.dfm
Normal file
|
|
@ -0,0 +1,359 @@
|
||||||
|
object frmNengHaoList: TfrmNengHaoList
|
||||||
|
Left = 209
|
||||||
|
Top = 16
|
||||||
|
Width = 1036
|
||||||
|
Height = 618
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1020
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 437
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1020
|
||||||
|
Height = 66
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 439
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #34920#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #36710#38388
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 574
|
||||||
|
Top = 20
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 21
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 142
|
||||||
|
Top = 21
|
||||||
|
Width = 78
|
||||||
|
Height = 12
|
||||||
|
Caption = '-------------'
|
||||||
|
end
|
||||||
|
object NHBiaoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 463
|
||||||
|
Top = 17
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
end
|
||||||
|
object Chejian: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 327
|
||||||
|
Top = 17
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
end
|
||||||
|
object NHType: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 627
|
||||||
|
Top = 17
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#27827#27700
|
||||||
|
#33258#26469#27700
|
||||||
|
#27745#27700
|
||||||
|
#22825#28982#27668
|
||||||
|
#33976#27773
|
||||||
|
#30005
|
||||||
|
#23792#30005
|
||||||
|
#23574#30005
|
||||||
|
#35895#30005
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 184
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1020
|
||||||
|
Height = 482
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'NHDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #34920#21517
|
||||||
|
DataBinding.FieldName = 'NHBiaoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 728
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 688
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 832
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 771
|
||||||
|
Top = 251
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 768
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
end
|
||||||
261
基础资料维护(BaseInfo.dll)/U_NengHaoList.pas
Normal file
261
基础资料维护(BaseInfo.dll)/U_NengHaoList.pas
Normal file
|
|
@ -0,0 +1,261 @@
|
||||||
|
unit U_NengHaoList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmNengHaoList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
NHBiaoName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
Chejian: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
NHType: TComboBox;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
Label4: TLabel;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label5: TLabel;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure NHBiaoNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmNengHaoList: TfrmNengHaoList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_NengHaoInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from NengHao ');
|
||||||
|
sql.Add(' where NHDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and NHDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' order by Chejian,NHTYpe,NHDate');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmNengHaoList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmNengHaoList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('NHID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete NengHao where NHID='''+Trim(CDS_HZ.fieldbyname('NHID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
EndDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||||
|
BegDate.Date:=EndDate.Date;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.NHBiaoNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
SelExportData(Tv2,ADOQueryMain,'能耗列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmNengHaoInput:=TfrmNengHaoInput.Create(Application);
|
||||||
|
with frmNengHaoInput do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('NHID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_HZ.Locate('NHID',FCYID,[]);
|
||||||
|
with Self.CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('NHDate').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHDate').Value;
|
||||||
|
FieldByName('chejian').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('chejian').Value;
|
||||||
|
FieldByName('NHType').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHType').Value;
|
||||||
|
FieldByName('NHBiaoName').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHBiaoName').Value;
|
||||||
|
FieldByName('Price').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
FieldByName('Qty').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Qty').Value;
|
||||||
|
FieldByName('Note').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Note').Value;
|
||||||
|
//FieldByName('NHID').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHID').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmNengHaoInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmNengHaoInput:=TfrmNengHaoInput.Create(Application);
|
||||||
|
with frmNengHaoInput do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_HZ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('NHDate').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHDate').Value;
|
||||||
|
FieldByName('chejian').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('chejian').Value;
|
||||||
|
FieldByName('NHType').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHType').Value;
|
||||||
|
FieldByName('NHBiaoName').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHBiaoName').Value;
|
||||||
|
FieldByName('Price').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
FieldByName('Qty').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Qty').Value;
|
||||||
|
FieldByName('Note').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Note').Value;
|
||||||
|
FieldByName('NHID').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHID').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmNengHaoInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM,RPTName:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\能耗报表.rmf' ;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['begdate']:=BegDate.DateTime;
|
||||||
|
RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+RPTName),'提示',0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
277
基础资料维护(BaseInfo.dll)/U_SYDept.dfm
Normal file
277
基础资料维护(BaseInfo.dll)/U_SYDept.dfm
Normal file
|
|
@ -0,0 +1,277 @@
|
||||||
|
object frmSYDept: TfrmSYDept
|
||||||
|
Left = 209
|
||||||
|
Top = 173
|
||||||
|
Width = 872
|
||||||
|
Height = 509
|
||||||
|
Caption = #32452#32455#32467#26500
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 864
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGLWT.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGLWT.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686#23376#31867
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
Caption = #32452#32455#20998#37197
|
||||||
|
ImageIndex = 132
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 359
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxDBTreeList1: TcxDBTreeList
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 249
|
||||||
|
Height = 439
|
||||||
|
Align = alLeft
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
end>
|
||||||
|
BufferedPaint = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.ParentField = 'DPParent'
|
||||||
|
DataController.KeyField = 'DPID'
|
||||||
|
OptionsBehavior.ExpandOnDblClick = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.CellAutoHeight = True
|
||||||
|
OptionsView.Headers = False
|
||||||
|
RootValue = -1
|
||||||
|
Styles.Inactive = DataLink_YPGLWT.Red
|
||||||
|
Styles.Selection = DataLink_YPGLWT.Red
|
||||||
|
Styles.IncSearch = DataLink_YPGLWT.Red
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxDBTreeList1Click
|
||||||
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'DPName'
|
||||||
|
Width = 210
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 249
|
||||||
|
Top = 33
|
||||||
|
Width = 315
|
||||||
|
Height = 439
|
||||||
|
Align = alLeft
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 40
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #19978#32423#32452#32455
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 81
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #32452#32455#21517#31216
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 121
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #32452#32455#32534#30721
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 16
|
||||||
|
Width = 60
|
||||||
|
Height = 14
|
||||||
|
Caption = #32452#32455#32467#26500
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object DPTopName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 37
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DPName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 77
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnKeyPress = DPNameKeyPress
|
||||||
|
end
|
||||||
|
object DPNo: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 117
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid4: TcxGrid
|
||||||
|
Left = 564
|
||||||
|
Top = 33
|
||||||
|
Width = 300
|
||||||
|
Height = 439
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv4: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DSUser
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_YPGLWT.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YPGLWT.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YPGLWT.SHuangSe
|
||||||
|
object cxGridDBColumn1: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#32534#21495
|
||||||
|
DataBinding.FieldName = 'UserId'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
object cxGridDBColumn7: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#21517#31216
|
||||||
|
DataBinding.FieldName = 'UserName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object cxGridDBColumn8: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#32452#32455
|
||||||
|
DataBinding.FieldName = 'dept'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = Tv4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Tree
|
||||||
|
Left = 147
|
||||||
|
Top = 219
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 357
|
||||||
|
Top = 177
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 397
|
||||||
|
Top = 177
|
||||||
|
end
|
||||||
|
object CDS_Tree: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 96
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
object CDS_User: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 272
|
||||||
|
end
|
||||||
|
object DSUser: TDataSource
|
||||||
|
DataSet = CDS_User
|
||||||
|
Left = 675
|
||||||
|
Top = 211
|
||||||
|
end
|
||||||
|
end
|
||||||
314
基础资料维护(BaseInfo.dll)/U_SYDept.pas
Normal file
314
基础资料维护(BaseInfo.dll)/U_SYDept.pas
Normal file
|
|
@ -0,0 +1,314 @@
|
||||||
|
unit U_SYDept;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, ExtCtrls, DBClient, cxFilter, cxData, cxDataStorage, cxEdit,
|
||||||
|
cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxClasses, cxGridCustomView, cxGrid;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmSYDept = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxDBTreeList1: TcxDBTreeList;
|
||||||
|
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOQueryTree: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
DPTopName: TEdit;
|
||||||
|
DPName: TEdit;
|
||||||
|
DPNo: TEdit;
|
||||||
|
CDS_Tree: TClientDataSet;
|
||||||
|
cxGrid4: TcxGrid;
|
||||||
|
Tv4: TcxGridDBTableView;
|
||||||
|
cxGridDBColumn1: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn7: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn8: TcxGridDBColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
Label4: TLabel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
CDS_User: TClientDataSet;
|
||||||
|
DSUser: TDataSource;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
PState:Integer;
|
||||||
|
FCPID,FTopID:String;
|
||||||
|
procedure InitTree();
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmSYDept: TfrmSYDept;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmSYDept.InitTree();
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryTree.DisableControls;
|
||||||
|
with ADOQueryTree do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from SY_Dept order by DPlevel,DPOrder,DPName');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTree,CDS_Tree);
|
||||||
|
SInitCDSData20(ADOQueryTree,CDS_Tree);
|
||||||
|
cxDBTreeList1.Items[0].Expand(false);
|
||||||
|
finally
|
||||||
|
ADOQueryTree.EnableControls;
|
||||||
|
end;
|
||||||
|
//cxDBTreeList1.Items[1].Expand(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmSYDept:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PState:=11;
|
||||||
|
DPTopName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||||
|
//FTopID:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
FCPID:='';
|
||||||
|
DPName.Text:='';
|
||||||
|
DPNo.Text:='';
|
||||||
|
DPName.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.cxDBTreeList1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PState:=22;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPParent').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
FCPID:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||||
|
DPTopName.Text:=Trim(ADOQueryTemp.fieldbyname('DPName').AsString);
|
||||||
|
DPName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||||
|
DPNo.Text:=Trim(CDS_Tree.fieldbyname('DPNo').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.ToolButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxId:String;
|
||||||
|
begin
|
||||||
|
if Trim(DPName.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('本级名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(DPNo.Text)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('类别编码不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if PState=11 then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'DP','SY_Dept',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('区最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCPID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from SY_Dept where DPID='''+Trim(FCPID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if PState=11 then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('DPID').Value:=Trim(maxId);
|
||||||
|
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||||
|
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||||
|
FieldByName('DPParent').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||||
|
FieldByName('DPLevel').Value:=CDS_Tree.fieldbyname('DPLevel').AsInteger+1;
|
||||||
|
Post;
|
||||||
|
end else
|
||||||
|
if PState=22 then
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DPID').Value:=Trim(maxId);
|
||||||
|
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||||
|
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||||
|
//FieldByName('CPParent').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||||
|
//FieldByName('CPOrder').Value:=ADOQueryTree.fieldbyname('CPOrder').AsInteger+1;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTree.FieldByName('DPLevel').AsInteger=0 then Exit;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已经定义下级组织不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_User where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('该组织已有人员不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
sql.Add('delete SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
DPNo.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Tree.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
if CDS_User.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要进行组织分配吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update SY_User Set DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||||
|
sql.Add(' where UserId='''+Trim(CDS_User.fieldbyname('UserId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with CDS_User do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Dept').Value:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmSYDept.cxDBTreeList1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Tree.FieldByName('DPLevel').Value=0 then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select A.*,Dept=(select DPName from SY_Dept where DPID=A.DPID) ');
|
||||||
|
SQL.Add(' from SY_User A where UserId not in(''Admin'',''Test'') ');
|
||||||
|
SQL.Add(' and Valid=''Y'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('exec P_Select_Dept_User :CYType');
|
||||||
|
Parameters.ParamByName('CYType').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
23820
基础资料维护(BaseInfo.dll)/U_UserHelpSel.dfm
Normal file
23820
基础资料维护(BaseInfo.dll)/U_UserHelpSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
234
基础资料维护(BaseInfo.dll)/U_UserHelpSel.pas
Normal file
234
基础资料维护(BaseInfo.dll)/U_UserHelpSel.pas
Normal file
|
|
@ -0,0 +1,234 @@
|
||||||
|
unit U_UserHelpSel;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, StdCtrls, cxGridLevel,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, cxInplaceContainer, cxDBTL,
|
||||||
|
cxTLData, ComCtrls, ToolWin, ADODB, ImgList,StrUtils, ExtCtrls,
|
||||||
|
cxCheckBox, DBClient;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmUserHelpSel = class(TForm)
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
TOk: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxDBTreeList1: TcxDBTreeList;
|
||||||
|
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
tv1: TcxGridDBTableView;
|
||||||
|
tv1Code: TcxGridDBColumn;
|
||||||
|
tv1Name: TcxGridDBColumn;
|
||||||
|
DBGrid1Level1: TcxGridLevel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
ADOQueryDept: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
tv1Column1: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
ADOQueryHelp: TADOQuery;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
Label1: TLabel;
|
||||||
|
Edt_name: TEdit;
|
||||||
|
ImageList1: TImageList;
|
||||||
|
cxStyleTree: TcxStyle;
|
||||||
|
Label2: TLabel;
|
||||||
|
Edt_Code: TEdit;
|
||||||
|
Splitter1: TSplitter;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
procedure tv1DblClick(Sender: TObject);
|
||||||
|
procedure Edt_nameChange(Sender: TObject);
|
||||||
|
procedure cxDBTreeList1Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitTree();
|
||||||
|
procedure DoQuery();
|
||||||
|
procedure FilterData(strdepotno,strcode,strname:string);
|
||||||
|
public
|
||||||
|
fFrameNo:string;
|
||||||
|
fFrameName:string;
|
||||||
|
fIsYwy:boolean;
|
||||||
|
ReturnStr:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmUserHelpSel: TfrmUserHelpSel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
{$R *.dfm}
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
//////功能:过滤数据
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmUserHelpSel.FilterData(strdepotno,strcode,strname:string);
|
||||||
|
var
|
||||||
|
filterStr:string;
|
||||||
|
begin
|
||||||
|
filterStr:='';
|
||||||
|
if trim(strdepotno)<>'' then
|
||||||
|
filterStr:=filterStr+' and dept like '+quotedstr('%'+trim(strdepotno)+'%');
|
||||||
|
if trim(strcode)<>'' then
|
||||||
|
filterStr:=filterStr+' and userID like '+quotedstr('%'+trim(strcode)+'%');
|
||||||
|
if trim(strname)<>'' then
|
||||||
|
filterStr:=filterStr+' and userName like '+quotedstr('%'+trim(strname)+'%');
|
||||||
|
|
||||||
|
try
|
||||||
|
ADOQueryHelp.DisableControls ;
|
||||||
|
if trim(filterStr)='' then
|
||||||
|
begin
|
||||||
|
ADOQueryHelp.Filtered:=false;
|
||||||
|
ADOQueryHelp.EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
filterStr:=trim(RightBStr(filterStr,length(filterStr)-5));
|
||||||
|
// showmessage(filterStr);
|
||||||
|
with ADOQueryHelp do
|
||||||
|
begin
|
||||||
|
filtered:=false;
|
||||||
|
filter:=filterStr;
|
||||||
|
filtered:=true;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryHelp.EnableControls;
|
||||||
|
SCreateCDS20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//////////////////////////////////////////////////////
|
||||||
|
procedure TfrmUserHelpSel.InitTree();
|
||||||
|
var
|
||||||
|
strsql,strwhere:string;
|
||||||
|
begin
|
||||||
|
strsql:=' SELECT distinct UDept=''ALL'',UDeptTop='''',UDeptName=''所有部门'',Framelevel=0 '+
|
||||||
|
' union '+
|
||||||
|
' SELECT distinct UDept,UDeptTop=''ALL'',UDept,Framelevel=1 '+
|
||||||
|
' FROM BD_staff A '+
|
||||||
|
' WHERE USERID<>''ADMIN'' and ISNULL(UDept,'''')<>'''' ';
|
||||||
|
|
||||||
|
strwhere:=' where A.Valid=''Y'' ';
|
||||||
|
{ if fIsYwy then
|
||||||
|
strwhere:=strwhere+' and A.YWYFlag=''Y'' ';
|
||||||
|
if trim(fFrameNo)<>'' then
|
||||||
|
strwhere:=strwhere+' and A.dept='+quotedstr(trim(fFrameNo));
|
||||||
|
if trim(fFrameName)<>'' then
|
||||||
|
strwhere:=strwhere+' and B.frameName like '+quotedstr('%'+trim(fFrameName)+'%');
|
||||||
|
strsql:=strsql+ strwhere; }
|
||||||
|
|
||||||
|
with ADOQueryDept do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear ;
|
||||||
|
sql.Add( strsql);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
cxDBTreeList1.FullExpand;
|
||||||
|
|
||||||
|
DoQuery();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitTree();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align :=alclient;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////
|
||||||
|
procedure TfrmUserHelpSel.DoQuery();
|
||||||
|
var
|
||||||
|
strsql,strwhere:string;
|
||||||
|
begin
|
||||||
|
strsql:=' select * '+
|
||||||
|
' from BD_staff A '+
|
||||||
|
' where isnull(UserID,'''')<>''ADMIN'' ';
|
||||||
|
strwhere:=' and A.Valid=''Y'' ';
|
||||||
|
if fIsYwy then
|
||||||
|
strwhere:=strwhere+' and A.Isywy=1 ';
|
||||||
|
|
||||||
|
strsql:=strsql+ strwhere +' order by A.userID ';
|
||||||
|
|
||||||
|
with ADOQueryHelp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear ;
|
||||||
|
sql.Add( strsql);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryHelp,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then exit;
|
||||||
|
|
||||||
|
ReturnStr:='';
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if FieldByName('SSel').AsBoolean=True then
|
||||||
|
begin
|
||||||
|
ReturnStr:=ReturnStr+Trim(fieldbyname('UserName').AsString)+';'
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// if JiangeStr<>99 then
|
||||||
|
IF ReturnStr<>'' then
|
||||||
|
ReturnStr:=Copy(ReturnStr,1,Length(ReturnStr)-1);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.tv1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Tok.Click ;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.Edt_nameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FilterData('',edt_code.Text,Edt_name.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmUserHelpSel.cxDBTreeList1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryDept.IsEmpty then exit;
|
||||||
|
if trim(ADOQueryDept.FieldByName('Framelevel').AsString)='0' then
|
||||||
|
FilterData('','','')
|
||||||
|
else
|
||||||
|
FilterData(ADOQueryDept.FieldByName('UDept').AsString,'','');
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
18066
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.dfm
Normal file
18066
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.dfm
Normal file
File diff suppressed because it is too large
Load Diff
628
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.pas
Normal file
628
基础资料维护(BaseInfo.dll)/U_ZDYHelp11.pas
Normal file
|
|
@ -0,0 +1,628 @@
|
||||||
|
unit U_ZDYHelp;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||||
|
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZDYHelp = class(TForm)
|
||||||
|
TV1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
V1Code: TcxGridDBColumn;
|
||||||
|
V1Name: TcxGridDBColumn;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBSave: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
V1Note: TcxGridDBColumn;
|
||||||
|
V1OrderNo: TcxGridDBColumn;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZDYName: TEdit;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
V1ZdyFlag: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure TBSaveClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ZDYNameChange(Sender: TObject);
|
||||||
|
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
flag,flagname,snote,MainType:string;
|
||||||
|
fnote,forderno,fZdyFlag:Boolean;
|
||||||
|
PPSTE:integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZDYHelp: TfrmZDYHelp;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='23242';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,ZJM=dbo.getPinYin(A.ZdyName) from KH_ZDY A where A.Type='''+flag+'''');
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
begin
|
||||||
|
sql.Add(' and A.MainType='''+Trim(MainType)+'''');
|
||||||
|
end;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
TV1.OptionsData.Editing:=True;
|
||||||
|
TV1.OptionsSelection.CellSelect:=True;
|
||||||
|
for i:=0 to 5 do
|
||||||
|
begin
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBSaveClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then Exit;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
|
||||||
|
if ClientDataSet1.Locate('ZDYName',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet1.Locate('ZDYName','',[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from KH_ZDY where ZdyNo='''+Trim(flag)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||||
|
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
|
||||||
|
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
|
||||||
|
Parameters.ParamByName('Type').Value:='Main';
|
||||||
|
Parameters.ParamByName('MainType').Value:=Trim(MainType);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
ClientDataSet1.DisableControls;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTemp,maxno,'SY','KH_ZDY',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('取最大编号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from KH_Zdy where Type='''+Trim(flag)+'''');
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
SQL.Add(' and MainType='''+Trim(MainType)+'''');
|
||||||
|
sql.Add(' and ZdyName='''+Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
if ADOQueryTemp.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)='' then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString)<>Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('delete KH_ZDY where ZDYNO='''+Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||||
|
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||||
|
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||||
|
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
ClientDataSet1.Edit;
|
||||||
|
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ClientDataSet1.Post;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ClientDataSet1.EnableControls;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
TV1.OptionsData.Editing:=False;
|
||||||
|
TV1.OptionsSelection.CellSelect:=False;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ClientDataSet1.IsEmpty then Exit;
|
||||||
|
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString)<>'') or
|
||||||
|
(Trim(ClientDataSet1.FieldByName('ZDYname').AsString)<>'') then
|
||||||
|
begin
|
||||||
|
if application.MessageBox('确定要删除吗?','提示信息',1)=2 then exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete KH_ZDY where ZDYNo='''+Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString)+'''');
|
||||||
|
SQL.Add(' and Type='''+Trim(flag)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ClientDataSet1.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult:=2;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
WriteCxGrid('自定义',TV1,'自定义数据');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj,fsj1:string;
|
||||||
|
begin
|
||||||
|
{if PPSTE=1 then
|
||||||
|
begin
|
||||||
|
Application.Terminate;
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
InitGrid();
|
||||||
|
fsj:=Trim(flag)+'01';
|
||||||
|
fsj1:=Trim(flagname)+'01';
|
||||||
|
{if ClientDataSet1.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYname,Type,note)');
|
||||||
|
sql.Add('select '''+Trim(fsj)+'''');
|
||||||
|
sql.Add(','''+Trim(fsj1)+'''');
|
||||||
|
SQL.Add(','''+Trim(flag)+'''');
|
||||||
|
sql.Add(','''+Trim(snote)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
InitGrid();
|
||||||
|
end;}
|
||||||
|
//frmZDYHelp.Caption:=Trim(flagname)+'<'+Trim(flag)+'>';
|
||||||
|
ReadCxGrid('自定义',TV1,'自定义数据');
|
||||||
|
frmZDYHelp.Caption:=Trim(flagname);
|
||||||
|
V1Note.Visible:=fnote;
|
||||||
|
V1ZdyFlag.Visible:=fZdyFlag;
|
||||||
|
V1OrderNo.Visible:=forderno;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TV1.OptionsData.Editing:=True;
|
||||||
|
TV1.OptionsSelection.CellSelect:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if TV1.OptionsData.Editing=False then
|
||||||
|
begin
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.ZDYNameChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj:String;
|
||||||
|
begin
|
||||||
|
if Trim(ZDYName.Text)<>'' then
|
||||||
|
begin
|
||||||
|
fsj:=' zdyname like '''+'%'+Trim(ZDYName.Text)+'%'+''''
|
||||||
|
+' or Note like '''+'%'+Trim(ZDYName.Text)+'%'+''''
|
||||||
|
+' or ZJM like '''+'%'+Trim(ZDYName.Text)+'%'+'''';
|
||||||
|
end;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,fsj);
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno,mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
//Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select * from KH_ZDY where ZdyNo='''+Trim(flag)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||||
|
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
|
||||||
|
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
|
||||||
|
Parameters.ParamByName('Type').Value:='Main';
|
||||||
|
Parameters.ParamByName('MainType').Value:=Trim(MainType);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
//ClientDataSet1.DisableControls;
|
||||||
|
//with ClientDataSet1 do
|
||||||
|
//begin
|
||||||
|
//First;
|
||||||
|
//while not eof do
|
||||||
|
//begin
|
||||||
|
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTemp,maxno,'SY','KH_ZDY',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('取最大编号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from KH_Zdy where Type='''+Trim(flag)+'''');
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
SQL.Add(' and MainType='''+Trim(MainType)+'''');
|
||||||
|
sql.Add(' and ZdyName='''+Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
if ADOQueryTemp.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)='' then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString)<>Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//ClientDataSet1.EnableControls;
|
||||||
|
Application.MessageBox('名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('delete KH_ZDY where ZDYNO='''+Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ADOQueryCmd.FieldByName('ZDYName').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||||
|
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||||
|
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||||
|
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||||
|
if Trim(MainType)<>'' then
|
||||||
|
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||||
|
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
ClientDataSet1.Edit;
|
||||||
|
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||||
|
ClientDataSet1.Post;
|
||||||
|
// Next;
|
||||||
|
//end;
|
||||||
|
//end;
|
||||||
|
// ClientDataSet1.EnableControls;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
//Application.MessageBox('保存成功!','提示',0);
|
||||||
|
//TV1.OptionsData.Editing:=False;
|
||||||
|
//TV1.OptionsSelection.CellSelect:=False;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('OrderNo').Value:=mvalue;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set OrderNo='+mvalue);
|
||||||
|
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Note').Value:=mvalue;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set Note='''+Trim(mvalue)+'''');
|
||||||
|
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZDYHelp.V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:String;
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with ClientDataSet1 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ZdyFlag').Value:=StrToInt(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('Update KH_Zdy Set ZdyFlag='+Trim(mvalue));
|
||||||
|
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
270
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.dfm
Normal file
270
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.dfm
Normal file
|
|
@ -0,0 +1,270 @@
|
||||||
|
object frmZdyAttInput: TfrmZdyAttInput
|
||||||
|
Left = 146
|
||||||
|
Top = 208
|
||||||
|
Width = 1125
|
||||||
|
Height = 450
|
||||||
|
Caption = #23458#25143#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1109
|
||||||
|
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 = 1109
|
||||||
|
Height = 381
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 147
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#31616#31216
|
||||||
|
DataBinding.FieldName = 'zdyNameZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 64
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21457#36135#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2DefFlt1: TcxGridDBColumn
|
||||||
|
Caption = #27424#27454#39069#24230
|
||||||
|
DataBinding.FieldName = 'DefFlt1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#26469#28304
|
||||||
|
DataBinding.FieldName = 'DEFstr9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 105
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#20184#27454#26041#24335
|
||||||
|
DataBinding.FieldName = 'DEFNote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 113
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 154
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'KHType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
''
|
||||||
|
#33258#24049)
|
||||||
|
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 ADOQueryKH: TADOQuery
|
||||||
|
Parameters = <>
|
||||||
|
Left = 692
|
||||||
|
Top = 31
|
||||||
|
end
|
||||||
|
object DSKH: TDataSource
|
||||||
|
DataSet = ADOQueryKH
|
||||||
|
Left = 544
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
300
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.pas
Normal file
300
基础资料维护(BaseInfo.dll)/U_ZdyAttInput.pas
Normal file
|
|
@ -0,0 +1,300 @@
|
||||||
|
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;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2DefFlt1: TcxGridDBColumn;
|
||||||
|
ADOQueryKH: TADOQuery;
|
||||||
|
DSKH: TDataSource;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInput: TfrmZdyAttInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//frmZdyAttInput:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
//Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('客户资料录入1',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInput.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户资料录入1',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.FieldByName('DEFstr5').Value:=trim(Dname);
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInput.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
fzdyCode:string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
IF trim(fkhType)='广东客户' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'KH','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
IF trim(fkhType)='湖州客户' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'HZ','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'KF','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('zdyCode').Value:=Trim(fzdyCode);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'',0);
|
||||||
|
FieldByName('Type').Value:='KHName';
|
||||||
|
//FieldByName('khType').Value:=trim(fkhType);
|
||||||
|
FieldByName('DefFlt1').Value:=CDS_HZ.fieldbyname('DefFlt1').AsFloat;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='KHName';
|
||||||
|
FieldByName('MainType').Value:=Trim(CDS_HZ.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end; }
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyName='''+Trim(CDS_HZ.fieldbyname('ZdyName').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''KHName'' ');
|
||||||
|
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('客户名称重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_HZ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''KHName'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInput.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('客户名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
end.
|
||||||
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.
|
||||||
242
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.dfm
Normal file
242
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.dfm
Normal file
|
|
@ -0,0 +1,242 @@
|
||||||
|
object frmZdyAttInputGYS: TfrmZdyAttInputGYS
|
||||||
|
Left = 219
|
||||||
|
Top = 254
|
||||||
|
Width = 920
|
||||||
|
Height = 370
|
||||||
|
Caption = #20379#24212#21830#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 904
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 904
|
||||||
|
Height = 301
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#31616#31216
|
||||||
|
DataBinding.FieldName = 'zdyNameZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #32479#35745#21333#20301#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZDYNameTj'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 160
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#22383#24067#21378
|
||||||
|
#21152#24037#21378
|
||||||
|
#32433#32447#21378
|
||||||
|
#29289#27969#20844#21496
|
||||||
|
#33258#24049
|
||||||
|
#25104#21697
|
||||||
|
#20462#24067#21378
|
||||||
|
#25171#21367#24215)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2DEFStr6: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
252
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.pas
Normal file
252
基础资料维护(BaseInfo.dll)/U_ZdyAttInputGYS.pas
Normal file
|
|
@ -0,0 +1,252 @@
|
||||||
|
unit U_ZdyAttInputGYS;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttInputGYS = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2DEFStr6: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
fDEFstr5:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttInputGYS: TfrmZdyAttInputGYS;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttInputGYS:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('供应商资料录入1',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttInputGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('供应商资料录入1',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
IF trim(fDEFstr5)<>'' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.FieldByName('DEFstr5').Value:=trim(fDEFstr5);
|
||||||
|
v2Column8.Options.Editing:=false;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmZdyAttInputGYS.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID,fzdyCode:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if GetLSNo(ADOQueryCmd,fzdyCode,'PB','KH_Zdy_Attachment',4,0)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('zdyCode').Value:=Trim(fzdyCode);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'',0);
|
||||||
|
FieldByName('Type').Value:='GYS';
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
end;
|
||||||
|
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FieldByName('Type').Value:='GYS';
|
||||||
|
FieldByName('MainType').Value:=Trim(CDS_HZ.fieldbyname('DEFstr5').AsString);
|
||||||
|
Post;
|
||||||
|
end; }
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_HZ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
sql.Add(' and Type=''GYS'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.RecordCount>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttInputGYS.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('供应商名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
end.
|
||||||
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.
|
||||||
|
|
||||||
|
|
||||||
385
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.dfm
Normal file
385
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.dfm
Normal file
|
|
@ -0,0 +1,385 @@
|
||||||
|
object frmZdyAttachGYS: TfrmZdyAttachGYS
|
||||||
|
Left = 159
|
||||||
|
Top = 119
|
||||||
|
Width = 1014
|
||||||
|
Height = 618
|
||||||
|
Caption = #20379#24212#21830#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 998
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 311
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 374
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 998
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 203
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 395
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 534
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #22320#21306
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 267
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 83
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 424
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22383#24067#21378
|
||||||
|
#21152#24037#21378
|
||||||
|
#32433#32447#21378
|
||||||
|
#29289#27969#20844#21496
|
||||||
|
#33258#24049
|
||||||
|
#25104#21697
|
||||||
|
#20462#24067#21378
|
||||||
|
#25171#21367#24215)
|
||||||
|
end
|
||||||
|
object DEFStr7: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 564
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 998
|
||||||
|
Height = 510
|
||||||
|
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
|
||||||
|
OptionsData.Editing = 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 = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
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.Focusing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#31616#31216
|
||||||
|
DataBinding.FieldName = 'zdyNameZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #32479#35745#21333#20301#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZDYNameTj'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 147
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 888
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
223
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.pas
Normal file
223
基础资料维护(BaseInfo.dll)/U_ZdyAttachGYS.pas
Normal file
|
|
@ -0,0 +1,223 @@
|
||||||
|
unit U_ZdyAttachGYS;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachGYS = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
DEFStr7: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fDEFstr5:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachGYS: TfrmZdyAttachGYS;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInputGYS;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''GYS'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachGYS:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('供应商资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachGYS.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('供应商资料',Tv2,'客户自定义');
|
||||||
|
IF trim(fDEFstr5)<>'' then
|
||||||
|
begin
|
||||||
|
DEFstr5.Text:=trim(fDEFstr5);
|
||||||
|
DEFstr5.Enabled:=false;
|
||||||
|
end;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'供应商资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fDEFstr5:=self.fDEFstr5;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fDEFstr5:=self.fDEFstr5;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
402
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.dfm
Normal file
402
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.dfm
Normal file
|
|
@ -0,0 +1,402 @@
|
||||||
|
object frmZdyAttachment: TfrmZdyAttachment
|
||||||
|
Left = 311
|
||||||
|
Top = 127
|
||||||
|
Width = 1382
|
||||||
|
Height = 573
|
||||||
|
Caption = #23458#25143#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1366
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 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 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 TBuser: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25351#23450#25805#20316#21592
|
||||||
|
ImageIndex = 97
|
||||||
|
OnClick = TBuserClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 414
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 477
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 190
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 350
|
||||||
|
Top = 13
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 502
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #22320#21306
|
||||||
|
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 DEFstr5: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 388
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFStr7: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 532
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1366
|
||||||
|
Height = 464
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Filter.AutoDataSetFilter = True
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#31616#31216
|
||||||
|
DataBinding.FieldName = 'zdyNameZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFStr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #22320#21306
|
||||||
|
DataBinding.FieldName = 'DEFStr7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21457#36135#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #27424#27454#39069#24230
|
||||||
|
DataBinding.FieldName = 'DefFlt1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#26469#28304
|
||||||
|
DataBinding.FieldName = 'DEFstr9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#20184#27454#26041#24335
|
||||||
|
DataBinding.FieldName = 'DEFNote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 120
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 165
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v2Column18: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'KHType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
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
|
||||||
|
end
|
||||||
262
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.pas
Normal file
262
基础资料维护(BaseInfo.dll)/U_ZdyAttachment.pas
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
unit U_ZdyAttachment;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDBLookupComboBox, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachment = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
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;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TEdit;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
DEFStr7: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
TBuser: TToolButton;
|
||||||
|
v2Column17: TcxGridDBColumn;
|
||||||
|
v2Column18: 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 TBuserClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
Fmanage:string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachment: TfrmZdyAttachment;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_ZdyAttInput,U_ZdyInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''KHName'' ');
|
||||||
|
// sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
IF trim(Fmanage)='业务员'then
|
||||||
|
sql.Add(' and DEFstr5='+quotedstr(trim(DName)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachment:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('客户资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachment.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 TfrmZdyAttachment.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户资料',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
IF trim(Fmanage)='业务员'then
|
||||||
|
TBuser.Visible:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'客户资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF CDS_HZ.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
frmZdyAttInput:=TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttInput:=TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
fkhType:=self.fkhType;
|
||||||
|
FCYID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBuserClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
FuserName:string;
|
||||||
|
begin
|
||||||
|
IF CDS_HZ.IsEmpty then exit;
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(self);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='UserName';
|
||||||
|
FlagName:='操作员';
|
||||||
|
IF showmodal=1 then
|
||||||
|
begin
|
||||||
|
FuserName:=ClientDataSet1.fieldbyname('zdyName').AsString;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
IF trim(FuserName)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('update KH_Zdy_Attachment SET DEFstr5='''+trim(FuserName)+''', filler='''+trim(FuserName)+''' where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
17
基础资料维护(BaseInfo.dll)/U_ZdyInput.dfm
Normal file
17
基础资料维护(BaseInfo.dll)/U_ZdyInput.dfm
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
object frmZdyInput: TfrmZdyInput
|
||||||
|
Left = 165
|
||||||
|
Top = 188
|
||||||
|
Width = 870
|
||||||
|
Height = 500
|
||||||
|
Caption = #23458#25143#36164#26009#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
end
|
||||||
30
基础资料维护(BaseInfo.dll)/U_ZdyInput.pas
Normal file
30
基础资料维护(BaseInfo.dll)/U_ZdyInput.pas
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
unit U_ZdyInput;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyInput = class(TForm)
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyInput: TfrmZdyInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZdyInput.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyInput:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
221
基础资料维护(BaseInfo.dll)/U_testdll.dfm
Normal file
221
基础资料维护(BaseInfo.dll)/U_testdll.dfm
Normal file
|
|
@ -0,0 +1,221 @@
|
||||||
|
object Form1: TForm1
|
||||||
|
Left = 97
|
||||||
|
Top = 122
|
||||||
|
Width = 791
|
||||||
|
Height = 554
|
||||||
|
Caption = 'Form1'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
FormStyle = fsMDIForm
|
||||||
|
Menu = MainMenu1
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
OnClose = FormClose
|
||||||
|
OnResize = FormResize
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 783
|
||||||
|
Height = 25
|
||||||
|
ButtonWidth = 57
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = ImageList1
|
||||||
|
TabOrder = 0
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 81
|
||||||
|
Height = 22
|
||||||
|
TabOrder = 0
|
||||||
|
Text = '1'
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 81
|
||||||
|
Top = 0
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 0
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 138
|
||||||
|
Top = 0
|
||||||
|
Width = 79
|
||||||
|
Height = 22
|
||||||
|
Caption = ' DllName'#65306
|
||||||
|
end
|
||||||
|
object DllName: TEdit
|
||||||
|
Left = 217
|
||||||
|
Top = 0
|
||||||
|
Width = 135
|
||||||
|
Height = 22
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object MainMenu1: TMainMenu
|
||||||
|
Left = 232
|
||||||
|
Top = 40
|
||||||
|
object test1: TMenuItem
|
||||||
|
Caption = 'test'
|
||||||
|
OnClick = test1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ImageList1: TImageList
|
||||||
|
Left = 320
|
||||||
|
Top = 56
|
||||||
|
Bitmap = {
|
||||||
|
494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||||
|
0000000000003600000028000000400000001000000001002000000000000010
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000EFEFEF000000
|
||||||
|
0000EFEFEF00EFEFEF000000000000000000EFEFEF0000000000000000000000
|
||||||
|
0000EFEFEF00EFEFEF0000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000EFEFEF0000000000EFEFEF00EFEFEF0000000000EFEFEF00000000008080
|
||||||
|
00008080000000000000C0C0C000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000000000000000000EFEFEF00EFEFEF000000
|
||||||
|
0000EFEFEF00EFEFEF000000000000000000C0C0C00000000000000000008080
|
||||||
|
00008080000080800000EFEFEF00EFEFEF000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000EFEFEF0000000000000000000000000000000000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000EFEFEF0000000000808080008080800080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000008080000000000000808080008080800080808000000000008080
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000EFEFEF00EFEF
|
||||||
|
EF0000000000FFFF000080800000000000008080800080808000000000000000
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000FFFF0000FFFF0000808000000000000080808000000000008080
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000808000008080
|
||||||
|
000080800000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000FFFF0000FFFF
|
||||||
|
0000FFFF0000FFFF000000000000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000808000000000000080808000808080008080800080808000FFFF
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000808080008080800080808000808080000000
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||||
|
2800000040000000100000000100010000000000800000000000000000000000
|
||||||
|
000000000000000000000000FFFFFF00FFFF000000000000D343000000000000
|
||||||
|
F4810000000000009340000000000000F801000000000000F001000000000000
|
||||||
|
F001000000000000C001000000000000C001000000000000C001000000000000
|
||||||
|
C201000000000000C001000000000000F001000000000000F001000000000000
|
||||||
|
FC03000000000000FFFF00000000000000000000000000000000000000000000
|
||||||
|
000000000000}
|
||||||
|
end
|
||||||
|
object ADOConnection1: TADOConnection
|
||||||
|
ConnectionString =
|
||||||
|
'Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ' +
|
||||||
|
'ID=sa;Initial Catalog=rzdata;Data Source=6GMFFMYKYMJDZW7'
|
||||||
|
LoginPrompt = False
|
||||||
|
Provider = 'SQLOLEDB.1'
|
||||||
|
Left = 408
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
end
|
||||||
106
基础资料维护(BaseInfo.dll)/U_testdll.pas
Normal file
106
基础资料维护(BaseInfo.dll)/U_testdll.pas
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
unit U_testdll;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, StdCtrls, Menus, ToolWin, ComCtrls, ImgList, DB, ADODB;
|
||||||
|
|
||||||
|
type
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
MainMenu1: TMainMenu;
|
||||||
|
test1: TMenuItem;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
Edit1: TEdit;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ImageList1: TImageList;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
DllName: TEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure test1Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure FormResize(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
newh:hwnd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
sendmessage(newh,1034,4,0);
|
||||||
|
action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.test1Click(Sender: TObject);
|
||||||
|
type
|
||||||
|
TMyFunc = function(App:Tapplication; FormH:hwnd; FormID:integer;
|
||||||
|
Language: integer; WinStyle:integer;
|
||||||
|
GCode: Pchar; GName: Pchar; DataBase:Pchar;Title:PChar;
|
||||||
|
Parameters1:PChar;Parameters2:PChar;Parameters3:PChar;Parameters4:PChar;
|
||||||
|
Parameters5:PChar;Parameters6:PChar;Parameters7:PChar;Parameters8:PChar;
|
||||||
|
Parameters9:PChar;Parameters10:PChar;DataBaseStr:PChar):hwnd;stdcall;
|
||||||
|
var
|
||||||
|
Tf: TMyFunc;
|
||||||
|
Tp: TFarProc;
|
||||||
|
Th:Thandle;
|
||||||
|
begin
|
||||||
|
//静态加载
|
||||||
|
//newh:=getForm(Application,1,ADOConnection1,PChar('sa'),PChar('dsa'));
|
||||||
|
|
||||||
|
//动态加载
|
||||||
|
// showMessage(intTostr(application.Handle));
|
||||||
|
Th := LoadLibrary('BaseInfo.dll');
|
||||||
|
if Th > 0 then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Tp := GetProcAddress(Th, 'GetDllForm');
|
||||||
|
if Tp <> nil then
|
||||||
|
begin
|
||||||
|
Tf := TMyFunc(Tp);
|
||||||
|
newh:=Tf(Application,0,strToint(edit1.text),0,0,
|
||||||
|
PChar('sa'),
|
||||||
|
PChar('dsa'),
|
||||||
|
PChar('bsa'),
|
||||||
|
PChar('tsa'),
|
||||||
|
PChar('d1sa'),
|
||||||
|
PChar('d2sa'),
|
||||||
|
'','','','','','','','',''
|
||||||
|
);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ShowMessage('打印执行错误');
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
// FreeLibrary();
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ShowMessage('找不到'+Trim(DllName.Text));
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
sendmessage(newh,1034,1,0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
2
基础资料维护(BaseInfo.dll)/consvr.ini
Normal file
2
基础资料维护(BaseInfo.dll)/consvr.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[SERVER]
|
||||||
|
SERVER=192.168.88.254
|
||||||
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
样品/DyeTwoStore.INI
Normal file
2
样品/DyeTwoStore.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[ム<>キア犲ナ]
|
||||||
|
ア犲ナタ獎ヘ=
|
||||||
42
样品/JWLCK.cfg
Normal file
42
样品/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
样品/JWLCK.dof
Normal file
138
样品/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
样品/JWLCK.res
Normal file
BIN
样品/JWLCK.res
Normal file
Binary file not shown.
42
样品/OrderManage.cfg
Normal file
42
样品/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
样品/OrderManage.dof
Normal file
138
样品/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
样品/OrderManage.res
Normal file
BIN
样品/OrderManage.res
Normal file
Binary file not shown.
23
样品/ProjectGroup1.bpg
Normal file
23
样品/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
样品/SYSTEMSET.ini
Normal file
3
样品/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[SERVER]
|
||||||
|
服务器地址=127.0.0.1
|
||||||
|
软件名称=欣戈纺织
|
||||||
362
样品/U_BaseIn.dfm
Normal file
362
样品/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
样品/U_BaseIn.pas
Normal file
585
样品/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
样品/U_BaseInList.dfm
Normal file
317
样品/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
样品/U_BaseInList.pas
Normal file
331
样品/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
样品/U_BaseOut.dfm
Normal file
341
样品/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
样品/U_BaseOut.pas
Normal file
471
样品/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
样品/U_BaseOutList.dfm
Normal file
465
样品/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
样品/U_BaseOutList.pas
Normal file
267
样品/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.
|
||||||
525
样品/U_CPAdd.dfm
Normal file
525
样品/U_CPAdd.dfm
Normal file
|
|
@ -0,0 +1,525 @@
|
||||||
|
object frmCPAdd: TfrmCPAdd
|
||||||
|
Left = 201
|
||||||
|
Top = 476
|
||||||
|
Width = 1296
|
||||||
|
Height = 515
|
||||||
|
Align = alClient
|
||||||
|
Caption = #26679#21697#36755#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 = 1280
|
||||||
|
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 TBADD: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = TBADDClick
|
||||||
|
end
|
||||||
|
object TBdel: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = TBdelClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 185
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
Width = 131
|
||||||
|
Height = 30
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 0
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 10
|
||||||
|
Top = 7
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #38376#24133#21333#20301#33521#23544
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1280
|
||||||
|
Height = 443
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #24211#20301#25918#32622
|
||||||
|
DataBinding.FieldName = 'DefStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #21333#20215'/'#31859
|
||||||
|
DataBinding.FieldName = 'Mprice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #21333#20215'/'#20844#26020
|
||||||
|
DataBinding.FieldName = 'Kgprice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'CYNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20013#25991#21697#21517
|
||||||
|
DataBinding.FieldName = 'CYName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column2PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYEName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'CYSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20013#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYECF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'CYMF'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column7PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'CYKZ'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column8PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column41: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #33521#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColorEng'
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column14: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #33457#22411
|
||||||
|
DataBinding.FieldName = 'CYHX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column35: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#32463#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr10'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column36: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#32428#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr11'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column37: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#32463#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr12'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column38: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#32428#23494'/CM'
|
||||||
|
DataBinding.FieldName = 'defstr13'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20844#26020#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceKg'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column20PropertiesEditValueChanged
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 53
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #31859#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceM'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column30: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #22383#24067#38376#24133
|
||||||
|
DataBinding.FieldName = 'PBMF'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column30PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column31: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #22383#24067#20811#37325
|
||||||
|
DataBinding.FieldName = 'PBKZ'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column31PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #32769#32534#21495
|
||||||
|
DataBinding.FieldName = 'defstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'defstr6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column32: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'defstr7'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column32PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column22: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #24037#21378#32534#30721
|
||||||
|
DataBinding.FieldName = 'defnote4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1Column23: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #32553#29575
|
||||||
|
DataBinding.FieldName = 'Price1'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column28: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #20215#26684
|
||||||
|
DataBinding.FieldName = 'Price6'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column24: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #22383#24067#36153
|
||||||
|
DataBinding.FieldName = 'Price2'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column25: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #26579#36153
|
||||||
|
DataBinding.FieldName = 'Price3'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column26: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = 'FOB'#36816#36153'+'#21253#35013
|
||||||
|
DataBinding.FieldName = 'Price4'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column27: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #21518#21152#24037#36153#29992
|
||||||
|
DataBinding.FieldName = 'Price5'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column15: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #23494#24230
|
||||||
|
DataBinding.FieldName = 'defstr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column16: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #32463#32428#25467#24230
|
||||||
|
DataBinding.FieldName = 'defstr4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column17: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'defnote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column33: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #21407#26009#32452#25104
|
||||||
|
DataBinding.FieldName = 'defstr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #32433#25903
|
||||||
|
DataBinding.FieldName = 'defnote5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column34: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #19978#26426#35268#26684
|
||||||
|
DataBinding.FieldName = 'DefStr9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'CYNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YPGL.Default
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v1Column39: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #26469#26679#26085#26399
|
||||||
|
DataBinding.FieldName = 'defnote2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column40: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'defstr14'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'RMB/Y'
|
||||||
|
'RMB/M'
|
||||||
|
'RMB/KG'
|
||||||
|
'USD/Y'
|
||||||
|
'USD/M'
|
||||||
|
'USD/KG')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column42: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #22383#24067#23494#24230
|
||||||
|
DataBinding.FieldName = 'defstr15'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column43: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #26579#21378
|
||||||
|
DataBinding.FieldName = 'defstr16'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column44: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'defstr17'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Tag = 3
|
||||||
|
Caption = 'FOB'#20215
|
||||||
|
DataBinding.FieldName = 'Price7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CDS_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 416
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 453
|
||||||
|
Top = 209
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = CDS_Sub
|
||||||
|
Left = 491
|
||||||
|
Top = 211
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 589
|
||||||
|
Top = 169
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 573
|
||||||
|
Top = 121
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
end
|
||||||
755
样品/U_CPAdd.pas
Normal file
755
样品/U_CPAdd.pas
Normal file
|
|
@ -0,0 +1,755 @@
|
||||||
|
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, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPAdd = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
v1Column9: TcxGridDBColumn;
|
||||||
|
v1Column10: TcxGridDBColumn;
|
||||||
|
v1Column11: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
CDS_Sub: TClientDataSet;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
v1Column13: TcxGridDBColumn;
|
||||||
|
v1Column14: TcxGridDBColumn;
|
||||||
|
v1Column20: TcxGridDBColumn;
|
||||||
|
v1Column41: TcxGridDBColumn;
|
||||||
|
Panel1: TPanel;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
v1Column12: TcxGridDBColumn;
|
||||||
|
v1Column15: TcxGridDBColumn;
|
||||||
|
v1Column16: TcxGridDBColumn;
|
||||||
|
v1Column17: TcxGridDBColumn;
|
||||||
|
v1Column21: TcxGridDBColumn;
|
||||||
|
v1Column22: TcxGridDBColumn;
|
||||||
|
v1Column23: TcxGridDBColumn;
|
||||||
|
v1Column24: TcxGridDBColumn;
|
||||||
|
v1Column25: TcxGridDBColumn;
|
||||||
|
v1Column26: TcxGridDBColumn;
|
||||||
|
v1Column27: TcxGridDBColumn;
|
||||||
|
v1Column28: TcxGridDBColumn;
|
||||||
|
v1Column30: TcxGridDBColumn;
|
||||||
|
v1Column31: TcxGridDBColumn;
|
||||||
|
v1Column18: TcxGridDBColumn;
|
||||||
|
v1Column19: TcxGridDBColumn;
|
||||||
|
v1Column32: TcxGridDBColumn;
|
||||||
|
v1Column33: TcxGridDBColumn;
|
||||||
|
v1Column34: TcxGridDBColumn;
|
||||||
|
v1Column35: TcxGridDBColumn;
|
||||||
|
v1Column36: TcxGridDBColumn;
|
||||||
|
v1Column37: TcxGridDBColumn;
|
||||||
|
v1Column38: TcxGridDBColumn;
|
||||||
|
v1Column39: TcxGridDBColumn;
|
||||||
|
v1Column40: TcxGridDBColumn;
|
||||||
|
v1Column42: TcxGridDBColumn;
|
||||||
|
v1Column43: TcxGridDBColumn;
|
||||||
|
v1Column44: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
TBADD: TToolButton;
|
||||||
|
TBdel: TToolButton;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure v1Column7PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1Column8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1Column2PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1Column26PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1Column27PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1Column20PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure v1Column31PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1Column30PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1Column32PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure TBdelClick(Sender: TObject);
|
||||||
|
procedure TBADDClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
canshu1:string;
|
||||||
|
Fint:Integer;
|
||||||
|
procedure InitSubGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FCYID,FCYCode,FCPID,FCPNO:String;
|
||||||
|
CopyInt:Integer;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPAdd: TfrmCPAdd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_iniParam,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$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;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Sub);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Sub);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj,FFSj,FFQZSj,FFFSj,FFType:String;
|
||||||
|
FFInt,i,j:Integer;
|
||||||
|
ii:LongInt;
|
||||||
|
begin
|
||||||
|
//canshu1:=Trim(DParameters1);
|
||||||
|
ReadCxGrid('样品编辑YT1',Tv1,'样品管理1');
|
||||||
|
InitSubGrid();
|
||||||
|
if CopyInt=1 then
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
fsj:=trim(fcpNo);
|
||||||
|
if GetLSNo(ADOQueryCmd,FFSj,fsj,'CP_YDang',3,0)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Append;
|
||||||
|
CDS_Sub.fieldbyName('CYNO').Value:=trim(FFSj);
|
||||||
|
CDS_Sub.Post;
|
||||||
|
end;
|
||||||
|
{ if Trim(YPCodeType)<>'' then
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
//取前缀
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select CYNO AA from CP_YDang ');
|
||||||
|
SQL.Add('where Cast(CYID as int)=(select isnull(Max(Cast(CYID as int)),0) from CP_YDang where CYType='''+Trim(FCPID)+''')');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if Trim(ADOQueryTemp.fieldbyname('AA').asstring)='' then
|
||||||
|
begin
|
||||||
|
FFQZSj:=Trim(FCPNO);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
fsj:=Trim(ADOQueryTemp.fieldbyname('AA').asstring);
|
||||||
|
FFInt:=0;
|
||||||
|
i:=0;
|
||||||
|
FFFSj:=Trim(Copy(fsj,Length(FCPNO)+1,Length(fsj)));
|
||||||
|
while FFInt<=0 do
|
||||||
|
begin
|
||||||
|
FFSj:=Trim(Copy(fsj,Length(FCPNO)+1+i,Length(fsj)));
|
||||||
|
if TryStrToInt(FFSj,ii) then
|
||||||
|
begin
|
||||||
|
if StrToInt(FFSj)>=0 then
|
||||||
|
begin
|
||||||
|
i:=i+1;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
FFQZSj:=Trim(Copy(fsj,1,Length(FCPNO)+i+1));//前缀字符串
|
||||||
|
end;
|
||||||
|
if i=Length(FFFSj) then
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
FFQZSj:=Trim(FCPNO);
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
FFQZSj:=Trim(Copy(fsj,1,Length(FCPNO)+i+1));//前缀字符串
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//取前缀
|
||||||
|
//取后缀
|
||||||
|
if Trim(YPCodeType)='大类' then
|
||||||
|
begin
|
||||||
|
i:=99;
|
||||||
|
while i>=1 do
|
||||||
|
begin
|
||||||
|
if i=99 then
|
||||||
|
begin
|
||||||
|
FFType:=Trim(FCPID);
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CP_Type where CPID='''+Trim(FFType)+'''');
|
||||||
|
Open;
|
||||||
|
i:=fieldbyname('CPLevel').AsInteger;
|
||||||
|
if i>1 then
|
||||||
|
FFType:=Trim(fieldbyname('CPParent').AsString)
|
||||||
|
else
|
||||||
|
if i=1 then
|
||||||
|
begin
|
||||||
|
FFType:=Trim(fieldbyname('CPID').AsString);
|
||||||
|
i:=0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Select_CP_YDang_MaxNo :CPType');
|
||||||
|
Parameters.ParamByName('CPType').Value:=Trim(FFType);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
if Trim(YPCodeType)='小类' then
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select CYNO AA from CP_YDang ');
|
||||||
|
SQL.Add('where Cast(CYID as int)=(select isnull(Max(Cast(CYID as int)),0) from CP_YDang where CYType='''+Trim(FCPID)+''')');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(ADOQueryTemp.fieldbyname('AA').asstring)='' then
|
||||||
|
begin
|
||||||
|
FFFSj:='0001';
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
fsj:=Trim(ADOQueryTemp.fieldbyname('AA').asstring);
|
||||||
|
FFInt:=0;
|
||||||
|
i:=0;
|
||||||
|
FFFSj:='';
|
||||||
|
fsj:=Trim( Copy( fsj,Length(FFQZSj)+1,Length(fsj) ) );
|
||||||
|
while FFInt<=0 do
|
||||||
|
begin
|
||||||
|
FFSj:=Trim(Copy(fsj,(Length(fsj)-i),(Length(fsj))));
|
||||||
|
if TryStrToInt(FFSj,ii) then
|
||||||
|
begin
|
||||||
|
if StrToInt(FFSj)>=0 then
|
||||||
|
begin
|
||||||
|
FFFSj:=Trim(FFSj);//后缀数字字符串
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
end;
|
||||||
|
i:=i+1;
|
||||||
|
if i=Length(fsj) then
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FFInt:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
i:=Length(FFFSj); //数字编号长度 3
|
||||||
|
FFInt:=StrToInt(FFFSj)+1;//最大号
|
||||||
|
j:=Length(Trim(IntToStr(FFInt))); //最大号位数 1
|
||||||
|
FFFSj:=Trim(IntToStr(FFInt));//后缀数字字符串
|
||||||
|
while j<i do
|
||||||
|
begin
|
||||||
|
FFFSj:='0'+Trim(FFFsj);
|
||||||
|
j:=j+1
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//取后缀
|
||||||
|
fsj:=Trim(FFQZSj)+Trim(FFFSj);
|
||||||
|
if CopyInt=0 then
|
||||||
|
CDS_Sub.Append
|
||||||
|
else
|
||||||
|
if CopyInt=1 then
|
||||||
|
CDS_Sub.Edit;
|
||||||
|
CDS_Sub.FieldByName('CYNo').Value:=Trim(fsj);
|
||||||
|
CDS_Sub.Post;
|
||||||
|
end;
|
||||||
|
end else }
|
||||||
|
|
||||||
|
|
||||||
|
if CDS_Sub.IsEmpty then
|
||||||
|
begin
|
||||||
|
fsj:=trim(fcpNo);
|
||||||
|
if GetLSNo(ADOQueryCmd,FFSj,fsj,'CP_YDang',3,0)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Append;
|
||||||
|
CDS_Sub.fieldbyName('CYNO').Value:=trim(FFSj);
|
||||||
|
CDS_Sub.Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('样品编辑YT1',Tv1,'样品管理1');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
function TfrmCPAdd.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
fsj,FFSj,maxId:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
CDS_Sub.DisableControls;
|
||||||
|
CDS_Sub.First;
|
||||||
|
while not CDS_Sub.Eof do
|
||||||
|
begin
|
||||||
|
if trim(CDS_Sub.fieldbyName('CYID').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'','CP_YDang',3,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
{ fsj:=trim(fcpNo);
|
||||||
|
if GetLSNo(ADOQueryCmd,FFSj,fsj,'CP_YDang',3,0)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
CDS_Sub.edit;
|
||||||
|
CDS_Sub.fieldbyName('CYID').Value:=trim(maxId);
|
||||||
|
// CDS_Sub.fieldbyName('CYNO').Value:=trim(FFSj);
|
||||||
|
CDS_Sub.FieldByName('CYType').Value:=Trim(FCPID);
|
||||||
|
CDS_Sub.Post;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
maxId:=trim(CDS_Sub.fieldbyName('CYID').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from CP_YDang where CYID='''+trim(CDS_Sub.fieldbyName('CYID').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldbyName('Filler').Value:=trim(DName);
|
||||||
|
FieldByName('CYType').Value:=Trim(FCPID);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldbyName('editer').Value:=trim(DName);
|
||||||
|
FieldbyName('editTime').Value:=now();
|
||||||
|
end;
|
||||||
|
FieldByName('CYID').Value:=trim(CDS_Sub.fieldbyName('CYID').AsString);
|
||||||
|
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd,Tv1,CDS_Sub,'CP_YDang',3);
|
||||||
|
if Trim(CDS_Sub.fieldbyname('CYPriceKg').AsString)='' then
|
||||||
|
FieldByName('CYPriceKg').Value:=0
|
||||||
|
else
|
||||||
|
FieldByName('CYPriceKg').Value:=CDS_Sub.fieldbyname('CYPriceKg').AsString;
|
||||||
|
if Trim(CDS_Sub.fieldbyname('CYPriceM').AsString)='' then
|
||||||
|
FieldByName('CYPriceM').Value:=0
|
||||||
|
else
|
||||||
|
FieldByName('CYPriceM').Value:=CDS_Sub.fieldbyname('CYPriceM').AsString;
|
||||||
|
FieldByName('CYNO').Value:=CDS_Sub.fieldbyname('CYNO').AsString;
|
||||||
|
FieldByName('Price1').Value:=CDS_Sub.fieldbyname('Price1').AsFloat;
|
||||||
|
FieldByName('Price2').Value:=CDS_Sub.fieldbyname('Price2').AsFloat;
|
||||||
|
FieldByName('Price3').Value:=CDS_Sub.fieldbyname('Price3').AsFloat;
|
||||||
|
FieldByName('Price4').Value:=CDS_Sub.fieldbyname('Price4').AsFloat;
|
||||||
|
FieldByName('Price5').Value:=CDS_Sub.fieldbyname('Price5').AsFloat;
|
||||||
|
FieldByName('Price6').Value:=CDS_Sub.fieldbyname('Price6').AsFloat;
|
||||||
|
FieldByName('Price7').Value:=CDS_Sub.fieldbyname('Price7').AsFloat;
|
||||||
|
FieldByName('Price8').Value:=CDS_Sub.fieldbyname('Price8').AsFloat;
|
||||||
|
FieldByName('Qty').Value:=CDS_Sub.fieldbyname('Qty').AsFloat;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select count(CYID) as AA from CP_YDang where CYNo='''+Trim(CDS_Sub.fieldbyname('CYNo').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if FieldByName('AA').AsInteger>1 then
|
||||||
|
begin
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Next;
|
||||||
|
end;
|
||||||
|
FCYID:=Trim(maxId);
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{if CDS_Sub.Locate('CYName',null,[])=True then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('中文名称不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column7PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FieldName,PriceKg,MF,KZ:string;
|
||||||
|
FReal:Double;
|
||||||
|
begin
|
||||||
|
mvalue:=Trim(TcxTextEdit(Sender).EditingText);
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if TryStrToFloat(mvalue,FReal)=False then
|
||||||
|
FieldByName('CYMF').Value:=mvalue
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if Trim(canshu1)='英寸' then
|
||||||
|
FieldByName('CYMF').Value:=mvalue+'"'
|
||||||
|
else
|
||||||
|
FieldByName('CYMF').Value:=mvalue+'CM';
|
||||||
|
end;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
{ FieldName:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
PriceKg:=Trim(CDS_Sub.fieldbyname('CYPriceKg').AsString);
|
||||||
|
if Trim(PriceKg)='' then
|
||||||
|
begin
|
||||||
|
PriceKg:='0';
|
||||||
|
end;
|
||||||
|
MF:=Trim(CDS_Sub.fieldbyname('CYMF').AsString);
|
||||||
|
KZ:=Trim(CDS_Sub.fieldbyname('CYKZ').AsString);
|
||||||
|
if Trim(canshu1)<>'英寸' then
|
||||||
|
MF:=Copy(MF,1,Pos('C',MF)-1)
|
||||||
|
else
|
||||||
|
MF:=Copy(MF,1,Pos('"',MF)-1);
|
||||||
|
KZ:=Copy(KZ,1,Pos('g',KZ)-1);
|
||||||
|
if TryStrToFloat(MF,FReal)=False then
|
||||||
|
begin
|
||||||
|
MF:='0';
|
||||||
|
end;
|
||||||
|
if TryStrToFloat(KZ,FReal)=False then
|
||||||
|
begin
|
||||||
|
KZ:='0';
|
||||||
|
end;
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if Trim(canshu1)<>'英寸' then
|
||||||
|
FieldByName('CYPriceM').Value:=StrToFloat(PriceKg)*StrToFloat(MF)*StrToFloat(KZ)*1.00/100000
|
||||||
|
else
|
||||||
|
FieldByName('CYPriceM').Value:=StrToFloat(PriceKg)*StrToFloat(MF)*2.54*StrToFloat(KZ)*1.00/100000;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FieldName,PriceKg,MF,KZ:string;
|
||||||
|
FReal:Double;
|
||||||
|
begin
|
||||||
|
mvalue:=Trim(TcxTextEdit(Sender).EditingText);
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if TryStrToFloat(mvalue,FReal)=False then
|
||||||
|
FieldByName('CYKZ').Value:=mvalue
|
||||||
|
else
|
||||||
|
FieldByName('CYKZ').Value:=mvalue+'GSM';
|
||||||
|
Post;
|
||||||
|
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.v1Column26PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
var
|
||||||
|
fsj:string;
|
||||||
|
begin
|
||||||
|
fsj:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='GYStr';
|
||||||
|
flagname:='工艺名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(fsj).Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column27PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
var
|
||||||
|
fsj:string;
|
||||||
|
begin
|
||||||
|
fsj:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='YPJGFactory';
|
||||||
|
flagname:='加工厂/供应商';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(fsj).Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column20PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
FieldName,mvalue,MF,KZ,PriceKg:string;
|
||||||
|
FReal:Double;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
FieldName:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FieldName).Value:=mvalue;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
{ PriceKg:=Trim(CDS_Sub.fieldbyname('CYPriceKg').AsString);
|
||||||
|
if Trim(PriceKg)='' then
|
||||||
|
begin
|
||||||
|
PriceKg:='0';
|
||||||
|
end;
|
||||||
|
MF:=Trim(CDS_Sub.fieldbyname('CYMF').AsString);
|
||||||
|
KZ:=Trim(CDS_Sub.fieldbyname('CYKZ').AsString);
|
||||||
|
if Trim(canshu1)<>'英寸' then
|
||||||
|
MF:=Copy(MF,1,Pos('C',MF)-1)
|
||||||
|
else
|
||||||
|
MF:=Copy(MF,1,Pos('"',MF)-1);
|
||||||
|
KZ:=Copy(KZ,1,Pos('g',KZ)-1);
|
||||||
|
if TryStrToFloat(MF,FReal)=False then
|
||||||
|
begin
|
||||||
|
MF:='0';
|
||||||
|
end;
|
||||||
|
if TryStrToFloat(KZ,FReal)=False then
|
||||||
|
begin
|
||||||
|
KZ:='0';
|
||||||
|
end;
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if Trim(canshu1)<>'英寸' then
|
||||||
|
FieldByName('CYPriceM').Value:=StrToFloat(PriceKg)*StrToFloat(MF)*StrToFloat(KZ)*1.00/100000
|
||||||
|
else
|
||||||
|
FieldByName('CYPriceM').Value:=StrToFloat(PriceKg)*StrToFloat(MF)*2.54*StrToFloat(KZ)*1.00/100000;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CheckBox1.Checked=True then
|
||||||
|
begin
|
||||||
|
canshu1:='英寸';
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
canshu1:='';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column31PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FieldName,PriceKg,MF,KZ:string;
|
||||||
|
FReal:Double;
|
||||||
|
begin
|
||||||
|
mvalue:=Trim(TcxTextEdit(Sender).EditingText);
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if TryStrToFloat(mvalue,FReal)=False then
|
||||||
|
FieldByName('PBKZ').Value:=mvalue
|
||||||
|
else
|
||||||
|
FieldByName('PBKZ').Value:=mvalue+'g/㎡';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column30PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FieldName,PriceKg,MF,KZ:string;
|
||||||
|
FReal:Double;
|
||||||
|
begin
|
||||||
|
mvalue:=Trim(TcxTextEdit(Sender).EditingText);
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if TryStrToFloat(mvalue,FReal)=False then
|
||||||
|
FieldByName('PBMF').Value:=mvalue
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if Trim(canshu1)='英寸' then
|
||||||
|
FieldByName('PBMF').Value:=mvalue+'"'
|
||||||
|
else
|
||||||
|
FieldByName('PBMF').Value:=mvalue+'CM';
|
||||||
|
end;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.v1Column32PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
var
|
||||||
|
fsj:string;
|
||||||
|
begin
|
||||||
|
fsj:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='YPJGFactory';
|
||||||
|
flagname:='加工厂/供应商';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(fsj).Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.TBdelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF CDS_Sub.IsEmpty then exit;
|
||||||
|
IF trim(CDS_Sub.fieldbyName('CYID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete CP_YDang where CYID='''+Trim(CDS_Sub.fieldbyname('CYID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Sub.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPAdd.TBADDClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj,FFSj:string;
|
||||||
|
begin
|
||||||
|
fsj:=trim(fcpNo);
|
||||||
|
if GetLSNo(ADOQueryCmd,FFSj,fsj,'CP_YDang',3,0)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CopyAddRow(tv1,CDS_Sub);
|
||||||
|
CDS_Sub.Edit;
|
||||||
|
CDS_Sub.fieldbyName('CYNO').Value:=trim(FFSj);
|
||||||
|
CDS_Sub.Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
1127
样品/U_CPManage.dfm
Normal file
1127
样品/U_CPManage.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1152
样品/U_CPManage.pas
Normal file
1152
样品/U_CPManage.pas
Normal file
File diff suppressed because it is too large
Load Diff
925
样品/U_CPManageCX.dfm
Normal file
925
样品/U_CPManageCX.dfm
Normal file
|
|
@ -0,0 +1,925 @@
|
||||||
|
object frmCPManageCX: TfrmCPManageCX
|
||||||
|
Left = 312
|
||||||
|
Top = 181
|
||||||
|
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 = 89
|
||||||
|
Width = 189
|
||||||
|
Height = 626
|
||||||
|
Align = alLeft
|
||||||
|
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.ColumnAutoWidth = 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 = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Summary.FooterSummaryItems = <>
|
||||||
|
Summary.GroupFooterSummaryItems = <>
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter1: TcxSplitter
|
||||||
|
Left = 189
|
||||||
|
Top = 89
|
||||||
|
Width = 8
|
||||||
|
Height = 626
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
Control = cxDBTreeList1
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 58
|
||||||
|
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 Label8: TLabel
|
||||||
|
Left = 866
|
||||||
|
Top = 15
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
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
|
||||||
|
object CYSpec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 892
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = defnote5Change
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 72
|
||||||
|
Top = 36
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #20840#36873
|
||||||
|
TabOrder = 9
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
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 = 223
|
||||||
|
Top = 75
|
||||||
|
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
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnCellClick = Tv1CellClick
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
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 Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215'/'#31859
|
||||||
|
DataBinding.FieldName = 'Mprice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215'/'#20844#26020
|
||||||
|
DataBinding.FieldName = 'KGprice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
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#30721
|
||||||
|
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
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Caption = #31859#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceM'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = 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 = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column24: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
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
|
||||||
|
object v1Column41: TcxGridDBColumn
|
||||||
|
Caption = #26469#26679#26085#26399
|
||||||
|
DataBinding.FieldName = 'defnote2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column43: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'EditTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 120
|
||||||
|
end
|
||||||
|
object v1Column44: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'defstr14'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column45: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#23494#24230
|
||||||
|
DataBinding.FieldName = 'defstr15'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column46: TcxGridDBColumn
|
||||||
|
Caption = #26579#21378
|
||||||
|
DataBinding.FieldName = 'defstr16'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column47: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'defstr17'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column48: TcxGridDBColumn
|
||||||
|
Caption = #30331#35760#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 100
|
||||||
|
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 = 937
|
||||||
|
Top = 65525
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGL.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 893
|
||||||
|
Top = 65525
|
||||||
|
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
|
||||||
826
样品/U_CPManageCX.pas
Normal file
826
样品/U_CPManageCX.pas
Normal file
|
|
@ -0,0 +1,826 @@
|
||||||
|
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,
|
||||||
|
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator;
|
||||||
|
|
||||||
|
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;
|
||||||
|
CYSpec: TEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
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;
|
||||||
|
v1Column41: TcxGridDBColumn;
|
||||||
|
v1Column43: TcxGridDBColumn;
|
||||||
|
v1Column44: TcxGridDBColumn;
|
||||||
|
v1Column45: TcxGridDBColumn;
|
||||||
|
v1Column46: TcxGridDBColumn;
|
||||||
|
v1Column47: TcxGridDBColumn;
|
||||||
|
v1Column48: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: 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 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);
|
||||||
|
procedure CheckBox1Click(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,'样品管理1');
|
||||||
|
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,'样品管理1');
|
||||||
|
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);
|
||||||
|
FCPNo:=Trim(Self.ADOQueryTree.fieldbyname('CPNo').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);
|
||||||
|
FCPNo:=Trim(Self.ADOQueryTree.fieldbyname('CPNo').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:='';
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.FieldByName('SSel').AsBoolean=True then
|
||||||
|
begin
|
||||||
|
sleep(200);
|
||||||
|
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;
|
||||||
|
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.DefaultCopies:=strtointdef(trim(Edit1.Text),1);
|
||||||
|
RM1.PrintReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\样品标签.rmf'),'提示',0);
|
||||||
|
Exit;
|
||||||
|
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);
|
||||||
|
FCPNo:=Trim(Self.ADOQueryTree.fieldbyname('CPNo').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:='';
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.FieldByName('SSel').AsBoolean then
|
||||||
|
begin
|
||||||
|
sleep(200);
|
||||||
|
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;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.DefaultCopies:=strtointdef(trim(Edit1.Text),1);
|
||||||
|
// RM1.PrintReport;
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\样品标签.rmf'),'提示',0);
|
||||||
|
Exit;
|
||||||
|
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.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_Main,checkbox1.Checked);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
703
样品/U_CPManageSel.dfm
Normal file
703
样品/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
样品/U_CPManageSel.pas
Normal file
475
样品/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
样品/U_CPType.dfm
Normal file
183
样品/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
样品/U_CPType.pas
Normal file
239
样品/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
样品/U_ClothContractInPut.dfm
Normal file
513
样品/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
样品/U_ClothContractInPut.pas
Normal file
580
样品/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
样品/U_ClothContractList.dfm
Normal file
672
样品/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
样品/U_ClothContractList.pas
Normal file
652
样品/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.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user