~
This commit is contained in:
commit
526c7e2fae
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 := 'shengxingfhdata';
|
||||||
|
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
应收应付(YSYF.dll)/FieldExportSet/应付款付款统计列表.INI
Normal file
2
应收应付(YSYF.dll)/FieldExportSet/应付款付款统计列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/客户/日期/品名/数量/单价/应付款金额/付款金额/累计欠款/备注
|
||||||
2
应收应付(YSYF.dll)/FieldExportSet/应付款列表.INI
Normal file
2
应收应付(YSYF.dll)/FieldExportSet/应付款列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/日期/对方单位/项目及摘要/数量/数量单位/单价/币种/汇率/原币金额/本币金额
|
||||||
2
应收应付(YSYF.dll)/FieldExportSet/检验分析订单.INI
Normal file
2
应收应付(YSYF.dll)/FieldExportSet/检验分析订单.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/布单号/布类/颜色/针寸数/重量(磅)/疵点个数
|
||||||
2
应收应付(YSYF.dll)/FieldExportSet/检验报告.INI
Normal file
2
应收应付(YSYF.dll)/FieldExportSet/检验报告.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin
|
||||||
2
应收应付(YSYF.dll)/FieldExportSet/采购单列表.INI
Normal file
2
应收应付(YSYF.dll)/FieldExportSet/采购单列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/采购单编号/Fabric/布类
|
||||||
23
应收应付(YSYF.dll)/ProjectGroup1.bpg
Normal file
23
应收应付(YSYF.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 = YSYF.dll testDll.exe
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
default: $(PROJECTS)
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
YSYF.dll: YSYF.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
testDll.exe: testDll.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
|
||||||
23
应收应付(YSYF.dll)/ProjectGroup1.~bpg
Normal file
23
应收应付(YSYF.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
应收应付(YSYF.dll)/SYSTEMSET.ini
Normal file
3
应收应付(YSYF.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[SERVER]
|
||||||
|
服务器地址=127.0.0.1
|
||||||
|
软件名称=XXXXXXX1
|
||||||
452
应收应付(YSYF.dll)/U_BpGdCklist.dfm
Normal file
452
应收应付(YSYF.dll)/U_BpGdCklist.dfm
Normal file
|
|
@ -0,0 +1,452 @@
|
||||||
|
object frmBpGdCklist: TfrmBpGdCklist
|
||||||
|
Left = 87
|
||||||
|
Top = 133
|
||||||
|
Width = 1178
|
||||||
|
Height = 579
|
||||||
|
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 = 1162
|
||||||
|
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_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TOK: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TOKClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 122
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1162
|
||||||
|
Height = 45
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#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 = 168
|
||||||
|
Top = 16
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 464
|
||||||
|
Top = 16
|
||||||
|
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 = 628
|
||||||
|
Top = 16
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 328
|
||||||
|
Top = 56
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 772
|
||||||
|
Top = 16
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 1000
|
||||||
|
Top = 16
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#21333#25968#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
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 = 180
|
||||||
|
Top = 11
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 520
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object P_Color: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 660
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 344
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#38144#21806#20986#24211
|
||||||
|
#21152#24037#20986#24211)
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 356
|
||||||
|
Top = 52
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 5
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object cust: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 804
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 77
|
||||||
|
Width = 1162
|
||||||
|
Height = 384
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
object v1CRNO: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#32534#21495
|
||||||
|
DataBinding.FieldName = 'CRNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1CRID: TcxGridDBColumn
|
||||||
|
Caption = #24207#27425#21495
|
||||||
|
DataBinding.FieldName = 'CRID'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1CRTime: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1CRType: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CRType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
end
|
||||||
|
object v1cust: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'cust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'RollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = DataLink_YSYF.FontBlue
|
||||||
|
Styles.Footer = DataLink_YSYF.FontBlue
|
||||||
|
Styles.Header = DataLink_YSYF.FontBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = DataLink_YSYF.FontBlue
|
||||||
|
Styles.Footer = DataLink_YSYF.FontBlue
|
||||||
|
Styles.Header = DataLink_YSYF.FontBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Filler: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1FillTime: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 724
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 832
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 856
|
||||||
|
Top = 161
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 876
|
||||||
|
Top = 101
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 508
|
||||||
|
Top = 68
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 848
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, 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
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 896
|
||||||
|
Top = 8
|
||||||
|
ReportData = {}
|
||||||
|
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 = 948
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
end
|
||||||
365
应收应付(YSYF.dll)/U_BpGdCklist.pas
Normal file
365
应收应付(YSYF.dll)/U_BpGdCklist.pas
Normal file
|
|
@ -0,0 +1,365 @@
|
||||||
|
unit U_BpGdCklist;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, RM_System, RM_Dataset, RM_Common, RM_Class, RM_e_Xls,
|
||||||
|
RM_GridReport;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpGdCklist = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1RollNum: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1CRType: TcxGridDBColumn;
|
||||||
|
v1CRTime: TcxGridDBColumn;
|
||||||
|
v1CRNO: TcxGridDBColumn;
|
||||||
|
v1CRID: TcxGridDBColumn;
|
||||||
|
v1Filler: TcxGridDBColumn;
|
||||||
|
v1FillTime: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
P_Color: TEdit;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ckName: TComboBox;
|
||||||
|
Label6: TLabel;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
v1cust: TcxGridDBColumn;
|
||||||
|
ADOPrint: TADOQuery;
|
||||||
|
RMDB_MD: TRMDBDataSet;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
cust: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
TOK: TToolButton;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure P_CodeNameChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TOKClick(Sender: TObject);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fCKName:string;
|
||||||
|
fManage:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpGdCklist: TfrmBpGdCklist;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.SetComboBox();
|
||||||
|
begin
|
||||||
|
ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and zdyName='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count>0 then ckName.ItemIndex:=0;
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCKTYPE''');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and note='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count>0 then CRType.ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpGdCklist.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
sql.Add('where CRTime>='''+formatdateTime('yyyy-MM-dd',begdate.Date)+''' ');
|
||||||
|
sql.Add('and CRTime<'''+formatdateTime('yyyy-MM-dd',enddate.Date+1)+''' ');
|
||||||
|
sql.Add('and CRFlag=''出库'' ');
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) );
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp,CDS_Main);
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select COUNT(distinct CRNo) as CRNo from BP_InOut A');
|
||||||
|
sql.Add('where CRTime>='''+formatdateTime('yyyy-MM-dd',begdate.Date)+''' ');
|
||||||
|
sql.Add('and CRTime<'''+formatdateTime('yyyy-MM-dd',enddate.Date+1)+''' ');
|
||||||
|
sql.Add('and CRFlag=''出库'' ');
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) );
|
||||||
|
open;
|
||||||
|
IF IsEmpty then
|
||||||
|
begin
|
||||||
|
Label8.Caption:='出库单数:0';
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Label8.Caption:='出库单数:'+Fieldbyname('CRNo').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
Action:=cahide;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpGdCklist:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.P_CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTmp.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryTmp,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryTmp,CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
readCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BegDate.Date:=date();
|
||||||
|
EndDate.Date:=date();
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if cds_main.IsEmpty then exit;
|
||||||
|
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能修改!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
{ if Trim(CDS_Main.fieldbyname('Filler').AsString)<>Trim(DName) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('不能操作他人的数据!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
|
||||||
|
|
||||||
|
{ sql.Add('update Contract_Cloth_DH set DHPS=A.DHPS - B.RollNum, DHQty=A.DHQty - B.Qty ');
|
||||||
|
sql.Add('from Contract_Cloth_DH A');
|
||||||
|
sql.Add('inner join BP_INout B on cast(B.kcid as varchar)=A.SXDHID and rtrim(B.FirstName)=rtrim(A.FirstName)');
|
||||||
|
sql.Add('where B.CRNO='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
sql.Add('and B.CRType=''加工出库'' '); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
SQL.Add('where maiNID='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
|
||||||
|
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 YFDefFlag1=1 ');
|
||||||
|
|
||||||
|
sql.Add('update BP_kc set RollNum=1, Qty=A.Qty + B.Qty ');
|
||||||
|
sql.Add('from BP_kc A');
|
||||||
|
sql.Add('inner join BP_INout B on B.kcid=A.kcid');
|
||||||
|
sql.Add('where B.CRNO='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
|
||||||
|
sql.Add('delete from BP_InOut ');
|
||||||
|
SQL.Add('where CRNO='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' '+quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(','+quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(','+quotedstr(trim('出库单删除')));
|
||||||
|
sql.Add(','+quotedstr(trim('出库单号:'+trim(CDS_Main.FieldByName('CRNO').AsString))));
|
||||||
|
sql.Add(','+quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
Application.MessageBox('数据删除失败!','提示信息',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath:string;
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then exit;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Do_PrintMd ');
|
||||||
|
sql.Add('@mainID='+quotedstr(trim(CDS_Main.fieldbyname('cRNo').AsString)));
|
||||||
|
sql.Add(',@flag='+quotedstr(trim('广东出库')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单建威广州.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件['+filepath+']不存在!'),'提示信息',MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['dtxz'] :=FormatDateTime('yyyy-mm-dd',date());
|
||||||
|
RMVariables['zdr'] :=trim(DName);
|
||||||
|
RMVariables['Filler'] :=trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TOKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
tok.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
822
应收应付(YSYF.dll)/U_CPManageSel.dfm
Normal file
822
应收应付(YSYF.dll)/U_CPManageSel.dfm
Normal file
|
|
@ -0,0 +1,822 @@
|
||||||
|
object frmCPManageSel: TfrmCPManageSel
|
||||||
|
Left = -8
|
||||||
|
Top = -8
|
||||||
|
Width = 1382
|
||||||
|
Height = 754
|
||||||
|
Caption = #26679#21697#20449#24687#36873#25321#21015#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
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_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TOK: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TOKClick
|
||||||
|
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 = 69
|
||||||
|
Width = 181
|
||||||
|
Height = 647
|
||||||
|
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_YSYF.Red
|
||||||
|
Styles.Selection = DataLink_YSYF.Red
|
||||||
|
Styles.IncSearch = DataLink_YSYF.Red
|
||||||
|
TabOrder = 1
|
||||||
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
Width = 160
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter1: TcxSplitter
|
||||||
|
Left = 181
|
||||||
|
Top = 69
|
||||||
|
Width = 8
|
||||||
|
Height = 647
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
Control = cxDBTreeList1
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1366
|
||||||
|
Height = 38
|
||||||
|
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 = 209
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 295
|
||||||
|
Top = 59
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 391
|
||||||
|
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 = 838
|
||||||
|
Top = 47
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #32769#32534#21495
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 627
|
||||||
|
Top = 75
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 683
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 847
|
||||||
|
Top = 15
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33521#25991#39068#33394
|
||||||
|
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 = 259
|
||||||
|
Top = 11
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = CYNoChange
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
end
|
||||||
|
object CYEName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 340
|
||||||
|
Top = 55
|
||||||
|
Width = 59
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = CYNoChange
|
||||||
|
end
|
||||||
|
object CYSpec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 417
|
||||||
|
Top = 11
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = CYNoChange
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
end
|
||||||
|
object CYNO: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 82
|
||||||
|
Top = 11
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = CYNoChange
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
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 = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = CYNoChange
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 872
|
||||||
|
Top = 67
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = CYSpecChange
|
||||||
|
end
|
||||||
|
object DefStr6: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 689
|
||||||
|
Top = 71
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
end
|
||||||
|
object CYColor: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 737
|
||||||
|
Top = 11
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = CYNoChange
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
end
|
||||||
|
object CYColorEng: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 897
|
||||||
|
Top = 11
|
||||||
|
Width = 90
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 10
|
||||||
|
OnChange = CYNoChange
|
||||||
|
OnKeyPress = CYNOKeyPress
|
||||||
|
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 = 187
|
||||||
|
Top = 188
|
||||||
|
Width = 1073
|
||||||
|
Height = 492
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Panel3'
|
||||||
|
TabOrder = 5
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 2
|
||||||
|
Top = 295
|
||||||
|
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 = 293
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
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_YSYF.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YSYF.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YSYF.SHuangSe
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
object v1Column19: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 40
|
||||||
|
end
|
||||||
|
object v1Column12: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column15: TcxGridDBColumn
|
||||||
|
Caption = #24211#20301#20301#32622
|
||||||
|
DataBinding.FieldName = 'DefStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'CYNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21697#21517
|
||||||
|
DataBinding.FieldName = 'CYName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'CYSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'CYEName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #33521#25991#25104#20998
|
||||||
|
DataBinding.FieldName = 'CYECF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'CYKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'CYMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#39068#33394
|
||||||
|
DataBinding.FieldName = 'CYColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_YSYF.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_YSYF.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_YSYF.Default
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBColumn
|
||||||
|
Caption = #20844#26020#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceKg'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v1Column13: TcxGridDBColumn
|
||||||
|
Caption = #31859#20215
|
||||||
|
DataBinding.FieldName = 'CYPriceM'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 54
|
||||||
|
end
|
||||||
|
object v1Column26: TcxGridDBColumn
|
||||||
|
Caption = #32553#29575
|
||||||
|
DataBinding.FieldName = 'price1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column27: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#36153
|
||||||
|
DataBinding.FieldName = 'Price2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column28: TcxGridDBColumn
|
||||||
|
Caption = #26579#36153
|
||||||
|
DataBinding.FieldName = 'price3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column18: TcxGridDBColumn
|
||||||
|
Caption = #23494#24230
|
||||||
|
DataBinding.FieldName = 'defstr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column29: TcxGridDBColumn
|
||||||
|
Caption = 'FOB'#36816#36153'+'#21253#35013
|
||||||
|
DataBinding.FieldName = 'price4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v1Column31: TcxGridDBColumn
|
||||||
|
Caption = #20215#26684
|
||||||
|
DataBinding.FieldName = 'price6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column30: TcxGridDBColumn
|
||||||
|
Caption = #21518#21152#24037#36153
|
||||||
|
DataBinding.FieldName = 'price5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column20: TcxGridDBColumn
|
||||||
|
Caption = #32463#32428#25467#24230
|
||||||
|
DataBinding.FieldName = 'defstr4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column21: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'defstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column24: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#26469#28304
|
||||||
|
DataBinding.FieldName = 'defnote3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column22: TcxGridDBColumn
|
||||||
|
Caption = #32433#25903
|
||||||
|
DataBinding.FieldName = 'defnote5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column32: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#38376#24133
|
||||||
|
DataBinding.FieldName = 'PBMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column33: TcxGridDBColumn
|
||||||
|
Caption = #22383#24067#20811#37325
|
||||||
|
DataBinding.FieldName = 'PBKZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column35: TcxGridDBColumn
|
||||||
|
Caption = #21407#26009#32452#25104
|
||||||
|
DataBinding.FieldName = 'DefStr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column36: TcxGridDBColumn
|
||||||
|
Caption = #19978#26426#35268#26684
|
||||||
|
DataBinding.FieldName = 'DefStr9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'CYNote'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryTree
|
||||||
|
Left = 91
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 945
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 881
|
||||||
|
Top = 65521
|
||||||
|
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_YSYF.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_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 479
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
end
|
||||||
502
应收应付(YSYF.dll)/U_CPManageSel.pas
Normal file
502
应收应付(YSYF.dll)/U_CPManageSel.pas
Normal file
|
|
@ -0,0 +1,502 @@
|
||||||
|
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;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
ODPat: TOpenDialog;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
|
TOK: 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;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
adoqueryPicture: TADOQuery;
|
||||||
|
DefStr6: 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;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
CYColor: TEdit;
|
||||||
|
Label9: TLabel;
|
||||||
|
CYColorEng: TEdit;
|
||||||
|
Label10: TLabel;
|
||||||
|
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 TBFindClick(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);
|
||||||
|
procedure TOKClick(Sender: TObject);
|
||||||
|
procedure CYNOKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
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_Fun10;
|
||||||
|
|
||||||
|
{$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;
|
||||||
|
tbfind.Click;
|
||||||
|
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
|
||||||
|
inittree();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure 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
|
||||||
|
TBFind.Click;
|
||||||
|
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;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.TOKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF CDS_main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPManageSel.CYNOKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
474
应收应付(YSYF.dll)/U_ClothContractListHZSel.dfm
Normal file
474
应收应付(YSYF.dll)/U_ClothContractListHZSel.dfm
Normal file
|
|
@ -0,0 +1,474 @@
|
||||||
|
object frmClothContractListHZSel: TfrmClothContractListHZSel
|
||||||
|
Left = 327
|
||||||
|
Top = 164
|
||||||
|
Width = 1177
|
||||||
|
Height = 535
|
||||||
|
Caption = #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
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1161
|
||||||
|
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_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1161
|
||||||
|
Height = 54
|
||||||
|
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 = 165
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 283
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21512#21516#32534#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 = 588
|
||||||
|
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 = 756
|
||||||
|
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 = 443
|
||||||
|
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 = 171
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 337
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 641
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 784
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 469
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 86
|
||||||
|
Width = 1161
|
||||||
|
Height = 410
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnDblClick = Tv1DblClick
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
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
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_YSYF.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YSYF.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YSYF.SHuangSe
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #21512#21516#32534#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #20379#26041
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 124
|
||||||
|
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_YSYF.Default
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #25351#31034#21333#21495
|
||||||
|
DataBinding.FieldName = 'JYOrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'C_Code'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 110
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'C_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'RollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 150
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #21512#21516#31867#22411
|
||||||
|
DataBinding.FieldName = 'ordertype'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
end
|
||||||
|
object v1Column9: TcxGridDBColumn
|
||||||
|
Caption = #20184#27454#26041#24335
|
||||||
|
DataBinding.FieldName = 'ConTK4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column10: TcxGridDBColumn
|
||||||
|
Caption = #23450#37329
|
||||||
|
DataBinding.FieldName = 'Deposit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object v1Column11: TcxGridDBColumn
|
||||||
|
Caption = #20323#37329#21333#20215
|
||||||
|
DataBinding.FieldName = 'HYPrice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21040#36135#25968#37327
|
||||||
|
DataBinding.FieldName = 'DHQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.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 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 = 880
|
||||||
|
Top = 56
|
||||||
|
end
|
||||||
|
end
|
||||||
537
应收应付(YSYF.dll)/U_ClothContractListHZSel.pas
Normal file
537
应收应付(YSYF.dll)/U_ClothContractListHZSel.pas
Normal file
|
|
@ -0,0 +1,537 @@
|
||||||
|
unit U_ClothContractListHZSel;
|
||||||
|
|
||||||
|
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, cxPC,
|
||||||
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractListHZSel = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeName: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
v1Column9: TcxGridDBColumn;
|
||||||
|
v1Column10: TcxGridDBColumn;
|
||||||
|
v1Column11: TcxGridDBColumn;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ConNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure cxPageControl1Change(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure Tv1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
FInt, PFInt: Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData(): Boolean;
|
||||||
|
function YFData(): Boolean;
|
||||||
|
function HYYFData(): Boolean;
|
||||||
|
function WKYFData(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FFName, FFactoryName: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractListHZSel: TfrmClothContractListHZSel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ProductOrderList, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractListHZSel := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.*,isnull(Deposit,0) as CDeposit,OrderNO=(select Top 1 OrderNo from JYOrder_main X where X.MainID=B.fromMainID)');
|
||||||
|
SQL.Add(',DHQty=(select sum(Qty) from yf_money_cr X where X.CGSubid=A.subid)');
|
||||||
|
sql.Add('from Contract_sub A');
|
||||||
|
sql.Add('inner join Contract_Main B on B.mainID=A.mainID');
|
||||||
|
sql.Add('where FillTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||||
|
sql.Add('and FillTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + '''');
|
||||||
|
sql.Add('and FillTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + '''');
|
||||||
|
sql.Add('and HTType=''采购合同'' ');
|
||||||
|
if FFactoryName <> '' then
|
||||||
|
sql.Add('and FactoryNoName=''' + ffactoryname + ''' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption, Tv1, '指示单管理');
|
||||||
|
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 90;
|
||||||
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractListHZSel.DelData(): Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result := false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete ContractSX_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from ContractSX_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 ContractSX_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 ContractSX_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 TfrmClothContractListHZSel.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表', cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.ConNoChange(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 TfrmClothContractListHZSel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.cxPageControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractListHZSel.YFData(): Boolean;
|
||||||
|
var
|
||||||
|
CRID, OrdMainId, YFID, FComTaiTou, FCRID, FFactoryName: string;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd, YFID, 'YF', 'YF_Money_CR', 3, 1) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取定金最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||||
|
sql.Add('select * from YF_Money_CRID ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CRID := ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CRID').Value := StrToInt(CRID);
|
||||||
|
FieldByName('FactoryNo').Value := Trim(Order_Main.fieldbyname('FactoryNo').AsString);
|
||||||
|
FieldByName('FactoryName').Value := Trim(Order_Main.fieldbyname('FactoryNoName').AsString);
|
||||||
|
FieldByName('ZdyStr1').Value := '应付付';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR where YFID=''' + Trim(YFID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('YFID').Value := Trim(YFID);
|
||||||
|
FieldByName('YFTypeId').Value := Trim(Order_Main.fieldbyname('Mainid').AsString);
|
||||||
|
FieldByName('CRID').Value := StrToInt(CRID);
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
FieldByName('CRType').Value := '付款登记';
|
||||||
|
FieldByName('CRFlag').Value := '应付付';
|
||||||
|
FieldByName('QtyFlag').Value := -1;
|
||||||
|
FieldByName('FactoryName').Value := Trim(Order_Main.fieldbyname('factoryNoName').AsString);
|
||||||
|
FieldByName('CRTime').Value := SGetServerDateTime(ADOQuerytemp);
|
||||||
|
|
||||||
|
FieldByName('DFBankNo').Value := Trim(Order_Main.fieldbyname('bankNo').AsString);
|
||||||
|
FieldByName('payment').Value := Trim(Order_Main.fieldbyname('ConTK4').AsString);
|
||||||
|
|
||||||
|
FieldByName('Qty').Value := 0;
|
||||||
|
FieldByName('PS').Value := 0;
|
||||||
|
FieldByName('YFType').Value := '自动生成';
|
||||||
|
FieldByName('Price').Value := 0;
|
||||||
|
if Order_Main.fieldbyname('CDeposit').asstring <> '' then
|
||||||
|
begin
|
||||||
|
FieldByName('money').Value := Order_Main.fieldbyname('CDeposit').AsFloat;
|
||||||
|
FieldByName('BBmoney').Value := Order_Main.fieldbyname('CDeposit').AsFloat;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('money').Value := 0;
|
||||||
|
FieldByName('BBmoney').Value := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FieldByName('HuiLv').Value := 1;
|
||||||
|
FieldByName('BZType').Value := 'RMB';
|
||||||
|
FieldByName('ComTaiTou').Value := '';
|
||||||
|
FieldByName('QtyUnit').Value := '';
|
||||||
|
FieldByName('orderNo').Value := Trim(Order_Main.fieldbyname('ConNo').AsString);
|
||||||
|
FieldByName('P_CodeName').Value := Trim(Order_Main.fieldbyname('C_CodeName').AsString);
|
||||||
|
FieldByName('YFName').Value := '坯布采购定金';
|
||||||
|
FieldByName('MainId').Value := Trim(Order_Main.fieldbyname('Mainid').AsString);
|
||||||
|
FieldByName('status').Value := '0';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractListHZSel.HYYFData(): Boolean;
|
||||||
|
var
|
||||||
|
CRID, OrdMainId, YFID, FComTaiTou, FCRID, FFactoryName: string;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd, YFID, 'YS', 'YF_Money_CR', 3, 1) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取佣金最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||||
|
sql.Add('select * from YF_Money_CRID ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CRID := ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CRID').Value := StrToInt(CRID);
|
||||||
|
FieldByName('FactoryNo').Value := Trim(Order_Main.fieldbyname('FactoryNo').AsString);
|
||||||
|
FieldByName('FactoryName').Value := Trim(Order_Main.fieldbyname('FactoryNoName').AsString);
|
||||||
|
FieldByName('ZdyStr1').Value := '应收收';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR where YFID=''' + Trim(YFID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('YFID').Value := Trim(YFID);
|
||||||
|
FieldByName('YFTypeId').Value := Trim(Order_Main.fieldbyname('Mainid').AsString);
|
||||||
|
FieldByName('CRID').Value := StrToInt(CRID);
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
FieldByName('CRType').Value := '应收款登记';
|
||||||
|
FieldByName('CRFlag').Value := '应收收';
|
||||||
|
FieldByName('QtyFlag').Value := 1;
|
||||||
|
FieldByName('FactoryName').Value := Trim(Order_Main.fieldbyname('factoryNoName').AsString);
|
||||||
|
FieldByName('CRTime').Value := SGetServerDateTime(ADOQuerytemp);
|
||||||
|
|
||||||
|
FieldByName('DFBankNo').Value := Trim(Order_Main.fieldbyname('bankNo').AsString);
|
||||||
|
FieldByName('payment').Value := Trim(Order_Main.fieldbyname('ConTK4').AsString);
|
||||||
|
|
||||||
|
FieldByName('Qty').Value := Order_Main.fieldbyname('Qty').asstring;
|
||||||
|
FieldByName('PS').Value := Order_Main.fieldbyname('RollNum').asstring;
|
||||||
|
FieldByName('YFType').Value := '自动生成';
|
||||||
|
|
||||||
|
if Order_Main.fieldbyname('HYPrice').asstring <> '' then
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value := Order_Main.fieldbyname('HYPrice').AsFloat;
|
||||||
|
FieldByName('money').Value := Order_Main.fieldbyname('Qty').AsFloat * Order_Main.fieldbyname('HYPrice').AsFloat;
|
||||||
|
FieldByName('BBmoney').Value := Order_Main.fieldbyname('Qty').AsFloat * Order_Main.fieldbyname('HYPrice').AsFloat;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value := 0;
|
||||||
|
FieldByName('money').Value := 0;
|
||||||
|
FieldByName('BBmoney').Value := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FieldByName('HuiLv').Value := 1;
|
||||||
|
FieldByName('BZType').Value := Order_Main.fieldbyname('HYPriceunit').AsString;
|
||||||
|
FieldByName('ComTaiTou').Value := '';
|
||||||
|
FieldByName('QtyUnit').Value := Order_Main.fieldbyname('QtyUnit').AsString;
|
||||||
|
FieldByName('orderNo').Value := Trim(Order_Main.fieldbyname('ConNo').AsString);
|
||||||
|
FieldByName('P_CodeName').Value := Trim(Order_Main.fieldbyname('C_CodeName').AsString);
|
||||||
|
FieldByName('YFName').Value := '坯布佣金';
|
||||||
|
FieldByName('MainId').Value := Trim(Order_Main.fieldbyname('Mainid').AsString);
|
||||||
|
FieldByName('status').Value := '0';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractListHZSel.WKYFData(): Boolean;
|
||||||
|
var
|
||||||
|
CRID, OrdMainId, YFID, FComTaiTou, FCRID, FFactoryName: string;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd, YFID, 'YF', 'YF_Money_CR', 3, 1) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取尾款最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||||
|
sql.Add('select * from YF_Money_CRID ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CRID := ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CRID').Value := StrToInt(CRID);
|
||||||
|
FieldByName('FactoryNo').Value := Trim(Order_Main.fieldbyname('FactoryNo').AsString);
|
||||||
|
FieldByName('FactoryName').Value := Trim(Order_Main.fieldbyname('FactoryNoName').AsString);
|
||||||
|
FieldByName('ZdyStr1').Value := '应付付';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR where YFID=''' + Trim(YFID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('YFID').Value := Trim(YFID);
|
||||||
|
FieldByName('YFTypeId').Value := Trim(Order_Main.fieldbyname('Mainid').AsString);
|
||||||
|
FieldByName('CRID').Value := StrToInt(CRID);
|
||||||
|
FieldByName('Filler').Value := Trim(DName);
|
||||||
|
FieldByName('CRType').Value := '付款登记';
|
||||||
|
FieldByName('CRFlag').Value := '应付付';
|
||||||
|
FieldByName('QtyFlag').Value := -1;
|
||||||
|
FieldByName('FactoryName').Value := Trim(Order_Main.fieldbyname('factoryNoName').AsString);
|
||||||
|
FieldByName('CRTime').Value := SGetServerDateTime(ADOQuerytemp);
|
||||||
|
|
||||||
|
FieldByName('DFBankNo').Value := Trim(Order_Main.fieldbyname('bankNo').AsString);
|
||||||
|
FieldByName('payment').Value := Trim(Order_Main.fieldbyname('ConTK4').AsString);
|
||||||
|
|
||||||
|
FieldByName('Qty').Value := 0;
|
||||||
|
FieldByName('PS').Value := 0;
|
||||||
|
FieldByName('YFType').Value := '自动生成';
|
||||||
|
FieldByName('Price').Value := 0;
|
||||||
|
if Order_Main.fieldbyname('Wmoney').asstring <> '' then
|
||||||
|
begin
|
||||||
|
FieldByName('money').Value := Order_Main.fieldbyname('Wmoney').AsFloat;
|
||||||
|
FieldByName('BBmoney').Value := Order_Main.fieldbyname('Wmoney').AsFloat;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('money').Value := 0;
|
||||||
|
FieldByName('BBmoney').Value := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FieldByName('HuiLv').Value := 1;
|
||||||
|
FieldByName('BZType').Value := 'RMB';
|
||||||
|
FieldByName('ComTaiTou').Value := '';
|
||||||
|
FieldByName('QtyUnit').Value := '';
|
||||||
|
FieldByName('orderNo').Value := Trim(Order_Main.fieldbyname('ConNo').AsString);
|
||||||
|
FieldByName('P_CodeName').Value := Trim(Order_Main.fieldbyname('C_CodeName').AsString);
|
||||||
|
FieldByName('YFName').Value := '坯布采购尾款';
|
||||||
|
FieldByName('MainId').Value := Trim(Order_Main.fieldbyname('Mainid').AsString);
|
||||||
|
FieldByName('status').Value := '0';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractListHZSel.Tv1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
17983
应收应付(YSYF.dll)/U_DataLink.dfm
Normal file
17983
应收应付(YSYF.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
76
应收应付(YSYF.dll)/U_DataLink.pas
Normal file
76
应收应付(YSYF.dll)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
unit U_DataLink;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||||
|
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses;
|
||||||
|
var
|
||||||
|
DConString:String; {全局连接字符串}
|
||||||
|
server, dtbase, user, pswd: String; {数据库连接参数}
|
||||||
|
DCurHandle:hwnd; //当前窗体句柄
|
||||||
|
DName:string ; //#用户名#//
|
||||||
|
DCode:string ; //#用户编号#//
|
||||||
|
Ddatabase:string; //#数据库名称#//
|
||||||
|
DTitCaption:string; //#主窗体名称#//
|
||||||
|
PicSvr:string;
|
||||||
|
DParameters1,DParameters2,DParameters3,DParameters4,DParameters5:string;// 外部参数;
|
||||||
|
DParameters6,DParameters7,DParameters8,DParameters9,DParameters10:string;//外部参数;
|
||||||
|
OldDllApp:Tapplication; //保存原有句柄
|
||||||
|
NewDllApp: Tapplication;//当前句柄
|
||||||
|
MainApplication: Tapplication ;
|
||||||
|
DFormCode:integer; //当前窗口号
|
||||||
|
IsDelphiLanguage:integer;
|
||||||
|
DServerDate:TdateTime; //服务器时间
|
||||||
|
DCompany:string; //公司
|
||||||
|
IpCall:Integer;
|
||||||
|
IpWLDZStr:string;
|
||||||
|
type
|
||||||
|
TDataLink_YSYF = 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;
|
||||||
|
Green: TcxStyle;
|
||||||
|
procedure DataModuleDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
TMakebar = procedure(ucData:pchar;nDataLen:integer;nErrLevel:integer;nMask:integer;nBarEdition:integer;szBmpFileName:pchar;nScale:integer);stdcall;
|
||||||
|
TMixtext = procedure( szSrcBmpFileName:PChar;szDstBmpFileName:PChar;sztext:PChar;fontsize,txtheight,hmargin,vmargin,txtcntoneline:integer);stdcall;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var
|
||||||
|
DataLink_YSYF: TDataLink_YSYF;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
procedure TDataLink_YSYF.DataModuleDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DataLink_YSYF:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
603
应收应付(YSYF.dll)/U_FDINVOICE.dfm
Normal file
603
应收应付(YSYF.dll)/U_FDINVOICE.dfm
Normal file
|
|
@ -0,0 +1,603 @@
|
||||||
|
object frmFDINVOICE: TfrmFDINVOICE
|
||||||
|
Left = 231
|
||||||
|
Top = 51
|
||||||
|
Width = 1288
|
||||||
|
Height = 754
|
||||||
|
Caption = #21457#31080#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 = 1272
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TADD: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TADDClick
|
||||||
|
end
|
||||||
|
object TUPDATE: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TUPDATEClick
|
||||||
|
end
|
||||||
|
object TBDEL: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDELClick
|
||||||
|
end
|
||||||
|
object TBCopy: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22797#21046
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = TBCopyClick
|
||||||
|
end
|
||||||
|
object TSel: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
OnClick = TSelClick
|
||||||
|
end
|
||||||
|
object TCHK: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23457#26680
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TCHKClick
|
||||||
|
end
|
||||||
|
object TNOCHK: TToolButton
|
||||||
|
Left = 504
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23457#26680
|
||||||
|
ImageIndex = 86
|
||||||
|
OnClick = TNOCHKClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 591
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 654
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21457#31080#38468#20214
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 741
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1272
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 472
|
||||||
|
Top = 13
|
||||||
|
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 Label3: TLabel
|
||||||
|
Left = 328
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#21495#30721
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 186
|
||||||
|
Top = 13
|
||||||
|
Width = 30
|
||||||
|
Height = 12
|
||||||
|
Caption = '-----'
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 616
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 760
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #24320#31080#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 904
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 1052
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25105#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 524
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object InvoiceNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 380
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object begdate: TDateTimePicker
|
||||||
|
Left = 94
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Enddate: TDateTimePicker
|
||||||
|
Left = 204
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object P_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 668
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object FactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 812
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object ToFactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 956
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object SYRName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 1104
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 91
|
||||||
|
Width = 1272
|
||||||
|
Height = 624
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_FP
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Money
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column5
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
Column = v1InvoiceNo
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object v1InvoiceNo: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#21495#30721
|
||||||
|
DataBinding.FieldName = 'InvoiceNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1InvoiceDate: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#26085#26399
|
||||||
|
DataBinding.FieldName = 'InvoiceDate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v1InvoiceType: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#31867#22411
|
||||||
|
DataBinding.FieldName = 'InvoiceType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1FactoryName: TcxGridDBColumn
|
||||||
|
Caption = #24320#31080#21333#20301
|
||||||
|
DataBinding.FieldName = 'FactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25105#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'SYRName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 94
|
||||||
|
end
|
||||||
|
object v1P_Spec: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
DataBinding.FieldName = 'P_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1ToFactoryName: TcxGridDBColumn
|
||||||
|
Caption = #36827#26041
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1Money: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = cxStyle1
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1PriceUnit: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #31246#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'tax'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #21547#31246#37329#39069
|
||||||
|
DataBinding.FieldName = 'taxMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#38468#20214
|
||||||
|
DataBinding.FieldName = 'Isfj'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
Properties.ReadOnly = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1272
|
||||||
|
Height = 21
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 0
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectRight = 0
|
||||||
|
ClientRectTop = 0
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 309
|
||||||
|
Top = 193
|
||||||
|
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 = 448
|
||||||
|
Top = 208
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 376
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_FP: TDataSource
|
||||||
|
DataSet = CDS_FP
|
||||||
|
Left = 443
|
||||||
|
Top = 243
|
||||||
|
end
|
||||||
|
object CDS_FP: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 472
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
PixelsPerInch = 96
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svTextColor]
|
||||||
|
TextColor = clRed
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
383
应收应付(YSYF.dll)/U_FDINVOICE.pas
Normal file
383
应收应付(YSYF.dll)/U_FDINVOICE.pas
Normal file
|
|
@ -0,0 +1,383 @@
|
||||||
|
unit U_FDINVOICE;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit, cxPC, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmFDINVOICE = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
Label1: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
InvoiceNo: TEdit;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
begdate: TDateTimePicker;
|
||||||
|
Enddate: TDateTimePicker;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_FP: TDataSource;
|
||||||
|
CDS_FP: TClientDataSet;
|
||||||
|
TADD: TToolButton;
|
||||||
|
TUPDATE: TToolButton;
|
||||||
|
TBDEL: TToolButton;
|
||||||
|
v1InvoiceNo: TcxGridDBColumn;
|
||||||
|
v1InvoiceType: TcxGridDBColumn;
|
||||||
|
v1InvoiceDate: TcxGridDBColumn;
|
||||||
|
v1ToFactoryName: TcxGridDBColumn;
|
||||||
|
v1FactoryName: TcxGridDBColumn;
|
||||||
|
v1note: TcxGridDBColumn;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_Spec: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1Money: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1PriceUnit: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_Spec: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
FactoryName: TEdit;
|
||||||
|
TCHK: TToolButton;
|
||||||
|
TNOCHK: TToolButton;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
TSel: TToolButton;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
TBCopy: TToolButton;
|
||||||
|
Label7: TLabel;
|
||||||
|
ToFactoryName: TEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
SYRName: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure InvoiceNoChange(Sender: TObject);
|
||||||
|
procedure TADDClick(Sender: TObject);
|
||||||
|
procedure TUPDATEClick(Sender: TObject);
|
||||||
|
procedure TBDELClick(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure TCHKClick(Sender: TObject);
|
||||||
|
procedure TNOCHKClick(Sender: TObject);
|
||||||
|
procedure TSelClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure TBCopyClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetStatus();
|
||||||
|
public
|
||||||
|
fInvoiceFlag:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmFDINVOICE: TfrmFDINVOICE;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_FDINVOICE_Sub, U_FjList10;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.SetStatus();
|
||||||
|
begin
|
||||||
|
tchk.Visible:=false;
|
||||||
|
tnochk.Visible:=false;
|
||||||
|
TUPDATE.Visible:=false;
|
||||||
|
tbdel.Visible:=false;
|
||||||
|
if trim(DParameters1)<>'高权限' then
|
||||||
|
begin
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
TUPDATE.Visible:=true;
|
||||||
|
tbdel.Visible:=true;
|
||||||
|
end;
|
||||||
|
1:begin
|
||||||
|
end;
|
||||||
|
2:begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
tchk.Visible:=true;
|
||||||
|
TUPDATE.Visible:=true;
|
||||||
|
tbdel.Visible:=true;
|
||||||
|
end;
|
||||||
|
1:begin
|
||||||
|
tnochk.Visible:=true;
|
||||||
|
end;
|
||||||
|
2:begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
IF fInvoiceFlag='' then
|
||||||
|
fInvoiceFlag:='1';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select A.*,B.*, ');
|
||||||
|
sql.Add(' isfj=cast(case when isnull((select count(WBID) from TP_File X where X.WBID=A.invoiceNo and X.TFType=''发票''),0)>0 then 1 else 0 end as bit) ');
|
||||||
|
sql.Add(' from FD_Invoice A ');
|
||||||
|
sql.add(' inner join FD_Invoicesub B on B.InvoiceNo=A.InvoiceNo ');
|
||||||
|
sql.add(' where A.InvoiceDate>='''+formatdatetime('yyyy-MM-dd',begdate.datetime)+''' ');
|
||||||
|
sql.Add(' and A.InvoiceDate<'''+formatdateTime('yyyy-MM-dd',enddate.DateTime+1)+''' ');
|
||||||
|
sql.Add(' and InvoiceFlag='''+fInvoiceFlag+''' ');
|
||||||
|
if cxTabControl1.TabIndex=0 then
|
||||||
|
sql.add(' and A.Chkstatus=''0''');
|
||||||
|
if cxTabControl1.TabIndex=1 then
|
||||||
|
sql.add(' and A.Chkstatus=''1''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_FP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_FP);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmFDINVOICE:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('发票管理',Tv1,'财务管理');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmFDINVOICE.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('发票管理',Tv1,'财务管理');
|
||||||
|
Enddate.DateTime:=SGetServerDate(ADOQueryTemp);
|
||||||
|
begdate.DateTime:=Enddate.DateTime-30;
|
||||||
|
|
||||||
|
SetStatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
begdate.SetFocus;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_FP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_FP);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.InvoiceNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TADDClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FrmInvoice_Sub:=TFrmInvoice_Sub.Create(self);
|
||||||
|
with FrmInvoice_Sub do
|
||||||
|
begin
|
||||||
|
FInvoiceNo:='';
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TUPDATEClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FrmInvoice_Sub:=TFrmInvoice_Sub.Create(self);
|
||||||
|
with FrmInvoice_Sub do
|
||||||
|
begin
|
||||||
|
InvoiceNo.Enabled:=False;
|
||||||
|
FInvoiceNo:=trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TBDELClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
if application.MessageBox('确定要删除发票吗?','提示',1)=2 then exit;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('delete from FD_Invoicesub where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
sql.add('delete from FD_Invoice where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SetStatus();
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TCHKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('update FD_Invoicesub set Chker='''+trim(DName)+''',Chktime=getdate(),chkstatus=''1'' ');
|
||||||
|
sql.add('where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
application.MessageBox('审核成功','提示');
|
||||||
|
initGrid();
|
||||||
|
except;
|
||||||
|
application.MessageBox('审核失败','提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TNOCHKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('update FD_Invoicesub set Chker=null,Chktime=null,chkstatus=''0'' ');
|
||||||
|
sql.add('where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
application.MessageBox('撤销成功','提示');
|
||||||
|
initGrid();
|
||||||
|
except;
|
||||||
|
application.MessageBox('撤销失败','提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TSelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FrmInvoice_Sub:=TFrmInvoice_Sub.Create(self);
|
||||||
|
with FrmInvoice_Sub do
|
||||||
|
begin
|
||||||
|
TSave.Visible:=False;
|
||||||
|
ToolBar2.Enabled:=False;
|
||||||
|
Panel1.Enabled:=False;
|
||||||
|
FInvoiceNo:=trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmFjList10:=TfrmFjList10.Create(Application);
|
||||||
|
with frmFjList10 do
|
||||||
|
begin
|
||||||
|
// PState:=1;
|
||||||
|
// if Trim(canshu1)<>'高权限' then cxButton1.Visible:=false;
|
||||||
|
fkeyNO:=Trim(Self.CDS_FP.fieldbyname('InvoiceNo').AsString);
|
||||||
|
fType:='发票';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmFjList10.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE.TBCopyClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FrmInvoice_Sub:=TFrmInvoice_Sub.Create(self);
|
||||||
|
with FrmInvoice_Sub do
|
||||||
|
begin
|
||||||
|
CopyInt:=99;
|
||||||
|
FInvoiceNo:=trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
540
应收应付(YSYF.dll)/U_FDINVOICE_S.dfm
Normal file
540
应收应付(YSYF.dll)/U_FDINVOICE_S.dfm
Normal file
|
|
@ -0,0 +1,540 @@
|
||||||
|
object frmFDINVOICE_S: TfrmFDINVOICE_S
|
||||||
|
Left = 131
|
||||||
|
Top = 159
|
||||||
|
Width = 1036
|
||||||
|
Height = 491
|
||||||
|
Caption = #24320#31080#30003#35831
|
||||||
|
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 = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TADD: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TADDClick
|
||||||
|
end
|
||||||
|
object TUPDATE: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TUPDATEClick
|
||||||
|
end
|
||||||
|
object TBDEL: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDELClick
|
||||||
|
end
|
||||||
|
object TSel: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
OnClick = TSelClick
|
||||||
|
end
|
||||||
|
object TCHK: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23457#26680
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TCHKClick
|
||||||
|
end
|
||||||
|
object TNOCHK: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23457#26680
|
||||||
|
ImageIndex = 86
|
||||||
|
OnClick = TNOCHKClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 528
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 591
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 654
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1020
|
||||||
|
Height = 62
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 612
|
||||||
|
Top = 13
|
||||||
|
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 Label3: TLabel
|
||||||
|
Left = 244
|
||||||
|
Top = 37
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994' '#21153' '#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #24320#31080#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 612
|
||||||
|
Top = 37
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 244
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #24320#31080#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 37
|
||||||
|
Width = 21
|
||||||
|
Height = 12
|
||||||
|
Caption = 'PO#'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 13
|
||||||
|
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 P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 664
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ywyChange
|
||||||
|
end
|
||||||
|
object ywy: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 296
|
||||||
|
Top = 33
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ywyChange
|
||||||
|
end
|
||||||
|
object begdate: TDateTimePicker
|
||||||
|
Left = 86
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Enddate: TDateTimePicker
|
||||||
|
Left = 86
|
||||||
|
Top = 33
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object P_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 664
|
||||||
|
Top = 33
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ywyChange
|
||||||
|
end
|
||||||
|
object FactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 296
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ywyChange
|
||||||
|
end
|
||||||
|
object orderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 480
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = ywyChange
|
||||||
|
end
|
||||||
|
object KHConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 480
|
||||||
|
Top = 33
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = ywyChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 114
|
||||||
|
Width = 1020
|
||||||
|
Height = 339
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_FP
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Money
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object v1InvoiceDate: TcxGridDBColumn
|
||||||
|
Caption = #30003#35831#26085#26399
|
||||||
|
DataBinding.FieldName = 'InvoiceDate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v1FactoryName: TcxGridDBColumn
|
||||||
|
Caption = #24320#31080#21333#20301
|
||||||
|
DataBinding.FieldName = 'FactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'ywy'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 94
|
||||||
|
end
|
||||||
|
object v1ToFactoryName: TcxGridDBColumn
|
||||||
|
Caption = #36827#26041
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1PriceUnit: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Money: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = cxStyle1
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'P_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #25105#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'SYRName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 93
|
||||||
|
Width = 1020
|
||||||
|
Height = 21
|
||||||
|
Align = alTop
|
||||||
|
Style = 9
|
||||||
|
TabIndex = 0
|
||||||
|
TabOrder = 3
|
||||||
|
Tabs.Strings = (
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 21
|
||||||
|
ClientRectRight = 1020
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 445
|
||||||
|
Top = 193
|
||||||
|
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 = 304
|
||||||
|
Top = 260
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Print
|
||||||
|
Left = 376
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_FP: TDataSource
|
||||||
|
DataSet = CDS_FP
|
||||||
|
Left = 503
|
||||||
|
Top = 195
|
||||||
|
end
|
||||||
|
object CDS_FP: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 472
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svTextColor]
|
||||||
|
TextColor = clRed
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CDS_Print: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 340
|
||||||
|
Top = 260
|
||||||
|
end
|
||||||
|
end
|
||||||
379
应收应付(YSYF.dll)/U_FDINVOICE_S.pas
Normal file
379
应收应付(YSYF.dll)/U_FDINVOICE_S.pas
Normal file
|
|
@ -0,0 +1,379 @@
|
||||||
|
unit U_FDINVOICE_S;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit, cxPC;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmFDINVOICE_S = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
Label1: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ywy: TEdit;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
Label2: TLabel;
|
||||||
|
begdate: TDateTimePicker;
|
||||||
|
Enddate: TDateTimePicker;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_FP: TDataSource;
|
||||||
|
CDS_FP: TClientDataSet;
|
||||||
|
TADD: TToolButton;
|
||||||
|
TUPDATE: TToolButton;
|
||||||
|
TBDEL: TToolButton;
|
||||||
|
v1InvoiceDate: TcxGridDBColumn;
|
||||||
|
v1ToFactoryName: TcxGridDBColumn;
|
||||||
|
v1FactoryName: TcxGridDBColumn;
|
||||||
|
v1note: TcxGridDBColumn;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1Money: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1PriceUnit: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_Spec: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
FactoryName: TEdit;
|
||||||
|
TCHK: TToolButton;
|
||||||
|
TNOCHK: TToolButton;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
TSel: TToolButton;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
orderNo: TEdit;
|
||||||
|
KHConNo: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
CDS_Print: TClientDataSet;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ywyChange(Sender: TObject);
|
||||||
|
procedure TADDClick(Sender: TObject);
|
||||||
|
procedure TUPDATEClick(Sender: TObject);
|
||||||
|
procedure TBDELClick(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure TCHKClick(Sender: TObject);
|
||||||
|
procedure TNOCHKClick(Sender: TObject);
|
||||||
|
procedure TSelClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
canshu1:string;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetStatus();
|
||||||
|
public
|
||||||
|
fInvoiceFlag:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmFDINVOICE_S: TfrmFDINVOICE_S;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp, U_FDINVOICE_Sub_S;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.SetStatus();
|
||||||
|
begin
|
||||||
|
tchk.Visible:=false;
|
||||||
|
tnochk.Visible:=false;
|
||||||
|
TUPDATE.Visible:=false;
|
||||||
|
tbdel.Visible:=false;
|
||||||
|
if trim(canshu1)<>'高权限' then
|
||||||
|
begin
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
TUPDATE.Visible:=true;
|
||||||
|
tbdel.Visible:=true;
|
||||||
|
end;
|
||||||
|
1:begin
|
||||||
|
end;
|
||||||
|
2:begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
tchk.Visible:=true;
|
||||||
|
TUPDATE.Visible:=true;
|
||||||
|
tbdel.Visible:=true;
|
||||||
|
end;
|
||||||
|
1:begin
|
||||||
|
tnochk.Visible:=true;
|
||||||
|
end;
|
||||||
|
2:begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
IF fInvoiceFlag='' then
|
||||||
|
fInvoiceFlag:='1';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select A.*,B.*,C.OrderNo,');
|
||||||
|
sql.Add('KHConNO=(select Top 1 KHConNO from JYOrdercon_Main X where X.conNO=C.conNO)');
|
||||||
|
sql.Add('from FD_Invoice A ');
|
||||||
|
sql.add('inner join FD_Invoicesub B on B.InvoiceNo=A.InvoiceNo ');
|
||||||
|
sql.Add('left join JYorder_main C on C.MainID=B.mainID') ;
|
||||||
|
sql.add('where A.InvoiceDate>='''+formatdatetime('yyyy-MM-dd',begdate.datetime)+''' ');
|
||||||
|
sql.Add(' and A.InvoiceDate<'''+formatdateTime('yyyy-MM-dd',enddate.DateTime+1)+''' ');
|
||||||
|
sql.Add(' and InvoiceFlag='''+fInvoiceFlag+''' ');
|
||||||
|
if cxTabControl1.TabIndex=0 then
|
||||||
|
sql.add(' and A.Chkstatus=''0''');
|
||||||
|
if cxTabControl1.TabIndex=1 then
|
||||||
|
sql.add(' and A.Chkstatus=''1''');
|
||||||
|
if trim(canshu1)<>'高权限'then
|
||||||
|
sql.add(' and A.ywy='''+trim(Dname)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_FP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_FP);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmFDINVOICE_S:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'财务管理');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmFDINVOICE_S.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
canshu1:=trim(DParameters1);
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'财务管理');
|
||||||
|
Enddate.DateTime:=SGetServerDate(ADOQueryTemp);
|
||||||
|
begdate.DateTime:=Enddate.DateTime-30;
|
||||||
|
v1FactoryName.Visible:=False;
|
||||||
|
v1FactoryName.Hidden:=True;
|
||||||
|
SetStatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
begdate.SetFocus;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_FP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_FP);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.ywyChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TADDClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmInvoice_Sub_S:=TfrmInvoice_Sub_S.Create(self);
|
||||||
|
with frmInvoice_Sub_S do
|
||||||
|
begin
|
||||||
|
FInvoiceNo:='';
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
canshu1:=self.canshu1;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TUPDATEClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF cds_Fp.IsEmpty then exit;
|
||||||
|
frmInvoice_Sub_S:=TfrmInvoice_Sub_S.Create(self);
|
||||||
|
with frmInvoice_Sub_S do
|
||||||
|
begin
|
||||||
|
InvoiceNo.Enabled:=False;
|
||||||
|
FInvoiceNo:=trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
canshu1:=self.canshu1;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TBDELClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
if application.MessageBox('确定要删除发票吗?','提示',1)=2 then exit;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('delete from FD_Invoicesub where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
sql.add('delete from FD_Invoice where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SetStatus();
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TCHKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('update FD_Invoice set Chker='''+trim(DName)+''',Chktime=getdate(),chkstatus=''1'' ');
|
||||||
|
sql.add('where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
application.MessageBox('审核成功','提示');
|
||||||
|
initGrid();
|
||||||
|
except;
|
||||||
|
application.MessageBox('审核失败','提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TNOCHKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('update FD_Invoice set Chker=null,Chktime=null,chkstatus=''0'' ');
|
||||||
|
sql.add('where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
application.MessageBox('撤销成功','提示');
|
||||||
|
initGrid();
|
||||||
|
except;
|
||||||
|
application.MessageBox('撤销失败','提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TSelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmInvoice_Sub_S:=TfrmInvoice_Sub_S.Create(self);
|
||||||
|
with frmInvoice_Sub_S do
|
||||||
|
begin
|
||||||
|
TSave.Visible:=False;
|
||||||
|
ToolBar2.Enabled:=False;
|
||||||
|
FInvoiceNo:=trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_S.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
FPrintFile:String;
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then Exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('select A.*,B.* ');
|
||||||
|
SQL.Add('from FD_Invoice A ');
|
||||||
|
SQL.Add('inner join FD_Invoicesub B on B.InvoiceNo=A.InvoiceNo ');
|
||||||
|
SQL.Add('where A.InvoiceNo='+QuotedStr(Trim(CDS_FP.fieldbyname('InvoiceNo').AsString)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryCmd,CDS_Print);
|
||||||
|
SInitCDSData20(ADOQueryCmd,CDS_Print);
|
||||||
|
|
||||||
|
FPrintFile:=ExtractFilePath(Application.ExeName)+'Report\开票申请单.rmf';
|
||||||
|
if FileExists(FPrintFile) then
|
||||||
|
begin
|
||||||
|
RM1.LoadFromFile(FPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找到'+FPrintFile),'提示',0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
436
应收应付(YSYF.dll)/U_FDINVOICE_Sub.dfm
Normal file
436
应收应付(YSYF.dll)/U_FDINVOICE_Sub.dfm
Normal file
|
|
@ -0,0 +1,436 @@
|
||||||
|
object FrmInvoice_Sub: TFrmInvoice_Sub
|
||||||
|
Left = 188
|
||||||
|
Top = 149
|
||||||
|
Width = 993
|
||||||
|
Height = 569
|
||||||
|
Caption = #20449#24687#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poDesktopCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 977
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 185
|
||||||
|
Width = 977
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar2'
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 1
|
||||||
|
object TADD: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = TADDClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #35843#29992#22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TDEl: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = TDElClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 977
|
||||||
|
Height = 154
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 21
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#21495#30721
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 524
|
||||||
|
Top = 21
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 21
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #24320#31080#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 76
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #22791' '#27880
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 244
|
||||||
|
Top = 297
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #25805' '#20316' '#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 524
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25105#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object InvoiceNo: TEdit
|
||||||
|
Left = 96
|
||||||
|
Top = 17
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object InvoiceDate: TDateTimePicker
|
||||||
|
Left = 580
|
||||||
|
Top = 17
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
Date = 42263.599160520830000000
|
||||||
|
Time = 42263.599160520830000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Note: TMemo
|
||||||
|
Left = 96
|
||||||
|
Top = 72
|
||||||
|
Width = 625
|
||||||
|
Height = 69
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object InvoiceType: TBtnEditA
|
||||||
|
Left = 344
|
||||||
|
Top = 17
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 3
|
||||||
|
OnBtnClick = InvoiceTypeBtnClick
|
||||||
|
end
|
||||||
|
object ToFactoryName: TBtnEditA
|
||||||
|
Left = 344
|
||||||
|
Top = 44
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 4
|
||||||
|
OnBtnClick = ToFactoryNameBtnClick
|
||||||
|
end
|
||||||
|
object FactoryName: TBtnEditA
|
||||||
|
Left = 96
|
||||||
|
Top = 44
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 5
|
||||||
|
OnBtnClick = FactoryNameBtnClick
|
||||||
|
end
|
||||||
|
object Filler: TEdit
|
||||||
|
Left = 316
|
||||||
|
Top = 317
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object SYRName: TBtnEditA
|
||||||
|
Left = 580
|
||||||
|
Top = 44
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnBtnClick = SYRNameBtnClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 214
|
||||||
|
Width = 977
|
||||||
|
Height = 316
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Money
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column4
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1P_CodeNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 119
|
||||||
|
end
|
||||||
|
object v1P_Spec: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
DataBinding.FieldName = 'P_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 93
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1QtyUnitPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Money: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1MoneyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'priceUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'RMB'
|
||||||
|
'USD')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #31246#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'tax'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column3PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #21547#31246#37329#39069
|
||||||
|
DataBinding.FieldName = 'taxMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'P_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = FP_Sub
|
||||||
|
Left = 412
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object FP_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 244
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 484
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 336
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 540
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
end
|
||||||
641
应收应付(YSYF.dll)/U_FDINVOICE_Sub.pas
Normal file
641
应收应付(YSYF.dll)/U_FDINVOICE_Sub.pas
Normal file
|
|
@ -0,0 +1,641 @@
|
||||||
|
unit U_FDINVOICE_Sub;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGrid, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB,
|
||||||
|
DBClient, ExtCtrls, StdCtrls, BtnEdit, cxButtonEdit, cxTextEdit,
|
||||||
|
cxDropDownEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFrmInvoice_Sub = class(TForm)
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
FP_Sub: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TSave: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
TADD: TToolButton;
|
||||||
|
TDEl: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_Spec: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Money: TcxGridDBColumn;
|
||||||
|
v1note: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
Label1: TLabel;
|
||||||
|
InvoiceNo: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
InvoiceDate: TDateTimePicker;
|
||||||
|
Note: TMemo;
|
||||||
|
InvoiceType: TBtnEditA;
|
||||||
|
ToFactoryName: TBtnEditA;
|
||||||
|
FactoryName: TBtnEditA;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Filler: TEdit;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Label8: TLabel;
|
||||||
|
SYRName: TBtnEditA;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToFactoryNameBtnClick(Sender: TObject);
|
||||||
|
procedure TSaveClick(Sender: TObject);
|
||||||
|
procedure FactoryNameBtnClick(Sender: TObject);
|
||||||
|
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure InvoiceTypeBtnClick(Sender: TObject);
|
||||||
|
procedure v1P_SpecPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure v1QtyUnitPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure v1PriceUnitPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure TADDClick(Sender: TObject);
|
||||||
|
procedure TDElClick(Sender: TObject);
|
||||||
|
procedure v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1MoneyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure SYRNameBtnClick(Sender: TObject);
|
||||||
|
procedure v1Column3PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure initGrid();
|
||||||
|
procedure SaveDate();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FInvoiceNO: string;
|
||||||
|
fInvoiceFlag: string;
|
||||||
|
CopyInt: Integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
FrmInvoice_Sub: TFrmInvoice_Sub;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_Fun10, U_ZDYHelp, U_ZdyAttachment, U_dataLink, U_ZdyAttachGYS, U_YFlist,
|
||||||
|
U_CPManageSel;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.SaveDate();
|
||||||
|
var
|
||||||
|
FInvoiceID: string;
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_Invoice where InvoiceNo=''' + trim(InvoiceNo.Text) + '''');
|
||||||
|
open;
|
||||||
|
if isempty then
|
||||||
|
begin
|
||||||
|
append;
|
||||||
|
fieldbyname('filltime').AsDateTime := SGetServerDate(ADOQueryTmp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
edit;
|
||||||
|
SSetsaveSqlnew(ADOQueryCmd, 'FD_Invoice', panel1, 0);
|
||||||
|
fieldbyname('Invoiceflag').Value := strtoint(FInvoiceflag);
|
||||||
|
fieldbyname('chkstatus').AsString := '0';
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('delete from FD_InvoiceSub where InvoiceNo=''' + trim(InvoiceNo.Text) + ''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if fieldbyname('invoiceID').AsString = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTmp, FInvoiceID, 'FP', 'FD_InvoiceSub', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
FInvoiceID := FP_Sub.fieldbyname('invoiceID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_InvoiceSub where InvoiceNo=''' + trim(InvoiceNo.Text) + ''' ');
|
||||||
|
sql.add('and InvoiceID=''' + trim(FInvoiceID) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.append;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.edit;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceNo').Value := trim(InvoiceNo.Text);
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceID').Value := FInvoiceID;
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd, Tv1, FP_Sub, 'FD_InvoiceSub', 0);
|
||||||
|
ADOQueryCmd.fieldbyname('Qty').Value := FP_Sub.fieldbyname('Qty').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Price').Value := FP_Sub.fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Money').Value := FP_Sub.fieldbyname('Money').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('tax').Value := FP_Sub.fieldbyname('tax').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('TaxMoney').Value := FP_Sub.fieldbyname('TaxMoney').AsFloat;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
application.MessageBox('保存成功!', '提示');
|
||||||
|
Modalresult := 1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('保存失败!', '提示', MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.initGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from FD_Invoice where InvoiceNo=''' + trim(FInvoiceNo) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTmp.isempty = False then
|
||||||
|
begin
|
||||||
|
SCSHDataNew(ADOQueryTmp, Panel1, 0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Filler.Text := trim(DName);
|
||||||
|
InvoiceDate.DateTime := SGetServerDate(ADOQueryCmd);
|
||||||
|
InvoiceType.Text := '增票';
|
||||||
|
end;
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from FD_InvoiceSub where InvoiceNo=''' + trim(FInvoiceNo) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTmp, FP_Sub);
|
||||||
|
SInitCDSData20(ADOQueryTmp, FP_Sub);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('发票录入', Tv1, '财务管理');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('发票录入', Tv1, '财务管理');
|
||||||
|
initGrid();
|
||||||
|
if CopyInt = 99 then
|
||||||
|
begin
|
||||||
|
InvoiceNo.Text := '';
|
||||||
|
FInvoiceNO := '';
|
||||||
|
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
if not eof then
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('invoiceID').value := '';
|
||||||
|
Post;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.ToFactoryNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if fInvoiceflag = '0' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachGYS := TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TOFactoryName.Text := Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FactoryName.Text := Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment := TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TOFactoryName.Text := Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
FactoryName.Text := Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.TSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if trim(InvoiceNo.Text) = '' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票号不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(FactoryName.Text) = '' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('开票单位不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if FP_Sub.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票明细不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(FInvoiceNo) = '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.clear;
|
||||||
|
sql.add('select * from FD_Invoice where InvoiceNo=''' + trim(InvoiceNo.Text) + ''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTmp.IsEmpty = False then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票号不能重复', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
SaveDate();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.FactoryNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'DFTaiTou';
|
||||||
|
flagname := '开票单位';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
FactoryName.Text := Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
{ IF fInvoiceflag='0' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
FactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
FactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.v1P_CodeNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'FPCodeName';
|
||||||
|
flagname := '产品名称';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('P_CodeName').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.FP_Sub.FieldByName('P_Code').Value := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
//self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.InvoiceTypeBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'InvoiceType';
|
||||||
|
flagname := '发票类型';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
InvoiceType.Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.v1P_SpecPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'P_Spec';
|
||||||
|
flagname := '成品规格';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('P_Spec').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.v1QtyUnitPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'QtyUnit';
|
||||||
|
flagname := '数量单位';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('QtyUnit').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.v1PriceUnitPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'PriceUnit';
|
||||||
|
flagname := '币种';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('PriceUnit').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.TADDClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// frmCPManageSel:=TfrmCPManageSel.create(self);
|
||||||
|
// with frmCPManageSel do
|
||||||
|
// begin
|
||||||
|
// if showmodal=1 then
|
||||||
|
// begin
|
||||||
|
// FP_Sub.DisableControls;
|
||||||
|
// CDS_Main.DisableControls;
|
||||||
|
// CDS_Main.First;
|
||||||
|
// while not CDS_Main.Eof do
|
||||||
|
// begin
|
||||||
|
// if (cds_main.fieldbyname('ssel').AsBoolean) and
|
||||||
|
// (not FP_Sub.Locate('P_Code',trim(cds_main.fieldbyname('CYNo').AsString),[])) then
|
||||||
|
// begin
|
||||||
|
// FP_Sub.Append;
|
||||||
|
// FP_Sub.FieldByName('P_Code').Value:=trim(cds_main.fieldbyname('CYNo').AsString);
|
||||||
|
// FP_Sub.FieldByName('P_CodeName').Value:=trim(cds_main.fieldbyname('CYName').AsString);
|
||||||
|
// // self.cds_main.FieldByName('defnote5').Value:=trim(cds_main.fieldbyname('defnote5').AsString);
|
||||||
|
// FP_Sub.FieldByName('P_spec').Value:=trim(cds_main.fieldbyname('CYSpec').AsString);
|
||||||
|
// FP_Sub.FieldByName('QtyUnit').Value:='M';
|
||||||
|
// FP_Sub.FieldByName('priceUnit').Value:='RMB';
|
||||||
|
//
|
||||||
|
// FP_Sub.Post;
|
||||||
|
// end;
|
||||||
|
// cds_main.Next;
|
||||||
|
// end;
|
||||||
|
// cds_main.EnableControls;
|
||||||
|
// FP_Sub.EnableControls;
|
||||||
|
// end;
|
||||||
|
// free;
|
||||||
|
// end;
|
||||||
|
FP_Sub.Append;
|
||||||
|
FP_Sub.FieldByName('QtyUnit').Value := 'M';
|
||||||
|
FP_Sub.FieldByName('priceUnit').Value := 'RMB';
|
||||||
|
FP_Sub.Post;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.TDElClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FP_Sub.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if application.MessageBox('确定要删除吗', '提示', 1) = 2 then
|
||||||
|
exit;
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.clear;
|
||||||
|
sql.add('delete from FD_Invoicesub where InvoiceID=''' + trim(FP_Sub.fieldbyname('InvoiceID').asstring) + ''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
FP_Sub.delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
mvalue := '0';
|
||||||
|
end;
|
||||||
|
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||||
|
FieldbyName('Money').Value := format('%.2f', [FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat]);
|
||||||
|
FieldbyName('taxMoney').Value := format('%.2f', [FieldByName('money').AsFloat * (1 + FieldByName('tax').AsFloat / 100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.v1MoneyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
mvalue := '0';
|
||||||
|
end;
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Money').Value := Trim(mvalue);
|
||||||
|
if fieldbyname('Qty').AsFloat > 0 then
|
||||||
|
FieldbyName('price').Value := format('%.4f', [FieldByName('money').AsFloat / FieldByName('Qty').AsFloat])
|
||||||
|
else
|
||||||
|
FieldbyName('price').Value := 0;
|
||||||
|
FieldbyName('taxMoney').Value := format('%.2f', [FieldByName('money').AsFloat * (1 + FieldByName('tax').AsFloat / 100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.SYRNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'SYRName';
|
||||||
|
flagname := '公司抬头';
|
||||||
|
if Trim(flag) = 'SYRName' then
|
||||||
|
begin
|
||||||
|
flag := 'OrdDefStr2';
|
||||||
|
V1Name.Caption := '中文名称';
|
||||||
|
V1Note.Caption := '英文名称';
|
||||||
|
fnote := True;
|
||||||
|
end;
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
SYRName.Text := Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.v1Column3PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
mvalue := '0';
|
||||||
|
end;
|
||||||
|
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||||
|
FieldbyName('taxMoney').Value := format('%.2f', [FieldByName('money').AsFloat * (1 + FieldByName('tax').AsFloat / 100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmYFlist := TfrmYFlist.create(self);
|
||||||
|
with frmYFlist do
|
||||||
|
begin
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
FP_Sub.DisableControls;
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
CDS_HZ.First;
|
||||||
|
while not CDS_HZ.Eof do
|
||||||
|
begin
|
||||||
|
if (CDS_HZ.fieldbyname('ssel').AsBoolean) then
|
||||||
|
begin
|
||||||
|
FP_Sub.Append;
|
||||||
|
FP_Sub.FieldByName('P_Code').Value := trim(CDS_HZ.fieldbyname('P_Code').AsString);
|
||||||
|
FP_Sub.FieldByName('P_CodeName').Value := trim(CDS_HZ.fieldbyname('P_CodeName').AsString);
|
||||||
|
// self.cds_main.FieldByName('defnote5').Value:=trim(cds_main.fieldbyname('defnote5').AsString);
|
||||||
|
FP_Sub.FieldByName('Qty').Value := trim(CDS_HZ.fieldbyname('Qty').AsString);
|
||||||
|
FP_Sub.FieldByName('QtyUnit').Value := trim(CDS_HZ.fieldbyname('QtyUnit').AsString);
|
||||||
|
FP_Sub.FieldByName('Price').Value := trim(CDS_HZ.fieldbyname('Price').AsString);
|
||||||
|
FP_Sub.FieldByName('priceUnit').Value := trim(CDS_HZ.fieldbyname('BZType').AsString);
|
||||||
|
FP_Sub.FieldByName('Money').Value := trim(CDS_HZ.fieldbyname('Money').AsString);
|
||||||
|
FP_Sub.FieldByName('P_Spec').Value := trim(CDS_HZ.fieldbyname('P_Spec').AsString);
|
||||||
|
FP_Sub.Post;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Next;
|
||||||
|
end;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
FP_Sub.EnableControls;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
454
应收应付(YSYF.dll)/U_FDINVOICE_Sub_S.dfm
Normal file
454
应收应付(YSYF.dll)/U_FDINVOICE_Sub_S.dfm
Normal file
|
|
@ -0,0 +1,454 @@
|
||||||
|
object FrmInvoice_Sub_S: TFrmInvoice_Sub_S
|
||||||
|
Left = 137
|
||||||
|
Top = 191
|
||||||
|
Width = 1080
|
||||||
|
Height = 455
|
||||||
|
Caption = #24320#31080#30003#35831#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 = 1064
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 158
|
||||||
|
Width = 1064
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar2'
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 1
|
||||||
|
object TADD: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = TADDClick
|
||||||
|
end
|
||||||
|
object TDEl: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = TDElClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1064
|
||||||
|
Height = 127
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 201
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#21495#30721
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 17
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30003#35831#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 292
|
||||||
|
Top = 201
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 524
|
||||||
|
Top = 200
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #24320#31080#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 607
|
||||||
|
Top = 17
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 44
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #25551' '#36848
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 244
|
||||||
|
Top = 297
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #25805' '#20316' '#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 376
|
||||||
|
Top = 17
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25105#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 208
|
||||||
|
Top = 17
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994' '#21153' '#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object InvoiceNo: TEdit
|
||||||
|
Left = 100
|
||||||
|
Top = 197
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object InvoiceDate: TDateTimePicker
|
||||||
|
Left = 96
|
||||||
|
Top = 13
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 42263.599160520830000000
|
||||||
|
Time = 42263.599160520830000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Note: TMemo
|
||||||
|
Left = 96
|
||||||
|
Top = 44
|
||||||
|
Width = 693
|
||||||
|
Height = 69
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object InvoiceType: TBtnEditA
|
||||||
|
Left = 348
|
||||||
|
Top = 197
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 3
|
||||||
|
OnBtnClick = InvoiceTypeBtnClick
|
||||||
|
end
|
||||||
|
object ToFactoryName: TBtnEditA
|
||||||
|
Left = 659
|
||||||
|
Top = 13
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 4
|
||||||
|
OnBtnClick = ToFactoryNameBtnClick
|
||||||
|
end
|
||||||
|
object FactoryName: TBtnEditA
|
||||||
|
Left = 584
|
||||||
|
Top = 196
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
OnBtnClick = FactoryNameBtnClick
|
||||||
|
end
|
||||||
|
object Filler: TEdit
|
||||||
|
Left = 316
|
||||||
|
Top = 317
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object SYRName: TBtnEditA
|
||||||
|
Left = 436
|
||||||
|
Top = 13
|
||||||
|
Width = 157
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnBtnClick = SYRNameBtnClick
|
||||||
|
end
|
||||||
|
object ywy: TEdit
|
||||||
|
Left = 264
|
||||||
|
Top = 13
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 187
|
||||||
|
Width = 1064
|
||||||
|
Height = 230
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Money
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = 'PO#'
|
||||||
|
DataBinding.FieldName = 'KHConNo'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 119
|
||||||
|
end
|
||||||
|
object v1P_Spec: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
DataBinding.FieldName = 'P_Spec'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Hidden = True
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1QtyUnitPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'priceUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'RMB'
|
||||||
|
'USD')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 93
|
||||||
|
end
|
||||||
|
object v1Money: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1MoneyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'P_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = FP_Sub
|
||||||
|
Left = 920
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
object FP_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 852
|
||||||
|
Top = 108
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 752
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 828
|
||||||
|
Top = 52
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 792
|
||||||
|
Top = 68
|
||||||
|
end
|
||||||
|
end
|
||||||
598
应收应付(YSYF.dll)/U_FDINVOICE_Sub_S.pas
Normal file
598
应收应付(YSYF.dll)/U_FDINVOICE_Sub_S.pas
Normal file
|
|
@ -0,0 +1,598 @@
|
||||||
|
unit U_FDINVOICE_Sub_S;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGrid, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB,
|
||||||
|
DBClient, ExtCtrls, StdCtrls, BtnEdit, cxButtonEdit, cxTextEdit,
|
||||||
|
cxDropDownEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFrmInvoice_Sub_S = class(TForm)
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
FP_Sub: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TSave: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
TADD: TToolButton;
|
||||||
|
TDEl: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_Spec: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Money: TcxGridDBColumn;
|
||||||
|
v1note: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
Label1: TLabel;
|
||||||
|
InvoiceNo: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
InvoiceDate: TDateTimePicker;
|
||||||
|
Note: TMemo;
|
||||||
|
InvoiceType: TBtnEditA;
|
||||||
|
ToFactoryName: TBtnEditA;
|
||||||
|
FactoryName: TBtnEditA;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Filler: TEdit;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Label8: TLabel;
|
||||||
|
SYRName: TBtnEditA;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
Label9: TLabel;
|
||||||
|
ywy: TEdit;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToFactoryNameBtnClick(Sender: TObject);
|
||||||
|
procedure TSaveClick(Sender: TObject);
|
||||||
|
procedure FactoryNameBtnClick(Sender: TObject);
|
||||||
|
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure InvoiceTypeBtnClick(Sender: TObject);
|
||||||
|
procedure v1P_SpecPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1QtyUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1PriceUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure TADDClick(Sender: TObject);
|
||||||
|
procedure TDElClick(Sender: TObject);
|
||||||
|
procedure v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1MoneyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure SYRNameBtnClick(Sender: TObject);
|
||||||
|
procedure v1Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
|
||||||
|
procedure initGrid();
|
||||||
|
procedure SaveDate();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FInvoiceNO: string;
|
||||||
|
fInvoiceFlag:string;
|
||||||
|
canshu1:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
FrmInvoice_Sub_S: TFrmInvoice_Sub_S;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses U_Fun10,U_ZDYHelp, U_ZdyAttachment,U_dataLink, U_ZdyAttachGYS,
|
||||||
|
U_CPManageSel,U_ProductOrderNewList;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.SaveDate();
|
||||||
|
var FInvoiceID: string;
|
||||||
|
begin
|
||||||
|
if trim(FInvoiceNO)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTmp,FInvoiceNO,'PS','FD_InvoiceSub',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
InvoiceNO.Text:=trim(FInvoiceNO);
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_Invoice where InvoiceNo='''+trim(InvoiceNo.Text)+'''');
|
||||||
|
open;
|
||||||
|
if isempty then
|
||||||
|
begin
|
||||||
|
append;
|
||||||
|
fieldbyname('filltime').AsDateTime:=SGetServerDate(ADOQueryTmp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
edit;
|
||||||
|
SSetsaveSqlnew(ADOQueryCmd,'FD_Invoice',panel1,0);
|
||||||
|
fieldbyname('Invoiceflag').Value:=strtoint(FInvoiceflag);
|
||||||
|
fieldbyname('chkstatus').AsString:='0';
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('delete from FD_InvoiceSub where InvoiceNo='''+trim(InvoiceNo.Text)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if fieldbyname('invoiceID').AsString='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTmp,FInvoiceID,'FP','FD_InvoiceSub',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
FInvoiceID:=FP_Sub.fieldbyname('invoiceID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_InvoiceSub where InvoiceNo='''+trim(InvoiceNo.Text)+''' ');
|
||||||
|
sql.add('and InvoiceID='''+trim(FInvoiceID)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.append;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.edit;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceNo').Value:=trim(InvoiceNo.Text);
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceID').Value:=FInvoiceID;
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd,Tv1,FP_Sub,'FD_InvoiceSub',0);
|
||||||
|
ADOQueryCmd.fieldbyname('MainID').Value:=FP_Sub.fieldbyname('MainID').asstring;
|
||||||
|
ADOQueryCmd.fieldbyname('Qty').Value:=FP_Sub.fieldbyname('Qty').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Price').Value:=FP_Sub.fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Money').Value:=FP_Sub.fieldbyname('Money').AsFloat;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
application.MessageBox('保存成功!','提示');
|
||||||
|
Modalresult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('保存失败!','提示',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.initGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*');
|
||||||
|
sql.Add('from FD_Invoice A');
|
||||||
|
sql.Add('where A.InvoiceNo='''+trim(FInvoiceNo)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTmp.isempty=False then
|
||||||
|
begin
|
||||||
|
SCSHDataNew(ADOQueryTmp,Panel1,0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Filler.Text:=trim(DName);
|
||||||
|
InvoiceDate.DateTime:=SGetServerDate(ADOQueryCmd);
|
||||||
|
end;
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.OrderNo,');
|
||||||
|
sql.Add('KHConNO=(select Top 1 KHConNO from JYOrdercon_Main X where X.conNO=B.conNO)');
|
||||||
|
sql.Add('from FD_InvoiceSub A ');
|
||||||
|
sql.Add('left join JYorder_main B on B.MainID=A.mainID') ;
|
||||||
|
sql.Add('where A.InvoiceNo='''+trim(FInvoiceNo)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTmp,FP_Sub);
|
||||||
|
SInitCDSData20(ADOQueryTmp,FP_Sub);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'财务管理');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if canshu1<>'高权限'then
|
||||||
|
ywy.Text:=trim(DName);
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'财务管理');
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.ToFactoryNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF fInvoiceflag='0' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TOFactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
if canshu1<>'高权限' then
|
||||||
|
begin
|
||||||
|
ywy.Text:=trim(DName);
|
||||||
|
ywy.Enabled:=false;
|
||||||
|
end;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TOFactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.TSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if trim(ToFactoryName.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('对方单位不能为空','提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if trim(SYRName.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('我方单位不能为空','提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if trim(FInvoiceNo)='' then
|
||||||
|
begin
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.clear;
|
||||||
|
sql.add('select * from FD_Invoice where InvoiceNo='''+trim(InvoiceNo.Text)+''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTmp.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票号不能重复','提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
SaveDate();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.FactoryNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
if canshu1<>'高权限' then
|
||||||
|
begin
|
||||||
|
ywy.Text:=trim(DName);
|
||||||
|
ywy.Enabled:=false;
|
||||||
|
end;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
FactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.v1P_CodeNamePropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='MPRTCodeName';
|
||||||
|
flagname:='产品名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('P_CodeName').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.FP_Sub.FieldByName('P_Code').Value:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
//self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.InvoiceTypeBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='InvoiceType';
|
||||||
|
flagname:='发票类型';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
InvoiceType.Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.v1P_SpecPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='P_Spec';
|
||||||
|
flagname:='成品规格';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('P_Spec').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.v1QtyUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='QtyUnit';
|
||||||
|
flagname:='数量单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('QtyUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.v1PriceUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='PriceUnit';
|
||||||
|
flagname:='币种';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('PriceUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.TADDClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ frmCPManageSel:=TfrmCPManageSel.create(self);
|
||||||
|
with frmCPManageSel do
|
||||||
|
begin
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
FP_Sub.DisableControls;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
while not CDS_Main.Eof do
|
||||||
|
begin
|
||||||
|
if (cds_main.fieldbyname('ssel').AsBoolean) and
|
||||||
|
(not FP_Sub.Locate('P_Code',trim(cds_main.fieldbyname('CYNo').AsString),[])) then
|
||||||
|
begin
|
||||||
|
FP_Sub.Append;
|
||||||
|
FP_Sub.FieldByName('P_Code').Value:=trim(cds_main.fieldbyname('CYNo').AsString);
|
||||||
|
FP_Sub.FieldByName('P_CodeName').Value:=trim(cds_main.fieldbyname('CYName').AsString);
|
||||||
|
// self.cds_main.FieldByName('defnote5').Value:=trim(cds_main.fieldbyname('defnote5').AsString);
|
||||||
|
FP_Sub.FieldByName('P_spec').Value:=trim(cds_main.fieldbyname('CYSpec').AsString);
|
||||||
|
FP_Sub.FieldByName('QtyUnit').Value:='M';
|
||||||
|
FP_Sub.FieldByName('priceUnit').Value:='RMB';
|
||||||
|
|
||||||
|
FP_Sub.Post;
|
||||||
|
end;
|
||||||
|
cds_main.Next;
|
||||||
|
end;
|
||||||
|
cds_main.EnableControls;
|
||||||
|
FP_Sub.EnableControls;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end; }
|
||||||
|
FP_Sub.Append;
|
||||||
|
FP_Sub.FieldByName('QtyUnit').Value:='M';
|
||||||
|
FP_Sub.FieldByName('priceUnit').Value:='RMB';
|
||||||
|
FP_Sub.Post;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.TDElClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FP_Sub.IsEmpty then exit;
|
||||||
|
if application.MessageBox('确定要删除吗','提示',1)=2 then exit;
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.clear;
|
||||||
|
sql.add('delete from FD_Invoicesub where InvoiceID='''+trim(FP_Sub.fieldbyname('InvoiceID').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
FP_Sub.delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FFieldName:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
FFieldName:=Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value:=Trim(mvalue);
|
||||||
|
FieldbyName('Money').Value:=format('%.2f',[FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.v1MoneyPropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FFieldName:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Money').Value:=Trim(mvalue);
|
||||||
|
IF fieldbyname('Qty').AsFloat>0 then
|
||||||
|
FieldbyName('price').Value:=format('%.4f',[FieldByName('money').AsFloat / FieldByName('Qty').AsFloat])
|
||||||
|
else
|
||||||
|
FieldbyName('price').Value:=0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.SYRNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='SYRName';
|
||||||
|
flagname:='公司抬头';
|
||||||
|
if Trim(flag)='SYRName' then
|
||||||
|
begin
|
||||||
|
flag:='OrdDefStr2';
|
||||||
|
V1Name.Caption:='中文名称';
|
||||||
|
V1Note.Caption:='英文名称';
|
||||||
|
fnote:=True;
|
||||||
|
end;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
SYRName.Text:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.v1Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductOrderNewList:=TfrmProductOrderNewList.Create(Application);
|
||||||
|
with frmProductOrderNewList do
|
||||||
|
begin
|
||||||
|
if canshu1<>'高权限' then fywy:=trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('MainId').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
// FieldByName('subID').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('subID').AsString);
|
||||||
|
FieldByName('orderNo').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('orderNo').AsString);
|
||||||
|
FieldByName('khconNO').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('khconNO').AsString);
|
||||||
|
FieldByName('P_Code').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('MPRTCode').AsString);
|
||||||
|
FieldByName('P_CodeName').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('MPRTCodeName').AsString);
|
||||||
|
FieldByName('P_spec').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('Mprtspec').AsString);
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductOrderNewList.Free;
|
||||||
|
self.Tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=cahide;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_S.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmInvoice_Sub_S:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
442
应收应付(YSYF.dll)/U_FDINVOICE_Sub_X.dfm
Normal file
442
应收应付(YSYF.dll)/U_FDINVOICE_Sub_X.dfm
Normal file
|
|
@ -0,0 +1,442 @@
|
||||||
|
object FrmInvoice_Sub_X: TFrmInvoice_Sub_X
|
||||||
|
Left = 154
|
||||||
|
Top = 131
|
||||||
|
Width = 1001
|
||||||
|
Height = 568
|
||||||
|
Caption = #20449#24687#24405#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poDesktopCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 985
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 185
|
||||||
|
Width = 985
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar2'
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 1
|
||||||
|
object TADD: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = TADDClick
|
||||||
|
end
|
||||||
|
object TDEl: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = TDElClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 985
|
||||||
|
Height = 154
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 21
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#21495#30721
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 524
|
||||||
|
Top = 21
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 21
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20184#27454#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 76
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #25551' '#36848
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 244
|
||||||
|
Top = 297
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #25805' '#20316' '#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 524
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25105#26041#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object InvoiceNo: TEdit
|
||||||
|
Left = 96
|
||||||
|
Top = 17
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object InvoiceDate: TDateTimePicker
|
||||||
|
Left = 580
|
||||||
|
Top = 17
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
Date = 42263.599160520830000000
|
||||||
|
Time = 42263.599160520830000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Note: TMemo
|
||||||
|
Left = 96
|
||||||
|
Top = 72
|
||||||
|
Width = 625
|
||||||
|
Height = 69
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object InvoiceType: TBtnEditA
|
||||||
|
Left = 344
|
||||||
|
Top = 17
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 3
|
||||||
|
OnBtnClick = InvoiceTypeBtnClick
|
||||||
|
end
|
||||||
|
object ToFactoryName: TBtnEditA
|
||||||
|
Left = 344
|
||||||
|
Top = 44
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 4
|
||||||
|
OnBtnClick = ToFactoryNameBtnClick
|
||||||
|
end
|
||||||
|
object FactoryName: TBtnEditA
|
||||||
|
Left = 96
|
||||||
|
Top = 44
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 5
|
||||||
|
OnBtnClick = FactoryNameBtnClick
|
||||||
|
end
|
||||||
|
object Filler: TEdit
|
||||||
|
Left = 316
|
||||||
|
Top = 317
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object SYRName: TBtnEditA
|
||||||
|
Left = 580
|
||||||
|
Top = 44
|
||||||
|
Width = 140
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnBtnClick = SYRNameBtnClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 214
|
||||||
|
Width = 985
|
||||||
|
Height = 316
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Money
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column6
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = 'PO#'
|
||||||
|
DataBinding.FieldName = 'KHConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 119
|
||||||
|
end
|
||||||
|
object v1P_Spec: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
DataBinding.FieldName = 'P_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 55
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1QtyUnitPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Money: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1MoneyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'priceUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'RMB'
|
||||||
|
'USD')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #31246#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'tax'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column4PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #21547#31246#37329#39069
|
||||||
|
DataBinding.FieldName = 'taxMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'P_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = FP_Sub
|
||||||
|
Left = 412
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object FP_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 244
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 484
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 336
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 540
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
end
|
||||||
605
应收应付(YSYF.dll)/U_FDINVOICE_Sub_X.pas
Normal file
605
应收应付(YSYF.dll)/U_FDINVOICE_Sub_X.pas
Normal file
|
|
@ -0,0 +1,605 @@
|
||||||
|
unit U_FDINVOICE_Sub_X;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGrid, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB,
|
||||||
|
DBClient, ExtCtrls, StdCtrls, BtnEdit, cxButtonEdit, cxTextEdit,
|
||||||
|
cxDropDownEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFrmInvoice_Sub_X = class(TForm)
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
FP_Sub: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TSave: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
TADD: TToolButton;
|
||||||
|
TDEl: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_Spec: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Money: TcxGridDBColumn;
|
||||||
|
v1note: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
Label1: TLabel;
|
||||||
|
InvoiceNo: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
InvoiceDate: TDateTimePicker;
|
||||||
|
Note: TMemo;
|
||||||
|
InvoiceType: TBtnEditA;
|
||||||
|
ToFactoryName: TBtnEditA;
|
||||||
|
FactoryName: TBtnEditA;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Filler: TEdit;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Label8: TLabel;
|
||||||
|
SYRName: TBtnEditA;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToFactoryNameBtnClick(Sender: TObject);
|
||||||
|
procedure TSaveClick(Sender: TObject);
|
||||||
|
procedure FactoryNameBtnClick(Sender: TObject);
|
||||||
|
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure InvoiceTypeBtnClick(Sender: TObject);
|
||||||
|
procedure v1P_SpecPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1QtyUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1PriceUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure TADDClick(Sender: TObject);
|
||||||
|
procedure TDElClick(Sender: TObject);
|
||||||
|
procedure v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1MoneyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure SYRNameBtnClick(Sender: TObject);
|
||||||
|
procedure v1Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v1Column4PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure initGrid();
|
||||||
|
procedure SaveDate();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FInvoiceNO: string;
|
||||||
|
fInvoiceFlag:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
FrmInvoice_Sub_X: TFrmInvoice_Sub_X;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses U_Fun10,U_ZDYHelp, U_ZdyAttachment,U_dataLink, U_ZdyAttachGYS,
|
||||||
|
U_CPManageSel,U_ProductOrderNewList;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.SaveDate();
|
||||||
|
var FInvoiceID: string;
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_Invoice where InvoiceNo='''+trim(InvoiceNo.Text)+'''');
|
||||||
|
open;
|
||||||
|
if isempty then
|
||||||
|
begin
|
||||||
|
append;
|
||||||
|
fieldbyname('filltime').AsDateTime:=SGetServerDate(ADOQueryTmp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
edit;
|
||||||
|
SSetsaveSqlnew(ADOQueryCmd,'FD_Invoice',panel1,0);
|
||||||
|
fieldbyname('Invoiceflag').Value:=strtoint(FInvoiceflag);
|
||||||
|
fieldbyname('chkstatus').AsString:='0';
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('delete from FD_InvoiceSub where InvoiceNo='''+trim(InvoiceNo.Text)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if fieldbyname('invoiceID').AsString='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTmp,FInvoiceID,'FP','FD_InvoiceSub',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
FInvoiceID:=FP_Sub.fieldbyname('invoiceID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_InvoiceSub where InvoiceNo='''+trim(InvoiceNo.Text)+''' ');
|
||||||
|
sql.add('and InvoiceID='''+trim(FInvoiceID)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.append;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.edit;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceNo').Value:=trim(InvoiceNo.Text);
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceID').Value:=FInvoiceID;
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd,Tv1,FP_Sub,'FD_InvoiceSub',0);
|
||||||
|
ADOQueryCmd.fieldbyname('MainID').Value:=FP_Sub.fieldbyname('MainID').asstring;
|
||||||
|
ADOQueryCmd.fieldbyname('Qty').Value:=FP_Sub.fieldbyname('Qty').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Price').Value:=FP_Sub.fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Money').Value:=FP_Sub.fieldbyname('Money').AsFloat;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
application.MessageBox('保存成功!','提示');
|
||||||
|
Modalresult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('保存失败!','提示',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.initGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*');
|
||||||
|
sql.Add('from FD_Invoice A');
|
||||||
|
sql.Add('where A.InvoiceNo='''+trim(FInvoiceNo)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTmp.isempty=False then
|
||||||
|
begin
|
||||||
|
SCSHDataNew(ADOQueryTmp,Panel1,0);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Filler.Text:=trim(DName);
|
||||||
|
InvoiceDate.DateTime:=SGetServerDate(ADOQueryCmd);
|
||||||
|
end;
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.OrderNo,');
|
||||||
|
sql.Add('KHConNO=(select Top 1 KHConNO from JYOrdercon_Main X where X.conNO=B.conNO)');
|
||||||
|
sql.Add('from FD_InvoiceSub A ');
|
||||||
|
sql.Add('left join JYorder_main B on B.MainID=A.mainID') ;
|
||||||
|
sql.Add('where A.InvoiceNo='''+trim(FInvoiceNo)+'''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTmp,FP_Sub);
|
||||||
|
SInitCDSData20(ADOQueryTmp,FP_Sub);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('销项发票录入',Tv1,'财务管理');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('销项发票录入',Tv1,'财务管理');
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.ToFactoryNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF fInvoiceflag='0' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TOFactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
TOFactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.TSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if trim(InvoiceNo.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票号不能为空','提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if trim(FactoryName.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('开票单位不能为空','提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if trim(FInvoiceNo)='' then
|
||||||
|
begin
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.clear;
|
||||||
|
sql.add('select * from FD_Invoice where InvoiceNo='''+trim(InvoiceNo.Text)+''' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTmp.IsEmpty=False then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票号不能重复','提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
SaveDate();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.FactoryNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF fInvoiceflag='0' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
FactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
FactoryName.Text:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1P_CodeNamePropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='MPRTCodeName';
|
||||||
|
flagname:='产品名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('P_CodeName').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.FP_Sub.FieldByName('P_Code').Value:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
//self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.InvoiceTypeBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='InvoiceType';
|
||||||
|
flagname:='发票类型';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
InvoiceType.Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1P_SpecPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='P_Spec';
|
||||||
|
flagname:='成品规格';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('P_Spec').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1QtyUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='QtyUnit';
|
||||||
|
flagname:='数量单位';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('QtyUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1PriceUnitPropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='PriceUnit';
|
||||||
|
flagname:='币种';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.FP_Sub.Edit;
|
||||||
|
Self.FP_Sub.FieldByName('PriceUnit').Value:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.TADDClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ frmCPManageSel:=TfrmCPManageSel.create(self);
|
||||||
|
with frmCPManageSel do
|
||||||
|
begin
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
FP_Sub.DisableControls;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
while not CDS_Main.Eof do
|
||||||
|
begin
|
||||||
|
if (cds_main.fieldbyname('ssel').AsBoolean) and
|
||||||
|
(not FP_Sub.Locate('P_Code',trim(cds_main.fieldbyname('CYNo').AsString),[])) then
|
||||||
|
begin
|
||||||
|
FP_Sub.Append;
|
||||||
|
FP_Sub.FieldByName('P_Code').Value:=trim(cds_main.fieldbyname('CYNo').AsString);
|
||||||
|
FP_Sub.FieldByName('P_CodeName').Value:=trim(cds_main.fieldbyname('CYName').AsString);
|
||||||
|
// self.cds_main.FieldByName('defnote5').Value:=trim(cds_main.fieldbyname('defnote5').AsString);
|
||||||
|
FP_Sub.FieldByName('P_spec').Value:=trim(cds_main.fieldbyname('CYSpec').AsString);
|
||||||
|
FP_Sub.FieldByName('QtyUnit').Value:='M';
|
||||||
|
FP_Sub.FieldByName('priceUnit').Value:='RMB';
|
||||||
|
|
||||||
|
FP_Sub.Post;
|
||||||
|
end;
|
||||||
|
cds_main.Next;
|
||||||
|
end;
|
||||||
|
cds_main.EnableControls;
|
||||||
|
FP_Sub.EnableControls;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end; }
|
||||||
|
FP_Sub.Append;
|
||||||
|
FP_Sub.FieldByName('QtyUnit').Value:='M';
|
||||||
|
FP_Sub.FieldByName('priceUnit').Value:='RMB';
|
||||||
|
FP_Sub.Post;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.TDElClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FP_Sub.IsEmpty then exit;
|
||||||
|
if application.MessageBox('确定要删除吗','提示',1)=2 then exit;
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.clear;
|
||||||
|
sql.add('delete from FD_Invoicesub where InvoiceID='''+trim(FP_Sub.fieldbyname('InvoiceID').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
FP_Sub.delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FFieldName:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
FFieldName:=Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value:=Trim(mvalue);
|
||||||
|
FieldbyName('Money').Value:=format('%.2f',[FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat]);
|
||||||
|
FieldbyName('taxMoney').Value:=format('%.2f',[FieldByName('money').AsFloat *(1+FieldByName('tax').AsFloat/100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1MoneyPropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FFieldName:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Money').Value:=Trim(mvalue);
|
||||||
|
IF fieldbyname('Qty').AsFloat>0 then
|
||||||
|
FieldbyName('price').Value:=format('%.4f',[FieldByName('money').AsFloat / FieldByName('Qty').AsFloat])
|
||||||
|
else
|
||||||
|
FieldbyName('price').Value:=0;
|
||||||
|
FieldbyName('taxMoney').Value:=format('%.2f',[FieldByName('money').AsFloat *(1+FieldByName('tax').AsFloat/100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.SYRNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='SYRName';
|
||||||
|
flagname:='公司抬头';
|
||||||
|
if Trim(flag)='SYRName' then
|
||||||
|
begin
|
||||||
|
flag:='OrdDefStr2';
|
||||||
|
V1Name.Caption:='中文名称';
|
||||||
|
V1Note.Caption:='英文名称';
|
||||||
|
fnote:=True;
|
||||||
|
end;
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
SYRName.Text:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmProductOrderNewList:=TfrmProductOrderNewList.Create(Application);
|
||||||
|
with frmProductOrderNewList do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('MainId').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
// FieldByName('subID').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('subID').AsString);
|
||||||
|
FieldByName('orderNo').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('orderNo').AsString);
|
||||||
|
FieldByName('khconNO').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('khconNO').AsString);
|
||||||
|
FieldByName('P_Code').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('MPRTCode').AsString);
|
||||||
|
FieldByName('P_CodeName').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('MPRTCodeName').AsString);
|
||||||
|
FieldByName('P_spec').Value:=Trim(frmProductOrderNewList.Order_Main.fieldbyname('Mprtspec').AsString);
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmProductOrderNewList.Free;
|
||||||
|
self.Tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFrmInvoice_Sub_X.v1Column4PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,FFieldName:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue)='' then
|
||||||
|
begin
|
||||||
|
mvalue:='0';
|
||||||
|
end;
|
||||||
|
FFieldName:=Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with FP_Sub do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value:=Trim(mvalue);
|
||||||
|
FieldbyName('taxMoney').Value:=format('%.2f',[FieldByName('money').AsFloat *(1+FieldByName('tax').AsFloat/100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
576
应收应付(YSYF.dll)/U_FDINVOICE_X.dfm
Normal file
576
应收应付(YSYF.dll)/U_FDINVOICE_X.dfm
Normal file
|
|
@ -0,0 +1,576 @@
|
||||||
|
object frmFDINVOICE_X: TfrmFDINVOICE_X
|
||||||
|
Left = 138
|
||||||
|
Top = 215
|
||||||
|
Width = 1036
|
||||||
|
Height = 491
|
||||||
|
Caption = #21457#31080#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 = 1020
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TADD: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TADDClick
|
||||||
|
end
|
||||||
|
object TUPDATE: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TUPDATEClick
|
||||||
|
end
|
||||||
|
object TBDEL: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDELClick
|
||||||
|
end
|
||||||
|
object TSel: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 58
|
||||||
|
OnClick = TSelClick
|
||||||
|
end
|
||||||
|
object TCHK: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23457#26680
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TCHKClick
|
||||||
|
end
|
||||||
|
object TNOCHK: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23457#26680
|
||||||
|
ImageIndex = 86
|
||||||
|
OnClick = TNOCHKClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 528
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 591
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21457#31080#38468#20214
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 678
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1020
|
||||||
|
Height = 62
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 612
|
||||||
|
Top = 13
|
||||||
|
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 Label3: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#21495#30721
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 13
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21457#31080#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 612
|
||||||
|
Top = 37
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 256
|
||||||
|
Top = 37
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20184#27454#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 37
|
||||||
|
Width = 21
|
||||||
|
Height = 12
|
||||||
|
Caption = 'PO#'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 13
|
||||||
|
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 P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 664
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object InvoiceNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object begdate: TDateTimePicker
|
||||||
|
Left = 98
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Enddate: TDateTimePicker
|
||||||
|
Left = 98
|
||||||
|
Top = 33
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object P_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 664
|
||||||
|
Top = 33
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object FactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 308
|
||||||
|
Top = 33
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object orderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 480
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
object KHConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 480
|
||||||
|
Top = 33
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = InvoiceNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 114
|
||||||
|
Width = 1020
|
||||||
|
Height = 339
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_FP
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Money
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column7
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object v1InvoiceNo: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#21495#30721
|
||||||
|
DataBinding.FieldName = 'InvoiceNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1InvoiceDate: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#26085#26399
|
||||||
|
DataBinding.FieldName = 'InvoiceDate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v1InvoiceType: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#31867#22411
|
||||||
|
DataBinding.FieldName = 'InvoiceType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1FactoryName: TcxGridDBColumn
|
||||||
|
Caption = #20184#27454#21333#20301
|
||||||
|
DataBinding.FieldName = 'FactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25105#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'SYRName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = 'PO#'
|
||||||
|
DataBinding.FieldName = 'KHConNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 94
|
||||||
|
end
|
||||||
|
object v1P_Spec: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
DataBinding.FieldName = 'P_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1ToFactoryName: TcxGridDBColumn
|
||||||
|
Caption = #36827#26041
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1Money: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = cxStyle1
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1PriceUnit: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #31246#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'tax'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #21547#31246#37329#39069
|
||||||
|
DataBinding.FieldName = 'taxMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'P_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #21457#31080#38468#20214
|
||||||
|
DataBinding.FieldName = 'ISFJ'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 93
|
||||||
|
Width = 1020
|
||||||
|
Height = 21
|
||||||
|
Align = alTop
|
||||||
|
Style = 9
|
||||||
|
TabIndex = 0
|
||||||
|
TabOrder = 3
|
||||||
|
Tabs.Strings = (
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680
|
||||||
|
#20840#37096)
|
||||||
|
Visible = False
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 21
|
||||||
|
ClientRectRight = 1020
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 309
|
||||||
|
Top = 193
|
||||||
|
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 = 448
|
||||||
|
Top = 208
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 376
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_FP: TDataSource
|
||||||
|
DataSet = CDS_FP
|
||||||
|
Left = 443
|
||||||
|
Top = 243
|
||||||
|
end
|
||||||
|
object CDS_FP: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 472
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxStyleRepository1: TcxStyleRepository
|
||||||
|
object cxStyle1: TcxStyle
|
||||||
|
AssignedValues = [svTextColor]
|
||||||
|
TextColor = clRed
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
369
应收应付(YSYF.dll)/U_FDINVOICE_X.pas
Normal file
369
应收应付(YSYF.dll)/U_FDINVOICE_X.pas
Normal file
|
|
@ -0,0 +1,369 @@
|
||||||
|
unit U_FDINVOICE_X;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit, cxPC;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmFDINVOICE_X = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
Label1: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
InvoiceNo: TEdit;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
Label2: TLabel;
|
||||||
|
begdate: TDateTimePicker;
|
||||||
|
Enddate: TDateTimePicker;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_FP: TDataSource;
|
||||||
|
CDS_FP: TClientDataSet;
|
||||||
|
TADD: TToolButton;
|
||||||
|
TUPDATE: TToolButton;
|
||||||
|
TBDEL: TToolButton;
|
||||||
|
v1InvoiceNo: TcxGridDBColumn;
|
||||||
|
v1InvoiceType: TcxGridDBColumn;
|
||||||
|
v1InvoiceDate: TcxGridDBColumn;
|
||||||
|
v1ToFactoryName: TcxGridDBColumn;
|
||||||
|
v1FactoryName: TcxGridDBColumn;
|
||||||
|
v1note: TcxGridDBColumn;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_Spec: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1Money: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1PriceUnit: TcxGridDBColumn;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_Spec: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
FactoryName: TEdit;
|
||||||
|
TCHK: TToolButton;
|
||||||
|
TNOCHK: TToolButton;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
TSel: TToolButton;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
orderNo: TEdit;
|
||||||
|
KHConNo: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure InvoiceNoChange(Sender: TObject);
|
||||||
|
procedure TADDClick(Sender: TObject);
|
||||||
|
procedure TUPDATEClick(Sender: TObject);
|
||||||
|
procedure TBDELClick(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure TCHKClick(Sender: TObject);
|
||||||
|
procedure TNOCHKClick(Sender: TObject);
|
||||||
|
procedure TSelClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetStatus();
|
||||||
|
public
|
||||||
|
fInvoiceFlag:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmFDINVOICE_X: TfrmFDINVOICE_X;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp, U_FDINVOICE_Sub_X, U_FjList10;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.SetStatus();
|
||||||
|
begin
|
||||||
|
tchk.Visible:=false;
|
||||||
|
tnochk.Visible:=false;
|
||||||
|
TUPDATE.Visible:=false;
|
||||||
|
tbdel.Visible:=false;
|
||||||
|
if trim(DParameters1)<>'高权限' then
|
||||||
|
begin
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
TUPDATE.Visible:=true;
|
||||||
|
tbdel.Visible:=true;
|
||||||
|
end;
|
||||||
|
1:begin
|
||||||
|
end;
|
||||||
|
2:begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:begin
|
||||||
|
tchk.Visible:=true;
|
||||||
|
TUPDATE.Visible:=true;
|
||||||
|
tbdel.Visible:=true;
|
||||||
|
end;
|
||||||
|
1:begin
|
||||||
|
tnochk.Visible:=true;
|
||||||
|
end;
|
||||||
|
2:begin
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
IF fInvoiceFlag='' then
|
||||||
|
fInvoiceFlag:='1';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select A.*,B.*,C.OrderNo,');
|
||||||
|
sql.Add(' KHConNO=(select Top 1 KHConNO from JYOrdercon_Main X where X.conNO=C.conNO),');
|
||||||
|
sql.Add(' isfj=cast(case when isnull((select count(WBID) from TP_File X where X.WBID=A.invoiceNo and X.TFType=''发票''),0)>0 then 1 else 0 end as bit) ');
|
||||||
|
sql.Add(' from FD_Invoice A ');
|
||||||
|
sql.add(' inner join FD_Invoicesub B on B.InvoiceNo=A.InvoiceNo ');
|
||||||
|
sql.Add(' left join JYorder_main C on C.MainID=B.mainID') ;
|
||||||
|
sql.add(' where A.InvoiceDate>='''+formatdatetime('yyyy-MM-dd',begdate.datetime)+''' ');
|
||||||
|
sql.Add(' and A.InvoiceDate<'''+formatdateTime('yyyy-MM-dd',enddate.DateTime+1)+''' ');
|
||||||
|
sql.Add(' and InvoiceFlag='''+fInvoiceFlag+''' ');
|
||||||
|
if cxTabControl1.TabIndex=0 then
|
||||||
|
sql.add(' and A.Chkstatus=''0''');
|
||||||
|
if cxTabControl1.TabIndex=1 then
|
||||||
|
sql.add(' and A.Chkstatus=''1''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_FP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_FP);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmFDINVOICE_X:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'财务管理');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmFDINVOICE_X.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'财务管理');
|
||||||
|
Enddate.DateTime:=SGetServerDate(ADOQueryTemp);
|
||||||
|
begdate.DateTime:=Enddate.DateTime-30;
|
||||||
|
|
||||||
|
SetStatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
begdate.SetFocus;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_FP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_FP);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.InvoiceNoChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TADDClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FrmInvoice_Sub_X:=TfrmInvoice_Sub_X.Create(self);
|
||||||
|
with frmInvoice_Sub_X do
|
||||||
|
begin
|
||||||
|
FInvoiceNo:='';
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TUPDATEClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF cds_Fp.IsEmpty then exit;
|
||||||
|
frmInvoice_Sub_X:=TfrmInvoice_Sub_X.Create(self);
|
||||||
|
with frmInvoice_Sub_X do
|
||||||
|
begin
|
||||||
|
InvoiceNo.Enabled:=False;
|
||||||
|
FInvoiceNo:=trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TBDELClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
if application.MessageBox('确定要删除发票吗?','提示',1)=2 then exit;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('delete from FD_Invoicesub where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
sql.add('delete from FD_Invoice where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SetStatus();
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TCHKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('update FD_Invoicesub set Chker='''+trim(DName)+''',Chktime=getdate(),chkstatus=''1'' ');
|
||||||
|
sql.add('where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
application.MessageBox('审核成功','提示');
|
||||||
|
initGrid();
|
||||||
|
except;
|
||||||
|
application.MessageBox('审核失败','提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TNOCHKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then exit;
|
||||||
|
try
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('update FD_Invoicesub set Chker=null,Chktime=null,chkstatus=''0'' ');
|
||||||
|
sql.add('where InvoiceNo='''+trim(CDS_FP.fieldbyname('invoiceNo').asstring)+''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
application.MessageBox('撤销成功','提示');
|
||||||
|
initGrid();
|
||||||
|
except;
|
||||||
|
application.MessageBox('撤销失败','提示');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.TSelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmInvoice_Sub_X:=TfrmInvoice_Sub_X.Create(self);
|
||||||
|
with frmInvoice_Sub_X do
|
||||||
|
begin
|
||||||
|
TSave.Visible:=False;
|
||||||
|
ToolBar2.Enabled:=False;
|
||||||
|
FInvoiceNo:=trim(CDS_FP.fieldbyname('InvoiceNo').asstring);
|
||||||
|
fInvoiceFlag:=self.fInvoiceFlag;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFDINVOICE_X.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_FP.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmFjList10:=TfrmFjList10.Create(Application);
|
||||||
|
with frmFjList10 do
|
||||||
|
begin
|
||||||
|
// PState:=1;
|
||||||
|
// if Trim(canshu1)<>'高权限' then cxButton1.Visible:=false;
|
||||||
|
fkeyNO:=Trim(Self.CDS_FP.fieldbyname('InvoiceNo').AsString);
|
||||||
|
fType:='发票';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmFjList10.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
435
应收应付(YSYF.dll)/U_FKCR.dfm
Normal file
435
应收应付(YSYF.dll)/U_FKCR.dfm
Normal file
|
|
@ -0,0 +1,435 @@
|
||||||
|
object frmFKCR: TfrmFKCR
|
||||||
|
Left = 507
|
||||||
|
Top = 53
|
||||||
|
Width = 1038
|
||||||
|
Height = 623
|
||||||
|
Caption = #20184#27454#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 = 1022
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.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 = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object Tchk: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23457#26680
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TchkClick
|
||||||
|
end
|
||||||
|
object TNochk: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25764#38144#23457#26680
|
||||||
|
ImageIndex = 56
|
||||||
|
OnClick = TNochkClick
|
||||||
|
end
|
||||||
|
object TBFileUp: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #38468#20214#19978#20256
|
||||||
|
ImageIndex = 93
|
||||||
|
OnClick = TBFileUpClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 489
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 552
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1022
|
||||||
|
Height = 58
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 466
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #39033#30446#21450#25688#35201
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 164
|
||||||
|
Top = 13
|
||||||
|
Width = 30
|
||||||
|
Height = 12
|
||||||
|
Caption = '-----'
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 630
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25351#31034#21333#21495
|
||||||
|
end
|
||||||
|
object YFName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = FactoryNameChange
|
||||||
|
end
|
||||||
|
object FactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 350
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = FactoryNameChange
|
||||||
|
end
|
||||||
|
object begdate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Enddate: TDateTimePicker
|
||||||
|
Left = 182
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object orderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 679
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = orderNoChange
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 24
|
||||||
|
Top = 37
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #20840#36873
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 111
|
||||||
|
Width = 1022
|
||||||
|
Height = 473
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Filter.AutoDataSetFilter = True
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = VBB
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = VYB
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object v2Ssel: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'Ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object cxGridDBColumn1: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
Properties.OnEditValueChanged = cxGridDBColumn1PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 115
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'FactoryName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object cxGridDBColumn3: TcxGridDBColumn
|
||||||
|
Caption = #39033#30446#21450#25688#35201
|
||||||
|
DataBinding.FieldName = 'YFName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = cxGridDBColumn3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 146
|
||||||
|
end
|
||||||
|
object VBZ: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'BZType'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column3PropertiesButtonClick
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object VHL: TcxGridDBColumn
|
||||||
|
Caption = #27719#29575
|
||||||
|
DataBinding.FieldName = 'HuiLv'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = cxGridDBColumn5PropertiesEditValueChanged
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object VYB: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column4PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object VBB: TcxGridDBColumn
|
||||||
|
Caption = #26412#24065#37329#39069
|
||||||
|
DataBinding.FieldName = 'BBMoney'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = VBBPropertiesEditValueChanged
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column1PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 112
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 89
|
||||||
|
Width = 1022
|
||||||
|
Height = 22
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 0
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#26410#23457#26680
|
||||||
|
#24050#23457#26680
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectBottom = 22
|
||||||
|
ClientRectRight = 1022
|
||||||
|
ClientRectTop = 19
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 309
|
||||||
|
Top = 193
|
||||||
|
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 = 448
|
||||||
|
Top = 208
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 376
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 443
|
||||||
|
Top = 243
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 472
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
end
|
||||||
1568
应收应付(YSYF.dll)/U_FKCR.pas
Normal file
1568
应收应付(YSYF.dll)/U_FKCR.pas
Normal file
File diff suppressed because it is too large
Load Diff
406
应收应付(YSYF.dll)/U_FKCRLZ.dfm
Normal file
406
应收应付(YSYF.dll)/U_FKCRLZ.dfm
Normal file
|
|
@ -0,0 +1,406 @@
|
||||||
|
object frmFKCRLZ: TfrmFKCRLZ
|
||||||
|
Left = 188
|
||||||
|
Top = 79
|
||||||
|
Width = 1038
|
||||||
|
Height = 618
|
||||||
|
Caption = #20184#27454#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 = 1030
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.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 = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
Caption = #19968#38190#26367#25442
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 335
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 398
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1030
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 466
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #39033#30446#21450#25688#35201
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 164
|
||||||
|
Top = 13
|
||||||
|
Width = 30
|
||||||
|
Height = 12
|
||||||
|
Caption = '-----'
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 634
|
||||||
|
Top = 13
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 782
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25903#20184#21488#22836
|
||||||
|
end
|
||||||
|
object YFName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 528
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = FactoryNameChange
|
||||||
|
end
|
||||||
|
object FactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 350
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = FactoryNameChange
|
||||||
|
end
|
||||||
|
object begdate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Enddate: TDateTimePicker
|
||||||
|
Left = 182
|
||||||
|
Top = 9
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41256.918237847230000000
|
||||||
|
Time = 41256.918237847230000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object OrderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 671
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
OnKeyPress = OrderNoKeyPress
|
||||||
|
end
|
||||||
|
object ComTaiTou: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 830
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = FactoryNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1030
|
||||||
|
Height = 511
|
||||||
|
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
|
||||||
|
Column = VBB
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = VYB
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object cxGridDBColumn1: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
Properties.OnEditValueChanged = cxGridDBColumn1PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 115
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23545#26041#21333#20301
|
||||||
|
DataBinding.FieldName = 'FactoryName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object cxGridDBColumn3: TcxGridDBColumn
|
||||||
|
Caption = #39033#30446#21450#25688#35201
|
||||||
|
DataBinding.FieldName = 'YFName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = cxGridDBColumn3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_YSYF.Default
|
||||||
|
Width = 146
|
||||||
|
end
|
||||||
|
object VBZ: TcxGridDBColumn
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'BZType'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object VHL: TcxGridDBColumn
|
||||||
|
Caption = #27719#29575
|
||||||
|
DataBinding.FieldName = 'HuiLv'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = cxGridDBColumn5PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object VYB: TcxGridDBColumn
|
||||||
|
Caption = #21407#24065#37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column4PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object VBB: TcxGridDBColumn
|
||||||
|
Caption = #26412#24065#37329#39069
|
||||||
|
DataBinding.FieldName = 'BBMoney'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = VBBPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object VOrderNo: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v2Column1PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column1PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 112
|
||||||
|
end
|
||||||
|
object v2ZFTT: TcxGridDBColumn
|
||||||
|
Caption = #25903#20184#21488#22836
|
||||||
|
DataBinding.FieldName = 'ComTaiTou'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.OnEditValueChanged = cxGridDBColumn1PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 309
|
||||||
|
Top = 193
|
||||||
|
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 = 448
|
||||||
|
Top = 208
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 376
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 443
|
||||||
|
Top = 243
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 472
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
end
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user