~
This commit is contained in:
commit
0cb161cfb3
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
|
317
报关管理(BaoGuan.dll)/AES.pas
Normal file
317
报关管理(BaoGuan.dll)/AES.pas
Normal file
|
@ -0,0 +1,317 @@
|
|||
(**************************************************)
|
||||
|
||||
unit AES;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Math, ElAES;
|
||||
|
||||
type
|
||||
TKeyBit = (kb128, kb192, kb256);
|
||||
|
||||
function StrToHex(Value: string): string;
|
||||
function HexToStr(Value: string): string;
|
||||
function EncryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
function DecryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
function EncryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
function DecryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
procedure EncryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
procedure DecryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
|
||||
implementation
|
||||
|
||||
function StrToHex(Value: string): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := 1 to Length(Value) do
|
||||
Result := Result + IntToHex(Ord(Value[I]), 2);
|
||||
end;
|
||||
|
||||
function HexToStr(Value: string): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := 1 to Length(Value) do
|
||||
begin
|
||||
if ((I mod 2) = 1) then
|
||||
Result := Result + Chr(StrToInt('0x'+ Copy(Value, I, 2)));
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 字符串加密函数 默认按照 128 位密匙加密 -- }
|
||||
function EncryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
var
|
||||
SS, DS: TStringStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
Result := '';
|
||||
SS := TStringStream.Create(Value);
|
||||
DS := TStringStream.Create('');
|
||||
try
|
||||
Size := SS.Size;
|
||||
DS.WriteBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey128, DS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey192, DS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey256, DS);
|
||||
end;
|
||||
Result := StrToHex(DS.DataString);
|
||||
finally
|
||||
SS.Free;
|
||||
DS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 字符串解密函数 默认按照 128 位密匙解密 -- }
|
||||
function DecryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
var
|
||||
SS, DS: TStringStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
Result := '';
|
||||
SS := TStringStream.Create(HexToStr(Value));
|
||||
DS := TStringStream.Create('');
|
||||
try
|
||||
Size := SS.Size;
|
||||
SS.ReadBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey128, DS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey192, DS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey256, DS);
|
||||
end;
|
||||
Result := DS.DataString;
|
||||
finally
|
||||
SS.Free;
|
||||
DS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 流加密函数 默认按照 128 位密匙解密 -- }
|
||||
function EncryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
var
|
||||
Count: Int64;
|
||||
OutStrm: TStream;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
OutStrm := TStream.Create;
|
||||
Stream.Position := 0;
|
||||
Count := Stream.Size;
|
||||
OutStrm.Write(Count, SizeOf(Count));
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey128, OutStrm);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey192, OutStrm);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey256, OutStrm);
|
||||
end;
|
||||
Result := OutStrm;
|
||||
finally
|
||||
OutStrm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 流解密函数 默认按照 128 位密匙解密 -- }
|
||||
function DecryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
var
|
||||
Count, OutPos: Int64;
|
||||
OutStrm: TStream;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
OutStrm := TStream.Create;
|
||||
Stream.Position := 0;
|
||||
OutPos :=OutStrm.Position;
|
||||
Stream.ReadBuffer(Count, SizeOf(Count));
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey128, OutStrm);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey192, OutStrm);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey256, OutStrm);
|
||||
end;
|
||||
OutStrm.Size := OutPos + Count;
|
||||
OutStrm.Position := OutPos;
|
||||
Result := OutStrm;
|
||||
finally
|
||||
OutStrm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 文件加密函数 默认按照 128 位密匙解密 -- }
|
||||
procedure EncryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
var
|
||||
SFS, DFS: TFileStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
SFS := TFileStream.Create(SourceFile, fmOpenRead);
|
||||
try
|
||||
DFS := TFileStream.Create(DestFile, fmCreate);
|
||||
try
|
||||
Size := SFS.Size;
|
||||
DFS.WriteBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey128, DFS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey192, DFS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey256, DFS);
|
||||
end;
|
||||
finally
|
||||
DFS.Free;
|
||||
end;
|
||||
finally
|
||||
SFS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 文件解密函数 默认按照 128 位密匙解密 -- }
|
||||
procedure DecryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
var
|
||||
SFS, DFS: TFileStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
SFS := TFileStream.Create(SourceFile, fmOpenRead);
|
||||
try
|
||||
SFS.ReadBuffer(Size, SizeOf(Size));
|
||||
DFS := TFileStream.Create(DestFile, fmCreate);
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey128, DFS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey192, DFS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey256, DFS);
|
||||
end;
|
||||
DFS.Size := Size;
|
||||
finally
|
||||
DFS.Free;
|
||||
end;
|
||||
finally
|
||||
SFS.Free;
|
||||
end;
|
||||
end;
|
||||
end.
|
42
报关管理(BaoGuan.dll)/BaoGuan.cfg
Normal file
42
报关管理(BaoGuan.dll)/BaoGuan.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
报关管理(BaoGuan.dll)/BaoGuan.dof
Normal file
138
报关管理(BaoGuan.dll)/BaoGuan.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:\徐加艳项目代码\项目代码\盛纺\报关管理(BaoGuan.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
|
47
报关管理(BaoGuan.dll)/BaoGuan.dpr
Normal file
47
报关管理(BaoGuan.dll)/BaoGuan.dpr
Normal file
|
@ -0,0 +1,47 @@
|
|||
library BaoGuan;
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_DDMD: TDataModule},
|
||||
U_FjList in 'U_FjList.pas' {frmFjList},
|
||||
U_ZDYHelp in 'U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_FjList_RZ in 'U_FjList_RZ.pas' {frmFjList_RZ},
|
||||
U_CompressionFun in '..\..\..\ThreeFun\Fun\U_CompressionFun.pas',
|
||||
U_BaoGuanInPut in 'U_BaoGuanInPut.pas' {frmBaoGuanInPut},
|
||||
U_BaoGuanCRKCX in 'U_BaoGuanCRKCX.pas' {frmBaoGuanCRKCX},
|
||||
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||
U_RTFun in '..\..\..\ThreeFun\Fun\U_RTFun.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
报关管理(BaoGuan.dll)/BaoGuan.res
Normal file
BIN
报关管理(BaoGuan.dll)/BaoGuan.res
Normal file
Binary file not shown.
3
报关管理(BaoGuan.dll)/Desktop.ini
Normal file
3
报关管理(BaoGuan.dll)/Desktop.ini
Normal file
|
@ -0,0 +1,3 @@
|
|||
[.ShellClassInfo]
|
||||
IconFile=C:\Program Files (x86)\360\360WangPan\new_desktop_win7.ico
|
||||
IconIndex=0
|
2488
报关管理(BaoGuan.dll)/ElAES.pas
Normal file
2488
报关管理(BaoGuan.dll)/ElAES.pas
Normal file
File diff suppressed because it is too large
Load Diff
7
报关管理(BaoGuan.dll)/FileHelp.ini
Normal file
7
报关管理(BaoGuan.dll)/FileHelp.ini
Normal file
|
@ -0,0 +1,7 @@
|
|||
[FILEPATH]
|
||||
FileClass=YP,AA,BB,HT
|
||||
YP=D:\YP
|
||||
AA=D:\AA
|
||||
BB=D:\BB
|
||||
HT=D:\HT
|
||||
OTHER=D:\OTHER
|
23
报关管理(BaoGuan.dll)/ProjectGroup1.bpg
Normal file
23
报关管理(BaoGuan.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
报关管理(BaoGuan.dll)/SYSTEMSET.ini
Normal file
3
报关管理(BaoGuan.dll)/SYSTEMSET.ini
Normal file
|
@ -0,0 +1,3 @@
|
|||
[SERVER]
|
||||
服务器地址=172.168.1.246
|
||||
软件名称=欣戈纺织
|
429
报关管理(BaoGuan.dll)/U_BaoGuanCRKCX.dfm
Normal file
429
报关管理(BaoGuan.dll)/U_BaoGuanCRKCX.dfm
Normal file
|
@ -0,0 +1,429 @@
|
|||
object frmBaoGuanCRKCX: TfrmBaoGuanCRKCX
|
||||
Left = 189
|
||||
Top = 135
|
||||
Width = 1348
|
||||
Height = 635
|
||||
Caption = #25253#20851#20986#20837#24211#26597#35810
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 107
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1332
|
||||
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_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TPrint: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = TPrintClick
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 189
|
||||
Top = 5
|
||||
Width = 145
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 0
|
||||
Items.Strings = (
|
||||
#20837#24211#21333
|
||||
#20986#24211#21333)
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 334
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 397
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1332
|
||||
Height = 40
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 30
|
||||
Top = 13
|
||||
Width = 52
|
||||
Height = 13
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 182
|
||||
Top = 13
|
||||
Width = 13
|
||||
Height = 13
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 307
|
||||
Top = 13
|
||||
Width = 72
|
||||
Height = 13
|
||||
Caption = #20379#24212#21830'/'#23458#25143
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 533
|
||||
Top = 13
|
||||
Width = 39
|
||||
Height = 13
|
||||
Caption = #35746#21333#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 724
|
||||
Top = 13
|
||||
Width = 52
|
||||
Height = 13
|
||||
Caption = #21830#21697#21517#31216
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 921
|
||||
Top = 13
|
||||
Width = 26
|
||||
Height = 13
|
||||
Caption = #35268#26684
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 83
|
||||
Top = 9
|
||||
Width = 95
|
||||
Height = 21
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 196
|
||||
Top = 9
|
||||
Width = 96
|
||||
Height = 21
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object C3BGName: TEdit
|
||||
Tag = 2
|
||||
Left = 775
|
||||
Top = 9
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 2
|
||||
OnChange = A5ConNOChange
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 573
|
||||
Top = 9
|
||||
Width = 140
|
||||
Height = 21
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 3
|
||||
OnChange = A5ConNOChange
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 381
|
||||
Top = 9
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
OnChange = A1ChuKouShangChange
|
||||
end
|
||||
object YSChenFen: TEdit
|
||||
Tag = 2
|
||||
Left = 948
|
||||
Top = 9
|
||||
Width = 140
|
||||
Height = 21
|
||||
TabOrder = 5
|
||||
OnChange = A5ConNOChange
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 1332
|
||||
Height = 522
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1C4BGQty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1C4BGQty
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1A1ChuKouShang
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1C4BGQty
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1A7FPDate: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1A1ChuKouShang: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830'/'#23458#25143
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1A5ConNO: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1C3BGName: TcxGridDBColumn
|
||||
Caption = #21830#21697#21517#31216
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1YSChenFen: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object v1C5BGUnit: TcxGridDBColumn
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1C4BGQty: TcxGridDBColumn
|
||||
Caption = #20837#24211#25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20986#24211#25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1JC: TcxGridDBColumn
|
||||
Caption = #32467#23384
|
||||
DataBinding.FieldName = 'JC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 114
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 571
|
||||
Top = 278
|
||||
Width = 235
|
||||
Height = 44
|
||||
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 = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1000
|
||||
Top = 202
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 960
|
||||
Top = 202
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1035
|
||||
Top = 202
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBMain
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 360
|
||||
Top = 232
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Main
|
||||
Left = 424
|
||||
Top = 232
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 392
|
||||
Top = 232
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 488
|
||||
Top = 232
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 456
|
||||
Top = 232
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 328
|
||||
Top = 232
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
end
|
||||
end
|
||||
end
|
245
报关管理(BaoGuan.dll)/U_BaoGuanCRKCX.pas
Normal file
245
报关管理(BaoGuan.dll)/U_BaoGuanCRKCX.pas
Normal file
|
@ -0,0 +1,245 @@
|
|||
unit U_BaoGuanCRKCX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxPC;
|
||||
|
||||
type
|
||||
TfrmBaoGuanCRKCX = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
RM1: TRMGridReport;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_HZ: TClientDataSet;
|
||||
CDS_PRT: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
Panel2: TPanel;
|
||||
Label6: TLabel;
|
||||
Label8: TLabel;
|
||||
Label3: TLabel;
|
||||
C3BGName: TEdit;
|
||||
A5ConNO: TEdit;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1A7FPDate: TcxGridDBColumn;
|
||||
v1A1ChuKouShang: TcxGridDBColumn;
|
||||
v1A5ConNO: TcxGridDBColumn;
|
||||
v1C3BGName: TcxGridDBColumn;
|
||||
v1YSChenFen: TcxGridDBColumn;
|
||||
v1C5BGUnit: TcxGridDBColumn;
|
||||
v1C4BGQty: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
YSChenFen: TEdit;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1JC: TcxGridDBColumn;
|
||||
TPrint: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure v2Column1CompareRowValuesForCellMerging(
|
||||
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
|
||||
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
|
||||
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
|
||||
const AValue2: Variant; var AAreEqual: Boolean);
|
||||
procedure TPrintClick(Sender: TObject);
|
||||
procedure A1ChuKouShangChange(Sender: TObject);
|
||||
procedure A5ConNOChange(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure GetColor(color:TColor);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanCRKCX: TfrmBaoGuanCRKCX;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanCRKCX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.InitGrid();
|
||||
var
|
||||
fsj:string;
|
||||
begin
|
||||
Panel2.Visible:=True;
|
||||
Panel2.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,JC=cast(0 as decimal(18,2)) from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A7FPDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and A7FPDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally;
|
||||
ADOQueryMain.EnableControls;
|
||||
Panel2.Visible:=False;
|
||||
end;
|
||||
Panel2.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('财务报关销售报表',Tv1,'财务管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('财务报关销售报表',Tv1,'财务管理');
|
||||
//InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('财务报关销售报表',cxGrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.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 TfrmBaoGuanCRKCX.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.v2Column1CompareRowValuesForCellMerging(
|
||||
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
|
||||
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
|
||||
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
|
||||
const AValue2: Variant; var AAreEqual: Boolean);
|
||||
|
||||
var
|
||||
colIdx0:integer;
|
||||
begin
|
||||
colIdx0:= tv1.GetColumnByFieldName('A4FPNO').Index;
|
||||
if ARow1.Values[colIdx0] = ARow2.Values[colIdx0] then
|
||||
AAreEqual := True
|
||||
else
|
||||
AAreEqual := False;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.GetColor(color:TColor);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.TPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile,fsj:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if ComboBox1.Text='入库单' then
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\财务报关入库单.rmf';
|
||||
if ComboBox1.Text='出库单' then
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\财务报关出库单.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['TaiTou']:=cxTabControl1.Tabs[cxTabControl1.TabIndex].Caption;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\财务报关入库单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.A1ChuKouShangChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanCRKCX.A5ConNOChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
end.
|
1321
报关管理(BaoGuan.dll)/U_BaoGuanInPut.dfm
Normal file
1321
报关管理(BaoGuan.dll)/U_BaoGuanInPut.dfm
Normal file
File diff suppressed because it is too large
Load Diff
862
报关管理(BaoGuan.dll)/U_BaoGuanInPut.pas
Normal file
862
报关管理(BaoGuan.dll)/U_BaoGuanInPut.pas
Normal file
|
@ -0,0 +1,862 @@
|
|||
unit U_BaoGuanInPut;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxCalendar, cxDropDownEdit,
|
||||
ComCtrls, ToolWin, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient, cxButtonEdit,
|
||||
cxTextEdit, StdCtrls, BtnEdit, ExtCtrls, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmBaoGuanInPut = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
DataSource3: TDataSource;
|
||||
CDS_Sub: TClientDataSet;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
A7FPDate: TDateTimePicker;
|
||||
A1ChuKouShang: TBtnEditA;
|
||||
Label1: TLabel;
|
||||
Label3: TLabel;
|
||||
Label12: TLabel;
|
||||
A2ShuiHao: TEdit;
|
||||
Label13: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
Label14: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
Label4: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label5: TLabel;
|
||||
B1HangBan: TBtnEditA;
|
||||
Label6: TLabel;
|
||||
B2TiDanHao: TEdit;
|
||||
Label7: TLabel;
|
||||
B3KaiHangDate: TDateTimePicker;
|
||||
Label8: TLabel;
|
||||
B4XiangNO: TEdit;
|
||||
Label9: TLabel;
|
||||
B5HuoGui: TBtnEditA;
|
||||
Label10: TLabel;
|
||||
B6ChuYunGang: TBtnEditA;
|
||||
Label11: TLabel;
|
||||
B7DaoHuoGang: TBtnEditA;
|
||||
Label15: TLabel;
|
||||
B8MaoYiGuo: TBtnEditA;
|
||||
Label16: TLabel;
|
||||
Label17: TLabel;
|
||||
B9DiYunGuo: TBtnEditA;
|
||||
B10YunShuType: TBtnEditA;
|
||||
Label19: TLabel;
|
||||
D1HuoYunDiJN: TBtnEditA;
|
||||
Label20: TLabel;
|
||||
D2MaoYiType: TBtnEditA;
|
||||
Label21: TLabel;
|
||||
D3JiHuiType: TBtnEditA;
|
||||
Label2: TLabel;
|
||||
F1BaoGuanTK: TBtnEditA;
|
||||
Label18: TLabel;
|
||||
F2YunFee: TEdit;
|
||||
Label22: TLabel;
|
||||
F3BaoFee: TEdit;
|
||||
Label23: TLabel;
|
||||
F4HuoYunDaiLi: TBtnEditA;
|
||||
Label24: TLabel;
|
||||
F5ChuanGongSi: TBtnEditA;
|
||||
Label25: TLabel;
|
||||
Note: TEdit;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
Label26: TLabel;
|
||||
ToolButton1: TToolButton;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
ComboBox1: TComboBox;
|
||||
ToolButton4: TToolButton;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
Label27: TLabel;
|
||||
KHName: TBtnEditA;
|
||||
Label28: TLabel;
|
||||
ZMXingZhi: TBtnEditA;
|
||||
Label29: TLabel;
|
||||
WHJu: TBtnEditA;
|
||||
Label30: TLabel;
|
||||
HTDate: TDateTimePicker;
|
||||
v1ZZJGou: TcxGridDBColumn;
|
||||
v1YSKeZhong: TcxGridDBColumn;
|
||||
TCXLJ: TToolButton;
|
||||
Label31: TLabel;
|
||||
LJKouAn: TBtnEditA;
|
||||
Label32: TLabel;
|
||||
BZType: TBtnEditA;
|
||||
Label33: TLabel;
|
||||
SBDate: TDateTimePicker;
|
||||
Label34: TLabel;
|
||||
BAHao: TEdit;
|
||||
Label35: TLabel;
|
||||
MDGuo: TBtnEditA;
|
||||
A3HaiGuanBM: TBtnEditA;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure A1ChuKouShangBtnClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure v1Column5PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v1Column14PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v1Column16PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v1Column17PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v1Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure v1ZZJGouPropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v1Column12PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure TCXLJClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
function SaveCKData():Boolean;
|
||||
public
|
||||
{ Public declarations }
|
||||
FBCId:String;CopyStr:String;
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanInPut: TfrmBaoGuanInPut;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanInPut.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanInPut.SaveCKData():Boolean;
|
||||
var
|
||||
FJMID,Maxno,MaxSubNo,FSCID:string;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Main where BGID='''+Trim(FBCId)+'''');
|
||||
Open;
|
||||
end;
|
||||
FBCId:=Trim(ADOQueryTemp.fieldbyname('BGID').AsString);
|
||||
if Trim(FBCId)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,Maxno,'BG','JYOrder_BaoGuan_Main',3,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取报关资料主编号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
Maxno:=Trim(FBCId);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Main where BGID='''+Trim(Maxno)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FBCId)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('FillerCode').Value:=Trim(DCode);
|
||||
end else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditerCode').Value:=Trim(DCode);
|
||||
FieldByName('EditTime').Value:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('BGID').Value:=Trim(Maxno);
|
||||
RTSetsavedata(ADOQueryCmd,'JYOrder_BaoGuan_Main',Panel1,1);
|
||||
RTSetsavedata(ADOQueryCmd,'JYOrder_BaoGuan_Main',Panel1,2);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Main where A4FPNO='''+Trim(A4FPNO.Text)+''' and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('此发票号已经被使用,不能保存!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
CDS_Sub.DisableControls;
|
||||
with CDS_Sub do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BSID='''+Trim(CDS_Sub.fieldbyname('BSID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
FSCID:=Trim(ADOQueryTemp.fieldbyname('BSID').AsString);
|
||||
if Trim(FSCID)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,MaxSubNo,'BS','JYOrder_BaoGuan_Sub',3,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取报关资料子编号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
MaxSubNo:=Trim(FSCID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BSID='''+Trim(MaxSubNo)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FSCID)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('SFiller').Value:=Trim(DName);
|
||||
end else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SEditer').Value:=Trim(DName);
|
||||
FieldByName('SEditTime').Value:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('BGID').Value:=Trim(Maxno);
|
||||
FieldByName('BSID').Value:=Trim(MaxSubNo);
|
||||
RTSetSaveDataCDS(ADOQueryCmd,Tv1,CDS_Sub,'JYOrder_BaoGuan_Sub',2);
|
||||
Post;
|
||||
end;
|
||||
Edit;
|
||||
FieldByName('BSID').Value:=Trim(MaxSubNo);
|
||||
FieldByName('BGID').Value:=Trim(Maxno);
|
||||
Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_Sub.EnableControls;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set ');
|
||||
sql.Add(' C7BGMoneyHZ=(select Sum(C7BGMoney) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E1BZQtyHZ=(select Sum(E1BZQty) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E2ChiMaQtyHZ=(select Sum(E2ChiMaQty) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E3MaoZHZ=(select Sum(E3MaoZ) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E4JingZHZ=(select Sum(E4JingZ) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(' where BGID='''+Trim(Maxno)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
FBCId:=Trim(Maxno);
|
||||
Result:=True;
|
||||
except
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存异常!','提示',0);
|
||||
end;
|
||||
|
||||
end;
|
||||
procedure TfrmBaoGuanInPut.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关资料录入YD',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关资料录入YD',Tv1,'报关管理');
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A');
|
||||
sql.Add(' where BGID='''+Trim(FBCId)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCSHDataNew(ADOQueryTemp,Panel1,1);
|
||||
SCSHDataNew(ADOQueryTemp,Panel1,2);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Sub A');
|
||||
sql.Add(' where BGID='''+Trim(FBCId)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_Sub);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_Sub);
|
||||
if CopyStr='99' then
|
||||
begin
|
||||
FBCId:='';
|
||||
CDS_Sub.DisableControls;
|
||||
with CDS_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BGID').Value:=Null;
|
||||
FieldByName('BSID').Value:=Null;
|
||||
Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_Sub.EnableControls;
|
||||
end;
|
||||
if Trim(FBCId)='' then
|
||||
begin
|
||||
A7FPDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||
B3KaiHangDate.Date:=A7FPDate.Date;
|
||||
HTDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
ToolButton4.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
FReal:Double;
|
||||
i:Integer;
|
||||
begin
|
||||
with Panel1 do
|
||||
begin
|
||||
for i:=0 to ControlCount-1 do
|
||||
begin
|
||||
if Controls[i].Tag=1 then
|
||||
begin
|
||||
if Controls[i] is TLabel then continue;
|
||||
if Controls[i].Tag<>1 then continue;
|
||||
if Controls[i] is TEdit then
|
||||
begin
|
||||
if Trim(TEdit(Controls[i]).Text)='' then
|
||||
begin
|
||||
Application.MessageBox('蓝色标注的信息为必填,请填写!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if Controls[i] is TBtnEditA then
|
||||
begin
|
||||
if Trim(TBtnEditA(Controls[i]).Text)='' then
|
||||
begin
|
||||
Application.MessageBox('蓝色标注的信息为必填,请填写!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if TryStrToFloat(F2YunFee.Text,FReal)=False then
|
||||
begin
|
||||
Application.MessageBox('运费非法数字!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if TryStrToFloat(F3BaoFee.Text,FReal)=False then
|
||||
begin
|
||||
Application.MessageBox('保费非法数字!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C3BGName',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('品名不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C3BGNameEng',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('英文品名不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C2HSNO',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('HS NO不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C4BGQty',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('数量不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C5BGUnit',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('单位不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C6BGPrice',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('单价不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C7BGMoney',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('金额不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('E1BZQty',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('包装数量不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('E1BZUnit',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('包装单位不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('E2ChiMaQty',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('尺码不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('E3MaoZ',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('毛重不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('E4JingZ',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('净重不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('YSZhiZaoType',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('织造方法不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('YSChenFen',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('成分含量不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('YSRanZhengType',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('染整方式不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('YSFuKuan',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('幅宽(CM)不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('YSPinPai',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('品牌不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('YSShengChanShang',Null,[]) then
|
||||
begin
|
||||
Application.MessageBox('生产厂商不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Sub.Locate('C5BGUnit;ZheSuanMiQty', VarArrayOf(['KG', Null]), [loPartialKey]) then
|
||||
begin
|
||||
Application.MessageBox('数量单位为KG时,折算米数不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
ToolBar1.SetFocus;
|
||||
if SaveCKData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
//ModalResult:=1;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.A1ChuKouShangBtnClick(Sender: TObject);
|
||||
var
|
||||
fsj:string;
|
||||
FWZ:Integer;
|
||||
begin
|
||||
fsj:=Trim(TEdit(Sender).Hint);
|
||||
FWZ:=Pos('/',fsj);
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:=Copy(fsj,1,FWZ-1);
|
||||
flagname:=Copy(fsj,FWZ+1,Length(fsj)-fwz);
|
||||
if Trim(flag)='A1ChuKouShang' then
|
||||
begin
|
||||
V1Name.Caption:='中文名称';
|
||||
V1Note.Caption:='英文名称';
|
||||
fnote:=True;
|
||||
frmZDYHelp.Align:=alClient;
|
||||
V1ZdyStr1.Caption:='中文地址';
|
||||
V1ZdyStr1.Visible:=True;
|
||||
V1ZdyStr2.Caption:='英文地址';
|
||||
V1ZdyStr2.Visible:=True;
|
||||
V1ZdyStr3.Caption:='海关编号';
|
||||
V1ZdyStr3.Visible:=True;
|
||||
end;
|
||||
if Trim(flag)='B6ChuYunGang' then
|
||||
begin
|
||||
V1Name.Caption:='中文名称';
|
||||
V1Note.Caption:='英文名称';
|
||||
fnote:=True;
|
||||
end;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
TEdit(Sender).Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
if Trim(flag)='B9DiYunGuo' then
|
||||
begin
|
||||
MDGuo.Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
if Trim(flag)='A1ChuKouShang' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select Top 1 * from JYOrder_BaoGuan_Main where A1ChuKouShang='''+Trim(ClientDataSet1.fieldbyname('ZDYName').AsString)+'''');
|
||||
sql.Add(' and Valid=''Y'' ');
|
||||
sql.Add(' order by FillTime desc');
|
||||
Open;
|
||||
end;
|
||||
A2ShuiHao.Text:=ADOQueryTemp.fieldbyname('A2ShuiHao').ASString;
|
||||
A3HaiGuanBM.Text:=Trim(ClientDataSet1.fieldbyname('ZdyStr3').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally;
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
i:Integer;
|
||||
begin
|
||||
//CopyAddRowCDS(CDS_Sub);
|
||||
{with CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BGID').Value:=Null;
|
||||
FieldByName('BSID').Value:=Null;
|
||||
Post;
|
||||
end; }
|
||||
i:=CDS_Sub.RecordCount;
|
||||
i:=i+1;
|
||||
with CDS_Sub do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('XHInt').Value:=i;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Sub.IsEmpty then Exit;
|
||||
if Trim(CDS_Sub.fieldbyname('BSID').AsString)<>'' then
|
||||
begin
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() ');
|
||||
sql.Add(' where BSID='''+Trim(CDS_Sub.fieldbyname('BSID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set ');
|
||||
sql.Add(' C7BGMoneyHZ=(select Sum(C7BGMoney) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E1BZQtyHZ=(select Sum(E1BZQty) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E2ChiMaQtyHZ=(select Sum(E2ChiMaQty) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E3MaoZHZ=(select Sum(E3MaoZ) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(',E4JingZHZ=(select Sum(E4JingZ) from JYOrder_BaoGuan_Sub A where A.BGID=JYOrder_BaoGuan_Main.BGID and A.SValid=''Y'' )');
|
||||
sql.Add(' where BGID='''+Trim(CDS_Sub.fieldbyname('BGID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_Sub.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.v1Column5PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='C3BGName';
|
||||
flagname:='报关品名';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('C3BGName').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select Top 1 * from JYOrder_BaoGuan_Sub where C3BGName='''+Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString)+'''');
|
||||
sql.add(' and isnull(C2HSNO,'''')<>'''' ');
|
||||
sql.Add(' order by SFillTime desc');
|
||||
Open;
|
||||
end;
|
||||
with Self.CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('C2HSNO').Value:=Trim(ADOQueryTemp.fieldbyname('C2HSNO').asstring);
|
||||
FieldByName('C3BGNameEng').Value:=Trim(ADOQueryTemp.fieldbyname('C3BGNameEng').asstring);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanInPut.v1Column14PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='YSChenFen';
|
||||
flagname:='成分含量';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('YSChenFen').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.v1Column16PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='YSPinPai';
|
||||
flagname:='品牌';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('YSPinPai').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.v1Column17PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='YSShengChanShang';
|
||||
flagname:='生产商';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('YSShengChanShang').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.v1Column3PropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
var
|
||||
mvalue,FName,FPrice,FQty,FBaoGangFee:string;
|
||||
begin
|
||||
FName:=Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
mvalue:='0';
|
||||
end;
|
||||
with CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FName).Value:=mvalue;
|
||||
Post;
|
||||
end;
|
||||
|
||||
with CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('C7BGMoney').Value:=format('%.2f',[CDS_Sub.fieldbyname('C4BGQty').AsFloat*CDS_Sub.fieldbyname('C6BGPrice').AsFloat]);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Sub.IsEmpty then Exit;
|
||||
OneKeyPost(Tv1,CDS_Sub);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.ToolButton4Click(Sender: TObject);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
fsj:='select Name=AA.A4FPNO,Code='''' from (select Top 10 A4FPNO from JYOrder_BaoGuan_Main where Valid=''Y'' order by FillTime Desc)AA order by A4FPNO desc';
|
||||
SInitComBoxBySql(ADOQueryTemp,ComboBox1,False,fsj);
|
||||
ComboBox1.ItemIndex:=0;
|
||||
ToolBar1.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.v1ZZJGouPropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='ZZJGou';
|
||||
flagname:='组织结构';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ZZJGou').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.v1Column12PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='E5MaiTou';
|
||||
flagname:='唛头';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.CDS_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('E5MaiTou').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanInPut.TCXLJClick(Sender: TObject);
|
||||
begin
|
||||
if not Assigned(DataLink_DDMD) then
|
||||
DataLink_DDMD:=TDataLink_DDMD.Create(Application);
|
||||
Try
|
||||
with DataLink_DDMD.ADOLink do
|
||||
begin
|
||||
//if not Connected then
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
LoginPrompt:=false;
|
||||
Connected:=true;
|
||||
end;
|
||||
end;
|
||||
Except
|
||||
application.MessageBox('数据库连接失败!','错误',mb_Ok+ MB_ICONERROR);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
1213
报关管理(BaoGuan.dll)/U_BaoGuanList.dfm
Normal file
1213
报关管理(BaoGuan.dll)/U_BaoGuanList.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1269
报关管理(BaoGuan.dll)/U_BaoGuanList.pas
Normal file
1269
报关管理(BaoGuan.dll)/U_BaoGuanList.pas
Normal file
File diff suppressed because it is too large
Load Diff
985
报关管理(BaoGuan.dll)/U_BaoGuanListBGD.dfm
Normal file
985
报关管理(BaoGuan.dll)/U_BaoGuanListBGD.dfm
Normal file
|
@ -0,0 +1,985 @@
|
|||
object frmBaoGuanListBGD: TfrmBaoGuanListBGD
|
||||
Left = 110
|
||||
Top = 82
|
||||
Width = 1162
|
||||
Height = 615
|
||||
Caption = #25253#20851#21333#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 = 1146
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#36164#26009
|
||||
ImageIndex = 4
|
||||
Visible = False
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21512#21516
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#31080
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35013#31665#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton10Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#21333
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
Caption = #30003#25253#35201#32032
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 635
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 698
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1146
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 639
|
||||
Top = 12
|
||||
Width = 42
|
||||
Height = 12
|
||||
Caption = #23458#25143'PO#'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 831
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A4FPNOKeyPress
|
||||
end
|
||||
object A6PONO: TEdit
|
||||
Tag = 2
|
||||
Left = 683
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 4
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A5ConNOKeyPress
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 868
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 91
|
||||
Width = 1146
|
||||
Height = 309
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31246#21495
|
||||
DataBinding.FieldName = 'A2ShuiHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #28023#20851#32534#30721
|
||||
DataBinding.FieldName = 'A3HaiGuanBM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23458#25143'PO#'
|
||||
DataBinding.FieldName = 'A6PONO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24320#33322#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36135#26588
|
||||
DataBinding.FieldName = 'B5HuoGui'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20986#36816#28207
|
||||
DataBinding.FieldName = 'B6ChuYunGang'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21040#36135#28207
|
||||
DataBinding.FieldName = 'B7DaoHuoGang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36152#26131#22269
|
||||
DataBinding.FieldName = 'B8MaoYiGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25269#36816#22269
|
||||
DataBinding.FieldName = 'B9DiYunGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #36816#36755#26041#24335
|
||||
DataBinding.FieldName = 'B10YunShuType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36152#26131#26041#24335
|
||||
DataBinding.FieldName = 'D2MaoYiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #32467#27719#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #25253#20851#26465#27454
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #36816#36153
|
||||
DataBinding.FieldName = 'F2YunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20445#36153
|
||||
DataBinding.FieldName = 'F3BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #36135#36816#20195#29702
|
||||
DataBinding.FieldName = 'F4HuoYunDaiLi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #33322#21517#33322#27425
|
||||
DataBinding.FieldName = 'B1HangBan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #25552#21333#21495
|
||||
DataBinding.FieldName = 'B2TiDanHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #31665#21495#23553#21495
|
||||
DataBinding.FieldName = 'B4XiangNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #33337#20844#21496
|
||||
DataBinding.FieldName = 'F5ChuanGongSi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoneyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1146
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24050#36865#23457
|
||||
#24050#23457#25209
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1146
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 400
|
||||
Width = 1146
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1146
|
||||
Height = 169
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 183
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24133#23485'(CM)'
|
||||
DataBinding.FieldName = 'YSFuKuan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32455#36896#26041#27861
|
||||
DataBinding.FieldName = 'YSZhiZaoType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#38024#32455
|
||||
#32463#32534)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#29260
|
||||
DataBinding.FieldName = 'YSPinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #29983#20135#21378#21830
|
||||
DataBinding.FieldName = 'YSShengChanShang'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = 'HS NO'
|
||||
DataBinding.FieldName = 'C2HSNO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 132
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'MTR'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215'(USD)'
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#21333#20301
|
||||
DataBinding.FieldName = 'E1BZUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'BALES'
|
||||
'ROLLS')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21787#22836
|
||||
DataBinding.FieldName = 'E5MaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 952
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 768
|
||||
Top = 168
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 472
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 912
|
||||
Top = 472
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 944
|
||||
Top = 472
|
||||
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 = 200
|
||||
Top = 208
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 208
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 256
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 288
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 208
|
||||
end
|
||||
end
|
684
报关管理(BaoGuan.dll)/U_BaoGuanListBGD.pas
Normal file
684
报关管理(BaoGuan.dll)/U_BaoGuanListBGD.pas
Normal file
|
@ -0,0 +1,684 @@
|
|||
unit U_BaoGuanListBGD;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxSplitter;
|
||||
|
||||
type
|
||||
TfrmBaoGuanListBGD = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Label6: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label8: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton7: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure A6PONOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure A5ConNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
procedure ToolButton10Click(Sender: TObject);
|
||||
procedure ToolButton11Click(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1:string;
|
||||
canshu2:string;
|
||||
FDate:TDateTime;
|
||||
procedure InitGrid();
|
||||
function DelData():Boolean;
|
||||
procedure InitSubGrid();
|
||||
procedure InitGridSql(var fsj:String);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanListBGD: TfrmBaoGuanListBGD;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_BaoGuanInPut;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanListBGD.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanListBGD:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where Valid=''Y'' ');
|
||||
{if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and Filler='''+Trim(DName)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and BGDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and BGDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关主表BGD',Tv1,'报关管理');
|
||||
WriteCxGrid('报关明细BGD',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关主表BGD',Tv1,'报关管理');
|
||||
ReadCxGrid('报关明细BGD',Tv1,'报关管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('报关资料列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.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 TfrmBaoGuanListBGD.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,False);
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGD.InitSubGrid();
|
||||
begin
|
||||
if CDS_Main.IsEmpty=False then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BGID='''+Trim(CDS_Main.fieldbyname('BGID').AsString)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where 1=2');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanListBGD.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Main.DisableControls;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set Valid=''N'',C7BGMoneyHZ=Null,E1BZQtyHZ=Null, E2ChiMaQtyHZ=Null,E3MaoZHZ=Null,E4JingZHZ=Null');
|
||||
sql.Add(',Editer='''+Trim(DName)+''',EditTime=getdate()');
|
||||
sql.Add(' where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGD.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanListBGD.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A4FPNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A4FPNO,'''') like '''+'%'+Trim(A4FPNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGD.InitGridSql(var fsj:String);
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
{ if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and FillerCode='''+Trim(DCode)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
sql.Add(fsj);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.A6PONOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A6PONO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A6PONO,'''') like '''+'%'+Trim(A6PONO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.A5ConNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A5ConNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A5ConNO,'''') like '''+'%'+Trim(A5ConNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关资料.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关资料.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关合同.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关合同.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ToolButton9Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关发票.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ToolButton10Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关装箱单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ToolButton11Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
try
|
||||
frmBaoGuanInPut:=TfrmBaoGuanInPut.Create(Application);
|
||||
with frmBaoGuanInPut do
|
||||
begin
|
||||
FBCId:=Trim(CDS_Main.fieldbyname('BGID').AsString);
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
Panel1.Enabled:=False;
|
||||
Tv1.OptionsData.Editing:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBaoGuanInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGD.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\申报要素.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\申报要素.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
979
报关管理(BaoGuan.dll)/U_BaoGuanListBGZL.dfm
Normal file
979
报关管理(BaoGuan.dll)/U_BaoGuanListBGZL.dfm
Normal file
|
@ -0,0 +1,979 @@
|
|||
object frmBaoGuanListBGZL: TfrmBaoGuanListBGZL
|
||||
Left = 110
|
||||
Top = 82
|
||||
Width = 1162
|
||||
Height = 615
|
||||
Caption = #25253#20851#36164#26009#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 = 1146
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#36164#26009
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21512#21516
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#31080
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35013#31665#21333
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton10Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#21333
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
Caption = #30003#25253#35201#32032
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 635
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 698
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1146
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 639
|
||||
Top = 12
|
||||
Width = 42
|
||||
Height = 12
|
||||
Caption = #23458#25143'PO#'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 831
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A4FPNOKeyPress
|
||||
end
|
||||
object A6PONO: TEdit
|
||||
Tag = 2
|
||||
Left = 683
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 4
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A5ConNOKeyPress
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 868
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 91
|
||||
Width = 1146
|
||||
Height = 309
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31246#21495
|
||||
DataBinding.FieldName = 'A2ShuiHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #28023#20851#32534#30721
|
||||
DataBinding.FieldName = 'A3HaiGuanBM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23458#25143'PO#'
|
||||
DataBinding.FieldName = 'A6PONO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24320#33322#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36135#26588
|
||||
DataBinding.FieldName = 'B5HuoGui'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20986#36816#28207
|
||||
DataBinding.FieldName = 'B6ChuYunGang'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21040#36135#28207
|
||||
DataBinding.FieldName = 'B7DaoHuoGang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36152#26131#22269
|
||||
DataBinding.FieldName = 'B8MaoYiGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25269#36816#22269
|
||||
DataBinding.FieldName = 'B9DiYunGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #36816#36755#26041#24335
|
||||
DataBinding.FieldName = 'B10YunShuType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36152#26131#26041#24335
|
||||
DataBinding.FieldName = 'D2MaoYiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #32467#27719#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #25253#20851#26465#27454
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #36816#36153
|
||||
DataBinding.FieldName = 'F2YunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20445#36153
|
||||
DataBinding.FieldName = 'F3BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #36135#36816#20195#29702
|
||||
DataBinding.FieldName = 'F4HuoYunDaiLi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #33322#21517#33322#27425
|
||||
DataBinding.FieldName = 'B1HangBan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #25552#21333#21495
|
||||
DataBinding.FieldName = 'B2TiDanHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #31665#21495#23553#21495
|
||||
DataBinding.FieldName = 'B4XiangNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #33337#20844#21496
|
||||
DataBinding.FieldName = 'F5ChuanGongSi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoneyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1146
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24050#36865#23457
|
||||
#24050#23457#25209
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1146
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 400
|
||||
Width = 1146
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1146
|
||||
Height = 169
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 183
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24133#23485'(CM)'
|
||||
DataBinding.FieldName = 'YSFuKuan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32455#36896#26041#27861
|
||||
DataBinding.FieldName = 'YSZhiZaoType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#38024#32455
|
||||
#32463#32534)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#29260
|
||||
DataBinding.FieldName = 'YSPinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #29983#20135#21378#21830
|
||||
DataBinding.FieldName = 'YSShengChanShang'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = 'HS NO'
|
||||
DataBinding.FieldName = 'C2HSNO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 132
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'MTR'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215'(USD)'
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#21333#20301
|
||||
DataBinding.FieldName = 'E1BZUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'BALES'
|
||||
'ROLLS')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21787#22836
|
||||
DataBinding.FieldName = 'E5MaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 952
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 768
|
||||
Top = 168
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 472
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 912
|
||||
Top = 472
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 944
|
||||
Top = 472
|
||||
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 = 200
|
||||
Top = 208
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 208
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 256
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 288
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 208
|
||||
end
|
||||
end
|
700
报关管理(BaoGuan.dll)/U_BaoGuanListBGZL.pas
Normal file
700
报关管理(BaoGuan.dll)/U_BaoGuanListBGZL.pas
Normal file
|
@ -0,0 +1,700 @@
|
|||
unit U_BaoGuanListBGZL;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxSplitter;
|
||||
|
||||
type
|
||||
TfrmBaoGuanListBGZL = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Label6: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label8: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton7: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure A6PONOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure A5ConNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
procedure ToolButton10Click(Sender: TObject);
|
||||
procedure ToolButton11Click(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1:string;
|
||||
canshu2:string;
|
||||
FDate:TDateTime;
|
||||
procedure InitGrid();
|
||||
function DelData():Boolean;
|
||||
procedure InitSubGrid();
|
||||
procedure InitGridSql(var fsj:String);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanListBGZL: TfrmBaoGuanListBGZL;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_BaoGuanInPut;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanListBGZL:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where Valid=''Y'' ');
|
||||
{if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and Filler='''+Trim(DName)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and BGDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and BGDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关主表',Tv1,'报关管理');
|
||||
WriteCxGrid('报关明细',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关主表',Tv1,'报关管理');
|
||||
ReadCxGrid('报关明细',Tv1,'报关管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('报关资料列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.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 TfrmBaoGuanListBGZL.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,False);
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGZL.InitSubGrid();
|
||||
begin
|
||||
if CDS_Main.IsEmpty=False then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BGID='''+Trim(CDS_Main.fieldbyname('BGID').AsString)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where 1=2');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanListBGZL.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Main.DisableControls;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set Valid=''N'',C7BGMoneyHZ=Null,E1BZQtyHZ=Null, E2ChiMaQtyHZ=Null,E3MaoZHZ=Null,E4JingZHZ=Null');
|
||||
sql.Add(',Editer='''+Trim(DName)+''',EditTime=getdate()');
|
||||
sql.Add(' where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGZL.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A4FPNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A4FPNO,'''') like '''+'%'+Trim(A4FPNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGZL.InitGridSql(var fsj:String);
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
{ if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and FillerCode='''+Trim(DCode)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
sql.Add(fsj);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.A6PONOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A6PONO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A6PONO,'''') like '''+'%'+Trim(A6PONO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.A5ConNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A5ConNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A5ConNO,'''') like '''+'%'+Trim(A5ConNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关资料.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关资料.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关合同.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关合同.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ToolButton9Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
//fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票.rmf';
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴宇玎纺织有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票YD.rmf';
|
||||
end else
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴锦凤进出口有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票JF.rmf';
|
||||
end;
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关发票.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ToolButton10Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
//fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单.rmf';
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴宇玎纺织有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单YD.rmf';
|
||||
end else
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴锦凤进出口有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单JF.rmf';
|
||||
end;
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else ZheSuanMiQty end as C4BGQtyJS ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关装箱单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ToolButton11Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
try
|
||||
frmBaoGuanInPut:=TfrmBaoGuanInPut.Create(Application);
|
||||
with frmBaoGuanInPut do
|
||||
begin
|
||||
FBCId:=Trim(CDS_Main.fieldbyname('BGID').AsString);
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
Panel1.Enabled:=False;
|
||||
Tv1.OptionsData.Editing:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBaoGuanInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZL.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\申报要素.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\申报要素.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
985
报关管理(BaoGuan.dll)/U_BaoGuanListBGZLCX.dfm
Normal file
985
报关管理(BaoGuan.dll)/U_BaoGuanListBGZLCX.dfm
Normal file
|
@ -0,0 +1,985 @@
|
|||
object frmBaoGuanListBGZLCX: TfrmBaoGuanListBGZLCX
|
||||
Left = 110
|
||||
Top = 82
|
||||
Width = 1162
|
||||
Height = 615
|
||||
Caption = #25253#20851#36164#26009#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 = 1146
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#36164#26009
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21512#21516
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#31080
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35013#31665#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton10Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
Caption = #30003#25253#35201#32032
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 635
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 698
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1146
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 639
|
||||
Top = 12
|
||||
Width = 42
|
||||
Height = 12
|
||||
Caption = #23458#25143'PO#'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 831
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A4FPNOKeyPress
|
||||
end
|
||||
object A6PONO: TEdit
|
||||
Tag = 2
|
||||
Left = 683
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 4
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A5ConNOKeyPress
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 868
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 91
|
||||
Width = 1146
|
||||
Height = 309
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31246#21495
|
||||
DataBinding.FieldName = 'A2ShuiHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #28023#20851#32534#30721
|
||||
DataBinding.FieldName = 'A3HaiGuanBM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23458#25143'PO#'
|
||||
DataBinding.FieldName = 'A6PONO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24320#33322#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36135#26588
|
||||
DataBinding.FieldName = 'B5HuoGui'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20986#36816#28207
|
||||
DataBinding.FieldName = 'B6ChuYunGang'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21040#36135#28207
|
||||
DataBinding.FieldName = 'B7DaoHuoGang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36152#26131#22269
|
||||
DataBinding.FieldName = 'B8MaoYiGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25269#36816#22269
|
||||
DataBinding.FieldName = 'B9DiYunGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #36816#36755#26041#24335
|
||||
DataBinding.FieldName = 'B10YunShuType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36152#26131#26041#24335
|
||||
DataBinding.FieldName = 'D2MaoYiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #32467#27719#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #25253#20851#26465#27454
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #36816#36153
|
||||
DataBinding.FieldName = 'F2YunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20445#36153
|
||||
DataBinding.FieldName = 'F3BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #36135#36816#20195#29702
|
||||
DataBinding.FieldName = 'F4HuoYunDaiLi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #33322#21517#33322#27425
|
||||
DataBinding.FieldName = 'B1HangBan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #25552#21333#21495
|
||||
DataBinding.FieldName = 'B2TiDanHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #31665#21495#23553#21495
|
||||
DataBinding.FieldName = 'B4XiangNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #33337#20844#21496
|
||||
DataBinding.FieldName = 'F5ChuanGongSi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoneyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1146
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24050#36865#23457
|
||||
#24050#23457#25209
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1146
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 400
|
||||
Width = 1146
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1146
|
||||
Height = 169
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 183
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24133#23485'(CM)'
|
||||
DataBinding.FieldName = 'YSFuKuan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32455#36896#26041#27861
|
||||
DataBinding.FieldName = 'YSZhiZaoType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#38024#32455
|
||||
#32463#32534)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#29260
|
||||
DataBinding.FieldName = 'YSPinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #29983#20135#21378#21830
|
||||
DataBinding.FieldName = 'YSShengChanShang'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = 'HS NO'
|
||||
DataBinding.FieldName = 'C2HSNO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 132
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'MTR'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215'(USD)'
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#21333#20301
|
||||
DataBinding.FieldName = 'E1BZUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'BALES'
|
||||
'ROLLS')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21787#22836
|
||||
DataBinding.FieldName = 'E5MaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 952
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 768
|
||||
Top = 168
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 472
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 912
|
||||
Top = 472
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 944
|
||||
Top = 472
|
||||
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 = 200
|
||||
Top = 208
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 208
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 256
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 288
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 208
|
||||
end
|
||||
end
|
684
报关管理(BaoGuan.dll)/U_BaoGuanListBGZLCX.pas
Normal file
684
报关管理(BaoGuan.dll)/U_BaoGuanListBGZLCX.pas
Normal file
|
@ -0,0 +1,684 @@
|
|||
unit U_BaoGuanListBGZLCX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxSplitter;
|
||||
|
||||
type
|
||||
TfrmBaoGuanListBGZLCX = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Label6: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label8: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton7: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure A6PONOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure A5ConNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
procedure ToolButton10Click(Sender: TObject);
|
||||
procedure ToolButton11Click(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1:string;
|
||||
canshu2:string;
|
||||
FDate:TDateTime;
|
||||
procedure InitGrid();
|
||||
function DelData():Boolean;
|
||||
procedure InitSubGrid();
|
||||
procedure InitGridSql(var fsj:String);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanListBGZLCX: TfrmBaoGuanListBGZLCX;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_BaoGuanInPut;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanListBGZLCX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where Valid=''Y'' ');
|
||||
{if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and Filler='''+Trim(DName)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and BGDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and BGDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关主表BGZL',Tv1,'报关管理');
|
||||
WriteCxGrid('报关明细BGZL',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关主表BGZL',Tv1,'报关管理');
|
||||
ReadCxGrid('报关明细BGZL',Tv1,'报关管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('报关资料列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.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 TfrmBaoGuanListBGZLCX.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,False);
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGZLCX.InitSubGrid();
|
||||
begin
|
||||
if CDS_Main.IsEmpty=False then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BGID='''+Trim(CDS_Main.fieldbyname('BGID').AsString)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where 1=2');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanListBGZLCX.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Main.DisableControls;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set Valid=''N'',C7BGMoneyHZ=Null,E1BZQtyHZ=Null, E2ChiMaQtyHZ=Null,E3MaoZHZ=Null,E4JingZHZ=Null');
|
||||
sql.Add(',Editer='''+Trim(DName)+''',EditTime=getdate()');
|
||||
sql.Add(' where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGZLCX.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A4FPNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A4FPNO,'''') like '''+'%'+Trim(A4FPNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListBGZLCX.InitGridSql(var fsj:String);
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
{ if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and FillerCode='''+Trim(DCode)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
sql.Add(fsj);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.A6PONOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A6PONO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A6PONO,'''') like '''+'%'+Trim(A6PONO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.A5ConNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A5ConNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A5ConNO,'''') like '''+'%'+Trim(A5ConNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关资料.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关资料.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关合同.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关合同.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ToolButton9Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关发票.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ToolButton10Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关装箱单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ToolButton11Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
try
|
||||
frmBaoGuanInPut:=TfrmBaoGuanInPut.Create(Application);
|
||||
with frmBaoGuanInPut do
|
||||
begin
|
||||
FBCId:=Trim(CDS_Main.fieldbyname('BGID').AsString);
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
Panel1.Enabled:=False;
|
||||
Tv1.OptionsData.Editing:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBaoGuanInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListBGZLCX.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\申报要素.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\申报要素.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
985
报关管理(BaoGuan.dll)/U_BaoGuanListFP.dfm
Normal file
985
报关管理(BaoGuan.dll)/U_BaoGuanListFP.dfm
Normal file
|
@ -0,0 +1,985 @@
|
|||
object frmBaoGuanListFP: TfrmBaoGuanListFP
|
||||
Left = 110
|
||||
Top = 82
|
||||
Width = 1162
|
||||
Height = 615
|
||||
Caption = #25253#20851#21457#31080#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 = 1146
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#36164#26009
|
||||
ImageIndex = 4
|
||||
Visible = False
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21512#21516
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#31080
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35013#31665#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton10Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
Caption = #30003#25253#35201#32032
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 635
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 698
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1146
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 639
|
||||
Top = 12
|
||||
Width = 42
|
||||
Height = 12
|
||||
Caption = #23458#25143'PO#'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 831
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A4FPNOKeyPress
|
||||
end
|
||||
object A6PONO: TEdit
|
||||
Tag = 2
|
||||
Left = 683
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 4
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A5ConNOKeyPress
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 868
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 91
|
||||
Width = 1146
|
||||
Height = 309
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31246#21495
|
||||
DataBinding.FieldName = 'A2ShuiHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #28023#20851#32534#30721
|
||||
DataBinding.FieldName = 'A3HaiGuanBM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23458#25143'PO#'
|
||||
DataBinding.FieldName = 'A6PONO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24320#33322#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36135#26588
|
||||
DataBinding.FieldName = 'B5HuoGui'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20986#36816#28207
|
||||
DataBinding.FieldName = 'B6ChuYunGang'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21040#36135#28207
|
||||
DataBinding.FieldName = 'B7DaoHuoGang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36152#26131#22269
|
||||
DataBinding.FieldName = 'B8MaoYiGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25269#36816#22269
|
||||
DataBinding.FieldName = 'B9DiYunGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #36816#36755#26041#24335
|
||||
DataBinding.FieldName = 'B10YunShuType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36152#26131#26041#24335
|
||||
DataBinding.FieldName = 'D2MaoYiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #32467#27719#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #25253#20851#26465#27454
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #36816#36153
|
||||
DataBinding.FieldName = 'F2YunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20445#36153
|
||||
DataBinding.FieldName = 'F3BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #36135#36816#20195#29702
|
||||
DataBinding.FieldName = 'F4HuoYunDaiLi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #33322#21517#33322#27425
|
||||
DataBinding.FieldName = 'B1HangBan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #25552#21333#21495
|
||||
DataBinding.FieldName = 'B2TiDanHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #31665#21495#23553#21495
|
||||
DataBinding.FieldName = 'B4XiangNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #33337#20844#21496
|
||||
DataBinding.FieldName = 'F5ChuanGongSi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoneyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1146
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24050#36865#23457
|
||||
#24050#23457#25209
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1146
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 400
|
||||
Width = 1146
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1146
|
||||
Height = 169
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 183
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24133#23485'(CM)'
|
||||
DataBinding.FieldName = 'YSFuKuan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32455#36896#26041#27861
|
||||
DataBinding.FieldName = 'YSZhiZaoType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#38024#32455
|
||||
#32463#32534)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#29260
|
||||
DataBinding.FieldName = 'YSPinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #29983#20135#21378#21830
|
||||
DataBinding.FieldName = 'YSShengChanShang'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = 'HS NO'
|
||||
DataBinding.FieldName = 'C2HSNO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 132
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'MTR'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215'(USD)'
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#21333#20301
|
||||
DataBinding.FieldName = 'E1BZUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'BALES'
|
||||
'ROLLS')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21787#22836
|
||||
DataBinding.FieldName = 'E5MaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 952
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 768
|
||||
Top = 168
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 472
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 912
|
||||
Top = 472
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 944
|
||||
Top = 472
|
||||
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 = 200
|
||||
Top = 208
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 208
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 256
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 288
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 208
|
||||
end
|
||||
end
|
692
报关管理(BaoGuan.dll)/U_BaoGuanListFP.pas
Normal file
692
报关管理(BaoGuan.dll)/U_BaoGuanListFP.pas
Normal file
|
@ -0,0 +1,692 @@
|
|||
unit U_BaoGuanListFP;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxSplitter;
|
||||
|
||||
type
|
||||
TfrmBaoGuanListFP = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Label6: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label8: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton7: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure A6PONOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure A5ConNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
procedure ToolButton10Click(Sender: TObject);
|
||||
procedure ToolButton11Click(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1:string;
|
||||
canshu2:string;
|
||||
FDate:TDateTime;
|
||||
procedure InitGrid();
|
||||
function DelData():Boolean;
|
||||
procedure InitSubGrid();
|
||||
procedure InitGridSql(var fsj:String);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanListFP: TfrmBaoGuanListFP;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_BaoGuanInPut;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanListFP.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanListFP:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where Valid=''Y'' ');
|
||||
{if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and Filler='''+Trim(DName)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and BGDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and BGDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关主表FP',Tv1,'报关管理');
|
||||
WriteCxGrid('报关明细FP',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关主表FP',Tv1,'报关管理');
|
||||
ReadCxGrid('报关明细FP',Tv1,'报关管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('报关资料列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.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 TfrmBaoGuanListFP.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,False);
|
||||
end;
|
||||
procedure TfrmBaoGuanListFP.InitSubGrid();
|
||||
begin
|
||||
if CDS_Main.IsEmpty=False then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BGID='''+Trim(CDS_Main.fieldbyname('BGID').AsString)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where 1=2');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanListFP.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Main.DisableControls;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set Valid=''N'',C7BGMoneyHZ=Null,E1BZQtyHZ=Null, E2ChiMaQtyHZ=Null,E3MaoZHZ=Null,E4JingZHZ=Null');
|
||||
sql.Add(',Editer='''+Trim(DName)+''',EditTime=getdate()');
|
||||
sql.Add(' where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListFP.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanListFP.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A4FPNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A4FPNO,'''') like '''+'%'+Trim(A4FPNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListFP.InitGridSql(var fsj:String);
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
{ if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and FillerCode='''+Trim(DCode)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
sql.Add(fsj);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.A6PONOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A6PONO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A6PONO,'''') like '''+'%'+Trim(A6PONO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.A5ConNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A5ConNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A5ConNO,'''') like '''+'%'+Trim(A5ConNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关资料.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关资料.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关合同.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关合同.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ToolButton9Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
//fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票.rmf';
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴宇玎纺织有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票YD.rmf';
|
||||
end else
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴锦凤进出口有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票JF.rmf';
|
||||
end;
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关发票.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ToolButton10Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关装箱单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ToolButton11Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
try
|
||||
frmBaoGuanInPut:=TfrmBaoGuanInPut.Create(Application);
|
||||
with frmBaoGuanInPut do
|
||||
begin
|
||||
FBCId:=Trim(CDS_Main.fieldbyname('BGID').AsString);
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
Panel1.Enabled:=False;
|
||||
Tv1.OptionsData.Editing:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBaoGuanInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListFP.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\申报要素.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\申报要素.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
985
报关管理(BaoGuan.dll)/U_BaoGuanListHT.dfm
Normal file
985
报关管理(BaoGuan.dll)/U_BaoGuanListHT.dfm
Normal file
|
@ -0,0 +1,985 @@
|
|||
object frmBaoGuanListHT: TfrmBaoGuanListHT
|
||||
Left = 110
|
||||
Top = 82
|
||||
Width = 1162
|
||||
Height = 615
|
||||
Caption = #25253#20851#21512#21516#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 = 1146
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#36164#26009
|
||||
ImageIndex = 4
|
||||
Visible = False
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21512#21516
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#31080
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35013#31665#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton10Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
Caption = #30003#25253#35201#32032
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 635
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 698
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1146
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 639
|
||||
Top = 12
|
||||
Width = 42
|
||||
Height = 12
|
||||
Caption = #23458#25143'PO#'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 831
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A4FPNOKeyPress
|
||||
end
|
||||
object A6PONO: TEdit
|
||||
Tag = 2
|
||||
Left = 683
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 4
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A5ConNOKeyPress
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 868
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 91
|
||||
Width = 1146
|
||||
Height = 309
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31246#21495
|
||||
DataBinding.FieldName = 'A2ShuiHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #28023#20851#32534#30721
|
||||
DataBinding.FieldName = 'A3HaiGuanBM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23458#25143'PO#'
|
||||
DataBinding.FieldName = 'A6PONO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24320#33322#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36135#26588
|
||||
DataBinding.FieldName = 'B5HuoGui'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20986#36816#28207
|
||||
DataBinding.FieldName = 'B6ChuYunGang'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21040#36135#28207
|
||||
DataBinding.FieldName = 'B7DaoHuoGang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36152#26131#22269
|
||||
DataBinding.FieldName = 'B8MaoYiGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25269#36816#22269
|
||||
DataBinding.FieldName = 'B9DiYunGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #36816#36755#26041#24335
|
||||
DataBinding.FieldName = 'B10YunShuType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36152#26131#26041#24335
|
||||
DataBinding.FieldName = 'D2MaoYiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #32467#27719#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #25253#20851#26465#27454
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #36816#36153
|
||||
DataBinding.FieldName = 'F2YunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20445#36153
|
||||
DataBinding.FieldName = 'F3BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #36135#36816#20195#29702
|
||||
DataBinding.FieldName = 'F4HuoYunDaiLi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #33322#21517#33322#27425
|
||||
DataBinding.FieldName = 'B1HangBan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #25552#21333#21495
|
||||
DataBinding.FieldName = 'B2TiDanHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #31665#21495#23553#21495
|
||||
DataBinding.FieldName = 'B4XiangNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #33337#20844#21496
|
||||
DataBinding.FieldName = 'F5ChuanGongSi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoneyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1146
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24050#36865#23457
|
||||
#24050#23457#25209
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1146
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 400
|
||||
Width = 1146
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1146
|
||||
Height = 169
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 183
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24133#23485'(CM)'
|
||||
DataBinding.FieldName = 'YSFuKuan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32455#36896#26041#27861
|
||||
DataBinding.FieldName = 'YSZhiZaoType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#38024#32455
|
||||
#32463#32534)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#29260
|
||||
DataBinding.FieldName = 'YSPinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #29983#20135#21378#21830
|
||||
DataBinding.FieldName = 'YSShengChanShang'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = 'HS NO'
|
||||
DataBinding.FieldName = 'C2HSNO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 132
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'MTR'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215'(USD)'
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#21333#20301
|
||||
DataBinding.FieldName = 'E1BZUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'BALES'
|
||||
'ROLLS')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21787#22836
|
||||
DataBinding.FieldName = 'E5MaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 952
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 768
|
||||
Top = 168
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 472
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 912
|
||||
Top = 472
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 944
|
||||
Top = 472
|
||||
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 = 200
|
||||
Top = 208
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 208
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 256
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 288
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 208
|
||||
end
|
||||
end
|
684
报关管理(BaoGuan.dll)/U_BaoGuanListHT.pas
Normal file
684
报关管理(BaoGuan.dll)/U_BaoGuanListHT.pas
Normal file
|
@ -0,0 +1,684 @@
|
|||
unit U_BaoGuanListHT;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxSplitter;
|
||||
|
||||
type
|
||||
TfrmBaoGuanListHT = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Label6: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label8: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton7: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure A6PONOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure A5ConNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
procedure ToolButton10Click(Sender: TObject);
|
||||
procedure ToolButton11Click(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1:string;
|
||||
canshu2:string;
|
||||
FDate:TDateTime;
|
||||
procedure InitGrid();
|
||||
function DelData():Boolean;
|
||||
procedure InitSubGrid();
|
||||
procedure InitGridSql(var fsj:String);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanListHT: TfrmBaoGuanListHT;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_BaoGuanInPut;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanListHT.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanListHT:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where Valid=''Y'' ');
|
||||
{if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and Filler='''+Trim(DName)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and BGDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and BGDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关主表HT',Tv1,'报关管理');
|
||||
WriteCxGrid('报关明细HT',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关主表HT',Tv1,'报关管理');
|
||||
ReadCxGrid('报关明细HT',Tv1,'报关管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('报关资料列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.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 TfrmBaoGuanListHT.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,False);
|
||||
end;
|
||||
procedure TfrmBaoGuanListHT.InitSubGrid();
|
||||
begin
|
||||
if CDS_Main.IsEmpty=False then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BGID='''+Trim(CDS_Main.fieldbyname('BGID').AsString)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where 1=2');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanListHT.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Main.DisableControls;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set Valid=''N'',C7BGMoneyHZ=Null,E1BZQtyHZ=Null, E2ChiMaQtyHZ=Null,E3MaoZHZ=Null,E4JingZHZ=Null');
|
||||
sql.Add(',Editer='''+Trim(DName)+''',EditTime=getdate()');
|
||||
sql.Add(' where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListHT.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanListHT.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A4FPNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A4FPNO,'''') like '''+'%'+Trim(A4FPNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListHT.InitGridSql(var fsj:String);
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
{ if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and FillerCode='''+Trim(DCode)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
sql.Add(fsj);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.A6PONOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A6PONO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A6PONO,'''') like '''+'%'+Trim(A6PONO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.A5ConNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A5ConNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A5ConNO,'''') like '''+'%'+Trim(A5ConNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关资料.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关资料.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关合同.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关合同.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ToolButton9Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关发票.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ToolButton10Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关装箱单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ToolButton11Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
try
|
||||
frmBaoGuanInPut:=TfrmBaoGuanInPut.Create(Application);
|
||||
with frmBaoGuanInPut do
|
||||
begin
|
||||
FBCId:=Trim(CDS_Main.fieldbyname('BGID').AsString);
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
Panel1.Enabled:=False;
|
||||
Tv1.OptionsData.Editing:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBaoGuanInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListHT.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\申报要素.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\申报要素.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
985
报关管理(BaoGuan.dll)/U_BaoGuanListSBYS.dfm
Normal file
985
报关管理(BaoGuan.dll)/U_BaoGuanListSBYS.dfm
Normal file
|
@ -0,0 +1,985 @@
|
|||
object frmBaoGuanListSBYS: TfrmBaoGuanListSBYS
|
||||
Left = 110
|
||||
Top = 82
|
||||
Width = 1162
|
||||
Height = 615
|
||||
Caption = #25253#20851#21333#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 = 1146
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#36164#26009
|
||||
ImageIndex = 4
|
||||
Visible = False
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21512#21516
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#31080
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35013#31665#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton10Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
Caption = #30003#25253#35201#32032
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 635
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 698
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1146
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 639
|
||||
Top = 12
|
||||
Width = 42
|
||||
Height = 12
|
||||
Caption = #23458#25143'PO#'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 831
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A4FPNOKeyPress
|
||||
end
|
||||
object A6PONO: TEdit
|
||||
Tag = 2
|
||||
Left = 683
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 4
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A5ConNOKeyPress
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 868
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 91
|
||||
Width = 1146
|
||||
Height = 309
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31246#21495
|
||||
DataBinding.FieldName = 'A2ShuiHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #28023#20851#32534#30721
|
||||
DataBinding.FieldName = 'A3HaiGuanBM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23458#25143'PO#'
|
||||
DataBinding.FieldName = 'A6PONO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24320#33322#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36135#26588
|
||||
DataBinding.FieldName = 'B5HuoGui'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20986#36816#28207
|
||||
DataBinding.FieldName = 'B6ChuYunGang'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21040#36135#28207
|
||||
DataBinding.FieldName = 'B7DaoHuoGang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36152#26131#22269
|
||||
DataBinding.FieldName = 'B8MaoYiGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25269#36816#22269
|
||||
DataBinding.FieldName = 'B9DiYunGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #36816#36755#26041#24335
|
||||
DataBinding.FieldName = 'B10YunShuType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36152#26131#26041#24335
|
||||
DataBinding.FieldName = 'D2MaoYiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #32467#27719#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #25253#20851#26465#27454
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #36816#36153
|
||||
DataBinding.FieldName = 'F2YunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20445#36153
|
||||
DataBinding.FieldName = 'F3BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #36135#36816#20195#29702
|
||||
DataBinding.FieldName = 'F4HuoYunDaiLi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #33322#21517#33322#27425
|
||||
DataBinding.FieldName = 'B1HangBan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #25552#21333#21495
|
||||
DataBinding.FieldName = 'B2TiDanHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #31665#21495#23553#21495
|
||||
DataBinding.FieldName = 'B4XiangNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #33337#20844#21496
|
||||
DataBinding.FieldName = 'F5ChuanGongSi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoneyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1146
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24050#36865#23457
|
||||
#24050#23457#25209
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1146
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 400
|
||||
Width = 1146
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1146
|
||||
Height = 169
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 183
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24133#23485'(CM)'
|
||||
DataBinding.FieldName = 'YSFuKuan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32455#36896#26041#27861
|
||||
DataBinding.FieldName = 'YSZhiZaoType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#38024#32455
|
||||
#32463#32534)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#29260
|
||||
DataBinding.FieldName = 'YSPinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #29983#20135#21378#21830
|
||||
DataBinding.FieldName = 'YSShengChanShang'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = 'HS NO'
|
||||
DataBinding.FieldName = 'C2HSNO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 132
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'MTR'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215'(USD)'
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#21333#20301
|
||||
DataBinding.FieldName = 'E1BZUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'BALES'
|
||||
'ROLLS')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21787#22836
|
||||
DataBinding.FieldName = 'E5MaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 952
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 768
|
||||
Top = 168
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 472
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 912
|
||||
Top = 472
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 944
|
||||
Top = 472
|
||||
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 = 200
|
||||
Top = 208
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 208
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 256
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 288
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 208
|
||||
end
|
||||
end
|
684
报关管理(BaoGuan.dll)/U_BaoGuanListSBYS.pas
Normal file
684
报关管理(BaoGuan.dll)/U_BaoGuanListSBYS.pas
Normal file
|
@ -0,0 +1,684 @@
|
|||
unit U_BaoGuanListSBYS;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxSplitter;
|
||||
|
||||
type
|
||||
TfrmBaoGuanListSBYS = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Label6: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label8: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton7: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure A6PONOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure A5ConNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
procedure ToolButton10Click(Sender: TObject);
|
||||
procedure ToolButton11Click(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1:string;
|
||||
canshu2:string;
|
||||
FDate:TDateTime;
|
||||
procedure InitGrid();
|
||||
function DelData():Boolean;
|
||||
procedure InitSubGrid();
|
||||
procedure InitGridSql(var fsj:String);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanListSBYS: TfrmBaoGuanListSBYS;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_BaoGuanInPut;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanListSBYS:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where Valid=''Y'' ');
|
||||
{if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and Filler='''+Trim(DName)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and BGDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and BGDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关主表SBYS',Tv1,'报关管理');
|
||||
WriteCxGrid('报关明细SBYS',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关主表SBYS',Tv1,'报关管理');
|
||||
ReadCxGrid('报关明细SBYS',Tv1,'报关管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('报关资料列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.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 TfrmBaoGuanListSBYS.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,False);
|
||||
end;
|
||||
procedure TfrmBaoGuanListSBYS.InitSubGrid();
|
||||
begin
|
||||
if CDS_Main.IsEmpty=False then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BGID='''+Trim(CDS_Main.fieldbyname('BGID').AsString)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where 1=2');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanListSBYS.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Main.DisableControls;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set Valid=''N'',C7BGMoneyHZ=Null,E1BZQtyHZ=Null, E2ChiMaQtyHZ=Null,E3MaoZHZ=Null,E4JingZHZ=Null');
|
||||
sql.Add(',Editer='''+Trim(DName)+''',EditTime=getdate()');
|
||||
sql.Add(' where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListSBYS.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A4FPNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A4FPNO,'''') like '''+'%'+Trim(A4FPNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListSBYS.InitGridSql(var fsj:String);
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
{ if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and FillerCode='''+Trim(DCode)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
sql.Add(fsj);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.A6PONOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A6PONO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A6PONO,'''') like '''+'%'+Trim(A6PONO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.A5ConNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A5ConNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A5ConNO,'''') like '''+'%'+Trim(A5ConNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关资料.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关资料.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关合同.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关合同.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ToolButton9Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关发票.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ToolButton10Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关装箱单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ToolButton11Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
try
|
||||
frmBaoGuanInPut:=TfrmBaoGuanInPut.Create(Application);
|
||||
with frmBaoGuanInPut do
|
||||
begin
|
||||
FBCId:=Trim(CDS_Main.fieldbyname('BGID').AsString);
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
Panel1.Enabled:=False;
|
||||
Tv1.OptionsData.Editing:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBaoGuanInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListSBYS.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\申报要素.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\申报要素.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
985
报关管理(BaoGuan.dll)/U_BaoGuanListZXD.dfm
Normal file
985
报关管理(BaoGuan.dll)/U_BaoGuanListZXD.dfm
Normal file
|
@ -0,0 +1,985 @@
|
|||
object frmBaoGuanListZXD: TfrmBaoGuanListZXD
|
||||
Left = 110
|
||||
Top = 82
|
||||
Width = 1162
|
||||
Height = 615
|
||||
Caption = #25253#20851#35013#31665#21333#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 = 1146
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton12: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton12Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#36164#26009
|
||||
ImageIndex = 4
|
||||
Visible = False
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21512#21516
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21457#31080
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35013#31665#21333
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton10Click
|
||||
end
|
||||
object ToolButton11: TToolButton
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20851#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton11Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 552
|
||||
Top = 0
|
||||
Caption = #30003#25253#35201#32032
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 635
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 698
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1146
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 639
|
||||
Top = 12
|
||||
Width = 42
|
||||
Height = 12
|
||||
Caption = #23458#25143'PO#'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 831
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A4FPNOKeyPress
|
||||
end
|
||||
object A6PONO: TEdit
|
||||
Tag = 2
|
||||
Left = 683
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 4
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A5ConNOKeyPress
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 868
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = FactoryNameChange
|
||||
OnKeyPress = A6PONOKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 91
|
||||
Width = 1146
|
||||
Height = 309
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column27
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column28
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column30
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31246#21495
|
||||
DataBinding.FieldName = 'A2ShuiHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #28023#20851#32534#30721
|
||||
DataBinding.FieldName = 'A3HaiGuanBM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 93
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23458#25143'PO#'
|
||||
DataBinding.FieldName = 'A6PONO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21457#31080#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24320#33322#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #36135#26588
|
||||
DataBinding.FieldName = 'B5HuoGui'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20986#36816#28207
|
||||
DataBinding.FieldName = 'B6ChuYunGang'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21040#36135#28207
|
||||
DataBinding.FieldName = 'B7DaoHuoGang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 51
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36152#26131#22269
|
||||
DataBinding.FieldName = 'B8MaoYiGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25269#36816#22269
|
||||
DataBinding.FieldName = 'B9DiYunGuo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #36816#36755#26041#24335
|
||||
DataBinding.FieldName = 'B10YunShuType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36152#26131#26041#24335
|
||||
DataBinding.FieldName = 'D2MaoYiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #32467#27719#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #25253#20851#26465#27454
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #36816#36153
|
||||
DataBinding.FieldName = 'F2YunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20445#36153
|
||||
DataBinding.FieldName = 'F3BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #36135#36816#20195#29702
|
||||
DataBinding.FieldName = 'F4HuoYunDaiLi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #33322#21517#33322#27425
|
||||
DataBinding.FieldName = 'B1HangBan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #25552#21333#21495
|
||||
DataBinding.FieldName = 'B2TiDanHao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #31665#21495#23553#21495
|
||||
DataBinding.FieldName = 'B4XiangNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #33337#20844#21496
|
||||
DataBinding.FieldName = 'F5ChuanGongSi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoneyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1146
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24050#36865#23457
|
||||
#24050#23457#25209
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1146
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 400
|
||||
Width = 1146
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 408
|
||||
Width = 1146
|
||||
Height = 169
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 183
|
||||
end
|
||||
object cxGridDBColumn14: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cxGridDBColumn15: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #24133#23485'(CM)'
|
||||
DataBinding.FieldName = 'YSFuKuan'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn13: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32455#36896#26041#27861
|
||||
DataBinding.FieldName = 'YSZhiZaoType'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#38024#32455
|
||||
#32463#32534)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn16: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21697#29260
|
||||
DataBinding.FieldName = 'YSPinPai'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cxGridDBColumn17: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #29983#20135#21378#21830
|
||||
DataBinding.FieldName = 'YSShengChanShang'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = 'HS NO'
|
||||
DataBinding.FieldName = 'C2HSNO'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 132
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'MTR'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 43
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21333#20215'(USD)'
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #37329#39069'(USD)'
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#25968#37327
|
||||
DataBinding.FieldName = 'E1BZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21253#35013#21333#20301
|
||||
DataBinding.FieldName = 'E1BZUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'BALES'
|
||||
'ROLLS')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #23610#30721'(CBM)'
|
||||
DataBinding.FieldName = 'E2ChiMaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #27611#37325'(KG)'
|
||||
DataBinding.FieldName = 'E3MaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #20928#37325'(KG)'
|
||||
DataBinding.FieldName = 'E4JingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21787#22836
|
||||
DataBinding.FieldName = 'E5MaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 952
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 768
|
||||
Top = 168
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 816
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 472
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 912
|
||||
Top = 472
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 944
|
||||
Top = 472
|
||||
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 = 200
|
||||
Top = 208
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 320
|
||||
Top = 208
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 256
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 288
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 208
|
||||
end
|
||||
end
|
692
报关管理(BaoGuan.dll)/U_BaoGuanListZXD.pas
Normal file
692
报关管理(BaoGuan.dll)/U_BaoGuanListZXD.pas
Normal file
|
@ -0,0 +1,692 @@
|
|||
unit U_BaoGuanListZXD;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxSplitter;
|
||||
|
||||
type
|
||||
TfrmBaoGuanListZXD = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Label6: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
A6PONO: TEdit;
|
||||
Label8: TLabel;
|
||||
A5ConNO: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
A1ChuKouShang: TEdit;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ToolButton7: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton11: TToolButton;
|
||||
ToolButton12: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure FactoryNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure A6PONOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure A5ConNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
procedure ToolButton10Click(Sender: TObject);
|
||||
procedure ToolButton11Click(Sender: TObject);
|
||||
procedure ToolButton12Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
canshu1:string;
|
||||
canshu2:string;
|
||||
FDate:TDateTime;
|
||||
procedure InitGrid();
|
||||
function DelData():Boolean;
|
||||
procedure InitSubGrid();
|
||||
procedure InitGridSql(var fsj:String);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanListZXD: TfrmBaoGuanListZXD;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp,U_BaoGuanInPut;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanListZXD.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanListZXD:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where Valid=''Y'' ');
|
||||
{if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and Filler='''+Trim(DName)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
sql.Add(' and BGDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and BGDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('报关主表ZXD',Tv1,'报关管理');
|
||||
WriteCxGrid('报关明细ZXD',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('报关主表ZXD',Tv1,'报关管理');
|
||||
ReadCxGrid('报关明细ZXD',Tv1,'报关管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('报关资料列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.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 TfrmBaoGuanListZXD.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main,False);
|
||||
end;
|
||||
procedure TfrmBaoGuanListZXD.InitSubGrid();
|
||||
begin
|
||||
if CDS_Main.IsEmpty=False then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where BGID='''+Trim(CDS_Main.fieldbyname('BGID').AsString)+'''');
|
||||
sql.Add(' and SValid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BaoGuan_Sub where 1=2');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
function TfrmBaoGuanListZXD.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
CDS_Main.DisableControls;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while CDS_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Main Set Valid=''N'',C7BGMoneyHZ=Null,E1BZQtyHZ=Null, E2ChiMaQtyHZ=Null,E3MaoZHZ=Null,E4JingZHZ=Null');
|
||||
sql.Add(',Editer='''+Trim(DName)+''',EditTime=getdate()');
|
||||
sql.Add(' where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
sql.Add('UPdate JYOrder_BaoGuan_Sub Set SValid=''N'',SEditer='''+Trim(DName)+''',SEditTime=getdate() where BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListZXD.FactoryNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanListZXD.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.A4FPNOKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A4FPNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A4FPNO,'''') like '''+'%'+Trim(A4FPNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBaoGuanListZXD.InitGridSql(var fsj:String);
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
{ if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
SQL.Add(' and FillerCode='''+Trim(DCode)+'''');
|
||||
end;}
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')='''' ');
|
||||
end else
|
||||
begin
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(SChker,'''')<>'''' and isnull(Chker,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(Chker,'''')<>'''' ');
|
||||
end;
|
||||
end;
|
||||
sql.Add(fsj);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.A6PONOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A6PONO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A6PONO,'''') like '''+'%'+Trim(A6PONO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.A5ConNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var
|
||||
fsj:String;
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(A5ConNO.Text)='' then Exit;
|
||||
fsj:=' and isnull(A.A5ConNO,'''') like '''+'%'+Trim(A5ConNO.Text)+'%'+'''';
|
||||
InitGridSql(fsj);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关资料.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关资料.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ToolButton8Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关合同.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关合同.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ToolButton9Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关发票.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关发票.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ToolButton10Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
//fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单.rmf';
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴宇玎纺织有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单YD.rmf';
|
||||
end else
|
||||
if Trim(CDS_Main.fieldbyname('A1ChuKouShang').AsString)='绍兴锦凤进出口有限公司' then
|
||||
begin
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关装箱单JF.rmf';
|
||||
end;
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else ZheSuanMiQty end as C4BGQtyJS ');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关装箱单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ToolButton11Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关单.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ToolButton12Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
try
|
||||
frmBaoGuanInPut:=TfrmBaoGuanInPut.Create(Application);
|
||||
with frmBaoGuanInPut do
|
||||
begin
|
||||
FBCId:=Trim(CDS_Main.fieldbyname('BGID').AsString);
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
Panel1.Enabled:=False;
|
||||
Tv1.OptionsData.Editing:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBaoGuanInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanListZXD.ToolButton3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney,BZZH:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\申报要素.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,Case when C5BGUnit=''MTR'' then C4BGQty else Null end as C4BGQtyJS ');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then E4JingZ else Null End As E4JingZJS');
|
||||
sql.Add(',Case when C5BGUnit<>''KG'' then ''KGS'' else Null End As JZUnit');
|
||||
sql.Add(',Case when C5BGUnit=''KG'' then ''KGS'' else C5BGUnit End As C5BGUnitJS');
|
||||
sql.add(' ,A1ChuKouShangEng=(select Note from KH_Zdy where Type=''A1ChuKouShang'' and ZdyName=A.A1ChuKouShang )');
|
||||
sql.add(' ,B6ChuYunGangEng=(select Note from KH_Zdy where Type=''B6ChuYunGang'' and ZdyName=A.B6ChuYunGang )');
|
||||
sql.Add(',HTDate=(select ORDDate from JYOrderCon_Main F where F.ConNo=A.A5ConNO)');
|
||||
sql.Add(',KHNameEng=(select KHNameEng from ZH_KH_Info KH where KH.KHNameJC=');
|
||||
sql.Add(' (select CustomerNoName from JYOrderCon_Main F where F.ConNo=A.A5ConNO ))');
|
||||
sql.Add(' from JYOrder_BaoGuan_Main A inner join JYOrder_BaoGuan_Sub B on A.BGId=B.BGId ');
|
||||
sql.Add(' where A.BGId='''+Trim(CDS_Main.fieldbyname('BGId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\申报要素.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
519
报关管理(BaoGuan.dll)/U_BaoGuanXSList.dfm
Normal file
519
报关管理(BaoGuan.dll)/U_BaoGuanXSList.dfm
Normal file
|
@ -0,0 +1,519 @@
|
|||
object frmBaoGuanXSList: TfrmBaoGuanXSList
|
||||
Left = 117
|
||||
Top = 78
|
||||
Width = 1238
|
||||
Height = 618
|
||||
Caption = #38144#21806#26376#25253#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 = 1222
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 101
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBRKCX: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = TBRKCXClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
Caption = 'ToolButton1'
|
||||
ImageIndex = 22
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 353
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1222
|
||||
Height = 40
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 279
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21457#31080#21495
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 455
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #35746#21333#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 647
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #20986#21475#21830
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object A4FPNO: TEdit
|
||||
Tag = 2
|
||||
Left = 315
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object A5ConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 3
|
||||
end
|
||||
object A1ChuKouShang: TEdit
|
||||
Tag = 2
|
||||
Left = 684
|
||||
Top = 8
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 115
|
||||
Width = 1222
|
||||
Height = 465
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column9
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #21457#31080#21495
|
||||
DataBinding.FieldName = 'A4FPNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.CellMerging = True
|
||||
Options.Sorting = False
|
||||
Width = 100
|
||||
OnCompareRowValuesForCellMerging = v2Column1CompareRowValuesForCellMerging
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #20986#21475#21830
|
||||
DataBinding.FieldName = 'A1ChuKouShang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 134
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'A5ConNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.CellMerging = True
|
||||
Options.Sorting = False
|
||||
Width = 126
|
||||
OnCompareRowValuesForCellMerging = v2Column1CompareRowValuesForCellMerging
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C3BGName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 166
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #25104#20221#21547#37327
|
||||
DataBinding.FieldName = 'YSChenFen'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 149
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #20986#36135#26085#26399
|
||||
DataBinding.FieldName = 'A7FPDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.CellMerging = True
|
||||
Options.Sorting = False
|
||||
Width = 74
|
||||
OnCompareRowValuesForCellMerging = v2Column1CompareRowValuesForCellMerging
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20986#21475#26085#26399
|
||||
DataBinding.FieldName = 'B3KaiHangDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.CellMerging = True
|
||||
Options.Sorting = False
|
||||
Width = 67
|
||||
OnCompareRowValuesForCellMerging = v2Column1CompareRowValuesForCellMerging
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #25104#20132#26041#24335
|
||||
DataBinding.FieldName = 'F1BaoGuanTK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.CellMerging = True
|
||||
Options.Sorting = False
|
||||
Width = 65
|
||||
OnCompareRowValuesForCellMerging = v2Column1CompareRowValuesForCellMerging
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20184#27454#26041#24335
|
||||
DataBinding.FieldName = 'D3JiHuiType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.CellMerging = True
|
||||
Options.Sorting = False
|
||||
Width = 62
|
||||
OnCompareRowValuesForCellMerging = v2Column1CompareRowValuesForCellMerging
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #25253#20851#25968#37327
|
||||
DataBinding.FieldName = 'C4BGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C5BGUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 50
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #25253#20851#21333#20215
|
||||
DataBinding.FieldName = 'C6BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #25253#20851#37329#39069
|
||||
DataBinding.FieldName = 'C7BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #36741#21161#25968#37327
|
||||
DataBinding.FieldName = 'FZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 64
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #36741#21161#21333#20301
|
||||
DataBinding.FieldName = 'FZQtyUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #21046#21333#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #29366#24577
|
||||
DataBinding.FieldName = 'Status'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 416
|
||||
Top = 192
|
||||
Width = 217
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 94
|
||||
Width = 1222
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Style = 8
|
||||
TabOrder = 4
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 21
|
||||
ClientRectRight = 1222
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxTabControl3: TcxTabControl
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 1222
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 3
|
||||
TabOrder = 5
|
||||
Tabs.Strings = (
|
||||
#24453#36865#23457
|
||||
#24453#26680#23545
|
||||
#24453#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1222
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1000
|
||||
Top = 32
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 960
|
||||
Top = 32
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1040
|
||||
Top = 32
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 152
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 952
|
||||
Top = 152
|
||||
end
|
||||
object RM1: 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
|
||||
Dataset = RMDBMain
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 360
|
||||
Top = 232
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 424
|
||||
Top = 232
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 392
|
||||
Top = 232
|
||||
end
|
||||
object RMDBHZ: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_HZ
|
||||
Left = 520
|
||||
Top = 232
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 488
|
||||
Top = 232
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 456
|
||||
Top = 232
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 328
|
||||
Top = 232
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
end
|
||||
end
|
||||
end
|
328
报关管理(BaoGuan.dll)/U_BaoGuanXSList.pas
Normal file
328
报关管理(BaoGuan.dll)/U_BaoGuanXSList.pas
Normal file
|
@ -0,0 +1,328 @@
|
|||
unit U_BaoGuanXSList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
||||
cxCalendar, cxPC;
|
||||
|
||||
type
|
||||
TfrmBaoGuanXSList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
RM1: TRMGridReport;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDBHZ: TRMDBDataSet;
|
||||
CDS_HZ: TClientDataSet;
|
||||
CDS_PRT: TClientDataSet;
|
||||
TBRKCX: TToolButton;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
Label6: TLabel;
|
||||
Label8: TLabel;
|
||||
Label3: TLabel;
|
||||
A4FPNO: TEdit;
|
||||
A5ConNO: TEdit;
|
||||
A1ChuKouShang: TEdit;
|
||||
cxTabControl3: TcxTabControl;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure v2Column1CompareRowValuesForCellMerging(
|
||||
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
|
||||
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
|
||||
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
|
||||
const AValue2: Variant; var AAreEqual: Boolean);
|
||||
procedure TBRKCXClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure GetColor(color:TColor);
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBaoGuanXSList: TfrmBaoGuanXSList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBaoGuanXSList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBaoGuanXSList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=SGetServerDateMBeg(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.InitGrid();
|
||||
var
|
||||
fsj:string;
|
||||
begin
|
||||
Panel2.Visible:=True;
|
||||
Panel2.Refresh;
|
||||
fsj:=' and A7FPDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+''''
|
||||
+' and A7FPDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''';
|
||||
if cxTabControl1.Tabs[cxTabControl1.TabIndex].Caption<>'全部' then
|
||||
begin
|
||||
fsj:=fsj+' and A1ChuKouShang like '''+'%'+Trim(cxTabControl1.Tabs[cxTabControl1.TabIndex].Caption)+'%'+''''
|
||||
end;
|
||||
if cxTabControl3.TabIndex=0 then
|
||||
begin
|
||||
fsj:=fsj+'and isnull(SChker,'''')=''''';
|
||||
end else
|
||||
if cxTabControl3.TabIndex=1 then
|
||||
begin
|
||||
fsj:=fsj+' and isnull(OKPerson,'''')='''' and isnull(SChker,'''')<>'''' ';
|
||||
end else
|
||||
if cxTabControl3.TabIndex=2 then
|
||||
begin
|
||||
fsj:=fsj+' and isnull(Chker,'''')='''' and isnull(OKPerson,'''')<>'''' ';
|
||||
end else
|
||||
if cxTabControl3.TabIndex=3 then
|
||||
begin
|
||||
fsj:=fsj+' and isnull(Chker,'''')<>'''' ';
|
||||
end;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_View_BaoGuanData_XS :WSql');
|
||||
Parameters.ParamByName('WSql').Value:=fsj;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
Panel2.Visible:=False;
|
||||
end;
|
||||
Panel2.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('财务报关销售报表',Tv1,'财务管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('财务报关销售报表',Tv1,'财务管理');
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_Zdy where Type=''A1ChuKouShang'' ');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
cxTabControl1.Tabs.Add(ADOQueryTemp.fieldbyname('ZdyName').asstring);
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
cxTabControl1.Tabs.Add('全部');
|
||||
//InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('财务报关销售报表',cxGrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.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 TfrmBaoGuanXSList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.v2Column1CompareRowValuesForCellMerging(
|
||||
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
|
||||
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
|
||||
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
|
||||
const AValue2: Variant; var AAreEqual: Boolean);
|
||||
|
||||
var
|
||||
colIdx0:integer;
|
||||
begin
|
||||
colIdx0:= tv1.GetColumnByFieldName('A4FPNO').Index;
|
||||
if ARow1.Values[colIdx0] = ARow2.Values[colIdx0] then
|
||||
AAreEqual := True
|
||||
else
|
||||
AAreEqual := False;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmBaoGuanXSList.TBRKCXClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile,fsj:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
//if cxTabControl3.TabIndex<>3 then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报关销售资料.rmf';
|
||||
fsj:=' and SubString(convert(varchar(10),A7FPDate,120),1,7)='''+Copy(Trim(CDS_Main.fieldbyname('A7FPDate').AsString),1,7)+'''';
|
||||
if cxTabControl1.Tabs[cxTabControl1.TabIndex].Caption<>'全部' then
|
||||
begin
|
||||
fsj:=fsj+' and A1ChuKouShang like '''+'%'+Trim(cxTabControl1.Tabs[cxTabControl1.TabIndex].Caption)+'%'+'''';
|
||||
//+' and isnull(Chker,'''')<>'''' ';
|
||||
end else
|
||||
begin
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_View_BaoGuanData_XS :WSql');
|
||||
Parameters.ParamByName('WSql').Value:=fsj;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||
RMXLSExport1:= TRMXLSExport.Create(RMXLSExport1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
RMVariables['TaiTou']:=cxTabControl1.Tabs[cxTabControl1.TabIndex].Caption;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\报关销售资料.rmf'),'提示',0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBaoGuanXSList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
GetColor(clRed);
|
||||
end;
|
||||
|
||||
procedure TfrmBaoGuanXSList.GetColor(color:TColor);
|
||||
var
|
||||
R,G,B:Integer;
|
||||
color10:TColor;
|
||||
begin
|
||||
R:=0;
|
||||
G:=0;
|
||||
B:=0;
|
||||
for R:=0 to 255 do
|
||||
begin
|
||||
for G:=0 to 255 do
|
||||
begin
|
||||
for B:=0 to 255 do
|
||||
begin
|
||||
//HZ:=i+j+k;
|
||||
color10:=(R shr 3)shl 11+(G shr 2)shl 5+B shr 3;
|
||||
if color10=color then
|
||||
begin
|
||||
Application.MessageBox(PChar('R='+IntToStr(R)+',G='+IntToStr(G)+',B='+IntToStr(B)),'提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
17985
报关管理(BaoGuan.dll)/U_DataLink.dfm
Normal file
17985
报关管理(BaoGuan.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
85
报关管理(BaoGuan.dll)/U_DataLink.pas
Normal file
85
报关管理(BaoGuan.dll)/U_DataLink.pas
Normal file
|
@ -0,0 +1,85 @@
|
|||
unit U_DataLink;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, dxSkinsCore,
|
||||
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
||||
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
||||
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
|
||||
var
|
||||
DConString:String; {全局连接字符串}
|
||||
server, dtbase, user, pswd: String; {数据库连接参数}
|
||||
DCurHandle:hwnd; //当前窗体句柄
|
||||
DName:string ; //#用户名#//
|
||||
DCode:string ; //#用户编号#//
|
||||
PicSvr: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_DDMD = class(TDataModule)
|
||||
AdoDataLink: TADOQuery;
|
||||
ADOLink: TADOConnection;
|
||||
ThreeImgList: TImageList;
|
||||
ThreeLookAndFeelCol: TcxLookAndFeelController;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
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_DDMD: TDataLink_DDMD;
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TDataLink_DDMD.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
DataLink_DDMD:=nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
||||
|
188
报关管理(BaoGuan.dll)/U_FileUp.dfm
Normal file
188
报关管理(BaoGuan.dll)/U_FileUp.dfm
Normal file
|
@ -0,0 +1,188 @@
|
|||
object frmFileUp: TfrmFileUp
|
||||
Left = 247
|
||||
Top = 162
|
||||
Width = 634
|
||||
Height = 447
|
||||
Caption = #19978#20256#25991#20214
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid7: TcxGrid
|
||||
Left = 0
|
||||
Top = 41
|
||||
Width = 555
|
||||
Height = 367
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV7: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object FileName: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 121
|
||||
end
|
||||
object FileDate: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #19978#20256#26085#26399
|
||||
DataBinding.FieldName = 'FileDate'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 104
|
||||
end
|
||||
end
|
||||
object cxGridLevel6: TcxGridLevel
|
||||
GridView = TV7
|
||||
end
|
||||
end
|
||||
object Panel16: TPanel
|
||||
Left = 190
|
||||
Top = 126
|
||||
Width = 138
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
Caption = #27491#22312#19978#20256#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ToolBar6: TToolBar
|
||||
Left = 555
|
||||
Top = 41
|
||||
Width = 63
|
||||
Height = 367
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object FileUp: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19978#20256
|
||||
ImageIndex = 109
|
||||
Wrap = True
|
||||
OnClick = FileUpClick
|
||||
end
|
||||
object FileDel: TToolButton
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 17
|
||||
Wrap = True
|
||||
OnClick = FileDelClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 618
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 14
|
||||
Width = 68
|
||||
Height = 16
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Image2: TImage
|
||||
Left = 537
|
||||
Top = 17
|
||||
Width = 23
|
||||
Height = 16
|
||||
end
|
||||
object Code: TEdit
|
||||
Left = 78
|
||||
Top = 9
|
||||
Width = 211
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 404
|
||||
Top = 197
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 405
|
||||
Top = 236
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 409
|
||||
Top = 285
|
||||
end
|
||||
object ADOQueryFile: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 144
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryFile
|
||||
Left = 392
|
||||
Top = 168
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 216
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 264
|
||||
end
|
||||
end
|
357
报关管理(BaoGuan.dll)/U_FileUp.pas
Normal file
357
报关管理(BaoGuan.dll)/U_FileUp.pas
Normal file
|
@ -0,0 +1,357 @@
|
|||
unit U_FileUp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, IdBaseComponent,
|
||||
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB,jpeg,
|
||||
BtnEdit,IniFiles;
|
||||
|
||||
type
|
||||
TfrmFileUp = class(TForm)
|
||||
cxGrid7: TcxGrid;
|
||||
TV7: TcxGridDBTableView;
|
||||
FileName: TcxGridDBColumn;
|
||||
FileDate: TcxGridDBColumn;
|
||||
cxGridLevel6: TcxGridLevel;
|
||||
Panel16: TPanel;
|
||||
ToolBar6: TToolBar;
|
||||
FileUp: TToolButton;
|
||||
FileDel: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Code: TEdit;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
ADOQueryFile: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
Image2: TImage;
|
||||
procedure FileUpClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FileDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
lstPat: TStringList;
|
||||
AJpeg: TJPEGImage;
|
||||
procedure CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
procedure SaveImageOther();
|
||||
procedure ReadINIFile10();
|
||||
{ Private declarations }
|
||||
public
|
||||
CYID:String;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFileUp: TfrmFileUp;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFileUp.ReadINIFile10();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
FileName:string;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||
programIni.Free;
|
||||
end;
|
||||
procedure TfrmFileUp.FileUpClick(Sender: TObject);
|
||||
var
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo:string;
|
||||
AJpeg: TJPEGImage;
|
||||
begin
|
||||
if Trim(Code.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('编号不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
lstPat.Clear;
|
||||
if ODPat.Execute then
|
||||
begin
|
||||
lstPat.AddStrings(ODPat.Files);
|
||||
end;
|
||||
|
||||
if lstPat.Count > 0 then
|
||||
begin
|
||||
try
|
||||
ReadINIFile10();
|
||||
server:=ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Host :=server;//PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Panel16.Visible:=True;
|
||||
Panel16.Refresh;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select Count(*) MM from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add('and filetype=''YP''');
|
||||
Open;
|
||||
j:=fieldbyname('MM').AsInteger;
|
||||
end;
|
||||
Image2.Picture.LoadFromFile(ODPat.FileName);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
CreThumb(AJpeg,Image2,216, 187);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
for i := 0 to lstPat.Count - 1 do
|
||||
begin
|
||||
PatFile := ExtractFileName(lstPat[i]);
|
||||
PatFile:=Copy(PatFile,(Pos('.',PatFile)+1),(Length(PatFile)-Pos('.',PatFile)) ) ;
|
||||
FConNo:=Trim(Code.Text);
|
||||
while Pos('/',FConNo)>0 do
|
||||
begin
|
||||
Delete(FConNo,Pos('/',FConNo),1);
|
||||
end;
|
||||
PatFile:=Trim(FConNo)+'-'+Inttostr(j+i+1)+'.'+PatFile;
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
{if not DirectoryExists('D:\图片\'+Trim(gDef1)) then
|
||||
ForceDirectories('D:\图片\'+Trim(gDef1)); }
|
||||
IdFTP1.Put(lstPat[i], Trim('\YP')+'\'+Trim(PatFile));
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and filename='''+Trim(PatFile)+'''');
|
||||
SQL.Add(' and filetype=''YP''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Panel16.Visible:=False;
|
||||
Application.MessageBox(PChar('文件<'+Trim(PatFile)+'>重复,'+inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if GetLSNo(ADOQueryCmd,MaxNo,'YP','XD_File',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('XFID').Value:=Trim(MaxNo);
|
||||
FieldByName('CYID').Value:=Trim(CYID);
|
||||
FieldByName('CYNO').Value:=Trim(Code.Text);
|
||||
FieldByName('filename').Value:=Trim(PatFile);
|
||||
FieldByName('FileDate').Value:=SGetServerDate(ADOQueryTemp);
|
||||
fieldbyname('FileType').value:=Trim('YP');
|
||||
Post;
|
||||
end;
|
||||
except
|
||||
//ADOQueryCmd.Connection.RollbackTrans;
|
||||
//Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=1 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
SaveImageOther();
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
open;
|
||||
end;
|
||||
Panel16.Visible:=False;
|
||||
if i>0 then
|
||||
Application.MessageBox(PChar(inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
procedure TfrmFileUp.CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
Ratio: Double;
|
||||
ARect: TRect;
|
||||
AHeight, AHeightOffset: Integer;
|
||||
AWidth, AWidthOffset: Integer;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Ratio := AJPeg.Width /AJPeg.Height;
|
||||
if Ratio > 1.333 then
|
||||
begin
|
||||
AHeight := Round(Width / Ratio);
|
||||
AHeightOffset := (Height - AHeight) div 2;
|
||||
AWidth := Width;
|
||||
AWidthOffset := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
AWidth := Round(Height * Ratio);
|
||||
AWidthOffset := (Width - AWidth) div 2;
|
||||
AHeight := Height;
|
||||
AHeightOffset := 0;
|
||||
end;
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||
Bitmap.Canvas.StretchDraw(ARect, AJPeg);
|
||||
Image1.Picture.Assign(BitMap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmFileUp.SaveImageOther();
|
||||
var
|
||||
AJpeg: TJPEGImage;
|
||||
myStream: TADOBlobStream;
|
||||
ImgMaxNo:String;
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo,FTFID:string;
|
||||
begin
|
||||
if Image2.Picture=nil then Exit;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID='''+Trim(CYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
FTFID:=Trim(ADOQueryTemp.fieldbyname('TFID').AsString);
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,ImgMaxNo,'TF','TP_File',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片表最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
ImgMaxNo:=Trim(FTFID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add( ' select * from TP_File where TFID='''+Trim(FTFID)+'''');
|
||||
open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('TFID').Value:=Trim(ImgMaxNo);
|
||||
FieldByName('WBID').Value:=Trim(CYID);
|
||||
//FieldByName('TFIdx').Value:=cxTabControl2.TabIndex;
|
||||
FieldByName('TFType').Value:='样品';
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
//CreThumb(AJpeg,Image1,160, 120);
|
||||
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
AJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
lstPat := TStringList.Create;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FileDelClick(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add(' Delete XD_File where XFID='''+Trim(ADOQueryFile.fieldbyname('XFID').AsString)+'''');
|
||||
SQL.Add(' Delete TP_File where WBID='''+Trim(CYID)+''' and TFType=''样品'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryFile.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=0 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
172
报关管理(BaoGuan.dll)/U_FjList.dfm
Normal file
172
报关管理(BaoGuan.dll)/U_FjList.dfm
Normal file
|
@ -0,0 +1,172 @@
|
|||
object frmFjList: TfrmFjList
|
||||
Left = 154
|
||||
Top = 62
|
||||
Width = 1049
|
||||
Height = 540
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = #38468#20214#20449#24687
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ListView1: TListView
|
||||
Left = 36
|
||||
Top = 88
|
||||
Width = 141
|
||||
Height = 137
|
||||
Columns = <>
|
||||
TabOrder = 0
|
||||
OnDblClick = ListView1DblClick
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 882
|
||||
Top = 0
|
||||
Width = 151
|
||||
Height = 501
|
||||
Align = alRight
|
||||
TabOrder = 1
|
||||
object FileName: TcxButton
|
||||
Left = 30
|
||||
Top = 60
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #28155#21152
|
||||
TabOrder = 0
|
||||
OnClick = FileNameClick
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton1: TcxButton
|
||||
Left = 30
|
||||
Top = 96
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #21024#38500
|
||||
TabOrder = 1
|
||||
OnClick = cxButton1Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton2: TcxButton
|
||||
Left = 30
|
||||
Top = 132
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #20445#23384
|
||||
TabOrder = 2
|
||||
OnClick = cxButton2Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton3: TcxButton
|
||||
Left = 30
|
||||
Top = 172
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #20851#38381
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
OnClick = cxButton3Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton4: TcxButton
|
||||
Left = 30
|
||||
Top = 220
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #28155#21152#25991#20214#22841
|
||||
TabOrder = 4
|
||||
OnClick = cxButton4Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 24
|
||||
Top = 124
|
||||
Width = 193
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel2'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
OnDblClick = Panel2DblClick
|
||||
end
|
||||
object ShellListView1: TShellListView
|
||||
Left = 177
|
||||
Top = 0
|
||||
Width = 705
|
||||
Height = 501
|
||||
ObjectTypes = [otFolders, otNonFolders]
|
||||
Root = 'rfDesktop'
|
||||
ShellTreeView = ShellTreeView1
|
||||
Sorted = True
|
||||
Align = alClient
|
||||
ReadOnly = False
|
||||
TabOrder = 3
|
||||
end
|
||||
object ShellTreeView1: TShellTreeView
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 177
|
||||
Height = 501
|
||||
ObjectTypes = [otFolders]
|
||||
Root = 'rfDesktop'
|
||||
ShellListView = ShellListView1
|
||||
UseShellImages = True
|
||||
Align = alLeft
|
||||
AutoRefresh = False
|
||||
Indent = 19
|
||||
ParentColor = False
|
||||
RightClickSelect = True
|
||||
ShowRoot = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 512
|
||||
Top = 28
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 560
|
||||
Top = 24
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 520
|
||||
Top = 212
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 340
|
||||
Top = 190
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 484
|
||||
Top = 240
|
||||
end
|
||||
end
|
436
报关管理(BaoGuan.dll)/U_FjList.pas
Normal file
436
报关管理(BaoGuan.dll)/U_FjList.pas
Normal file
|
@ -0,0 +1,436 @@
|
|||
unit U_FjList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, ComCtrls, Menus, cxLookAndFeelPainters, StdCtrls,
|
||||
cxButtons, DB, ADODB, ImgList,shellapi, IdBaseComponent, IdComponent,
|
||||
IdTCPConnection, IdTCPClient, IdFTP, ShlObj, cxShellCommon, cxControls,
|
||||
cxContainer, cxShellTreeView, cxShellListView, ShellCtrls;
|
||||
|
||||
type
|
||||
TfrmFjList = class(TForm)
|
||||
ListView1: TListView;
|
||||
Panel1: TPanel;
|
||||
FileName: TcxButton;
|
||||
cxButton1: TcxButton;
|
||||
cxButton2: TcxButton;
|
||||
cxButton3: TcxButton;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ImageList1: TImageList;
|
||||
Panel2: TPanel;
|
||||
IdFTP1: TIdFTP;
|
||||
ADOConnection1: TADOConnection;
|
||||
cxButton4: TcxButton;
|
||||
ShellListView1: TShellListView;
|
||||
ShellTreeView1: TShellTreeView;
|
||||
procedure cxButton3Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FileNameClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ListView1DblClick(Sender: TObject);
|
||||
procedure cxButton1Click(Sender: TObject);
|
||||
procedure cxButton2Click(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure Panel2DblClick(Sender: TObject);
|
||||
procedure cxButton4Click(Sender: TObject);
|
||||
private
|
||||
procedure InitData();
|
||||
{ Private declarations }
|
||||
public
|
||||
fkeyNO:string;
|
||||
fType:string;
|
||||
fId:integer;
|
||||
|
||||
fstatus:integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFjList: TfrmFjList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
{$R *.dfm}
|
||||
procedure TfrmFjList.InitData();
|
||||
var
|
||||
ListItem: TListItem;
|
||||
Flag: Cardinal;
|
||||
info: SHFILEINFOA;
|
||||
Icon: TIcon;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
try
|
||||
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select fileName from TP_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
while not eof do
|
||||
begin
|
||||
with ListView1 do
|
||||
begin
|
||||
LargeImages := ImageList1;
|
||||
Icon := TIcon.Create;
|
||||
ListItem := Items.Add;
|
||||
Listitem.Caption := trim(fieldbyname('fileName').AsString);
|
||||
// Listitem.SubItems.Add(OpenDiaLog.FileName);
|
||||
Flag := (SHGFI_SMALLICON or SHGFI_ICON or SHGFI_USEFILEATTRIBUTES);
|
||||
SHGetFileInfo(Pchar(trim(fieldbyname('fileName').AsString)), 0, info, Sizeof(info), Flag);
|
||||
Icon.Handle := info.hIcon;
|
||||
ImageList1.AddIcon(Icon);
|
||||
ListItem.ImageIndex := ImageList1.Count - 1;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.cxButton3Click(Sender: TObject);
|
||||
begin
|
||||
ADOQueryTmp.Close;
|
||||
ADOQuerycmd.Close;
|
||||
ListView1.Items.Free;
|
||||
ModalResult:=-1;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmFjList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FileNameClick(Sender: TObject);
|
||||
var
|
||||
OpenDiaLog: TOpenDialog;
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
maxNo:string;
|
||||
// myStream: TADOBlobStream;
|
||||
// FJStream : TMemoryStream;
|
||||
begin
|
||||
|
||||
try
|
||||
OpenDiaLog := TOpenDialog.Create(Self);
|
||||
if OpenDiaLog.Execute then
|
||||
begin
|
||||
fFilePath:=OpenDiaLog.FileName;
|
||||
fFileName:=ExtractFileName(OpenDiaLog.FileName);
|
||||
|
||||
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select TFId from TP_File ');
|
||||
sql.Add('where WBID<>'+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
IF not adoqueryCmd.IsEmpty then
|
||||
begin
|
||||
application.MessageBox('此附件名称已存在,请修改文件名,继续上传!','提示信息',MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel2.Caption:='正在上传数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
|
||||
if GetLSNo(ADOQueryCmd,maxNo,'FJ','TP_File',4,1)=False then
|
||||
begin
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
adoqueryCmd.Connection.BeginTrans;
|
||||
|
||||
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from TP_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
|
||||
try
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
append;
|
||||
fieldbyname('TFID').Value:=trim(maxNO);
|
||||
fieldbyname('WBID').Value:=trim(fkeyNO);
|
||||
fieldbyname('TFType').Value:=trim(fType);
|
||||
fieldbyname('FileName').Value:=trim(fFileName);
|
||||
// tblobfield(FieldByName('Filesother')).LoadFromFile(fFilePath);
|
||||
post;
|
||||
end;
|
||||
|
||||
if fFilePath <> '' then
|
||||
begin
|
||||
try
|
||||
IdFTP1.Host :='127.0.0.1';
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
IdFTP1.Put(fFilePath, 'FJ\' + Trim(fFileName));
|
||||
IdFTP1.Quit;
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('上传客户图样文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||
end;
|
||||
end;
|
||||
IdFTP1.Quit;
|
||||
|
||||
Panel2.Visible:=false;
|
||||
initdata();
|
||||
finally
|
||||
// FJStream.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
adoqueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('附件保存失败!','提示信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='';
|
||||
Connected:=true;
|
||||
end;
|
||||
ListView1.Align:=alclient;
|
||||
fstatus:=0;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormShow(Sender: TObject);
|
||||
begin
|
||||
IF fstatus=0 then Panel1.Visible:=true
|
||||
else Panel1.Visible:=false;
|
||||
//initdata();
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.ListView1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName:string;
|
||||
fileName:string;
|
||||
begin
|
||||
if ListView1.Items.Count<1 THEN EXIT;
|
||||
|
||||
if listView1.SelCount<1 then exit;
|
||||
sFieldName:='D:\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName),nil);
|
||||
|
||||
fileName:=ListView1.Selected.Caption;
|
||||
|
||||
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host :='127.0.0.1';
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
|
||||
Panel2.Caption:='正在下载数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get('FJ\'+ Trim(fileName), sFieldName,false, true);
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible:=false;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.cxButton1Click(Sender: TObject);
|
||||
var
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
begin
|
||||
if listView1.SelCount<1 then exit;
|
||||
|
||||
try
|
||||
fFileName:=ListView1.Selected.Caption;
|
||||
// ADOQueryTmp.Locate('fileName',fFileName,[]);
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from TP_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
|
||||
initData();
|
||||
|
||||
except
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.cxButton2Click(Sender: TObject);
|
||||
var
|
||||
SaveDialog: TSaveDialog;
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
begin
|
||||
if listView1.SelCount<1 then exit;
|
||||
|
||||
try
|
||||
|
||||
fFileName:=ListView1.Selected.Caption;
|
||||
|
||||
SaveDialog := TSaveDialog.Create(Self);
|
||||
|
||||
SaveDialog.FileName:=fFileName;
|
||||
if SaveDialog.Execute then
|
||||
begin
|
||||
Panel2.Caption:='正在保存数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
fFilePath:=SaveDialog.FileName;
|
||||
try
|
||||
IdFTP1.Host := '127.0.0.1';
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
|
||||
Panel2.Caption:='正在下载数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get('FJ\'+ Trim(fFileName), fFilePath,false, true);
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible:=false;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
end;
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
if fId=10 then Action:=cafree
|
||||
else
|
||||
Action:=cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.Panel2DblClick(Sender: TObject);
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList.cxButton4Click(Sender: TObject);
|
||||
var
|
||||
fFilePath,FName:string;
|
||||
begin
|
||||
if Assigned(ShellListView1.Selected) then
|
||||
begin
|
||||
if ShellListView1.Selected.Selected then
|
||||
begin
|
||||
if ShellListView1.SelectedFolder.IsFolder then
|
||||
begin
|
||||
ShowMessage(ShellListView1.SelectedFolder.PathName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage(ShellListView1.SelectedFolder.PathName);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//if fFilePath <> '' then
|
||||
//fFilePath:=ShellListView1.SelectedFolder.PathName;
|
||||
// FName:=ShellListView1.SelectedFolder.DisplayName;
|
||||
begin
|
||||
try
|
||||
IdFTP1.Host :='127.0.0.1';
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
IdFTP1.Put(ShellListView1.SelectedFolder.PathName, 'FJ\' +ShellListView1.SelectedFolder.PathName);
|
||||
IdFTP1.Quit;
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('上传客户图样文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||
end;
|
||||
end;
|
||||
IdFTP1.Quit;
|
||||
end;
|
||||
|
||||
end.
|
183
报关管理(BaoGuan.dll)/U_FjList_BG.dfm
Normal file
183
报关管理(BaoGuan.dll)/U_FjList_BG.dfm
Normal file
|
@ -0,0 +1,183 @@
|
|||
object frmFjList_BG: TfrmFjList_BG
|
||||
Left = 192
|
||||
Top = 134
|
||||
Width = 796
|
||||
Height = 502
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = #38468#20214#20449#24687
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ListView1: TListView
|
||||
Left = 40
|
||||
Top = 20
|
||||
Width = 429
|
||||
Height = 77
|
||||
Columns = <>
|
||||
TabOrder = 0
|
||||
OnDblClick = ListView1DblClick
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 629
|
||||
Top = 0
|
||||
Width = 151
|
||||
Height = 463
|
||||
Align = alRight
|
||||
TabOrder = 1
|
||||
object FileName: TcxButton
|
||||
Left = 30
|
||||
Top = 60
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #28155#21152
|
||||
TabOrder = 0
|
||||
OnClick = FileNameClick
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton1: TcxButton
|
||||
Left = 30
|
||||
Top = 96
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #21024#38500
|
||||
TabOrder = 1
|
||||
OnClick = cxButton1Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton2: TcxButton
|
||||
Left = 30
|
||||
Top = 132
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #19979#36733
|
||||
TabOrder = 2
|
||||
OnClick = cxButton2Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton3: TcxButton
|
||||
Left = 30
|
||||
Top = 172
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #20851#38381
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
OnClick = cxButton3Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 176
|
||||
Top = 140
|
||||
Width = 193
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel2'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
OnDblClick = Panel2DblClick
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 4
|
||||
Top = 20
|
||||
Width = 621
|
||||
Height = 361
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 146
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #25991#20214#20462#25913#26102#38388
|
||||
DataBinding.FieldName = 'TFdate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25805#20316#21592
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #19978#20256#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 28
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 568
|
||||
Top = 32
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 536
|
||||
Top = 228
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 500
|
||||
Top = 198
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 532
|
||||
Top = 240
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTmp
|
||||
Left = 548
|
||||
Top = 140
|
||||
end
|
||||
end
|
404
报关管理(BaoGuan.dll)/U_FjList_BG.pas
Normal file
404
报关管理(BaoGuan.dll)/U_FjList_BG.pas
Normal file
|
@ -0,0 +1,404 @@
|
|||
unit U_FjList_BG;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, ComCtrls, Menus, cxLookAndFeelPainters, StdCtrls, cxButtons,
|
||||
DB, ADODB, ImgList, shellapi, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGridLevel, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, cxLookAndFeels, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||
dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||
dxSkinscxPCPainter, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmFjList_BG = class(TForm)
|
||||
ListView1: TListView;
|
||||
Panel1: TPanel;
|
||||
FileName: TcxButton;
|
||||
cxButton1: TcxButton;
|
||||
cxButton2: TcxButton;
|
||||
cxButton3: TcxButton;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ImageList1: TImageList;
|
||||
Panel2: TPanel;
|
||||
IdFTP1: TIdFTP;
|
||||
ADOConnection1: TADOConnection;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
DataSource1: TDataSource;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
procedure cxButton3Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FileNameClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ListView1DblClick(Sender: TObject);
|
||||
procedure cxButton1Click(Sender: TObject);
|
||||
procedure cxButton2Click(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure Panel2DblClick(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
procedure InitData();
|
||||
{ Private declarations }
|
||||
public
|
||||
fkeyNO: string;
|
||||
fType: string;
|
||||
fId: integer;
|
||||
fstatus: integer;
|
||||
// fmanage:string;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFjList_BG: TfrmFjList_BG;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun10, U_CompressionFun; //
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFjList_BG.InitData();
|
||||
var
|
||||
ListItem: TListItem;
|
||||
Flag: Cardinal;
|
||||
info: SHFILEINFOA;
|
||||
Icon: TIcon;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
try
|
||||
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File ');
|
||||
sql.Add('where WBID=' + quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType=' + quotedstr(trim(fType)));
|
||||
open;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.cxButton3Click(Sender: TObject);
|
||||
begin
|
||||
ADOQueryTmp.Close;
|
||||
ADOQuerycmd.Close;
|
||||
ListView1.Items.Free;
|
||||
ModalResult := -1;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmFjList_BG := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.FileNameClick(Sender: TObject);
|
||||
var
|
||||
OpenDiaLog: TOpenDialog;
|
||||
fFileName: string;
|
||||
fFilePath: string;
|
||||
maxNo: string;
|
||||
// myStream: TADOBlobStream;
|
||||
FJStream: TMemoryStream;
|
||||
mfileSize: integer;
|
||||
mCreationTime: TdateTime;
|
||||
mWriteTime: TdateTime;
|
||||
begin
|
||||
|
||||
try
|
||||
adoqueryCmd.Connection.BeginTrans;
|
||||
OpenDiaLog := TOpenDialog.Create(Self);
|
||||
if OpenDiaLog.Execute then
|
||||
begin
|
||||
fFilePath := OpenDiaLog.FileName;
|
||||
fFileName := ExtractFileName(OpenDiaLog.FileName);
|
||||
Panel2.Caption := '正在上传数据,请稍等...';
|
||||
Panel2.Visible := true;
|
||||
application.ProcessMessages;
|
||||
|
||||
if GetLSNo(ADOQueryCmd, maxNo, 'FJ', 'TP_File', 4, 1) = False then
|
||||
begin
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
//获取文件信息
|
||||
GetFileInfo(fFilePath, mfileSize, mCreationTime, mWriteTime);
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from TP_File ');
|
||||
sql.Add('where TFID=' + quotedstr(trim(maxNo)));
|
||||
execsql;
|
||||
end;
|
||||
try
|
||||
FJStream := TMemoryStream.Create;
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File ');
|
||||
sql.Add('where TFID=' + quotedstr(trim(maxNo)));
|
||||
// sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
append;
|
||||
fieldbyname('TFID').Value := trim(maxNo);
|
||||
// fieldbyname('WBID').Value:=trim(fkeyNO);
|
||||
fieldbyname('WBID').Value := trim(fFileName);
|
||||
fieldbyname('TFType').Value := trim(fType);
|
||||
fieldbyname('Filler').Value := trim(DName);
|
||||
fieldbyname('FileName').Value := trim(fFileName);
|
||||
fieldbyname('TFDate').Value := mWriteTime;
|
||||
FJStream.LoadFromFile(fFilePath);
|
||||
// CompressionStream(FJStream);
|
||||
tblobfield(FieldByName('Filesother')).LoadFromStream(FJStream);
|
||||
post;
|
||||
end;
|
||||
Panel2.Visible := false;
|
||||
initdata();
|
||||
finally
|
||||
FJStream.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
adoqueryCmd.Connection.CommitTrans;
|
||||
application.MessageBox('图片保存成功!', '提示信息', 0);
|
||||
except
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('图片保存失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.FormCreate(Sender: TObject);
|
||||
begin
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
//ConnectionString:='';
|
||||
Connected := true;
|
||||
end;
|
||||
cxGrid1.Align := alclient;
|
||||
fstatus := 0;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.FormShow(Sender: TObject);
|
||||
begin
|
||||
if fstatus = 0 then
|
||||
Panel1.Visible := true
|
||||
else
|
||||
Panel1.Visible := false;
|
||||
initdata();
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.ListView1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName: string;
|
||||
fileName: string;
|
||||
begin
|
||||
if ListView1.Items.Count < 1 then
|
||||
EXIT;
|
||||
|
||||
if listView1.SelCount < 1 then
|
||||
exit;
|
||||
sFieldName := 'D:\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
fileName := ListView1.Selected.Caption;
|
||||
|
||||
sFieldName := sFieldName + '\' + trim(fileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
|
||||
Panel2.Caption := '正在下载数据,请稍等...';
|
||||
Panel2.Visible := true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get('FJ\' + Trim(fileName), sFieldName, false, true);
|
||||
except
|
||||
Panel2.Visible := false;
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Panel2.Visible := false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible := false;
|
||||
if IdFTP1.Connected then
|
||||
IdFTP1.Quit;
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.cxButton1Click(Sender: TObject);
|
||||
var
|
||||
fFileName: string;
|
||||
fFilePath: string;
|
||||
begin
|
||||
// if listView1.SelCount<1 then exit;
|
||||
|
||||
if ADOQueryTmp.IsEmpty then
|
||||
exit;
|
||||
|
||||
try
|
||||
// fFileName:=ListView1.Selected.Caption;
|
||||
// ADOQueryTmp.Locate('fileName',fFileName,[]);
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from TP_File ');
|
||||
sql.Add('where TFID=' + quotedstr(trim(ADOQueryTmp.fieldbyname('TFID').AsString)));
|
||||
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
|
||||
initData();
|
||||
|
||||
except
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.cxButton2Click(Sender: TObject);
|
||||
var
|
||||
SaveDialog: TSaveDialog;
|
||||
fFileName: string;
|
||||
fFilePath: string;
|
||||
ff: TADOBlobStream;
|
||||
FJStream: TMemoryStream;
|
||||
begin
|
||||
if adoqueryTmp.IsEmpty then
|
||||
exit;
|
||||
|
||||
try
|
||||
|
||||
fFileName := adoqueryTmp.fieldbyname('FileName').AsString;
|
||||
|
||||
SaveDialog := TSaveDialog.Create(Self);
|
||||
|
||||
SaveDialog.FileName := fFileName;
|
||||
if SaveDialog.Execute then
|
||||
begin
|
||||
Panel2.Caption := '正在保存数据,请稍等...';
|
||||
Panel2.Visible := true;
|
||||
application.ProcessMessages;
|
||||
fFilePath := SaveDialog.FileName;
|
||||
|
||||
try
|
||||
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||
|
||||
FJStream := TMemoryStream.Create;
|
||||
ff.SaveToStream(FJStream);
|
||||
UnCompressionStream(FJStream);
|
||||
FJStream.SaveToFile(fFilePath);
|
||||
// ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
finally
|
||||
FJStream.free;
|
||||
ff.Free;
|
||||
end;
|
||||
|
||||
Panel2.Visible := false;
|
||||
// if IdFTP1.Connected then IdFTP1.Quit;
|
||||
end;
|
||||
except
|
||||
Panel2.Visible := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
if fId = 10 then
|
||||
Action := cafree
|
||||
else
|
||||
Action := cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.Panel2DblClick(Sender: TObject);
|
||||
begin
|
||||
Panel2.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_BG.Tv1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName: string;
|
||||
fileName: string;
|
||||
ff: TADOBlobStream;
|
||||
FJStream: TMemoryStream;
|
||||
begin
|
||||
|
||||
if adoqueryTmp.IsEmpty then
|
||||
exit;
|
||||
|
||||
sFieldName := 'D:\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
fileName := adoqueryTmp.fieldbyname('FileName').AsString;
|
||||
|
||||
sFieldName := sFieldName + '\' + trim(fileName);
|
||||
|
||||
try
|
||||
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||
|
||||
FJStream := TMemoryStream.Create;
|
||||
ff.SaveToStream(FJStream);
|
||||
UnCompressionStream(FJStream);
|
||||
FJStream.SaveToFile(sFieldName);
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
finally
|
||||
FJStream.free;
|
||||
ff.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
183
报关管理(BaoGuan.dll)/U_FjList_RZ.dfm
Normal file
183
报关管理(BaoGuan.dll)/U_FjList_RZ.dfm
Normal file
|
@ -0,0 +1,183 @@
|
|||
object frmFjList_RZ: TfrmFjList_RZ
|
||||
Left = 177
|
||||
Top = 159
|
||||
Width = 1062
|
||||
Height = 514
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = #38468#20214#20449#24687
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ListView1: TListView
|
||||
Left = 40
|
||||
Top = 20
|
||||
Width = 429
|
||||
Height = 77
|
||||
Columns = <>
|
||||
TabOrder = 0
|
||||
OnDblClick = ListView1DblClick
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 878
|
||||
Top = 0
|
||||
Width = 151
|
||||
Height = 517
|
||||
Align = alRight
|
||||
TabOrder = 1
|
||||
object FileName: TcxButton
|
||||
Left = 30
|
||||
Top = 60
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #28155#21152
|
||||
TabOrder = 0
|
||||
OnClick = FileNameClick
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton1: TcxButton
|
||||
Left = 30
|
||||
Top = 96
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #21024#38500
|
||||
TabOrder = 1
|
||||
OnClick = cxButton1Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton2: TcxButton
|
||||
Left = 30
|
||||
Top = 132
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #19979#36733
|
||||
TabOrder = 2
|
||||
OnClick = cxButton2Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
object cxButton3: TcxButton
|
||||
Left = 30
|
||||
Top = 172
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Filesother'
|
||||
Caption = #20851#38381
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
OnClick = cxButton3Click
|
||||
LookAndFeel.Kind = lfOffice11
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 176
|
||||
Top = 140
|
||||
Width = 193
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel2'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
OnDblClick = Panel2DblClick
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 80
|
||||
Top = 200
|
||||
Width = 593
|
||||
Height = 317
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 146
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #25991#20214#20462#25913#26102#38388
|
||||
DataBinding.FieldName = 'TFdate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25805#20316#21592
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #19978#20256#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 28
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 568
|
||||
Top = 32
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 536
|
||||
Top = 228
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 492
|
||||
Top = 166
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 460
|
||||
Top = 184
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTmp
|
||||
Left = 548
|
||||
Top = 124
|
||||
end
|
||||
end
|
400
报关管理(BaoGuan.dll)/U_FjList_RZ.pas
Normal file
400
报关管理(BaoGuan.dll)/U_FjList_RZ.pas
Normal file
|
@ -0,0 +1,400 @@
|
|||
unit U_FjList_RZ;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, ComCtrls, Menus, cxLookAndFeelPainters, StdCtrls,
|
||||
cxButtons, DB, ADODB, ImgList,shellapi, IdBaseComponent, IdComponent,
|
||||
IdTCPConnection, IdTCPClient, IdFTP, cxStyles, cxCustomData, cxGraphics,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid;
|
||||
|
||||
type
|
||||
TfrmFjList_RZ = class(TForm)
|
||||
ListView1: TListView;
|
||||
Panel1: TPanel;
|
||||
FileName: TcxButton;
|
||||
cxButton1: TcxButton;
|
||||
cxButton2: TcxButton;
|
||||
cxButton3: TcxButton;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ImageList1: TImageList;
|
||||
Panel2: TPanel;
|
||||
IdFTP1: TIdFTP;
|
||||
ADOConnection1: TADOConnection;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
DataSource1: TDataSource;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
procedure cxButton3Click(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FileNameClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ListView1DblClick(Sender: TObject);
|
||||
procedure cxButton1Click(Sender: TObject);
|
||||
procedure cxButton2Click(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure Panel2DblClick(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
procedure InitData();
|
||||
{ Private declarations }
|
||||
public
|
||||
fkeyNO:string;
|
||||
fType:string;
|
||||
fId:integer;
|
||||
fstatus:integer;
|
||||
// fmanage:string;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFjList_RZ: TfrmFjList_RZ;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_CompressionFun;
|
||||
{$R *.dfm}
|
||||
procedure TfrmFjList_RZ.InitData();
|
||||
var
|
||||
ListItem: TListItem;
|
||||
Flag: Cardinal;
|
||||
info: SHFILEINFOA;
|
||||
Icon: TIcon;
|
||||
begin
|
||||
ListView1.Items.Clear;
|
||||
try
|
||||
|
||||
with adoqueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File ');
|
||||
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
open;
|
||||
{ if not IsEmpty then
|
||||
begin
|
||||
while not eof do
|
||||
begin
|
||||
with ListView1 do
|
||||
begin
|
||||
LargeImages := ImageList1;
|
||||
Icon := TIcon.Create;
|
||||
ListItem := Items.Add;
|
||||
Listitem.Caption := trim(fieldbyname('fileName').AsString);
|
||||
// Listitem.SubItems.Add(OpenDiaLog.FileName);
|
||||
Flag := (SHGFI_SMALLICON or SHGFI_ICON or SHGFI_USEFILEATTRIBUTES);
|
||||
SHGetFileInfo(Pchar(trim(fieldbyname('fileName').AsString)), 0, info, Sizeof(info), Flag);
|
||||
Icon.Handle := info.hIcon;
|
||||
ImageList1.AddIcon(Icon);
|
||||
ListItem.ImageIndex := ImageList1.Count - 1;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
end; }
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.cxButton3Click(Sender: TObject);
|
||||
begin
|
||||
ADOQueryTmp.Close;
|
||||
ADOQuerycmd.Close;
|
||||
ListView1.Items.Free;
|
||||
ModalResult:=-1;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmFjList_RZ:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.FileNameClick(Sender: TObject);
|
||||
var
|
||||
OpenDiaLog: TOpenDialog;
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
maxNo:string;
|
||||
// myStream: TADOBlobStream;
|
||||
FJStream : TMemoryStream;
|
||||
mfileSize:integer;
|
||||
mCreationTime:TdateTime;
|
||||
mWriteTime:TdateTime;
|
||||
begin
|
||||
|
||||
try
|
||||
adoqueryCmd.Connection.BeginTrans;
|
||||
OpenDiaLog := TOpenDialog.Create(Self);
|
||||
if OpenDiaLog.Execute then
|
||||
begin
|
||||
fFilePath:=OpenDiaLog.FileName;
|
||||
fFileName:=ExtractFileName(OpenDiaLog.FileName);
|
||||
Panel2.Caption:='正在上传数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
|
||||
if GetLSNo(ADOQueryCmd,maxNo,'FJ','TP_File',4,1)=False then
|
||||
begin
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
//获取文件信息
|
||||
GetFileInfo(fFilePath,mfileSize,mCreationTime,mWriteTime);
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from TP_File ');
|
||||
sql.Add('where TFID='+quotedstr(trim(maxNO)));
|
||||
execsql;
|
||||
end;
|
||||
try
|
||||
FJStream:=TMemoryStream.Create;
|
||||
with adoqueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File ');
|
||||
sql.Add('where TFID='+quotedstr(trim(maxNO)));
|
||||
// sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
open;
|
||||
append;
|
||||
fieldbyname('TFID').Value:=trim(maxNO);
|
||||
fieldbyname('WBID').Value:=trim(fkeyNO);
|
||||
fieldbyname('TFType').Value:=trim(fType);
|
||||
fieldbyname('Filler').Value:=trim(DName);
|
||||
fieldbyname('FileName').Value:=trim(fFileName);
|
||||
fieldbyname('TFDate').Value:=mWriteTime;
|
||||
FJStream.LoadFromFile(fFilePath);
|
||||
CompressionStream(FJStream);
|
||||
tblobfield(FieldByName('Filesother')).LoadFromStream(FJStream);
|
||||
post;
|
||||
end;
|
||||
Panel2.Visible:=false;
|
||||
initdata();
|
||||
finally
|
||||
FJStream.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
adoqueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
adoqueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('附件保存失败!','提示信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.FormCreate(Sender: TObject);
|
||||
begin
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='';
|
||||
Connected:=true;
|
||||
end;
|
||||
cxGrid1.Align:=alclient;
|
||||
fstatus:=0;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.FormShow(Sender: TObject);
|
||||
begin
|
||||
IF fstatus=0 then Panel1.Visible:=true
|
||||
else Panel1.Visible:=false;
|
||||
initdata();
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.ListView1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName:string;
|
||||
fileName:string;
|
||||
begin
|
||||
if ListView1.Items.Count<1 THEN EXIT;
|
||||
|
||||
if listView1.SelCount<1 then exit;
|
||||
sFieldName:='D:\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName),nil);
|
||||
|
||||
fileName:=ListView1.Selected.Caption;
|
||||
|
||||
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
;
|
||||
end;
|
||||
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
|
||||
Panel2.Caption:='正在下载数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get('FJ\'+ Trim(fileName), sFieldName,false, true);
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible:=false;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.cxButton1Click(Sender: TObject);
|
||||
var
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
begin
|
||||
// if listView1.SelCount<1 then exit;
|
||||
|
||||
IF ADOQueryTmp.IsEmpty then exit;
|
||||
|
||||
try
|
||||
// fFileName:=ListView1.Selected.Caption;
|
||||
// ADOQueryTmp.Locate('fileName',fFileName,[]);
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from TP_File ');
|
||||
sql.Add('where TFID='+quotedstr(trim(ADOQueryTmp.fieldbyname('TFID').AsString)));
|
||||
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
|
||||
initData();
|
||||
|
||||
except
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.cxButton2Click(Sender: TObject);
|
||||
var
|
||||
SaveDialog: TSaveDialog;
|
||||
fFileName:string;
|
||||
fFilePath:string;
|
||||
ff: TADOBlobStream;
|
||||
FJStream : TMemoryStream;
|
||||
begin
|
||||
if adoqueryTmp.IsEmpty then exit;
|
||||
|
||||
try
|
||||
|
||||
fFileName:=adoqueryTmp.fieldbyname('FileName').AsString;
|
||||
|
||||
SaveDialog := TSaveDialog.Create(Self);
|
||||
|
||||
SaveDialog.FileName:=fFileName;
|
||||
if SaveDialog.Execute then
|
||||
begin
|
||||
Panel2.Caption:='正在保存数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
application.ProcessMessages;
|
||||
fFilePath:=SaveDialog.FileName;
|
||||
|
||||
try
|
||||
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||
|
||||
fjStream:= TMemoryStream.Create ;
|
||||
ff.SaveToStream(fjStream);
|
||||
UnCompressionStream(fjStream);
|
||||
fjStream.SaveToFile(fFilePath);
|
||||
// ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
finally
|
||||
fjStream.free;
|
||||
ff.Free;
|
||||
end;
|
||||
|
||||
|
||||
Panel2.Visible:=false;
|
||||
// if IdFTP1.Connected then IdFTP1.Quit;
|
||||
end;
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
if fId=10 then Action:=cafree
|
||||
else
|
||||
Action:=cahide;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.Panel2DblClick(Sender: TObject);
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
end;
|
||||
|
||||
procedure TfrmFjList_RZ.Tv1DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName:string;
|
||||
fileName:string;
|
||||
ff: TADOBlobStream;
|
||||
FJStream : TMemoryStream;
|
||||
begin
|
||||
|
||||
IF adoqueryTmp.IsEmpty then exit;
|
||||
|
||||
sFieldName:='D:\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName),nil);
|
||||
|
||||
fileName:=adoqueryTmp.fieldbyname('FileName').AsString;
|
||||
|
||||
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||
|
||||
try
|
||||
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||
|
||||
fjStream:= TMemoryStream.Create ;
|
||||
ff.SaveToStream(fjStream);
|
||||
UnCompressionStream(fjStream);
|
||||
fjStream.SaveToFile(sFieldName);
|
||||
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
finally
|
||||
fjStream.free;
|
||||
ff.Free;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
end;
|
||||
|
||||
end.
|
536
报关管理(BaoGuan.dll)/U_GYSList.dfm
Normal file
536
报关管理(BaoGuan.dll)/U_GYSList.dfm
Normal file
|
@ -0,0 +1,536 @@
|
|||
object frmGYSList: TfrmGYSList
|
||||
Left = 43
|
||||
Top = 66
|
||||
Width = 1182
|
||||
Height = 606
|
||||
Caption = #20379#24212#21830#30331#35760
|
||||
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 = 1166
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 107
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 1
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 315
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 3
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 378
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26356#26032#36134#26399#22825#25968
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 489
|
||||
Top = 0
|
||||
Width = 119
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label3: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #36134#26399#22825#25968
|
||||
end
|
||||
object LockDays: TEdit
|
||||
Left = 58
|
||||
Top = 5
|
||||
Width = 52
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 608
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26356#26032#22823#31867
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 695
|
||||
Top = 0
|
||||
Width = 107
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label4: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #22823#31867
|
||||
end
|
||||
object BigType: TComboBox
|
||||
Left = 34
|
||||
Top = 5
|
||||
Width = 70
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 0
|
||||
Items.Strings = (
|
||||
#24212#20184#27454
|
||||
#21333#35777
|
||||
#20179#24211
|
||||
#26426#29289#26009
|
||||
#20854#20182)
|
||||
end
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 802
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20379#24212#21830#38145#23450
|
||||
ImageIndex = 35
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 901
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35299#38145
|
||||
ImageIndex = 41
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 964
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 97
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1027
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 122
|
||||
Width = 1166
|
||||
Height = 446
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 46
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
DataBinding.FieldName = 'KHCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#20840#31216
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 88
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#31616#31216
|
||||
DataBinding.FieldName = 'KHNameJC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 139
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #22823#31867
|
||||
DataBinding.FieldName = 'BigType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 87
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#31867#22411
|
||||
DataBinding.FieldName = 'KHType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #32479#35745#21333#20301#21517#31216
|
||||
DataBinding.FieldName = 'TJKHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 102
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #30005#35805
|
||||
DataBinding.FieldName = 'ZKTelNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 96
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #20256#30495
|
||||
DataBinding.FieldName = 'ZKFax'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 89
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #22320#22336
|
||||
DataBinding.FieldName = 'ZKAddress'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 112
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #36127#36131#20154
|
||||
DataBinding.FieldName = 'FZPerson'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownRows = 40
|
||||
Properties.ImmediatePost = True
|
||||
Properties.OnChange = v1Column16PropertiesChange
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 73
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154
|
||||
DataBinding.FieldName = 'LXR'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 82
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154#30005#35805
|
||||
DataBinding.FieldName = 'LXRTel'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #26159#21542#26377#25928
|
||||
DataBinding.FieldName = 'Valid'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #24050#38145#23450
|
||||
DataBinding.FieldName = 'LockFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 64
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #36134#26399#22825#25968
|
||||
DataBinding.FieldName = 'lockDays'
|
||||
Options.Editing = False
|
||||
Width = 59
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1166
|
||||
Height = 67
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
object Label9: TLabel
|
||||
Left = 27
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31616#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 27
|
||||
Top = 39
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label34: TLabel
|
||||
Left = 249
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 241
|
||||
Top = 39
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #32479#35745#21333#20301#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 = 465
|
||||
Top = 15
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #36127#36131#20154
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object KHNameJC: TEdit
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 11
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object KHCode: TEdit
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 35
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object KHType: TEdit
|
||||
Tag = 2
|
||||
Left = 320
|
||||
Top = 11
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object TJKHName: TEdit
|
||||
Tag = 2
|
||||
Left = 320
|
||||
Top = 35
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 508
|
||||
Top = 37
|
||||
Width = 97
|
||||
Height = 17
|
||||
Caption = #26174#31034#26080#25928#25968#25454
|
||||
TabOrder = 4
|
||||
end
|
||||
object FZPerson: TEdit
|
||||
Tag = 2
|
||||
Left = 506
|
||||
Top = 11
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 99
|
||||
Width = 1166
|
||||
Height = 23
|
||||
Align = alTop
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24212#20184#27454
|
||||
#21333#35777
|
||||
#20179#24211
|
||||
#26426#29289#26009
|
||||
#20854#20182
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1166
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 464
|
||||
Top = 160
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 432
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 392
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 304
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 352
|
||||
Top = 160
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 416
|
||||
Top = 160
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 304
|
||||
Top = 192
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N1Click
|
||||
end
|
||||
end
|
||||
end
|
619
报关管理(BaoGuan.dll)/U_GYSList.pas
Normal file
619
报关管理(BaoGuan.dll)/U_GYSList.pas
Normal file
|
@ -0,0 +1,619 @@
|
|||
unit U_GYSList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
|
||||
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,
|
||||
Menus, cxButtonEdit, cxDropDownEdit, cxPC;
|
||||
|
||||
type
|
||||
TfrmGYSList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
TBExport: TToolButton;
|
||||
Order_Main: TClientDataSet;
|
||||
ToolButton1: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label9: TLabel;
|
||||
KHNameJC: TEdit;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
KHCode: TEdit;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Label34: TLabel;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
KHType: TEdit;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
TJKHName: TEdit;
|
||||
CheckBox1: TCheckBox;
|
||||
ToolButton2: TToolButton;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N2: TMenuItem;
|
||||
N1: TMenuItem;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
Label3: TLabel;
|
||||
LockDays: TEdit;
|
||||
ToolButton4: TToolButton;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
ToolButton5: TToolButton;
|
||||
Panel3: TPanel;
|
||||
BigType: TComboBox;
|
||||
Label4: TLabel;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
FZPerson: 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 TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure v1Column16PropertiesChange(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
private
|
||||
canshu1:string;
|
||||
DQdate:TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData():Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt,FCloth:Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmGYSList: TfrmGYSList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp, U_GYSInPutTab, U_ZDYHelpSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmGYSList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmGYSList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align:=alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('供应商登记',Tv1,'供应商管理');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from ZH_KH_Info A ');
|
||||
sql.Add(' where Type=''GYS'' ');
|
||||
if CheckBox1.Checked=false then
|
||||
begin
|
||||
sql.Add(' and Valid=''Y'' ');
|
||||
end;
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(BigType,'''')=''应付款'' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(BigType,'''')=''单证'' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(BigType,'''')=''仓库'' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=3 then
|
||||
begin
|
||||
sql.Add(' and isnull(BigType,'''')=''机物料'' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=4 then
|
||||
begin
|
||||
sql.Add(' and isnull(BigType,'''')=''其他'' ');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmGYSList.InitForm();
|
||||
begin
|
||||
ReadCxGrid('供应商登记',Tv1,'供应商管理');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.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 TfrmGYSList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
try
|
||||
frmGYSInPutTab:=TfrmGYSInPutTab.Create(Application);
|
||||
with frmGYSInPutTab do
|
||||
begin
|
||||
PState:=1;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('ZKId').AsString);
|
||||
frmGYSInPutTab.canshu1:=Trim(Self.canshu1);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmGYSInPutTab.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select Top 1* from JYOrder_Main_MD_DuiZhang ');
|
||||
sql.Add(' where FactoryNo='''+Trim(Order_Main.fieldbyname('ZKId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
Application.MessageBox('已有对账数据不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select Top 1* from YF_Money_PaiKuan ');
|
||||
sql.Add(' where FactoryNo='''+Trim(Order_Main.fieldbyname('ZKId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
Application.MessageBox('已有资金申请数据不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select Top 1* from JYOrder_Main_MD ');
|
||||
sql.Add(' where FactoryNo='''+Trim(Order_Main.fieldbyname('ZKId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
Application.MessageBox('已有码单数据不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select Top 1* from YF_Money_CR ');
|
||||
sql.Add(' where FactoryNo='''+Trim(Order_Main.fieldbyname('ZKId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
Application.MessageBox('已有入账数据不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
if DelData() then
|
||||
begin
|
||||
Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmGYSList.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update ZH_KH_Info Set Valid=''N'' where ZKId='''+Trim(Order_Main.fieldbyname('ZKId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel('供应商列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.TBAddClick(Sender: TObject);
|
||||
var
|
||||
maxno:string;
|
||||
begin
|
||||
try
|
||||
frmGYSInPutTab:=TfrmGYSInPutTab.Create(Application);
|
||||
with frmGYSInPutTab do
|
||||
begin
|
||||
PState:=0;
|
||||
FMainId:='';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmGYSInPutTab.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
try
|
||||
frmGYSInPutTab:=TfrmGYSInPutTab.Create(Application);
|
||||
with frmGYSInPutTab do
|
||||
begin
|
||||
PState:=1;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('ZKId').AsString);
|
||||
TBSave.Visible:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmGYSInPutTab.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.CustomerNoNameChange(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 TfrmGYSList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要锁定数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Order_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update ZH_KH_Info Set ');
|
||||
sql.Add(' LockFlag=1');
|
||||
sql.Add(' where ZKID='''+Order_Main.fieldbyname('ZKID').AsString+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
Edit;
|
||||
FieldByName('SSel').Value:=False;
|
||||
FieldByName('LockFlag').Value:=True;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
//Application.MessageBox('锁定成功!','提示',0);
|
||||
Exit;
|
||||
except
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('锁定异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main,False);
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要解锁数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Order_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update ZH_KH_Info Set ');
|
||||
sql.Add(' LockFlag=0');
|
||||
sql.Add(' where ZKID='''+Order_Main.fieldbyname('ZKID').AsString+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
Edit;
|
||||
FieldByName('SSel').Value:=False;
|
||||
FieldByName('LockFlag').Value:=False;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
//Application.MessageBox('解锁成功!','提示',0);
|
||||
Exit;
|
||||
except
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('解锁异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.ToolButton4Click(Sender: TObject);
|
||||
var
|
||||
FInteger:Integer;
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(LockDays.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('账期天数不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if TryStrToInt(Trim(LockDays.Text),FInteger)=False then
|
||||
begin
|
||||
Application.MessageBox('账期天数非法数字!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要更新账期天数吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Order_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update ZH_KH_Info Set ');
|
||||
sql.Add(' lockDays='+LockDays.Text);
|
||||
sql.Add(' where ZKID='''+Order_Main.fieldbyname('ZKID').AsString+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
Edit;
|
||||
FieldByName('SSel').Value:=False;
|
||||
FieldByName('lockDays').Value:=LockDays.Text;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('更新成功!','提示',0);
|
||||
Exit;
|
||||
except
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('更新异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.ToolButton5Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(BigType.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('大类不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要更新大类吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Order_Main.Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update ZH_KH_Info Set ');
|
||||
sql.Add(' BigType='''+Trim(BigType.Text)+'''');
|
||||
sql.Add(' where ZKID='''+Order_Main.fieldbyname('ZKID').AsString+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
Edit;
|
||||
FieldByName('SSel').Value:=False;
|
||||
FieldByName('BigType').Value:=BigType.Text;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('更新成功!','提示',0);
|
||||
Exit;
|
||||
except
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('更新异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.v1Column16PropertiesChange(Sender: TObject);
|
||||
var
|
||||
mvalue:String;
|
||||
begin
|
||||
mvalue:=TcxComboBox(Sender).EditText;
|
||||
with Order_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('FZPerson').Value:=Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update ZH_KH_Info Set FZPerson='''+Trim(mvalue)+'''');
|
||||
SQL.Add(' where ZKID='''+Trim(Order_Main.fieldbyname('ZKID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSList.Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
fsj:string;
|
||||
begin
|
||||
fsj:='select distinct(FZPerson) Name ,Code='''' from ZH_KH_Info where Type=''GYS''';
|
||||
SInitCxGridComboBoxBySql(ADOQueryCmd,v1Column16,fsj,0,True,'');
|
||||
end;
|
||||
|
||||
end.
|
304
报关管理(BaoGuan.dll)/U_GYSSelList.dfm
Normal file
304
报关管理(BaoGuan.dll)/U_GYSSelList.dfm
Normal file
|
@ -0,0 +1,304 @@
|
|||
object frmGYSSelList: TfrmGYSSelList
|
||||
Left = 206
|
||||
Top = 98
|
||||
Width = 906
|
||||
Height = 606
|
||||
Caption = #20379#24212#21830#36873#25321
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 890
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 99
|
||||
Width = 890
|
||||
Height = 468
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 1
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
DataBinding.FieldName = 'KHCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#20840#31216
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 88
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#31616#31216
|
||||
DataBinding.FieldName = 'KHNameJC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 139
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#31867#22411
|
||||
DataBinding.FieldName = 'KHType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #32479#35745#21333#20301#21517#31216
|
||||
DataBinding.FieldName = 'TJKHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 102
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #30005#35805
|
||||
DataBinding.FieldName = 'ZKTelNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 96
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #20256#30495
|
||||
DataBinding.FieldName = 'ZKFax'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 89
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #22320#22336
|
||||
DataBinding.FieldName = 'ZKAddress'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 112
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 890
|
||||
Height = 67
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
object Label9: TLabel
|
||||
Left = 27
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31616#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 27
|
||||
Top = 39
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label34: TLabel
|
||||
Left = 261
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20379#24212#21830#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 253
|
||||
Top = 39
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #32479#35745#21333#20301#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object KHNameJC: TEdit
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 11
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object KHCode: TEdit
|
||||
Tag = 2
|
||||
Left = 94
|
||||
Top = 35
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object KHType: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 11
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object TJKHName: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 35
|
||||
Width = 125
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 464
|
||||
Top = 160
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 432
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 392
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 304
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 352
|
||||
Top = 160
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 416
|
||||
Top = 160
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 304
|
||||
Top = 192
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N1Click
|
||||
end
|
||||
end
|
||||
end
|
221
报关管理(BaoGuan.dll)/U_GYSSelList.pas
Normal file
221
报关管理(BaoGuan.dll)/U_GYSSelList.pas
Normal file
|
@ -0,0 +1,221 @@
|
|||
unit U_GYSSelList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
|
||||
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,
|
||||
Menus, cxButtonEdit, cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmGYSSelList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Main: TClientDataSet;
|
||||
ToolButton1: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label9: TLabel;
|
||||
KHNameJC: TEdit;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
KHCode: TEdit;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Label34: TLabel;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
KHType: TEdit;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
TJKHName: TEdit;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N2: TMenuItem;
|
||||
N1: TMenuItem;
|
||||
TBFind: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
canshu1:string;
|
||||
DQdate:TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData():Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt,FCloth:Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmGYSSelList: TfrmGYSSelList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,U_ZDYHelp, U_GYSInPutTab, U_ZDYHelpSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmGYSSelList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmGYSSelList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align:=alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('供应商登记',Tv1,'供应商管理');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add(' from ZH_KH_Info A ');
|
||||
sql.Add(' where Type=''GYS'' ');
|
||||
sql.Add(' and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmGYSSelList.InitForm();
|
||||
begin
|
||||
ReadCxGrid('供应商登记',Tv1,'供应商管理');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.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 TfrmGYSSelList.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update ZH_KH_Info Set Valid=''N'' where ZKId='''+Trim(Order_Main.fieldbyname('ZKId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.CustomerNoNameChange(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 TfrmGYSSelList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main,True);
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main,False);
|
||||
end;
|
||||
|
||||
procedure TfrmGYSSelList.Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
377
报关管理(BaoGuan.dll)/U_GetDllForm.pas
Normal file
377
报关管理(BaoGuan.dll)/U_GetDllForm.pas
Normal file
|
@ -0,0 +1,377 @@
|
|||
unit U_GetDllForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, IniFiles,
|
||||
dxcore, activeX;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
||||
|
||||
function ConnData(): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_BaoGuanList, U_BaoGuanListZXD, U_BaoGuanXSList, U_BaoGuanCRKCX;
|
||||
|
||||
var
|
||||
frmBaoGuanList, frmBaoGuanListGQX, frmBaoGuanListCXGQX, frmBaoGuanListZL: TfrmBaoGuanList;
|
||||
frmBaoGuanListHT, frmBaoGuanListFP, frmBaoGuanListZXD, frmBaoGuanListBGD: TfrmBaoGuanList;
|
||||
frmBaoGuanListSBYS, frmBaoGuanListHD, frmBaoGuanListSH, frmBaoGuanListDJ: TfrmBaoGuanList;
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取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
|
||||
i: Integer;
|
||||
bFound: Boolean;
|
||||
mnewHandle: hwnd;
|
||||
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||||
mstate: TWindowState;
|
||||
mborderstyle: TFormBorderStyle;
|
||||
begin
|
||||
mnewHandle := 0;
|
||||
DName := PChar(GName);
|
||||
DCode := PChar(GCode);
|
||||
DdataBase := DataBase;
|
||||
DTitCaption := Title;
|
||||
DParameters1 := Parameters1;
|
||||
DParameters2 := Parameters2;
|
||||
DParameters3 := Parameters3;
|
||||
DParameters4 := Parameters4;
|
||||
DParameters5 := Parameters5;
|
||||
DParameters6 := Parameters6;
|
||||
DParameters7 := Parameters7;
|
||||
DParameters8 := Parameters8;
|
||||
DParameters9 := Parameters9;
|
||||
DParameters10 := Parameters10;
|
||||
|
||||
MainApplication := App;
|
||||
DCurHandle := FormH;
|
||||
IsDelphiLanguage := Language;
|
||||
|
||||
Application := TApplication(App);
|
||||
DCurHandle := 0;
|
||||
|
||||
|
||||
//赋值链接字符串
|
||||
SetLength(server, 255);
|
||||
SetLength(dtbase, 255);
|
||||
SetLength(user, 255);
|
||||
SetLength(pswd, 255);
|
||||
|
||||
//server:='121.40.233.100,7781'; //192.168.1.113
|
||||
server := '101.132.146.12,7781'; //192.168.1.113
|
||||
dtbase := 'shengfangData';
|
||||
user := 'shengfangsa';
|
||||
pswd := 'rightsoft@4400';
|
||||
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;
|
||||
|
||||
//DName:='ADMIN';
|
||||
|
||||
DParameters1 := '高权限'; //
|
||||
//DParameters2:='';
|
||||
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;
|
||||
//Title:='报关管理';
|
||||
/////////////////////
|
||||
//调用子模块窗口
|
||||
case FormID of
|
||||
-1: //报关资料录入
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '报关资料录入' then
|
||||
begin
|
||||
BringWindowToTop(frmBaoGuanList.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
//if frmBaoGuanList=nil then
|
||||
begin
|
||||
frmBaoGuanList := TfrmBaoGuanList.Create(application.MainForm);
|
||||
with frmBaoGuanList do
|
||||
begin
|
||||
Title := '报关资料录入';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanList.Handle;
|
||||
end;
|
||||
-2: //报关资料录入(高权限)
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '报关资料录入(高权限)' then
|
||||
begin
|
||||
BringWindowToTop(frmBaoGuanListGQX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
//if frmBaoGuanList=nil then
|
||||
begin
|
||||
frmBaoGuanListGQX := TfrmBaoGuanList.Create(application.MainForm);
|
||||
with frmBaoGuanListGQX do
|
||||
begin
|
||||
Title := '报关资料录入(高权限)';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanListGQX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanListGQX.Handle;
|
||||
end;
|
||||
-3: //报关资料核对
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '报关资料核对' then
|
||||
begin
|
||||
BringWindowToTop(frmBaoGuanListHD.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
//if frmBaoGuanListSBYS=nil then
|
||||
begin
|
||||
frmBaoGuanListHD := TfrmBaoGuanList.Create(application.MainForm);
|
||||
with frmBaoGuanListHD do
|
||||
begin
|
||||
Title := '报关资料核对';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanListHD.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanListHD.Handle;
|
||||
end;
|
||||
-4: //报关资料审核
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '报关资料审核' then
|
||||
begin
|
||||
BringWindowToTop(frmBaoGuanListSH.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
//if frmBaoGuanListSBYS=nil then
|
||||
begin
|
||||
frmBaoGuanListSH := TfrmBaoGuanList.Create(application.MainForm);
|
||||
with frmBaoGuanListSH do
|
||||
begin
|
||||
Title := '报关资料审核';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanListSH.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanListSH.Handle;
|
||||
end;
|
||||
-5: //报关资料查询(高权限)
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '报关资料查询(高权限)' then
|
||||
begin
|
||||
BringWindowToTop(frmBaoGuanListCXGQX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
//if frmBaoGuanListBGZL=nil then
|
||||
begin
|
||||
frmBaoGuanListCXGQX := TfrmBaoGuanList.Create(application.MainForm);
|
||||
with frmBaoGuanListCXGQX do
|
||||
begin
|
||||
Title := '报关资料查询(高权限)';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanListCXGQX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanListCXGQX.Handle;
|
||||
end;
|
||||
-6: //报关销售资料
|
||||
begin
|
||||
if frmBaoGuanXSList = nil then
|
||||
begin
|
||||
frmBaoGuanXSList := TfrmBaoGuanXSList.Create(application.MainForm);
|
||||
with frmBaoGuanXSList do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanXSList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanXSList.Handle;
|
||||
end;
|
||||
|
||||
1: //报关管理(单机)
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '报关管理' then
|
||||
begin
|
||||
BringWindowToTop(frmBaoGuanListDJ.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
//if frmBaoGuanList=nil then
|
||||
begin
|
||||
frmBaoGuanListDJ := TfrmBaoGuanList.Create(application.MainForm);
|
||||
with frmBaoGuanListDJ do
|
||||
begin
|
||||
Title := '报关管理';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanListDJ.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanListDJ.Handle;
|
||||
end;
|
||||
|
||||
2: //报关出入库查询
|
||||
begin
|
||||
if frmBaoGuanCRKCX = nil then
|
||||
begin
|
||||
frmBaoGuanCRKCX := TfrmBaoGuanCRKCX.Create(application.MainForm);
|
||||
with frmBaoGuanCRKCX do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmBaoGuanCRKCX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmBaoGuanCRKCX.Handle;
|
||||
end;
|
||||
|
||||
end; // end case
|
||||
|
||||
Result := mnewHandle;
|
||||
// NewDllApp:=Application ;
|
||||
end;
|
||||
//===========================================================
|
||||
//建立数据库连接池
|
||||
//===========================================================
|
||||
|
||||
function ConnData(): Boolean;
|
||||
begin
|
||||
if not Assigned(DataLink_DDMD) then
|
||||
DataLink_DDMD := TDataLink_DDMD.Create(Application);
|
||||
try
|
||||
with DataLink_DDMD.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_DDMD.Free;
|
||||
application := NewDllApp;
|
||||
dxUnitsLoader.Finalize;
|
||||
|
||||
end.
|
||||
|
239
报关管理(BaoGuan.dll)/U_RTZDYHelp.dfm
Normal file
239
报关管理(BaoGuan.dll)/U_RTZDYHelp.dfm
Normal file
|
@ -0,0 +1,239 @@
|
|||
object frmRTZDYHelp: TfrmRTZDYHelp
|
||||
Left = 466
|
||||
Top = 188
|
||||
Width = 461
|
||||
Height = 528
|
||||
Caption = #39033#30446#32500#25252
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 8
|
||||
Top = 88
|
||||
Width = 417
|
||||
Height = 200
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
object V1Code: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'ZDYNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object V1OrderNo: TcxGridDBColumn
|
||||
Caption = #39034#24207#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1OrderNoPropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 46
|
||||
end
|
||||
object V1Name: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21517#31216
|
||||
DataBinding.FieldName = 'ZDYName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 146
|
||||
end
|
||||
object V1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NotePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 113
|
||||
end
|
||||
object V1ZdyFlag: TcxGridDBColumn
|
||||
Caption = #26631#24535
|
||||
DataBinding.FieldName = 'ZdyFlag'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1Column1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object V1HelpType: TcxGridDBColumn
|
||||
Caption = #24110#21161#31867#27604
|
||||
DataBinding.FieldName = 'HelpType'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1HelpTypePropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 55
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 445
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 118
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 177
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBSave: TToolButton
|
||||
Left = 236
|
||||
Top = 0
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 15
|
||||
Visible = False
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 295
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 445
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 18
|
||||
Top = 17
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21517#31216
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 240
|
||||
Top = 11
|
||||
Width = 120
|
||||
Height = 24
|
||||
Caption = #27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#13#10' '#21333#20803#26684#20445#23384#25968#25454#12290
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object ZDYName: TEdit
|
||||
Tag = 2
|
||||
Left = 53
|
||||
Top = 12
|
||||
Width = 169
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = ZDYNameChange
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = ADOConnection1
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 280
|
||||
Top = 144
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 208
|
||||
Top = 144
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
LoginPrompt = False
|
||||
Left = 80
|
||||
Top = 232
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 168
|
||||
Top = 152
|
||||
end
|
||||
end
|
685
报关管理(BaoGuan.dll)/U_RTZDYHelp.pas
Normal file
685
报关管理(BaoGuan.dll)/U_RTZDYHelp.pas
Normal file
|
@ -0,0 +1,685 @@
|
|||
unit U_RTZDYHelp;
|
||||
|
||||
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
|
||||
TfrmRTZDYHelp = 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;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
V1ZdyFlag: TcxGridDBColumn;
|
||||
V1HelpType: 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);
|
||||
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag,flagname,snote,MainType:string;
|
||||
fnote,forderno,fZdyFlag,ViewFlag:Boolean;
|
||||
PPSTE:integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmRTZDYHelp: TfrmRTZDYHelp;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmRTZDYHelp.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; }
|
||||
|
||||
frmRTZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.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 TfrmRTZDYHelp.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 TfrmRTZDYHelp.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').Value;
|
||||
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||
if Trim(MainType)<>'' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||
ClientDataSet1.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
TV1.OptionsData.Editing:=False;
|
||||
TV1.OptionsSelection.CellSelect:=False;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.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 TfrmRTZDYHelp.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=2;
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.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,'自定义数据');
|
||||
ReadCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
frmRTZDYHelp.Caption:=Trim(flagname);
|
||||
V1Note.Visible:=fnote;
|
||||
V1ZdyFlag.Visible:=fZdyFlag;
|
||||
V1OrderNo.Visible:=forderno;
|
||||
if ViewFlag=True then
|
||||
begin
|
||||
TBAdd.Visible:=False;
|
||||
TBSave.Visible:=False;
|
||||
TBDel.Visible:=False;
|
||||
TBEdit.Visible:=False;
|
||||
Label2.Visible:=False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing:=True;
|
||||
TV1.OptionsSelection.CellSelect:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.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 TfrmRTZDYHelp.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);
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
if Trim(fsj)='' then
|
||||
begin
|
||||
Filtered:=False;
|
||||
end else
|
||||
begin
|
||||
Filtered:=False;
|
||||
Filter:=fsj;
|
||||
Filtered:=True;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmRTZDYHelp.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 TfrmRTZDYHelp.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 TfrmRTZDYHelp.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 TfrmRTZDYHelp.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;
|
||||
|
||||
procedure TfrmRTZDYHelp.V1HelpTypePropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
var
|
||||
mvalue:string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
mvalue:='0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('HelpType').Value:=mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set HelpType='''+Trim(mvalue)+'''');
|
||||
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
320
报关管理(BaoGuan.dll)/U_ZDYHelp.dfm
Normal file
320
报关管理(BaoGuan.dll)/U_ZDYHelp.dfm
Normal file
|
@ -0,0 +1,320 @@
|
|||
object frmZDYHelp: TfrmZDYHelp
|
||||
Left = 356
|
||||
Top = 144
|
||||
Width = 460
|
||||
Height = 528
|
||||
Caption = #39033#30446#32500#25252
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 107
|
||||
TextHeight = 13
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 77
|
||||
Width = 444
|
||||
Height = 411
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
object V1Code: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'ZDYNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object V1OrderNo: TcxGridDBColumn
|
||||
Caption = #39034#24207#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1OrderNoPropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object V1Name: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21517#31216
|
||||
DataBinding.FieldName = 'ZDYName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 272
|
||||
end
|
||||
object V1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NotePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 109
|
||||
end
|
||||
object V1ZdyFlag: TcxGridDBColumn
|
||||
Caption = #26631#24535
|
||||
DataBinding.FieldName = 'ZdyFlag'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1Column1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object V1HelpType: TcxGridDBColumn
|
||||
Caption = #24110#21161#31867#27604
|
||||
DataBinding.FieldName = 'HelpType'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1HelpTypePropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 55
|
||||
end
|
||||
object V1ZdyStr1: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object V1ZdyStr2: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr2'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object V1ZdyStr3: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr3'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object V1ZdyStr4: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr4'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object V1ZdyStr5: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr5'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object V1ZdyStr6: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr6'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 51
|
||||
end
|
||||
object V1ZdyStr7: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr7'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 55
|
||||
end
|
||||
object V1ZdyStr8: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr8'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 56
|
||||
end
|
||||
object V1ZdyStr9: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr9'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 54
|
||||
end
|
||||
object V1ZdyStr10: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr10'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 56
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 444
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 118
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 177
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBSave: TToolButton
|
||||
Left = 236
|
||||
Top = 0
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 15
|
||||
Visible = False
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 295
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 444
|
||||
Height = 48
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 20
|
||||
Top = 18
|
||||
Width = 26
|
||||
Height = 13
|
||||
Caption = #21517#31216
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 260
|
||||
Top = 12
|
||||
Width = 132
|
||||
Height = 26
|
||||
Caption = #27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#13#10' '#21333#20803#26684#20445#23384#25968#25454#12290
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object ZDYName: TEdit
|
||||
Tag = 2
|
||||
Left = 57
|
||||
Top = 13
|
||||
Width = 184
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
OnChange = ZDYNameChange
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 280
|
||||
Top = 144
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 208
|
||||
Top = 144
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 162
|
||||
Top = 150
|
||||
end
|
||||
end
|
729
报关管理(BaoGuan.dll)/U_ZDYHelp.pas
Normal file
729
报关管理(BaoGuan.dll)/U_ZDYHelp.pas
Normal file
|
@ -0,0 +1,729 @@
|
|||
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,
|
||||
cxTimeEdit;
|
||||
|
||||
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;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
ZDYName: TEdit;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
V1ZdyFlag: TcxGridDBColumn;
|
||||
V1HelpType: TcxGridDBColumn;
|
||||
V1ZdyStr1: TcxGridDBColumn;
|
||||
V1ZdyStr2: TcxGridDBColumn;
|
||||
V1ZdyStr3: TcxGridDBColumn;
|
||||
V1ZdyStr4: TcxGridDBColumn;
|
||||
V1ZdyStr5: TcxGridDBColumn;
|
||||
V1ZdyStr6: TcxGridDBColumn;
|
||||
V1ZdyStr7: TcxGridDBColumn;
|
||||
V1ZdyStr8: TcxGridDBColumn;
|
||||
V1ZdyStr9: TcxGridDBColumn;
|
||||
V1ZdyStr10: 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);
|
||||
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1ZdyStr1PropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag,flagname,snote,MainType:string;
|
||||
fnote,forderno,fZdyFlag,ViewFlag:Boolean;
|
||||
PPSTE:integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmZDYHelp: TfrmZDYHelp;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$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; }
|
||||
|
||||
{frmRTZDYHelp.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
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').Value;
|
||||
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||
if Trim(MainType)<>'' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||
ClientDataSet1.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
TV1.OptionsData.Editing:=False;
|
||||
TV1.OptionsSelection.CellSelect:=False;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure 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('自定义'+Trim(flag),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,'自定义数据');
|
||||
ReadCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
frmZDYHelp.Caption:=Trim(flagname);
|
||||
V1Note.Visible:=fnote;
|
||||
V1ZdyFlag.Visible:=fZdyFlag;
|
||||
V1OrderNo.Visible:=forderno;
|
||||
if ViewFlag=True then
|
||||
begin
|
||||
TBAdd.Visible:=False;
|
||||
TBSave.Visible:=False;
|
||||
TBDel.Visible:=False;
|
||||
TBEdit.Visible:=False;
|
||||
Label2.Visible:=False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
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);
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
if Trim(fsj)='' then
|
||||
begin
|
||||
Filtered:=False;
|
||||
end else
|
||||
begin
|
||||
Filtered:=False;
|
||||
Filter:=fsj;
|
||||
Filtered:=True;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
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;
|
||||
|
||||
procedure TfrmZDYHelp.V1HelpTypePropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
var
|
||||
mvalue:string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
mvalue:='0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('HelpType').Value:=mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set HelpType='''+Trim(mvalue)+'''');
|
||||
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.V1ZdyStr1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue,FFieldName:string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)='' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
FFieldName:=TV1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
mvalue:='';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value:=mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set '+FFieldName+'='''+Trim(mvalue)+'''');
|
||||
sql.Add(' where ZdyNo='''+Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
224
报关管理(BaoGuan.dll)/U_ZDYHelpSel.dfm
Normal file
224
报关管理(BaoGuan.dll)/U_ZDYHelpSel.dfm
Normal file
|
@ -0,0 +1,224 @@
|
|||
object frmZDYHelpSel: TfrmZDYHelpSel
|
||||
Left = 392
|
||||
Top = 169
|
||||
Width = 574
|
||||
Height = 598
|
||||
Caption = #39033#30446#32500#25252
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 558
|
||||
Height = 486
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
object V1Code: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'ZDYNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object V1Column1: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object V1Name: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21517#31216
|
||||
DataBinding.FieldName = 'ZDYName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 208
|
||||
end
|
||||
object V1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object V1OrderNo: TcxGridDBColumn
|
||||
Caption = #39034#24207#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 53
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 558
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #30830#23450
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 118
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 177
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBSave: TToolButton
|
||||
Left = 236
|
||||
Top = 0
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 15
|
||||
Visible = False
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 295
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 558
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 19
|
||||
Top = 17
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21517#31216
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 240
|
||||
Top = 11
|
||||
Width = 120
|
||||
Height = 24
|
||||
Caption = #27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#13#10' '#21333#20803#26684#20445#23384#25968#25454#12290
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object ZDYName: TEdit
|
||||
Tag = 2
|
||||
Left = 54
|
||||
Top = 12
|
||||
Width = 169
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = ZDYNameChange
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 280
|
||||
Top = 144
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 200
|
||||
Top = 144
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 352
|
||||
Top = 248
|
||||
end
|
||||
end
|
465
报关管理(BaoGuan.dll)/U_ZDYHelpSel.pas
Normal file
465
报关管理(BaoGuan.dll)/U_ZDYHelpSel.pas
Normal file
|
@ -0,0 +1,465 @@
|
|||
unit U_ZDYHelpSel;
|
||||
|
||||
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, cxCheckBox, cxTextEdit, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu;
|
||||
|
||||
type
|
||||
TfrmZDYHelpSel = 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;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
ZDYName: TEdit;
|
||||
V1Column1: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
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);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag,flagname,snote,MainType,ReturnStr,FGStr:string;
|
||||
fnote,forderno:Boolean;
|
||||
PPSTE,JiangeStr:integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmZDYHelpSel: TfrmZDYHelpSel;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmZDYHelpSel.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type='''+flag+'''');
|
||||
if Trim(MainType)<>'' then
|
||||
begin
|
||||
sql.Add(' and MainType='''+Trim(MainType)+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.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 TfrmZDYHelpSel.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
maxno:string;
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
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
|
||||
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;
|
||||
Application.MessageBox('取最大编号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxno:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||
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;
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYName').AsString)='' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
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;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
// TV1.OptionsData.Editing:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.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 TfrmZDYHelpSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=2;
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.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';
|
||||
ReadCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
{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)+'>';
|
||||
frmZDYHelpSel.Caption:=Trim(flagname);
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ReturnStr:='';
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if FieldByName('SSel').AsBoolean=True then
|
||||
begin
|
||||
if JiangeStr<>99 then
|
||||
begin
|
||||
if FGStr<>'' then
|
||||
ReturnStr:=ReturnStr+Trim(fieldbyname('ZDYName').AsString)+FGStr
|
||||
else
|
||||
ReturnStr:=ReturnStr+Trim(fieldbyname('ZDYName').AsString)+';'
|
||||
end
|
||||
else
|
||||
ReturnStr:=ReturnStr+Trim(fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
if JiangeStr<>99 then
|
||||
ReturnStr:=Copy(ReturnStr,1,Length(ReturnStr)-1);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.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 TfrmZDYHelpSel.ZDYNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.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;
|
||||
|
||||
end.
|
64
报关管理(BaoGuan.dll)/U_iniParam.pas
Normal file
64
报关管理(BaoGuan.dll)/U_iniParam.pas
Normal file
|
@ -0,0 +1,64 @@
|
|||
|
||||
unit U_iniParam;
|
||||
|
||||
interface
|
||||
uses
|
||||
IniFiles,SysUtils;
|
||||
var
|
||||
Filename:string; //文件名
|
||||
iParam2:integer;
|
||||
bParam1:Boolean;
|
||||
bParam2:Boolean;
|
||||
SCXFlag:String; //生产线 根据此标志获取卷条码前缀 不能包含字母 1,2
|
||||
SCXCount:String; //机台个数
|
||||
PortNoStr:string;//端口号
|
||||
DllName:string;//端口Dll文件
|
||||
DllName10:string;//端口Dll文件
|
||||
Function IsINIFile():Boolean; //判断InI配置文件是否存在
|
||||
procedure ReadINIFile();
|
||||
procedure WriteINIFile();
|
||||
implementation
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//读取ini文件设置参数
|
||||
//参数:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
procedure ReadINIFile();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
SCXFlag:=programIni.ReadString('生产车间配置','卷条码机台标志','1');
|
||||
DllName:=programIni.ReadString('生产车间配置','码表Dll文件','JZCRS323C.DLL');
|
||||
DllName10:=programIni.ReadString('生产车间配置','电子秤Dll文件','JZCRS323C.DLL');
|
||||
programIni.Free;
|
||||
end;
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//写设置信息到INI文件
|
||||
//参数
|
||||
//////////////////////////////////////////////////////////////////
|
||||
procedure WriteINIFile();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
programIni.WriteString('生产车间配置','卷条码机台标志',SCXFlag);
|
||||
programIni.WriteString('生产车间配置','码表Dll文件',DllName);
|
||||
programIni.WriteString('生产车间配置','电子秤Dll文件',DllName10);
|
||||
programIni.Free;
|
||||
end;
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//判断InI文件是否存在
|
||||
//////////////////////////////////////////////////////////////////
|
||||
Function IsINIFile():Boolean;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
|
||||
if FileExists(FileName) then
|
||||
Result:=true
|
||||
else
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
end.
|
221
报关管理(BaoGuan.dll)/U_testdll.dfm
Normal file
221
报关管理(BaoGuan.dll)/U_testdll.dfm
Normal file
|
@ -0,0 +1,221 @@
|
|||
object Form1: TForm1
|
||||
Left = 203
|
||||
Top = 121
|
||||
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 = 775
|
||||
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
报关管理(BaoGuan.dll)/U_testdll.pas
Normal file
106
报关管理(BaoGuan.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('BaoGuan.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('ygcode'),
|
||||
PChar('ygname'),
|
||||
PChar('datebase'),
|
||||
PChar('title'),
|
||||
PChar(''),
|
||||
PChar(''),
|
||||
'','','','','','','','',''
|
||||
);
|
||||
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
报关管理(BaoGuan.dll)/consvr.ini
Normal file
2
报关管理(BaoGuan.dll)/consvr.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[SERVER]
|
||||
SERVER=192.168.88.254
|
38
报关管理(BaoGuan.dll)/testDll.cfg
Normal file
38
报关管理(BaoGuan.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 (x86)\borland\delphi7\Projects\Bpl"
|
||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
136
报关管理(BaoGuan.dll)/testDll.dof
Normal file
136
报关管理(BaoGuan.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\马国钢开发代码\项目代码\产品\订单码单管理(BaoGuan.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
报关管理(BaoGuan.dll)/testDll.dpr
Normal file
14
报关管理(BaoGuan.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
报关管理(BaoGuan.dll)/testDll.res
Normal file
BIN
报关管理(BaoGuan.dll)/testDll.res
Normal file
Binary file not shown.
38
报关管理(BaoGuan.dll)/testDllDJ.cfg
Normal file
38
报关管理(BaoGuan.dll)/testDllDJ.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 (x86)\borland\delphi7\Projects\Bpl"
|
||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
136
报关管理(BaoGuan.dll)/testDllDJ.dof
Normal file
136
报关管理(BaoGuan.dll)/testDllDJ.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\长阳针织(CYZZ.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=
|
BIN
报关管理(BaoGuan.dll)/testDllDJ.res
Normal file
BIN
报关管理(BaoGuan.dll)/testDllDJ.res
Normal file
Binary file not shown.
12
盛纺贸易管理/2323
Normal file
12
盛纺贸易管理/2323
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
2323
|
||||
</TITLE>
|
||||
</HEAD>
|
||||
<FRAMESET rows="39,*" border=0 width=0 frameborder=no framespacing=0>
|
||||
<FRAME name="header" src="2323_files/header.htm" marginwidth=0 marginheight=0>
|
||||
<FRAME name="sheet" src="2323_files/Sheet0.htm">
|
||||
</FRAMESET>
|
||||
</HTML>
|
317
盛纺贸易管理/AES.pas
Normal file
317
盛纺贸易管理/AES.pas
Normal file
|
@ -0,0 +1,317 @@
|
|||
(**************************************************)
|
||||
|
||||
unit AES;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Math, ElAES;
|
||||
|
||||
type
|
||||
TKeyBit = (kb128, kb192, kb256);
|
||||
|
||||
function StrToHex(Value: string): string;
|
||||
function HexToStr(Value: string): string;
|
||||
function EncryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
function DecryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
function EncryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
function DecryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
procedure EncryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
procedure DecryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
|
||||
implementation
|
||||
|
||||
function StrToHex(Value: string): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := 1 to Length(Value) do
|
||||
Result := Result + IntToHex(Ord(Value[I]), 2);
|
||||
end;
|
||||
|
||||
function HexToStr(Value: string): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := 1 to Length(Value) do
|
||||
begin
|
||||
if ((I mod 2) = 1) then
|
||||
Result := Result + Chr(StrToInt('0x'+ Copy(Value, I, 2)));
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 字符串加密函数 默认按照 128 位密匙加密 -- }
|
||||
function EncryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
var
|
||||
SS, DS: TStringStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
Result := '';
|
||||
SS := TStringStream.Create(Value);
|
||||
DS := TStringStream.Create('');
|
||||
try
|
||||
Size := SS.Size;
|
||||
DS.WriteBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey128, DS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey192, DS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(SS, 0, AESKey256, DS);
|
||||
end;
|
||||
Result := StrToHex(DS.DataString);
|
||||
finally
|
||||
SS.Free;
|
||||
DS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 字符串解密函数 默认按照 128 位密匙解密 -- }
|
||||
function DecryptString(Value: string; Key: string;
|
||||
KeyBit: TKeyBit = kb128): string;
|
||||
var
|
||||
SS, DS: TStringStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
Result := '';
|
||||
SS := TStringStream.Create(HexToStr(Value));
|
||||
DS := TStringStream.Create('');
|
||||
try
|
||||
Size := SS.Size;
|
||||
SS.ReadBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey128, DS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey192, DS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey256, DS);
|
||||
end;
|
||||
Result := DS.DataString;
|
||||
finally
|
||||
SS.Free;
|
||||
DS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 流加密函数 默认按照 128 位密匙解密 -- }
|
||||
function EncryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
var
|
||||
Count: Int64;
|
||||
OutStrm: TStream;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
OutStrm := TStream.Create;
|
||||
Stream.Position := 0;
|
||||
Count := Stream.Size;
|
||||
OutStrm.Write(Count, SizeOf(Count));
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey128, OutStrm);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey192, OutStrm);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(Stream, 0, AESKey256, OutStrm);
|
||||
end;
|
||||
Result := OutStrm;
|
||||
finally
|
||||
OutStrm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 流解密函数 默认按照 128 位密匙解密 -- }
|
||||
function DecryptStream(Stream: TStream; Key: string;
|
||||
KeyBit: TKeyBit = kb128): TStream;
|
||||
var
|
||||
Count, OutPos: Int64;
|
||||
OutStrm: TStream;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
OutStrm := TStream.Create;
|
||||
Stream.Position := 0;
|
||||
OutPos :=OutStrm.Position;
|
||||
Stream.ReadBuffer(Count, SizeOf(Count));
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey128, OutStrm);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey192, OutStrm);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
|
||||
AESKey256, OutStrm);
|
||||
end;
|
||||
OutStrm.Size := OutPos + Count;
|
||||
OutStrm.Position := OutPos;
|
||||
Result := OutStrm;
|
||||
finally
|
||||
OutStrm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 文件加密函数 默认按照 128 位密匙解密 -- }
|
||||
procedure EncryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
var
|
||||
SFS, DFS: TFileStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
SFS := TFileStream.Create(SourceFile, fmOpenRead);
|
||||
try
|
||||
DFS := TFileStream.Create(DestFile, fmCreate);
|
||||
try
|
||||
Size := SFS.Size;
|
||||
DFS.WriteBuffer(Size, SizeOf(Size));
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey128, DFS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey192, DFS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
EncryptAESStreamECB(SFS, 0, AESKey256, DFS);
|
||||
end;
|
||||
finally
|
||||
DFS.Free;
|
||||
end;
|
||||
finally
|
||||
SFS.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ -- 文件解密函数 默认按照 128 位密匙解密 -- }
|
||||
procedure DecryptFile(SourceFile, DestFile: string;
|
||||
Key: string; KeyBit: TKeyBit = kb128);
|
||||
var
|
||||
SFS, DFS: TFileStream;
|
||||
Size: Int64;
|
||||
AESKey128: TAESKey128;
|
||||
AESKey192: TAESKey192;
|
||||
AESKey256: TAESKey256;
|
||||
begin
|
||||
SFS := TFileStream.Create(SourceFile, fmOpenRead);
|
||||
try
|
||||
SFS.ReadBuffer(Size, SizeOf(Size));
|
||||
DFS := TFileStream.Create(DestFile, fmCreate);
|
||||
try
|
||||
{ -- 128 位密匙最大长度为 16 个字符 -- }
|
||||
if KeyBit = kb128 then
|
||||
begin
|
||||
FillChar(AESKey128, SizeOf(AESKey128), 0 );
|
||||
Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey128, DFS);
|
||||
end;
|
||||
{ -- 192 位密匙最大长度为 24 个字符 -- }
|
||||
if KeyBit = kb192 then
|
||||
begin
|
||||
FillChar(AESKey192, SizeOf(AESKey192), 0 );
|
||||
Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey192, DFS);
|
||||
end;
|
||||
{ -- 256 位密匙最大长度为 32 个字符 -- }
|
||||
if KeyBit = kb256 then
|
||||
begin
|
||||
FillChar(AESKey256, SizeOf(AESKey256), 0 );
|
||||
Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
|
||||
DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey256, DFS);
|
||||
end;
|
||||
DFS.Size := Size;
|
||||
finally
|
||||
DFS.Free;
|
||||
end;
|
||||
finally
|
||||
SFS.Free;
|
||||
end;
|
||||
end;
|
||||
end.
|
2488
盛纺贸易管理/ElAES.pas
Normal file
2488
盛纺贸易管理/ElAES.pas
Normal file
File diff suppressed because it is too large
Load Diff
BIN
盛纺贸易管理/FX16082.XLS
Normal file
BIN
盛纺贸易管理/FX16082.XLS
Normal file
Binary file not shown.
2
盛纺贸易管理/FieldExportSet/.INI
Normal file
2
盛纺贸易管理/FieldExportSet/.INI
Normal file
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/订单号/颜色/出库长度/长度单位/卷号/缸号
|
2
盛纺贸易管理/FieldExportSet/检验分析订单.INI
Normal file
2
盛纺贸易管理/FieldExportSet/检验分析订单.INI
Normal file
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/布单号/布类/颜色/针寸数/重量(磅)/疵点个数
|
2
盛纺贸易管理/FieldExportSet/检验报告.INI
Normal file
2
盛纺贸易管理/FieldExportSet/检验报告.INI
Normal file
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/指示单号/染厂缸号/中文名称/颜色/门幅/克重/加工厂/坯布厂/打码人/打码时间/卷号/类型/皮重/净重/毛重/卷长度/检验门幅(cm)/检验克重(g/㎡)/疵点长度/长度单位/赠送数量/疵点名称/疵点个数/换算系数/包号/颜色(英文)/收货公司/合同号/收货地址/PO#/打包状态/款号/色号/花型号
|
2
盛纺贸易管理/FieldExportSet/生产指示单明细列表.INI
Normal file
2
盛纺贸易管理/FieldExportSet/生产指示单明细列表.INI
Normal file
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/款号/颜色/颜色(英文)/花型号/数量/数量单位/备注
|
2
盛纺贸易管理/FieldExportSet/采购单列表.INI
Normal file
2
盛纺贸易管理/FieldExportSet/采购单列表.INI
Normal file
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/采购单编号/Fabric/布类
|
7
盛纺贸易管理/File.INI
Normal file
7
盛纺贸易管理/File.INI
Normal file
|
@ -0,0 +1,7 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=
|
||||
机台个数=
|
||||
端口号=
|
||||
端口Dll文件=
|
||||
码表是否存在=
|
||||
码表Dll文件=JCYData.DLL
|
7
盛纺贸易管理/JZCRS232U.INI
Normal file
7
盛纺贸易管理/JZCRS232U.INI
Normal file
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com3
|
||||
波特率=2400
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
138
盛纺贸易管理/OrderManage.dof
Normal file
138
盛纺贸易管理/OrderManage.dof
Normal file
|
@ -0,0 +1,138 @@
|
|||
[FileVersion]
|
||||
Version=7.0
|
||||
[Compiler]
|
||||
A=8
|
||||
B=0
|
||||
C=1
|
||||
D=1
|
||||
E=0
|
||||
F=0
|
||||
G=1
|
||||
H=1
|
||||
I=1
|
||||
J=0
|
||||
K=0
|
||||
L=1
|
||||
M=0
|
||||
N=1
|
||||
O=1
|
||||
P=1
|
||||
Q=0
|
||||
R=0
|
||||
S=0
|
||||
T=0
|
||||
U=0
|
||||
V=1
|
||||
W=0
|
||||
X=1
|
||||
Y=1
|
||||
Z=1
|
||||
ShowHints=1
|
||||
ShowWarnings=1
|
||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
NamespacePrefix=
|
||||
SymbolDeprecated=1
|
||||
SymbolLibrary=1
|
||||
SymbolPlatform=1
|
||||
UnitLibrary=1
|
||||
UnitPlatform=1
|
||||
UnitDeprecated=1
|
||||
HResultCompat=1
|
||||
HidingMember=1
|
||||
HiddenVirtual=1
|
||||
Garbage=1
|
||||
BoundsError=1
|
||||
ZeroNilCompat=1
|
||||
StringConstTruncated=1
|
||||
ForLoopVarVarPar=1
|
||||
TypedConstVarPar=1
|
||||
AsgToTypedConst=1
|
||||
CaseLabelRange=1
|
||||
ForVariable=1
|
||||
ConstructingAbstract=1
|
||||
ComparisonFalse=1
|
||||
ComparisonTrue=1
|
||||
ComparingSignedUnsigned=1
|
||||
CombiningSignedUnsigned=1
|
||||
UnsupportedConstruct=1
|
||||
FileOpen=1
|
||||
FileOpenUnitSrc=1
|
||||
BadGlobalSymbol=1
|
||||
DuplicateConstructorDestructor=1
|
||||
InvalidDirective=1
|
||||
PackageNoLink=1
|
||||
PackageThreadVar=1
|
||||
ImplicitImport=1
|
||||
HPPEMITIgnored=1
|
||||
NoRetVal=1
|
||||
UseBeforeDef=1
|
||||
ForLoopVarUndef=1
|
||||
UnitNameMismatch=1
|
||||
NoCFGFileFound=1
|
||||
MessageDirective=1
|
||||
ImplicitVariants=1
|
||||
UnicodeToLocale=1
|
||||
LocaleToUnicode=1
|
||||
ImagebaseMultiple=1
|
||||
SuspiciousTypecast=1
|
||||
PrivatePropAccessor=1
|
||||
UnsafeType=0
|
||||
UnsafeCode=0
|
||||
UnsafeCast=0
|
||||
[Linker]
|
||||
MapFile=0
|
||||
OutputObjs=0
|
||||
ConsoleApp=1
|
||||
DebugInfo=0
|
||||
RemoteSymbols=0
|
||||
MinStackSize=16384
|
||||
MaxStackSize=1048576
|
||||
ImageBase=4194304
|
||||
ExeDescription=
|
||||
[Directories]
|
||||
OutputDir=
|
||||
UnitOutputDir=
|
||||
PackageDLLOutputDir=
|
||||
PackageDCPOutputDir=
|
||||
SearchPath=D:\富通ERP
|
||||
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=F:\selfware_83398\selfware\马国钢开发代码\项目代码\self\订单\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
23
盛纺贸易管理/ProjectGroup1.bpg
Normal file
23
盛纺贸易管理/ProjectGroup1.bpg
Normal file
|
@ -0,0 +1,23 @@
|
|||
#------------------------------------------------------------------------------
|
||||
VERSION = BWS.01
|
||||
#------------------------------------------------------------------------------
|
||||
!ifndef ROOT
|
||||
ROOT = $(MAKEDIR)\..
|
||||
!endif
|
||||
#------------------------------------------------------------------------------
|
||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||
#------------------------------------------------------------------------------
|
||||
PROJECTS = testDll.exe ProductPrice.dll
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
testDll.exe: testDll.dpr
|
||||
$(DCC)
|
||||
|
||||
ProductPrice.dll: ProductPrice.dpr
|
||||
$(DCC)
|
||||
|
||||
|
38
盛纺贸易管理/RCInspection.cfg
Normal file
38
盛纺贸易管理/RCInspection.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
|
141
盛纺贸易管理/RCInspection.dof
Normal file
141
盛纺贸易管理/RCInspection.dof
Normal file
|
@ -0,0 +1,141 @@
|
|||
[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=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:\selfware_83398\selfware\马国钢开发代码\项目代码\self\染厂检验管理\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
BIN
盛纺贸易管理/RCInspection.res
Normal file
BIN
盛纺贸易管理/RCInspection.res
Normal file
Binary file not shown.
3
盛纺贸易管理/SYSTEMSET.ini
Normal file
3
盛纺贸易管理/SYSTEMSET.ini
Normal file
|
@ -0,0 +1,3 @@
|
|||
[SERVER]
|
||||
服务器地址=60.190.195.86,7781
|
||||
软件名称=XXXXXXX1
|
38
盛纺贸易管理/TradeManage.cfg
Normal file
38
盛纺贸易管理/TradeManage.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 (x86)\borland\delphi7\Projects\Bpl"
|
||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
138
盛纺贸易管理/TradeManage.dof
Normal file
138
盛纺贸易管理/TradeManage.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=
|
||||
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:\徐加艳项目代码\项目代码\盛纺\盛纺贸易管理\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
|
101
盛纺贸易管理/TradeManage.dpr
Normal file
101
盛纺贸易管理/TradeManage.dpr
Normal file
|
@ -0,0 +1,101 @@
|
|||
library TradeManage;
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_TradeManage: TDataModule},
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_ZDYHelpSel in '..\..\..\ThreeFun\Form\U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||
U_SelExportField in '..\..\..\ThreeFun\Fun\U_SelExportField.pas' {frmSelExportField},
|
||||
U_ColumnSet in '..\..\..\ThreeFun\Form\U_ColumnSet.pas' {frmColumnSet},
|
||||
U_ZDYHelp in '..\..\..\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_GetAddRess in '..\..\..\ThreeFun\Form\U_GetAddRess.pas',
|
||||
U_iniParam in 'U_iniParam.pas',
|
||||
AES in 'AES.pas',
|
||||
ElAES in 'ElAES.pas',
|
||||
U_ColumnBandSet in '..\..\..\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
|
||||
U_SelPrintFieldNew in '..\..\..\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||
U_LabelPrint in 'U_LabelPrint.pas' {frmLabelPrint},
|
||||
U_ConInPutNX in 'U_ConInPutNX.pas' {frmConInPutNX},
|
||||
U_ProductOrderAnPaiGQX in 'U_ProductOrderAnPaiGQX.pas' {frmProductOrderAnPaiGQX},
|
||||
U_BanCpCkSaoM in 'U_BanCpCkSaoM.pas' {frmBanCpCkSaoM},
|
||||
U_CpRkSaoMNewDB in 'U_CpRkSaoMNewDB.pas' {frmCpRkSaoMNewDB},
|
||||
U_OrderSelRK in 'U_OrderSelRK.pas' {frmOrderSelRK},
|
||||
U_CKJYList in 'U_CKJYList.pas' {frmCKJYList},
|
||||
U_BanCpHCSaoM in 'U_BanCpHCSaoM.pas' {frmBanCpHCSaoM},
|
||||
U_ClothHCList in 'U_ClothHCList.pas' {frmClothHCList},
|
||||
U_ClothContractInPutPB in 'U_ClothContractInPutPB.pas' {frmClothContractInPutPB},
|
||||
U_ContractListNX in 'U_ContractListNX.pas' {frmContractListNX},
|
||||
U_ClothContractListDHSXQJG in 'U_ClothContractListDHSXQJG.pas' {frmClothContractListDHSXQJG},
|
||||
U_OrderJDList in 'U_OrderJDList.pas' {frmOrderJDList},
|
||||
U_ClothContractListWJG in 'U_ClothContractListWJG.pas' {frmClothContractListWJG},
|
||||
U_BefChkHX in 'U_BefChkHX.pas' {frmBefChkHX},
|
||||
U_ClothContractInPut in 'U_ClothContractInPut.pas' {frmClothContractInPut},
|
||||
U_ClothContractList in 'U_ClothContractList.pas' {frmClothContractList},
|
||||
U_ClothContractListDH in 'U_ClothContractListDH.pas' {frmClothContractListDH},
|
||||
U_ClothContractInPutHZ in 'U_ClothContractInPutHZ.pas' {frmClothContractInPutHZ},
|
||||
U_OrderInPut in 'U_OrderInPut.pas' {frmOrderInPut},
|
||||
U_CKProductBCPOutList in 'U_CKProductBCPOutList.pas' {frmCKProductBCPOutList},
|
||||
U_ClothPDInfoList in 'U_ClothPDInfoList.pas' {frmClothPDInfoList},
|
||||
U_ClothContractListDHSX in 'U_ClothContractListDHSX.pas' {frmClothContractListDHSX},
|
||||
U_CpRkSaoMNew in 'U_CpRkSaoMNew.pas' {frmCpRkSaoMNew},
|
||||
U_JYOrderCDOne_LR in 'U_JYOrderCDOne_LR.pas' {frmJYOrderCDOne_LR},
|
||||
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||
U_OrderInPut_FB in 'U_OrderInPut_FB.pas' {frmOrderInPut_FB},
|
||||
U_ProductOrderNewList_FB in 'U_ProductOrderNewList_FB.pas' {frmProductOrderNewList_FB},
|
||||
U_HCList in 'U_HCList.pas' {frmHCList},
|
||||
U_OrderInPut_HYWT in 'U_OrderInPut_HYWT.pas' {frmorderInput_HYWT},
|
||||
U_orderInPut_HYWT_Sub in 'U_orderInPut_HYWT_Sub.pas' {FrmOrderInPut_HYWT_Sub},
|
||||
U_ModulePromptList in 'U_ModulePromptList.pas' {frmModulePromptList},
|
||||
U_ProductOrderNewList_CY_Sel in 'U_ProductOrderNewList_CY_Sel.pas' {frmProductOrderNewList_CY_Sel},
|
||||
U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
|
||||
U_FanYangList in 'U_FanYangList.pas' {FrmFanYangList},
|
||||
U_FanYangListHZ in 'U_FanYangListHZ.pas' {FrmFanYangListHZ},
|
||||
U_CPGangNo in 'U_CPGangNo.pas' {frmCPGangNo},
|
||||
U_JYMJIDPRINT in 'U_JYMJIDPRINT.pas' {frmJYMJIDPRINT},
|
||||
U_CompressionFun in '..\..\..\ThreeFun\Fun\U_CompressionFun.pas',
|
||||
U_FZCMain_cx in 'U_FZCMain_cx.pas' {frmFZCMain_cx},
|
||||
U_Contract_Main in 'U_Contract_Main.pas' {frmContract_Main},
|
||||
U_ProductOrder_CX in 'U_ProductOrder_CX.pas' {FrmProductOrder_CX},
|
||||
U_OrderJD in 'U_OrderJD.pas' {frmOrderJD},
|
||||
U_GYSList in 'U_GYSList.pas' {frmGYSList},
|
||||
U_FjList10 in '..\..\..\ThreeFun\Form\U_FjList10.pas' {frmFjList10},
|
||||
U_OrderInPutPrice in 'U_OrderInPutPrice.pas' {frmOrderInPutPrice},
|
||||
U_ContractSelList in 'U_ContractSelList.pas' {frmContractSelList},
|
||||
U_CPManageFMSel in 'U_CPManageFMSel.pas' {frmCPManageFMSel},
|
||||
U_RTFun in '..\..\..\ThreeFun\Fun\U_RTFun.pas',
|
||||
MovePanel in '..\..\..\ThreeFun\Form\MovePanel.pas',
|
||||
U_FjList_RZ in 'U_FjList_RZ.pas' {frmFjList_RZ},
|
||||
U_XHList_ceshi1 in 'U_XHList_ceshi1.pas' {frmXHList_ceshi1},
|
||||
U_ProductOrderNewList_JD in 'U_ProductOrderNewList_JD.pas' {frmProductOrderNewList_JD},
|
||||
U_HuiruhGPIjiluCX in 'U_HuiruhGPIjiluCX.pas' {frmHuiruhGPIjiluCX},
|
||||
U_SKCR_CX in 'U_SKCR_CX.pas' {frmSKCR_CX},
|
||||
U_KHTopList in 'U_KHTopList.pas' {frmKHTopList};
|
||||
|
||||
{$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
盛纺贸易管理/TradeManage.rar
Normal file
BIN
盛纺贸易管理/TradeManage.rar
Normal file
Binary file not shown.
BIN
盛纺贸易管理/TradeManage.res
Normal file
BIN
盛纺贸易管理/TradeManage.res
Normal file
Binary file not shown.
202
盛纺贸易管理/U.dfm
Normal file
202
盛纺贸易管理/U.dfm
Normal file
|
@ -0,0 +1,202 @@
|
|||
object Form1: TForm1
|
||||
Left = 204
|
||||
Top = 180
|
||||
Width = 870
|
||||
Height = 500
|
||||
Caption = 'Form1'
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 862
|
||||
Height = 30
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_RCInspection.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton2: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 58
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 30
|
||||
Width = 862
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 25
|
||||
Top = 16
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #24067#21305#26465#30721
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object APID: TEdit
|
||||
Left = 80
|
||||
Top = 10
|
||||
Width = 138
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 71
|
||||
Width = 862
|
||||
Height = 392
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2CDQty
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_RCInspection.TextSHuangSe
|
||||
object tv2CDType: TcxGridDBColumn
|
||||
Caption = #30133#28857#21517#31216
|
||||
DataBinding.FieldName = 'CDName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Styles.Content = DataLink_RCInspection.Default
|
||||
Width = 144
|
||||
end
|
||||
object tv2CDWZ: TcxGridDBColumn
|
||||
Caption = #20301#32622#36215
|
||||
DataBinding.FieldName = 'CDBeg'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Styles.Content = DataLink_RCInspection.Default
|
||||
Width = 96
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #20301#32622#27490
|
||||
DataBinding.FieldName = 'CDend'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Styles.Content = DataLink_RCInspection.Default
|
||||
Width = 93
|
||||
end
|
||||
object Tv2CDQty: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'CDQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Styles.Content = DataLink_RCInspection.Default
|
||||
Width = 93
|
||||
end
|
||||
object Tv2CDReason: TcxGridDBColumn
|
||||
Caption = #21407#22240
|
||||
DataBinding.FieldName = 'CDReason'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 131
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'CDQty'
|
||||
Visible = False
|
||||
Width = 55
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOTmp: TADOQuery
|
||||
Connection = DataLink_RCInspection.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 336
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_RCInspection.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 312
|
||||
Top = 200
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_RCInspection.ADOLink
|
||||
Parameters = <>
|
||||
Left = 288
|
||||
Top = 40
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_MJ
|
||||
Left = 528
|
||||
Top = 200
|
||||
end
|
||||
object Order_MJ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 344
|
||||
Top = 200
|
||||
end
|
||||
end
|
48
盛纺贸易管理/U.pas
Normal file
48
盛纺贸易管理/U.pas
Normal file
|
@ -0,0 +1,48 @@
|
|||
unit U;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxTextEdit, DBClient, ADODB,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, StdCtrls, ExtCtrls,
|
||||
ComCtrls, ToolWin;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
APID: TEdit;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
tv2CDType: TcxGridDBColumn;
|
||||
tv2CDWZ: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
Tv2CDQty: TcxGridDBColumn;
|
||||
Tv2CDReason: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ADOTmp: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_MJ: TClientDataSet;
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
end.
|
201
盛纺贸易管理/U_BanCpCkSaoM.dfm
Normal file
201
盛纺贸易管理/U_BanCpCkSaoM.dfm
Normal file
|
@ -0,0 +1,201 @@
|
|||
object frmBanCpCkSaoM: TfrmBanCpCkSaoM
|
||||
Left = 241
|
||||
Top = 177
|
||||
Width = 870
|
||||
Height = 500
|
||||
Caption = #21322#25104#21697#20986#24211#25195#25551
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 16
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 81
|
||||
Width = 862
|
||||
Height = 382
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'orderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #20013#25991#21517#31216
|
||||
DataBinding.FieldName = 'MPRTCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 101
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'GangNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 58
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 112
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #20986#24211#26102#38388
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #20986#24211#20844#26020#25968
|
||||
DataBinding.FieldName = 'KGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 89
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #20986#24211#38271#24230
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 99
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #38271#24230#21333#20301
|
||||
DataBinding.FieldName = 'QtyUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 862
|
||||
Height = 81
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 56
|
||||
Top = 40
|
||||
Width = 68
|
||||
Height = 16
|
||||
Caption = #25195#25551#20837#21475
|
||||
end
|
||||
object XJID: TEdit
|
||||
Left = 124
|
||||
Top = 37
|
||||
Width = 167
|
||||
Height = 24
|
||||
TabOrder = 0
|
||||
OnKeyPress = XJIDKeyPress
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 309
|
||||
Top = 38
|
||||
Width = 75
|
||||
Height = 23
|
||||
Caption = #20986#24211
|
||||
TabOrder = 1
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 413
|
||||
Top = 38
|
||||
Width = 75
|
||||
Height = 23
|
||||
Caption = #20851#38381
|
||||
TabOrder = 2
|
||||
OnClick = Button2Click
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 728
|
||||
Top = 136
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 760
|
||||
Top = 136
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 792
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 944
|
||||
Top = 32
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 984
|
||||
Top = 40
|
||||
end
|
||||
end
|
253
盛纺贸易管理/U_BanCpCkSaoM.pas
Normal file
253
盛纺贸易管理/U_BanCpCkSaoM.pas
Normal file
|
@ -0,0 +1,253 @@
|
|||
unit U_BanCpCkSaoM;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGrid;
|
||||
|
||||
type
|
||||
TfrmBanCpCkSaoM = class(TForm)
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
CDS_Main: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
XJID: TEdit;
|
||||
Label1: TLabel;
|
||||
Button1: TButton;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
Button2: TButton;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure XJIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBanCpCkSaoM: TfrmBanCpCkSaoM;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun ;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBanCpCkSaoM.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpCkSaoM.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBanCpCkSaoM:=nil;
|
||||
end;
|
||||
procedure TfrmBanCpCkSaoM.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,F.KCQty,F.KCKgQty,F.KCQtyUnit,KK.GangNo ');
|
||||
sql.add('from CK_BanCP_CR A ');
|
||||
Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
|
||||
Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
|
||||
Sql.add(' inner join WFB_MJJY D on A.MJId=D.MJId');
|
||||
sql.Add(' inner join JYOrder_Sub_AnPai KK on D.APID=KK.APID');
|
||||
sql.Add(' inner join CK_BanCP_KC F on A.CRID=F.CRID');
|
||||
sql.add('where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpCkSaoM.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('成品出库',Tv1,'成品仓库');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpCkSaoM.XJIDKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.* ');
|
||||
sql.add('from CK_BanCP_CR A ');
|
||||
sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('条码错误!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,F.KCQty,F.KCKgQty,F.KCQtyUnit,KK.GangNo ');
|
||||
sql.add('from CK_BanCP_CR A ');
|
||||
Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
|
||||
Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
|
||||
Sql.add(' inner join WFB_MJJY D on A.MJId=D.MJId');
|
||||
sql.Add(' inner join JYOrder_Sub_AnPai KK on D.APID=KK.APID');
|
||||
sql.Add(' inner join CK_BanCP_KC F on A.CRID=F.CRID');
|
||||
sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
|
||||
sql.Add(' and KCQty>0 and A.CRType=''检验入库'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
if CDS_Main.Locate('MJID',Trim(ADOQueryTemp.fieldbyname('MJID').AsString),[])=True then
|
||||
begin
|
||||
Application.MessageBox('已经扫描过,不能再次扫描!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with CDS_Main do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('OrderNo').Value:=ADOQueryTemp.fieldbyname('OrderNo').Value;
|
||||
FieldByName('MPRTCodeName').Value:=ADOQueryTemp.fieldbyname('MPRTCodeName').Value;
|
||||
FieldByName('PRTColor').Value:=ADOQueryTemp.fieldbyname('PRTColor').Value;
|
||||
FieldByName('GangNo').Value:=ADOQueryTemp.fieldbyname('GangNo').Value;
|
||||
FieldByName('CRID').Value:=ADOQueryTemp.fieldbyname('CRID').Value;
|
||||
FieldByName('CRTime').Value:=SGetServerDateTime(ADOQueryCmd);
|
||||
FieldByName('KGQty').Value:=ADOQueryTemp.fieldbyname('kCKGQty').Value;
|
||||
FieldByName('Qty').Value:=ADOQueryTemp.fieldbyname('KCQty').Value;
|
||||
FieldByName('QtyUnit').Value:=ADOQueryTemp.fieldbyname('KCQtyUnit').Value;
|
||||
FieldByName('MJID').Value:=ADOQueryTemp.fieldbyname('MJID').Value;
|
||||
FieldByName('APID').Value:=ADOQueryTemp.fieldbyname('APID').Value;
|
||||
Post;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox('此卷已经出库,不能再次出库!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
XJID.Text:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpCkSaoM.Button1Click(Sender: TObject);
|
||||
var
|
||||
maxno:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
XJID.SetFocus;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxno,'ZC','CK_BanCp_CR',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取出库最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CK_BanCp_CR Set NowOutFlag=1 where MJID='''+Trim(CDS_Main.fieldbyname('MJID').AsString)+'''');
|
||||
SQL.Add(' and CRType=''正常出库'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CK_BanCp_CR where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BCID').Value:=Trim(maxno);
|
||||
FieldByName('CRID').Value:=CDS_Main.fieldbyname('CRID').Value;
|
||||
FieldByName('CRTime').Value:=CDS_Main.fieldbyname('CRTime').Value;
|
||||
FieldByName('KGQty').Value:=CDS_Main.fieldbyname('KGQty').Value;
|
||||
FieldByName('Qty').Value:=CDS_Main.fieldbyname('Qty').Value;
|
||||
FieldByName('QtyUnit').Value:=CDS_Main.fieldbyname('QtyUnit').Value;
|
||||
FieldByName('MJID').Value:=CDS_Main.fieldbyname('MJID').Value;
|
||||
FieldByName('APID').Value:=CDS_Main.fieldbyname('APID').Value;
|
||||
FieldByName('CPType').Value:=CDS_Main.fieldbyname('CPType').Value;
|
||||
FieldByName('FillTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('CRFlag').Value:='出库';
|
||||
FieldByName('CRType').Value:='正常出库';
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CK_BanCp_KC set KCKgQty=0,KCQty=0 where CRID='+CDS_Main.fieldbyname('CRID').AsString);
|
||||
ExecSQL;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
InitGrid();
|
||||
Application.MessageBox('出库成功!','提示',0);
|
||||
Exit;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('出库异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpCkSaoM.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpCkSaoM.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('成品出库',Tv1,'成品仓库');
|
||||
end;
|
||||
|
||||
end.
|
212
盛纺贸易管理/U_BanCpHCSaoM.dfm
Normal file
212
盛纺贸易管理/U_BanCpHCSaoM.dfm
Normal file
|
@ -0,0 +1,212 @@
|
|||
object frmBanCpHCSaoM: TfrmBanCpHCSaoM
|
||||
Left = 241
|
||||
Top = 177
|
||||
Width = 905
|
||||
Height = 504
|
||||
Caption = #21322#25104#21697#22238#20179#25195#25551
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 16
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 81
|
||||
Width = 897
|
||||
Height = 386
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = cxStyle1
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'orderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 77
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #20135#21697#20195#21495
|
||||
DataBinding.FieldName = 'MPRTCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 112
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 77
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'MPRTMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 58
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'MPRTKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 57
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 123
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #22238#20179#26102#38388
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 88
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #22238#20179#20844#26020#25968
|
||||
DataBinding.FieldName = 'KGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 100
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #22238#20179#38271#24230
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 85
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #38271#24230#21333#20301
|
||||
DataBinding.FieldName = 'QtyUnit'
|
||||
Options.Focusing = False
|
||||
Width = 74
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 897
|
||||
Height = 81
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 56
|
||||
Top = 40
|
||||
Width = 68
|
||||
Height = 16
|
||||
Caption = #25195#25551#20837#21475
|
||||
end
|
||||
object XJID: TEdit
|
||||
Left = 124
|
||||
Top = 37
|
||||
Width = 167
|
||||
Height = 24
|
||||
TabOrder = 0
|
||||
OnKeyPress = XJIDKeyPress
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 309
|
||||
Top = 38
|
||||
Width = 75
|
||||
Height = 23
|
||||
Caption = #22238#20179
|
||||
TabOrder = 1
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 421
|
||||
Top = 38
|
||||
Width = 75
|
||||
Height = 23
|
||||
Caption = #20851#38381
|
||||
TabOrder = 2
|
||||
OnClick = Button2Click
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 728
|
||||
Top = 136
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 760
|
||||
Top = 136
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 792
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 944
|
||||
Top = 32
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 984
|
||||
Top = 40
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
object cxStyle1: TcxStyle
|
||||
end
|
||||
end
|
||||
end
|
264
盛纺贸易管理/U_BanCpHCSaoM.pas
Normal file
264
盛纺贸易管理/U_BanCpHCSaoM.pas
Normal file
|
@ -0,0 +1,264 @@
|
|||
unit U_BanCpHCSaoM;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGrid;
|
||||
|
||||
type
|
||||
TfrmBanCpHCSaoM = class(TForm)
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
CDS_Main: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
XJID: TEdit;
|
||||
Label1: TLabel;
|
||||
Button1: TButton;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
Button2: TButton;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure XJIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBanCpHCSaoM: TfrmBanCpHCSaoM;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun ;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBanCpHCSaoM.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpHCSaoM.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBanCpHCSaoM:=nil;
|
||||
end;
|
||||
procedure TfrmBanCpHCSaoM.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,B.MPRTMF,B.MPRTKZ ');
|
||||
sql.add('from CK_BanCP_CR A ');
|
||||
Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
|
||||
Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
|
||||
sql.add('where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpHCSaoM.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('成品回仓',Tv1,'成品仓库');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpHCSaoM.XJIDKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.* ');
|
||||
sql.add('from CK_BanCP_CR A ');
|
||||
sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('条码错误!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,B.MPRTMF,B.MPRTKZ,F.KCQty,F.KCKgQty ');
|
||||
sql.add('from CK_BanCP_CR A ');
|
||||
Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
|
||||
Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
|
||||
sql.Add(' inner join CK_BanCP_KC F on A.CRID=F.CRID');
|
||||
sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
|
||||
sql.Add(' and KCQty=0 and A.CRType=''检验入库'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=false then
|
||||
begin
|
||||
if CDS_Main.Locate('MJID',Trim(ADOQueryTemp.fieldbyname('MJID').AsString),[])=True then
|
||||
begin
|
||||
Application.MessageBox('已经扫描过,不能再次扫描!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with CDS_Main do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('OrderNo').Value:=ADOQueryTemp.fieldbyname('OrderNo').Value;
|
||||
FieldByName('MPRTCodeName').Value:=ADOQueryTemp.fieldbyname('MPRTCodeName').Value;
|
||||
FieldByName('PRTColor').Value:=ADOQueryTemp.fieldbyname('PRTColor').Value;
|
||||
FieldByName('MPRTMF').Value:=ADOQueryTemp.fieldbyname('MPRTMF').Value;
|
||||
FieldByName('MPRTKZ').Value:=ADOQueryTemp.fieldbyname('MPRTKZ').Value;
|
||||
FieldByName('CRID').Value:=ADOQueryTemp.fieldbyname('CRID').Value;
|
||||
FieldByName('CRTime').Value:=SGetServerDateTime(ADOQueryCmd);
|
||||
FieldByName('KGQty').Value:=ADOQueryTemp.fieldbyname('KGQty').Value;
|
||||
FieldByName('Qty').Value:=ADOQueryTemp.fieldbyname('Qty').Value;
|
||||
FieldByName('QtyUnit').Value:=ADOQueryTemp.fieldbyname('QtyUnit').Value;
|
||||
FieldByName('MainID').Value:=ADOQueryTemp.fieldbyname('MainID').Value;
|
||||
FieldByName('SubID').Value:=ADOQueryTemp.fieldbyname('SubID').Value;
|
||||
FieldByName('APID').Value:=ADOQueryTemp.fieldbyname('APID').Value;
|
||||
FieldByName('CPType').Value:=ADOQueryTemp.fieldbyname('CPType').Value;
|
||||
FieldByName('MJID').Value:=ADOQueryTemp.fieldbyname('MJID').Value;
|
||||
Post;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox('此卷已在仓库中,无需回仓!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
XJID.Text:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpHCSaoM.Button1Click(Sender: TObject);
|
||||
var
|
||||
maxno:string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if CDS_Main.Locate('KgQty',0,[]) then
|
||||
begin
|
||||
Application.MessageBox('回仓公斤数不能为0!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Main.Locate('Qty',0,[]) then
|
||||
begin
|
||||
Application.MessageBox('回仓长度不能为0!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Main.Locate('KgQty',null,[]) then
|
||||
begin
|
||||
Application.MessageBox('回仓公斤数不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if CDS_Main.Locate('Qty',null,[]) then
|
||||
begin
|
||||
Application.MessageBox('回仓长度不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
XJID.SetFocus;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxno,'HC','CK_BanCp_CR',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取出库最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CK_BanCp_CR where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('BCID').Value:=Trim(maxno);
|
||||
FieldByName('CRID').Value:=CDS_Main.fieldbyname('CRID').Value;
|
||||
FieldByName('CRTime').Value:=CDS_Main.fieldbyname('CRTime').Value;
|
||||
FieldByName('KGQty').Value:=CDS_Main.fieldbyname('KGQty').Value;
|
||||
FieldByName('Qty').Value:=CDS_Main.fieldbyname('Qty').Value;
|
||||
FieldByName('QtyUnit').Value:=CDS_Main.fieldbyname('QtyUnit').Value;
|
||||
FieldByName('MainID').Value:=CDS_Main.fieldbyname('MainID').Value;
|
||||
FieldByName('SubID').Value:=CDS_Main.fieldbyname('SubID').Value;
|
||||
FieldByName('APID').Value:=CDS_Main.fieldbyname('APID').Value;
|
||||
FieldByName('MJID').Value:=CDS_Main.fieldbyname('MJID').Value;
|
||||
FieldByName('CPType').Value:=CDS_Main.fieldbyname('CPType').Value;
|
||||
FieldByName('FillTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('CRFlag').Value:='入库';
|
||||
FieldByName('CRType').Value:='回仓';
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('Update CK_BanCp_KC set KCKgQty='+cds_main.fieldbyname('KgQty').AsString);
|
||||
SQL.Add(',KCQty='+cds_main.fieldbyname('Qty').AsString);
|
||||
sql.Add(' where CRID='+CDS_Main.fieldbyname('CRID').AsString);
|
||||
ExecSQL;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
InitGrid();
|
||||
Application.MessageBox('回仓成功!','提示',0);
|
||||
Exit;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('回仓异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBanCpHCSaoM.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('成品回仓',Tv1,'成品仓库');
|
||||
end;
|
||||
|
||||
end.
|
255
盛纺贸易管理/U_BangAdd.dfm
Normal file
255
盛纺贸易管理/U_BangAdd.dfm
Normal file
|
@ -0,0 +1,255 @@
|
|||
object frmBangAdd: TfrmBangAdd
|
||||
Left = 232
|
||||
Top = 185
|
||||
Width = 703
|
||||
Height = 396
|
||||
Caption = #26816#39564#31216#37325
|
||||
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 Label1: TLabel
|
||||
Left = 193
|
||||
Top = 79
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #25195#25551#20837#21475
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 392
|
||||
Top = 77
|
||||
Width = 9
|
||||
Height = 16
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 193
|
||||
Top = 115
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #31216' '#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 387
|
||||
Top = 115
|
||||
Width = 15
|
||||
Height = 14
|
||||
Caption = #30917
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 193
|
||||
Top = 147
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #32440' '#31649
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 387
|
||||
Top = 147
|
||||
Width = 15
|
||||
Height = 14
|
||||
Caption = #30917
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 193
|
||||
Top = 179
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #33014' '#24102
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 387
|
||||
Top = 179
|
||||
Width = 15
|
||||
Height = 14
|
||||
Caption = #30917
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object MJID: TEdit
|
||||
Left = 248
|
||||
Top = 73
|
||||
Width = 138
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnKeyPress = MJIDKeyPress
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 193
|
||||
Top = 232
|
||||
Width = 57
|
||||
Height = 25
|
||||
Caption = #30830#23450
|
||||
TabOrder = 1
|
||||
OnClick = Button1Click
|
||||
OnKeyPress = Button1KeyPress
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 343
|
||||
Top = 232
|
||||
Width = 60
|
||||
Height = 25
|
||||
Caption = #36864#20986
|
||||
TabOrder = 2
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 248
|
||||
Top = 109
|
||||
Width = 136
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
OnKeyPress = MJIDKeyPress
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 248
|
||||
Top = 44
|
||||
Width = 97
|
||||
Height = 17
|
||||
Caption = #33258#21160#35835#21462
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 4
|
||||
OnClick = CheckBox1Click
|
||||
end
|
||||
object Edit2: TEdit
|
||||
Left = 248
|
||||
Top = 141
|
||||
Width = 136
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
OnKeyPress = MJIDKeyPress
|
||||
end
|
||||
object Edit3: TEdit
|
||||
Left = 248
|
||||
Top = 173
|
||||
Width = 136
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnKeyPress = MJIDKeyPress
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_RCInspection.ADOLink
|
||||
Parameters = <>
|
||||
Left = 608
|
||||
Top = 144
|
||||
end
|
||||
object ADOTmp: TADOQuery
|
||||
Connection = DataLink_RCInspection.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 608
|
||||
Top = 200
|
||||
end
|
||||
object RM2: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 560
|
||||
Top = 200
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 536
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_RCInspection.ADOLink
|
||||
Parameters = <>
|
||||
Left = 512
|
||||
Top = 184
|
||||
end
|
||||
end
|
308
盛纺贸易管理/U_BangAdd.pas
Normal file
308
盛纺贸易管理/U_BangAdd.pas
Normal file
|
@ -0,0 +1,308 @@
|
|||
unit U_BangAdd;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, DB, ADODB,OleCtrls, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport;
|
||||
function CommOpen(fhandle:hwnd;sCommName:PAnsiChar;
|
||||
IntTime:integer;IsMessage:integer):integer;stdcall;external 'ELERS323C.DLL';
|
||||
function CommClose(sCommName:PAnsiChar):integer;stdcall;external 'ELERS323C.DLL';
|
||||
|
||||
type
|
||||
TfrmBangAdd = class(TForm)
|
||||
Label1: TLabel;
|
||||
MJID: TEdit;
|
||||
Label2: TLabel;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Edit1: TEdit;
|
||||
ADOCmd: TADOQuery;
|
||||
ADOTmp: TADOQuery;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
CheckBox1: TCheckBox;
|
||||
RM2: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Edit2: TEdit;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
Edit3: TEdit;
|
||||
procedure MJIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure Button1KeyPress(Sender: TObject; var Key: Char);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure On1201(Var Message:Tmessage);Message 1201;
|
||||
procedure PrintData();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBangAdd: TfrmBangAdd;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmBangAdd.On1201(Var Message:Tmessage);
|
||||
var
|
||||
i1,i2:integer;
|
||||
unitname:string;
|
||||
fdata:double;
|
||||
begin
|
||||
i1:=message.WParam;
|
||||
i2:=message.LParam;
|
||||
|
||||
Edit1.Text:= floattostr(i1 *i2 /100000 );
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.MJIDKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from WFB_MJJY where MJID='''+Trim(MJID.Text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOTmp.IsEmpty=False then
|
||||
begin
|
||||
Label2.Visible:=True;
|
||||
Label2.Caption:=Trim(ADOTmp.fieldbyname('MJID').AsString);
|
||||
end else
|
||||
begin
|
||||
MJID.Text:='';
|
||||
Label2.Visible:=False;
|
||||
Label2.Caption:='';
|
||||
Application.MessageBox('条码错误!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
MJID.Text:='';
|
||||
Button1.SetFocus;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBangAdd:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.Button1Click(Sender: TObject);
|
||||
var
|
||||
FZG,FJD:string;
|
||||
FFreal,FMJMaoZ:Double;
|
||||
begin
|
||||
if Label2.Caption='' then
|
||||
begin
|
||||
Application.MessageBox('未扫条码!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(Edit1.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('重量不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select * from WFB_MJJY where MJID='''+Trim(Label2.Caption)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOTmp.FieldByName('MJMaoZ').AsFloat>0 then
|
||||
begin
|
||||
if Application.MessageBox('已称重,确定要重新称重吗?','提示',32+4)<>IDYES then Exit;
|
||||
end;
|
||||
if Trim(Edit2.Text)<>'' then
|
||||
begin
|
||||
if TryStrToFloat(Edit2.Text,FFreal)=False then
|
||||
begin
|
||||
Application.MessageBox('非法数字!','提示',0);
|
||||
Exit;
|
||||
end else
|
||||
begin
|
||||
FZG:=Edit2.Text;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
FZG:='0';
|
||||
end;
|
||||
if Trim(Edit3.Text)<>'' then
|
||||
begin
|
||||
if TryStrToFloat(Edit3.Text,FFreal)=False then
|
||||
begin
|
||||
Application.MessageBox('非法数字!','提示',0);
|
||||
Exit;
|
||||
end else
|
||||
begin
|
||||
FJD:=Edit3.Text;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
FJD:='0';
|
||||
end;
|
||||
FMJMaoZ:=StrToFloat(Edit1.Text)-StrToFloat(FZG);
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update WFB_MJJY Set MJMaoZ='+Trim(Floattostr(FMJMaoZ)));
|
||||
sql.add(',MJQty1='+Trim(Edit1.Text));
|
||||
sql.add(',MJQty2='+Trim(FZG));
|
||||
sql.add(',MJQty3='+Trim(FJD));
|
||||
SQL.Add(' where MJID='''+Trim(Label2.Caption)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
PrintData();
|
||||
Label2.Caption:='';
|
||||
Label2.Visible:=False;
|
||||
MJID.SetFocus;
|
||||
//Application.MessageBox('操作成功!','提示',0);
|
||||
except
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('操作失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmBangAdd.PrintData();
|
||||
var
|
||||
fPrintFile,LabInt,LabName:String;
|
||||
begin
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select C.SLbInt,C.SLbName from WFB_MJJY A');
|
||||
sql.Add(' inner join JYOrder_Sub_AnPai B on A.APID=B.APID');
|
||||
sql.Add(' inner join JYOrder_Sub C on B.SubId=C.SubId');
|
||||
sql.Add(' where A.MJID='''+Trim(Label2.Caption)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOTmp.IsEmpty=False then
|
||||
begin
|
||||
LabInt:=ADOTmp.fieldbyname('SLbInt').AsString;
|
||||
LabName:=ADOTmp.fieldbyname('SLbName').AsString;
|
||||
end ;
|
||||
if Trim(LabName)='' then
|
||||
begin
|
||||
Application.MessageBox('卷标签未设置!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
{ try
|
||||
frmLabelPrint:=TfrmLabelPrint.Create(Application);
|
||||
with frmLabelPrint do
|
||||
begin
|
||||
fLabelId:=LabInt;
|
||||
FFCDFlag:=Trim(CDFlag);
|
||||
fKeyNo:=Trim(FXJID);
|
||||
fIsPreviewPrint:=True;
|
||||
frmLabelPrint.Button1.Click;
|
||||
// if ShowModal=1 then
|
||||
//begin
|
||||
|
||||
// end;
|
||||
end;
|
||||
finally
|
||||
frmLabelPrint.Free;
|
||||
end; }
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select D.OrderNo,C.PRTColor,C.PRTKZ,C.PRTType,D.OrdDefStr2,D.OrdDefStr3,D.OrdDefStr7,B.AOrdDefNote30,A.MJXH,B.GangNo');
|
||||
SQL.Add(',C.PRTMF,C.SOrddefstr3,C.SOrddefstr5,D.DlyDate,D.DLyPlace,A.MJMaoZ,B.AOrdDefNote31,C.SOrddefstr4,');
|
||||
SQL.Add('ColorEngName=(select top 1 Note from KH_Zdy E where E.ZdyName=C.PRTColor and E.Type=''OrdColor'' ),');
|
||||
{SQL.Add('MJBang=Cast((A.MJMaoZ*2.2046) as decimal(18,2)),');
|
||||
SQL.Add('MJMaoZBang=Cast(((A.MJQty1+A.MJQty3)*2.2046) as decimal(18,2)),');
|
||||
SQL.Add('MAQty=Cast((A.MJMaoZ*100*1000/(A.MJSJKZ*(A.MJFK*2.54))*0.9144) as decimal(18,2) ),');
|
||||
SQL.Add('MQty=Cast((A.MJMaoZ*100*1000/(A.MJSJKZ*(A.MJFK*2.54))) as decimal(18,2) ),');
|
||||
SQL.Add('MaoZ=A.MJQty1+A.MJQty3,');
|
||||
SQL.Add('JingZ=A.MJQty1-A.MJQty2'); }
|
||||
SQL.Add('MJBang=A.MJMaoZ,');
|
||||
SQL.Add('MJMaoZBang=A.MJQty1+A.MJQty3,');
|
||||
SQL.Add('MAQty=Cast((A.MJMaoZ*0.4536*100*1000/(A.MJSJKZ*(A.MJFK*2.54))*0.9144) as decimal(18,2) ),');
|
||||
SQL.Add('MQty=Cast((A.MJMaoZ*0.4536*100*1000/(A.MJSJKZ*(A.MJFK*2.54))) as decimal(18,2) ),');
|
||||
SQL.Add('MaoZ=Cast((A.MJQty1+A.MJQty3)*0.4536 as decimal(18,2)),');
|
||||
SQL.Add('JingZ=Cast((A.MJQty1-A.MJQty2)*0.4536 as decimal(18,2))');
|
||||
SQL.Add('from WFB_MJJY A inner join JYOrder_Sub_AnPai B on A.APID=B.APID');
|
||||
SQL.Add('inner join JYOrder_Sub C on B.SubId=C.SubId');
|
||||
SQL.Add('inner join JYOrder_Main D on C.MainId=D.Mainid');
|
||||
SQL.Add('where A.MJID='''+Trim(Label2.Caption)+'''');
|
||||
Open;
|
||||
end;
|
||||
fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\'+Trim(LabName)+'.rmf' ;
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM2.LoadFromFile(fPrintFile);
|
||||
//RM2.ShowReport;
|
||||
Rm2.PrintReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\'+Trim(LabName)+'.rmf'),'提示',0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
if CheckBox1.Checked=False then
|
||||
CommClose(pchar('com1'));
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.FormShow(Sender: TObject);
|
||||
begin
|
||||
if CommOpen(frmBangAdd.Handle,pchar('com1'),500,1)<1 then
|
||||
begin
|
||||
showmessage('串口打开失败!');
|
||||
end
|
||||
else
|
||||
begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
if CheckBox1.Checked=True then
|
||||
begin
|
||||
if CommOpen(frmBangAdd.Handle,pchar('com1'),500,1)<1 then
|
||||
begin
|
||||
showmessage('串口打开失败!');
|
||||
end
|
||||
else
|
||||
begin
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
CommClose(pchar('com1'));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBangAdd.Button1KeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
Button1.Click;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
335
盛纺贸易管理/U_BefChkHX.dfm
Normal file
335
盛纺贸易管理/U_BefChkHX.dfm
Normal file
|
@ -0,0 +1,335 @@
|
|||
object frmBefChkHX: TfrmBefChkHX
|
||||
Left = 213
|
||||
Top = 134
|
||||
Width = 870
|
||||
Height = 534
|
||||
Caption = #26816#21069#22238#20462
|
||||
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 Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 854
|
||||
Height = 73
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object orderno: TLabel
|
||||
Left = 48
|
||||
Top = 24
|
||||
Width = 63
|
||||
Height = 16
|
||||
Caption = 'orderno'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object PRTColor: TLabel
|
||||
Left = 168
|
||||
Top = 24
|
||||
Width = 72
|
||||
Height = 16
|
||||
Caption = 'PRTColor'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object FirstName: TLabel
|
||||
Left = 296
|
||||
Top = 24
|
||||
Width = 81
|
||||
Height = 16
|
||||
Caption = 'FirstName'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object PBFactory: TLabel
|
||||
Left = 464
|
||||
Top = 24
|
||||
Width = 81
|
||||
Height = 16
|
||||
Caption = 'PBFactory'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 854
|
||||
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 = 1
|
||||
object ToolButton2: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 103
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 107
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 111
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 248
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 105
|
||||
Width = 854
|
||||
Height = 390
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object TV2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = V2Column1
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = V2Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = V2Column7
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
object V2Column2: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #22238#20462#26102#38388
|
||||
DataBinding.FieldName = 'HXDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 96
|
||||
end
|
||||
object V2Column8: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #26579#21378
|
||||
DataBinding.FieldName = 'HXFactory'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 84
|
||||
end
|
||||
object V2Column7: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21305#25968#37327
|
||||
DataBinding.FieldName = 'HXPS'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 50
|
||||
end
|
||||
object V2Column1: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'HXQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_TradeManage.FonePurple
|
||||
Width = 69
|
||||
end
|
||||
object V2Column9: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'GangNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object V2Column5: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'HXUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
'M'
|
||||
'Kg')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 74
|
||||
end
|
||||
object V2Column6: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'HXNote'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 123
|
||||
end
|
||||
object V2Column4: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'HXType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 71
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = TV2
|
||||
end
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 8
|
||||
end
|
||||
object ADOQuery2: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 512
|
||||
Top = 8
|
||||
end
|
||||
object ADOQuery3: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 440
|
||||
Top = 8
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 448
|
||||
Top = 216
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 480
|
||||
Top = 224
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 312
|
||||
Top = 256
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 416
|
||||
Top = 160
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDBMain
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 464
|
||||
Top = 168
|
||||
ReportData = {}
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 392
|
||||
Top = 288
|
||||
end
|
||||
end
|
256
盛纺贸易管理/U_BefChkHX.pas
Normal file
256
盛纺贸易管理/U_BefChkHX.pas
Normal file
|
@ -0,0 +1,256 @@
|
|||
unit U_BefChkHX;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxCalendar, cxButtonEdit,
|
||||
cxTextEdit, StdCtrls, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, ComCtrls, ToolWin, ExtCtrls, cxDropDownEdit,
|
||||
DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, RM_Common,
|
||||
RM_Class, RM_GridReport, RM_System, RM_Dataset;
|
||||
|
||||
type
|
||||
TfrmBefChkHX = class(TForm)
|
||||
Panel1: TPanel;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
V2Column2: TcxGridDBColumn;
|
||||
V2Column8: TcxGridDBColumn;
|
||||
V2Column7: TcxGridDBColumn;
|
||||
V2Column1: TcxGridDBColumn;
|
||||
V2Column5: TcxGridDBColumn;
|
||||
V2Column6: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
orderno: TLabel;
|
||||
PRTColor: TLabel;
|
||||
FirstName: TLabel;
|
||||
PBFactory: TLabel;
|
||||
ADOQuery1: TADOQuery;
|
||||
ADOQuery2: TADOQuery;
|
||||
ADOQuery3: TADOQuery;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
ToolButton1: TToolButton;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
V2Column4: TcxGridDBColumn;
|
||||
V2Column9: TcxGridDBColumn;
|
||||
ToolButton5: TToolButton;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
CDS_PRT: TClientDataSet;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
FLLID,HXUnit:String;
|
||||
end;
|
||||
|
||||
var
|
||||
frmBefChkHX: TfrmBefChkHX;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBefChkHX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBefChkHX:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBefChkHX.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBefChkHX.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('HXFactory').Value:=Trim(FirstName.Caption);
|
||||
FieldByName('HXDate').Value:=SGetServerDate(ADOQuery2);
|
||||
FieldByName('HXType').Value:='检前回修';
|
||||
FieldByName('HXUnit').Value:=Trim(HXUnit);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBefChkHX.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
if Trim(ClientDataSet1.fieldbyname('HXType').AsString)<>'检前回修' then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQuery3 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('delete Contract_Cloth_BefChkHX where HXID='''+Trim(ClientDataSet1.fieldbyname('HXID').AsString)+'''');
|
||||
sql.Add('Update Contract_Cloth_LL Set HXPS=(select isnull(sum(HXPS),0) from Contract_Cloth_BefChkHX A where A.LLID='''+Trim(FLLID)+''')');
|
||||
sql.Add(',HXQty=(select isnull(sum(HXQty),0) from Contract_Cloth_BefChkHX A where A.LLID='''+Trim(FLLID)+''')');
|
||||
sql.Add(',HXMQty=(select isnull(sum(HXMQty),0) from Contract_Cloth_BefChkHX A where A.LLID='''+Trim(FLLID)+''')');
|
||||
sql.Add(',HXUnit=(select Top 1 HXUnit from Contract_Cloth_BefChkHX A where A.LLID='''+Trim(FLLID)+''')');
|
||||
sql.Add(' where LLID='''+Trim(FLLID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBefChkHX.ToolButton4Click(Sender: TObject);
|
||||
var
|
||||
maxno:string;
|
||||
FSubId:String;
|
||||
begin
|
||||
try
|
||||
ADOQuery3.Connection.BeginTrans;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('HXType').AsString)='检前回修' then
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('HXID').AsString)='' then
|
||||
begin
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Contract_Cloth_LL where LLID='''+Trim(FLLID)+'''');
|
||||
Open;
|
||||
end;
|
||||
FSubId:=Trim(ADOQuery1.fieldbyname('OrdSubId').AsString);
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_Sub_AnPai where Subid='''+Trim(FSubId)+'''');
|
||||
// sql.Add(' and GangNo='''+Trim(ClientDataSet1.fieldbyname('GangNo').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQuery1.IsEmpty then
|
||||
begin
|
||||
ADOQuery3.Connection.RollbackTrans;
|
||||
Application.MessageBox('未回仓不能保存回修数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
if Trim(ClientDataSet1.fieldbyname('HXID').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQuery3,maxno,'HX','Contract_Cloth_BefChkHX',2,1)=False then
|
||||
begin
|
||||
ADOQuery3.Connection.RollbackTrans;
|
||||
Application.MessageBox('取回修最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxno:=Trim(ClientDataSet1.fieldbyname('HXID').AsString);
|
||||
end;
|
||||
with ADOQuery3 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Contract_Cloth_BefChkHX where HXID='''+Trim(ClientDataSet1.fieldbyname('HXID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQuery3 do
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('HXID').AsString)='' then
|
||||
Append
|
||||
else
|
||||
Edit;
|
||||
FieldByName('LLID').Value:=Trim(FLLID);
|
||||
FieldByName('HXID').Value:=Trim(maxno);
|
||||
SSetSaveDataCDSNew(ADOQuery3,TV2,ClientDataSet1,'Contract_Cloth_BefChkHX',2);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
with ADOQuery3 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('Update Contract_Cloth_BefChkHX Set HXMQty=HXQty*ZSXS where LLID='''+Trim(FLLID)+'''');
|
||||
sql.Add('Update Contract_Cloth_LL Set HXPS=(select sum(HXPS) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
|
||||
sql.Add(',HXQty=(select sum(HXQty) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
|
||||
sql.Add(',HXMQty=(select sum(HXMQty) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
|
||||
sql.Add(',HXUnit=(select Top 1 HXUnit from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
|
||||
sql.Add(' where LLID='''+Trim(FLLID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQuery3.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
Exit;
|
||||
except
|
||||
ADOQuery3.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBefChkHX.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('检前回修',TV2,'回仓管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBefChkHX.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('检前回修',TV2,'回仓管理');
|
||||
end;
|
||||
|
||||
procedure TfrmBefChkHX.ToolButton5Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\回修单.rmf' ;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,C.PRTColor,D.MPRTCodeName,D.MPRTSpec,D.OrderNo from Contract_Cloth_BefChkHX A');
|
||||
sql.Add(' inner join Contract_Cloth_LL B on A.LLID=B.LLID');
|
||||
sql.Add(' inner join JYOrder_Sub C on B.OrdSubId=C.SubID');
|
||||
sql.Add(' inner join JYOrder_Main D on C.MainId=D.MainId');
|
||||
sql.Add(' where A.HXID='''+Trim(ClientDataSet1.fieldbyname('HXID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuery1,CDS_PRT);
|
||||
SInitCDSData20(ADOQuery1,CDS_PRT);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['begindate']:=begindate.DateTime;
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
RMVariables['DYFiller']:=Trim(DName);
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\回修单.rmf'),'提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
612
盛纺贸易管理/U_CKJYList.dfm
Normal file
612
盛纺贸易管理/U_CKJYList.dfm
Normal file
|
@ -0,0 +1,612 @@
|
|||
object frmCKJYList: TfrmCKJYList
|
||||
Left = 128
|
||||
Top = 152
|
||||
Width = 1199
|
||||
Height = 547
|
||||
Caption = #25104#21697#20986#24211#27719#24635#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 = 1183
|
||||
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_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 = 9
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 59
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 75
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 12
|
||||
Visible = False
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1183
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 24
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 6
|
||||
Height = 12
|
||||
Caption = '-'
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 211
|
||||
Top = 100
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20811' '#37325
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 380
|
||||
Top = 108
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 624
|
||||
Top = 84
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #31867' '#22411
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 496
|
||||
Top = 40
|
||||
Width = 6
|
||||
Height = 12
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 488
|
||||
Top = 80
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #19994#21153#21592
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 488
|
||||
Top = 104
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #36319#21333#21592
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 292
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 439
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20013#25991#21517#31216
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 752
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #39068#33394
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 600
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #21592#24037#21517#31216
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 876
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 1028
|
||||
Top = 12
|
||||
Width = 18
|
||||
Height = 12
|
||||
Caption = 'PO#'
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 73
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 181
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 260
|
||||
Top = 96
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object MPRTMF: TEdit
|
||||
Tag = 2
|
||||
Left = 404
|
||||
Top = 104
|
||||
Width = 65
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object CPType: TComboBox
|
||||
Tag = 2
|
||||
Left = 675
|
||||
Top = 80
|
||||
Width = 68
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 4
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
#27491#21697
|
||||
#27425#21697
|
||||
#22810#25340
|
||||
'')
|
||||
end
|
||||
object YWY: TEdit
|
||||
Tag = 2
|
||||
Left = 526
|
||||
Top = 76
|
||||
Width = 65
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object OrdPerson1: TEdit
|
||||
Tag = 2
|
||||
Left = 526
|
||||
Top = 100
|
||||
Width = 65
|
||||
Height = 20
|
||||
TabOrder = 6
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object orderNo: TEdit
|
||||
Tag = 2
|
||||
Left = 342
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 492
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 8
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object PRTColor: TEdit
|
||||
Tag = 2
|
||||
Left = 778
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 9
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object filler: TEdit
|
||||
Tag = 2
|
||||
Left = 650
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 10
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object conNo: TEdit
|
||||
Tag = 2
|
||||
Left = 918
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 11
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object KHCONNO: TEdit
|
||||
Tag = 2
|
||||
Left = 1050
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 12
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 97
|
||||
Width = 1183
|
||||
Height = 412
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseUp = Tv1MouseUp
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column12
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #26816#39564#26085#26399
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 142
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21592#24037#21517#31216
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = 'PO#'
|
||||
DataBinding.FieldName = 'KHCONNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'conNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'orderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 110
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #20013#25991#21517#31216
|
||||
DataBinding.FieldName = 'MPRTCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 125
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21367#25968
|
||||
DataBinding.FieldName = 'JQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #38271#24230
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'MjTypeOther'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #27611#37325
|
||||
DataBinding.FieldName = 'KGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #20928#37325
|
||||
DataBinding.FieldName = 'MJQty4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 62
|
||||
Top = 139
|
||||
Width = 294
|
||||
Height = 213
|
||||
TabOrder = 4
|
||||
Visible = False
|
||||
object Label14: TLabel
|
||||
Left = 48
|
||||
Top = 88
|
||||
Width = 6
|
||||
Height = 12
|
||||
end
|
||||
object Panel10: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 292
|
||||
Height = 23
|
||||
Align = alTop
|
||||
Alignment = taLeftJustify
|
||||
BevelOuter = bvNone
|
||||
Caption = #20107#20214#35828#26126
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
object Image2: TImage
|
||||
Left = 269
|
||||
Top = 3
|
||||
Width = 22
|
||||
Height = 16
|
||||
ParentShowHint = False
|
||||
Picture.Data = {
|
||||
07544269746D617076040000424D760400000000000036000000280000001500
|
||||
0000110000000100180000000000400400000000000000000000000000000000
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFF0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6
|
||||
F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFF404040404040404040404040404040404040404040404040
|
||||
404040404040404040404040404040404040404040404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFF808080808080808080808080808080808080808080
|
||||
808080808080808080808080808080808080808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4000000000000C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4000000000000C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4000000000000C8D0D4
|
||||
C8D0D4000000000000C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4000000000000
|
||||
000000000000C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4000000
|
||||
000000C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4000000000000
|
||||
000000000000C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4000000000000C8D0D4
|
||||
C8D0D4000000000000C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4000000000000C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4000000000000C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFC8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4
|
||||
C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4C8D0D4808080404040F0CAA6FFFFFFFFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FF00}
|
||||
ShowHint = True
|
||||
Transparent = True
|
||||
OnClick = Image2Click
|
||||
end
|
||||
end
|
||||
object RichEdit1: TRichEdit
|
||||
Left = 1
|
||||
Top = 24
|
||||
Width = 292
|
||||
Height = 188
|
||||
Align = alClient
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 77
|
||||
Width = 1183
|
||||
Height = 20
|
||||
Align = alTop
|
||||
Style = 9
|
||||
TabIndex = 0
|
||||
TabOrder = 5
|
||||
Tabs.Strings = (
|
||||
#26410#20837#24211
|
||||
#24050#20837#24211
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 20
|
||||
ClientRectRight = 1183
|
||||
ClientRectTop = 19
|
||||
end
|
||||
object MovePanel2: TMovePanel
|
||||
Left = 408
|
||||
Top = 192
|
||||
Width = 289
|
||||
Height = 49
|
||||
BevelInner = 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 = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 60
|
||||
Parameters = <>
|
||||
Left = 984
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 980
|
||||
Top = 4
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 144
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 896
|
||||
Top = 128
|
||||
end
|
||||
end
|
289
盛纺贸易管理/U_CKJYList.pas
Normal file
289
盛纺贸易管理/U_CKJYList.pas
Normal file
|
@ -0,0 +1,289 @@
|
|||
unit U_CKJYList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, MovePanel, cxButtonEdit,
|
||||
cxCalendar, cxPC;
|
||||
|
||||
type
|
||||
TfrmCKJYList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
Label8: TLabel;
|
||||
MPRTKZ: TEdit;
|
||||
Label9: TLabel;
|
||||
MPRTMF: TEdit;
|
||||
Label7: TLabel;
|
||||
CPType: TComboBox;
|
||||
MovePanel2: TMovePanel;
|
||||
Label10: TLabel;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
YWY: TEdit;
|
||||
OrdPerson1: TEdit;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
orderNo: TEdit;
|
||||
Label5: TLabel;
|
||||
Label3: TLabel;
|
||||
MPRTCodeName: TEdit;
|
||||
Label6: TLabel;
|
||||
PRTColor: TEdit;
|
||||
Label13: TLabel;
|
||||
filler: TEdit;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
conNo: TEdit;
|
||||
Label4: TLabel;
|
||||
Panel4: TPanel;
|
||||
Label14: TLabel;
|
||||
Panel10: TPanel;
|
||||
Image2: TImage;
|
||||
RichEdit1: TRichEdit;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
KHCONNO: TEdit;
|
||||
Label15: TLabel;
|
||||
cxTabControl1: TcxTabControl;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure MPRTCodeNameChange(Sender: TObject);
|
||||
procedure v1Column5PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure PRTColorChange(Sender: TObject);
|
||||
procedure Tv1MouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Image2Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
private
|
||||
FLeft,FTop:Integer;
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCKJYList: TfrmCKJYList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCKJYList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCKJYList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp);
|
||||
EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp)
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
Filtered:=False;
|
||||
sql.Add('select convert(char(10),A.FillTime,120) as CRTime,A.Filler,A.mainID,A.MjTypeOther,C.OrderNo,C.MPRTCodeName,C.conNo,D.PrtColor,');
|
||||
sql.Add('count(A.MainId) as JQty,SUM(A.MJlen) as Qty,SUM(A.MJmaoZ) as KGQty,SUM(A.MJQty4) as MJQty4,');
|
||||
sql.Add('khconNO=(select top 1 khconNo from JYOrderCon_Main X where X.conNO=C.conNO)');
|
||||
sql.Add('from WFB_MJJY A ');
|
||||
sql.Add('inner join JYOrder_Main C on C.MainId=A.MainId ');
|
||||
sql.Add('inner join JYOrder_sub D on D.subID=A.subID ');
|
||||
Sql.add('where A.FillTime>='''+formatdateTime('yyyy-MM-dd',begdate.Date)+''' ');
|
||||
Sql.add('and A.FillTime<'''+formatdateTime('yyyy-MM-dd',enddate.Date+1)+''' ');
|
||||
IF cxTabControl1.TabIndex=0 then
|
||||
Sql.add('and not exists(select MJID from CK_BanCP_KC X where X.MJID=A.MJID) ')
|
||||
else
|
||||
IF cxTabControl1.TabIndex=1 then
|
||||
Sql.add('and exists(select MJID from CK_BanCP_KC X where X.MJID=A.MJID) ');
|
||||
Sql.add('group by convert(char(10),A.FillTime,120),A.Filler,A.mainID,A.MjTypeOther,C.OrderNo,C.MPRTCodeName,C.conNo,D.PrtColor');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
//BegDate.SetFocus;
|
||||
MovePanel2.Visible:=True;
|
||||
MovePanel2.Refresh;
|
||||
InitGrid();
|
||||
MovePanel2.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption+tv1.Name,Tv1,'成品仓库');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.FormShow(Sender: TObject);
|
||||
begin
|
||||
|
||||
ReadCxGrid(self.Caption+tv1.Name,Tv1,'成品仓库');
|
||||
if Trim(DParameters2)='管理' then
|
||||
begin
|
||||
//v1Column5.Options.Focusing:=True;
|
||||
end else
|
||||
begin
|
||||
//v1Column5.Options.Focusing:=False;
|
||||
end;
|
||||
//InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then exit;
|
||||
TcxGridToExcel('库存汇总列表',cxGrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.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 TfrmCKJYList.MPRTCodeNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.v1Column5PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='SOrdDefStr10';
|
||||
flagname:='库存存放地点';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SOrdDefStr10').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update JYOrder_Sub Set SOrdDefStr10='''+Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||
sql.Add(' where SubId='''+Trim(Self.CDS_Main.fieldbyname('SubId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.PRTColorChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.Tv1MouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
FLeft:=X;
|
||||
FTop:=Y;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
Panel4.Left:=FLeft;
|
||||
Panel4.Top:=FTop+110;
|
||||
Panel4.Visible:=True;
|
||||
Panel10.Caption:=Trim(TV1.Controller.FocusedColumn.Caption);
|
||||
RichEdit1.Text:=CDS_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.Image2Click(Sender: TObject);
|
||||
begin
|
||||
Panel4.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCKJYList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
end.
|
390
盛纺贸易管理/U_CKProductBCPHCList.dfm
Normal file
390
盛纺贸易管理/U_CKProductBCPHCList.dfm
Normal file
|
@ -0,0 +1,390 @@
|
|||
object frmCKProductBCPHCList: TfrmCKProductBCPHCList
|
||||
Left = 128
|
||||
Top = 152
|
||||
Width = 1027
|
||||
Height = 511
|
||||
Caption = #25104#21697#22238#20179#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 = 1019
|
||||
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_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 = 9
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 59
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 75
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 12
|
||||
Visible = False
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1019
|
||||
Height = 72
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 357
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20013#25991#21517#31216
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 526
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #39068#33394
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 64
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 178
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 178
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26465' '#30721
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 357
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20811' '#37325
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 526
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 648
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #31867#22411
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 406
|
||||
Top = 9
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object PRTColor: TEdit
|
||||
Tag = 2
|
||||
Left = 550
|
||||
Top = 9
|
||||
Width = 65
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 2
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 33
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 3
|
||||
end
|
||||
object orderNo: TEdit
|
||||
Tag = 2
|
||||
Left = 228
|
||||
Top = 9
|
||||
Width = 109
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object MJID: TEdit
|
||||
Tag = 2
|
||||
Left = 228
|
||||
Top = 33
|
||||
Width = 109
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 406
|
||||
Top = 33
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 6
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object MPRTMF: TEdit
|
||||
Tag = 2
|
||||
Left = 550
|
||||
Top = 32
|
||||
Width = 65
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
OnChange = MPRTCodeNameChange
|
||||
end
|
||||
object CPType: TComboBox
|
||||
Tag = 2
|
||||
Left = 674
|
||||
Top = 32
|
||||
Width = 68
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 8
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
#27491#21697
|
||||
#27425#21697
|
||||
'')
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 105
|
||||
Width = 1019
|
||||
Height = 369
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column6
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'orderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 74
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #20013#25991#21517#31216
|
||||
DataBinding.FieldName = 'MPRTCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 92
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 77
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'MPRTMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'MPRTKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'CPType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 63
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #22238#20179#26102#38388
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 107
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #22238#20179#20844#26020#25968
|
||||
DataBinding.FieldName = 'KGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 83
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #22238#20179#38271#24230
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 85
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #38271#24230#21333#20301
|
||||
DataBinding.FieldName = 'QtyUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 83
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 984
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 944
|
||||
Top = 32
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 144
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 896
|
||||
Top = 128
|
||||
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