~
This commit is contained in:
commit
82c6347dad
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
**/layout
|
||||||
|
**/report
|
||||||
|
**/实施文件
|
||||||
|
**/image
|
||||||
|
**/doc
|
||||||
|
**/wav
|
||||||
|
**/__history
|
||||||
|
**/__recovery
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.ddp
|
||||||
|
*.dcu
|
||||||
|
*.~pas
|
||||||
|
*.~dfm
|
||||||
|
*.~ddp
|
||||||
|
*.~dpr
|
||||||
42
坯布仓库/BPCK.cfg
Normal file
42
坯布仓库/BPCK.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
坯布仓库/BPCK.dof
Normal file
138
坯布仓库/BPCK.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:\其속螺淃커덜쯤\淃커덜쯤\갔되\툰꼈꾑욋\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
|
||||||
67
坯布仓库/BPCK.dpr
Normal file
67
坯布仓库/BPCK.dpr
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
library BPCK;
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils,
|
||||||
|
classes,
|
||||||
|
forms,
|
||||||
|
WinTypes,
|
||||||
|
WinProcs,
|
||||||
|
U_DataLink in 'U_DataLink.pas' {BPCK_DataLink: TDataModule},
|
||||||
|
U_GetDllForm in 'U_GetDllForm.pas',
|
||||||
|
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||||
|
U_BpRklist in 'U_BpRklist.pas' {frmBpRklist},
|
||||||
|
U_BpCk in 'U_BpCk.pas' {frmbpCk},
|
||||||
|
U_BpGdCklist in 'U_BpGdCklist.pas' {frmBpGdCklist},
|
||||||
|
U_BpRk in 'U_BpRk.pas' {frmbpRk},
|
||||||
|
U_ZDYHelp in '..\..\..\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||||
|
U_ProductOrderNewListSEl in 'U_ProductOrderNewListSEl.pas' {frmProductOrderNewListSEl},
|
||||||
|
U_ZdyAttachCP in 'U_ZdyAttachCP.pas' {frmZdyAttachCP},
|
||||||
|
U_ZdyAttachGYS in 'U_ZdyAttachGYS.pas' {frmZdyAttachGYS},
|
||||||
|
U_ZdyAttachment in 'U_ZdyAttachment.pas' {frmZdyAttachment},
|
||||||
|
U_BpGdCkEdit in 'U_BpGdCkEdit.pas' {frmBpGdCkEdit},
|
||||||
|
U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
|
||||||
|
U_SelExportField in '..\..\..\ThreeFun\Form\U_SelExportField.pas' {frmSelExportField},
|
||||||
|
U_SelPrintField in '..\..\..\ThreeFun\Form\U_SelPrintField.pas' {frmSelPrintField},
|
||||||
|
U_SelPrintFieldNew in '..\..\..\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||||
|
U_ColumnSet in '..\..\..\ThreeFun\Form\U_ColumnSet.pas' {frmColumnSet},
|
||||||
|
U_ColumnBandSet in '..\..\..\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
|
||||||
|
U_BpJGlist in 'U_BpJGlist.pas' {frmBpJGlist},
|
||||||
|
U_Bpkclist in 'U_Bpkclist.pas' {frmBpkclist},
|
||||||
|
U_BpCklist in 'U_BpCklist.pas' {frmBpCklist},
|
||||||
|
U_CPKWListSel in 'U_CPKWListSel.pas' {frmCPKWListSel},
|
||||||
|
U_CPCKMXLR in 'U_CPCKMXLR.pas' {frmCPCKMXLR},
|
||||||
|
U_ZdyYS_Sel in 'U_ZdyYS_Sel.pas' {frmZdyYS_Sel};
|
||||||
|
|
||||||
|
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
||||||
|
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
||||||
|
// U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField},
|
||||||
|
// U_SelPrintFieldNew in '..\..\SelfForm\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||||
|
//U_FormPas in '..\CommonPas\formPas\U_FormPas.pas',
|
||||||
|
//U_CxGridSet in '..\CommonPas\cxgridPas\U_CxGridSet.pas';
|
||||||
|
|
||||||
|
//U_RSFormPas in '..\CommonPas\RSCommon\U_RSFormPas.pas';
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;
|
||||||
|
begin
|
||||||
|
DLLProc := @DLLEnterPoint;
|
||||||
|
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DLLUnloadProc(Reason: Integer); register;
|
||||||
|
begin
|
||||||
|
// if (Reason = DLL_PROCESS_DETACH) or (Reason=DLL_THREAD_DETACH) then
|
||||||
|
// Application:=NewDllApp;
|
||||||
|
end;
|
||||||
|
exports
|
||||||
|
GetDllForm;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
NewDllApp:=Application;
|
||||||
|
DLLProc := @DLLUnloadProc;
|
||||||
|
except
|
||||||
|
|
||||||
|
end;
|
||||||
|
end.
|
||||||
|
|
||||||
BIN
坯布仓库/BPCK.res
Normal file
BIN
坯布仓库/BPCK.res
Normal file
Binary file not shown.
23
坯布仓库/ProjectGroup1.bpg
Normal file
23
坯布仓库/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
VERSION = BWS.01
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
!ifndef ROOT
|
||||||
|
ROOT = $(MAKEDIR)\..
|
||||||
|
!endif
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||||
|
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||||
|
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
PROJECTS = testDll.exe BPCK.dll
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
default: $(PROJECTS)
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
testDll.exe: testDll.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
BPCK.dll: BPCK.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
|
||||||
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 BaseData.dll
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
default: $(PROJECTS)
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
testDll.exe: testDll.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
BaseData.dll: BaseData.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
|
||||||
3
坯布仓库/SYSTEMSET.ini
Normal file
3
坯布仓库/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[SERVER]
|
||||||
|
服务器地址=127.0.0.1
|
||||||
|
软件名称=XXXXXXX1
|
||||||
459
坯布仓库/U_BpCk.dfm
Normal file
459
坯布仓库/U_BpCk.dfm
Normal file
|
|
@ -0,0 +1,459 @@
|
||||||
|
object frmbpCk: TfrmbpCk
|
||||||
|
Left = 198
|
||||||
|
Top = 152
|
||||||
|
Width = 1038
|
||||||
|
Height = 530
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
|
Caption = #20986#24211#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 ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1022
|
||||||
|
Height = 29
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBSaveClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 29
|
||||||
|
Width = 1022
|
||||||
|
Height = 44
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 416
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 232
|
||||||
|
Top = 20
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 616
|
||||||
|
Top = 20
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CRTime: TDateTimePicker
|
||||||
|
Left = 88
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 41509.970132187500000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41509.970132187500000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Left = 472
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 1
|
||||||
|
Text = #38144#21806#20986#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#38144#21806#20986#24211
|
||||||
|
#21152#24037#20986#24211)
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 260
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 2
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object Tocust: TBtnEditA
|
||||||
|
Left = 644
|
||||||
|
Top = 16
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnBtnClick = TocustBtnClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 102
|
||||||
|
Width = 1022
|
||||||
|
Height = 311
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column2
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'orderNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column6PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
DataBinding.FieldName = 'factoryName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'cust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1MJID: TcxGridDBColumn
|
||||||
|
Caption = #21367#26465#30721
|
||||||
|
DataBinding.FieldName = 'MJID'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1MJXH: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'MJXH'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1P_CodeNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_SPEC: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'P_SPEC'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'gangNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1P_MF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'P_MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_KZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'P_KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1CPType: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'CPType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#21305#25968
|
||||||
|
DataBinding.FieldName = 'JHRollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#25968#37327
|
||||||
|
DataBinding.FieldName = 'JHQty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'KG')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'price'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'money'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 132
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'KCID'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
VisibleForCustomization = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 73
|
||||||
|
Width = 1022
|
||||||
|
Height = 29
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 3
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
Caption = #22797#21046
|
||||||
|
ImageIndex = 108
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 292
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 340
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 400
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 464
|
||||||
|
Top = 17
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 736
|
||||||
|
Top = 57
|
||||||
|
end
|
||||||
|
end
|
||||||
1113
坯布仓库/U_BpCk.pas
Normal file
1113
坯布仓库/U_BpCk.pas
Normal file
File diff suppressed because it is too large
Load Diff
678
坯布仓库/U_BpCklist.dfm
Normal file
678
坯布仓库/U_BpCklist.dfm
Normal file
|
|
@ -0,0 +1,678 @@
|
||||||
|
object frmBpCklist: TfrmBpCklist
|
||||||
|
Left = 241
|
||||||
|
Top = 146
|
||||||
|
Width = 1193
|
||||||
|
Height = 578
|
||||||
|
Caption = #20986#24211#21015#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 800
|
||||||
|
Top = 48
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1177
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20316#24223
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBcdel: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = TBcdelClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#20986#24211#30721#21333
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 552
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1177
|
||||||
|
Height = 65
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 64
|
||||||
|
Top = 37
|
||||||
|
Width = 13
|
||||||
|
Height = 12
|
||||||
|
Caption = #33267
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 432
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 432
|
||||||
|
Top = 40
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068' '#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 220
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 296
|
||||||
|
Top = 92
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 644
|
||||||
|
Top = 40
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 644
|
||||||
|
Top = 16
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 220
|
||||||
|
Top = 40
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746' '#21333' '#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 840
|
||||||
|
Top = 16
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 35
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 488
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object P_Color: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 488
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 276
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#38144#21806#20986#24211
|
||||||
|
#21152#24037#20986#24211)
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 332
|
||||||
|
Top = 88
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 5
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object cust: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 688
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object factoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 688
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object orderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 276
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object tocust: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 872
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 117
|
||||||
|
Width = 1177
|
||||||
|
Height = 384
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#21333#21495
|
||||||
|
DataBinding.FieldName = 'CRNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1CRTime: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v1CRType: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CRType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'orderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'tocust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
DataBinding.FieldName = 'factoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1customerNoname: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'cust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1MJID: TcxGridDBColumn
|
||||||
|
Caption = #21367#26465#30721
|
||||||
|
DataBinding.FieldName = 'MJID'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1MJXH: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'MJXH'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'gangNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
object v1P_SPEC: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'P_SPEC'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 91
|
||||||
|
end
|
||||||
|
object v1P_MF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'P_MF'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_KZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'P_KZ'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1CPTYPE: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'CPTYPE'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#21305#25968
|
||||||
|
DataBinding.FieldName = 'JHRollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#25968#37327
|
||||||
|
DataBinding.FieldName = 'JHQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1Filler: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'MxFiller'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1FillTime: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#21305#25968
|
||||||
|
DataBinding.FieldName = 'CKPS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'CKQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1177
|
||||||
|
Height = 20
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 0
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#26410#20316#24223
|
||||||
|
#24050#20316#24223
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectRight = 0
|
||||||
|
ClientRectTop = 0
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 724
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 560
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 624
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 660
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1044
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 808
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint1
|
||||||
|
Left = 840
|
||||||
|
Top = 52
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 896
|
||||||
|
Top = 4
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 948
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
object ADOPrint1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 72
|
||||||
|
end
|
||||||
|
object RMDB_main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 888
|
||||||
|
Top = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
498
坯布仓库/U_BpCklist.pas
Normal file
498
坯布仓库/U_BpCklist.pas
Normal file
|
|
@ -0,0 +1,498 @@
|
||||||
|
unit U_BpCklist;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||||
|
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, RM_Common,
|
||||||
|
RM_Class, RM_e_Xls, RM_GridReport, RM_System, RM_Dataset, cxPC, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpCklist = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_SPEC: TcxGridDBColumn;
|
||||||
|
v1P_MF: TcxGridDBColumn;
|
||||||
|
v1P_KZ: TcxGridDBColumn;
|
||||||
|
v1RollNum: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1CRType: TcxGridDBColumn;
|
||||||
|
v1CRTime: TcxGridDBColumn;
|
||||||
|
v1Filler: TcxGridDBColumn;
|
||||||
|
v1FillTime: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
P_Color: TEdit;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
v1MJID: TcxGridDBColumn;
|
||||||
|
v1MJXH: TcxGridDBColumn;
|
||||||
|
v1CPTYPE: TcxGridDBColumn;
|
||||||
|
ckName: TComboBox;
|
||||||
|
Label6: TLabel;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
ADOPrint: TADOQuery;
|
||||||
|
RMDB_MD: TRMDBDataSet;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1customerNoname: TcxGridDBColumn;
|
||||||
|
cust: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
factoryName: TEdit;
|
||||||
|
Label9: TLabel;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
TBcdel: TToolButton;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
Label10: TLabel;
|
||||||
|
orderNo: TEdit;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
tocust: TEdit;
|
||||||
|
Label11: TLabel;
|
||||||
|
ADOPrint1: TADOQuery;
|
||||||
|
RMDB_main: TRMDBDataSet;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure P_CodeNameChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure TBcdelClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
procedure SetStatus();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fCKName: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpCklist: TfrmBpCklist;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun10, U_ZDYHelp, U_BpCk, U_BpYPCkEdit;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.SetStatus();
|
||||||
|
begin
|
||||||
|
TBedit.Visible := false;
|
||||||
|
Tbdel.Visible := false;
|
||||||
|
tbcdel.Visible := false;
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:
|
||||||
|
begin
|
||||||
|
TBedit.Visible := true;
|
||||||
|
Tbdel.Visible := true;
|
||||||
|
end;
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
tbcdel.Visible := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.SetComboBox();
|
||||||
|
begin
|
||||||
|
ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName) <> '' then
|
||||||
|
sql.Add('and zdyName=' + quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count > 0 then
|
||||||
|
ckName.ItemIndex := 0;
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCKTYPE''');
|
||||||
|
if trim(fCKName) <> '' then
|
||||||
|
sql.Add('and note=' + quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count > 0 then
|
||||||
|
CRType.ItemIndex := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;//
|
||||||
|
sql.Clear; //case when (select count(mxid) from CK_SXPB_CRMX A where A.crno=B.CRNO and A.CRID=B.CRID and A.crzt='出库')>0 then crtime else (select top 1 convert(varchar(100),MxCrtime,23) from CK_SXPB_CRMX C where C.CRNO=B.crno ORDER BY MxCrtime desc) end as crtime,
|
||||||
|
sql.Add('select distinct B.crnos, C.MxCrtime as crtime,C.MxFiller,');
|
||||||
|
sql.Add(' B.*,');
|
||||||
|
sql.Add('orderNo=(select Top 1 orderNo from JYOrder_Main X where X.MainID=B.MainID ),');
|
||||||
|
SQL.Add('CKPS=(select count(mxid) from CK_SXPB_CRMX A where A.crno=B.CRNO and A.CRID=B.CRID and A.crzt=''出库'' ),');
|
||||||
|
sql.Add('CKQTY=case when B.QtyUnit=''KG'' then isnull((select sum(isnull(mxqty,0)) from CK_SXPB_CRMX A where A.crno=B.CRNO and A.CRID=B.CRID and A.crzt=''出库'' ),0)');
|
||||||
|
sql.Add(' else isnull((select sum(isnull(mxqty2,0)) from CK_SXPB_CRMX A where A.crno=B.CRNO and A.CRID=B.CRID and A.crzt=''出库'' ),0) end ');
|
||||||
|
|
||||||
|
sql.Add('from BP_InOut B ');
|
||||||
|
SQL.Add('right JOIN CK_SXPB_CRMX C on B.CRID=C.CRID and B.crno=C.crno');
|
||||||
|
sql.Add('where B.CRTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
|
||||||
|
sql.Add('and B.CRTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
|
||||||
|
sql.Add('and C.crzt=''出库'' ');
|
||||||
|
if trim(FckName) <> '' then
|
||||||
|
sql.Add('and ckName=' + quotedstr(trim(FckName)));
|
||||||
|
if cxTabControl1.TabIndex = 0 then
|
||||||
|
sql.Add('and valid=''Y'' ');
|
||||||
|
if cxTabControl1.TabIndex = 1 then
|
||||||
|
sql.Add('and valid=''N'' ');
|
||||||
|
// ShowMessage(sql.text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp, CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp, CDS_Main);
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption, Tv1, '布匹仓库');
|
||||||
|
Action := cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpCklist := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmbpCk := TfrmbpCk.create(self);
|
||||||
|
with frmbpCk do
|
||||||
|
begin
|
||||||
|
fkeyNo := '';
|
||||||
|
fType := 0;
|
||||||
|
fckName := self.fckName;
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.P_CodeNameChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
m: string;
|
||||||
|
begin
|
||||||
|
if ADOQueryTmp.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2));
|
||||||
|
m := SGetFilters(Panel1, 1, 2);
|
||||||
|
SCreateCDS20(ADOQueryTmp, CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryTmp, CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
readCxGrid(self.Caption, Tv1, '布匹仓库');
|
||||||
|
SetComboBox();
|
||||||
|
SetStatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BegDate.Date := DServerDate;
|
||||||
|
EndDate.Date := DServerDate;
|
||||||
|
cxGrid1.Align := alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if cds_main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from YF_Money_CR ');
|
||||||
|
SQL.Add(' where mainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add(' and status>=''1'' ');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('应付款没有撤销审核,不能修改出库!', '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能修改!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
frmbpCk := TfrmbpCk.create(self);
|
||||||
|
with frmbpCk do
|
||||||
|
begin
|
||||||
|
fkeyNo := self.cds_main.fieldbyname('CRNO').AsString;
|
||||||
|
fType := 1;
|
||||||
|
fckName := self.fckName;
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBDelClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
YFID, CRID: string;
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from YF_Money_CR ');
|
||||||
|
SQL.Add(' where mainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add(' and status>=''1'' ');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('应付款没有撤销审核,不能作废!', '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(CDS_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if Application.MessageBox('确定要作废数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
SQL.Add('where maiNID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
|
||||||
|
// sql.Add('update BP_kc set RollNum=A.RollNum+B.RollNum, Qty=A.Qty + B.Qty ');
|
||||||
|
// sql.Add('from BP_kc A');
|
||||||
|
// sql.Add('inner join BP_INout B on B.kcid=A.kcid');
|
||||||
|
// sql.Add('where B.CRNO='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
|
||||||
|
sql.Add(' update BP_kc SET RollNum=RollNum+(select SUM(RollNUM) from BP_INout X where X.KCID=BP_kc.KCID and X.CRNo=''' + trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ), ');
|
||||||
|
sql.Add(' Qty=Qty+(select SUM(Qty) from BP_INout X where X.KCID=BP_kc.KCID and X.CRNo=''' + trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ) ');
|
||||||
|
sql.Add(' where exists(select KCID from BP_INout X where X.KCID=BP_kc.KCID and X.CRNO=''' + trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' )');
|
||||||
|
sql.Add('delete from CP_InOut ');
|
||||||
|
SQL.Add('where fromMainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add('delete from CP_KC ');
|
||||||
|
SQL.Add('where fromMainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
|
||||||
|
sql.Add('update BP_InOut SET valid=''N''');
|
||||||
|
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('出库单删除')));
|
||||||
|
sql.Add(',' + quotedstr(trim('出库单号:' + trim(CDS_Main.FieldByName('CRNO').AsString))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath: string;
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.* from bP_InOut A');
|
||||||
|
sql.Add('where crno=' + quotedstr(trim(CDS_Main.fieldbyname('crno').AsString)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with AdoPrint1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Print_pbCkMd ');
|
||||||
|
sql.Add('@inoutNo=' + quotedstr(trim(CDS_Main.fieldbyname('crno').AsString)));
|
||||||
|
sql.Add(',@flag=' + quotedstr(trim('')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath := ExtractFilePath(Application.ExeName) + 'report\坯布出库码单.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['dtxz'] := FormatDateTime('yyyy-mm-dd', date());
|
||||||
|
RMVariables['zdr'] := trim(DName);
|
||||||
|
RMVariables['Filler'] := trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SetStatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpCklist.TBcdelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from BP_InOut where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
489
坯布仓库/U_BpGdCkEdit.dfm
Normal file
489
坯布仓库/U_BpGdCkEdit.dfm
Normal file
|
|
@ -0,0 +1,489 @@
|
||||||
|
object frmBpGdCkEdit: TfrmBpGdCkEdit
|
||||||
|
Left = 216
|
||||||
|
Top = 139
|
||||||
|
Width = 1050
|
||||||
|
Height = 530
|
||||||
|
Caption = #20986#24211#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1034
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TOk: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450#20986#24211
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TOkClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 150
|
||||||
|
Width = 1034
|
||||||
|
Height = 266
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellClick = Tv1CellClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1ckqty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1money
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 15
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
OnCustomDrawIndicatorCell = Tv1CustomDrawIndicatorCell
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1P_CodeNamePropertiesButtonClick
|
||||||
|
Properties.OnEditValueChanged = v1P_CodeNamePropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 152
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnEditValueChanged = v1P_ColorPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v1ckqty: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
Properties.OnEditValueChanged = v1ckqtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
object v1price: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#20215#26684
|
||||||
|
DataBinding.FieldName = 'price'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
Properties.OnEditValueChanged = v1ckqtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1money: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#37329#39069
|
||||||
|
DataBinding.FieldName = 'money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1034
|
||||||
|
Height = 89
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Panel2'
|
||||||
|
TabOrder = 2
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1034
|
||||||
|
Height = 89
|
||||||
|
Align = alClient
|
||||||
|
Caption = #20986#24211#20449#24687
|
||||||
|
Color = clSkyBlue
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 0
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 208
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 20
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458' '#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 68
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #22791' '#27880
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 44
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#22320#22336
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CRTime: TDateTimePicker
|
||||||
|
Left = 88
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 41509.970132187500000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41509.970132187500000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 265
|
||||||
|
Top = 16
|
||||||
|
Width = 120
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = CRTypeChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#29983#20135#20837#24211)
|
||||||
|
end
|
||||||
|
object cust: TBtnEditA
|
||||||
|
Left = 484
|
||||||
|
Top = 16
|
||||||
|
Width = 297
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 2
|
||||||
|
OnBtnClick = custBtnClick
|
||||||
|
end
|
||||||
|
object note: TEdit
|
||||||
|
Left = 88
|
||||||
|
Top = 64
|
||||||
|
Width = 693
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object custaddress: TEdit
|
||||||
|
Left = 88
|
||||||
|
Top = 40
|
||||||
|
Width = 693
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 121
|
||||||
|
Width = 1034
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 3
|
||||||
|
object TBKC: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Caption = #36873#25321#24211#23384
|
||||||
|
ImageIndex = 108
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBKCClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 83
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 146
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 676
|
||||||
|
Top = 124
|
||||||
|
Width = 289
|
||||||
|
Height = 25
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clSkyBlue
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
object Label23: TLabel
|
||||||
|
Left = 108
|
||||||
|
Top = 4
|
||||||
|
Width = 45
|
||||||
|
Height = 14
|
||||||
|
Caption = #25968#37327#65306
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 536
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 576
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 612
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 12
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 740
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 848
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 896
|
||||||
|
Top = 8
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 948
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
end
|
||||||
831
坯布仓库/U_BpGdCkEdit.pas
Normal file
831
坯布仓库/U_BpGdCkEdit.pas
Normal file
|
|
@ -0,0 +1,831 @@
|
||||||
|
unit U_BpGdCkEdit;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, cxEdit,Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, DB, cxDBData,cxTextEdit,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxCheckBox, BtnEdit, cxCurrencyEdit,strUtils, RM_Common,
|
||||||
|
RM_Class, RM_e_Xls, RM_GridReport, RM_System, RM_Dataset;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpGdCkEdit = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
TOk: TToolButton;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
v1ckqty: TcxGridDBColumn;
|
||||||
|
v1price: TcxGridDBColumn;
|
||||||
|
v1money: TcxGridDBColumn;
|
||||||
|
Panel2: TPanel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
CRTime: TDateTimePicker;
|
||||||
|
Label8: TLabel;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
cust: TBtnEditA;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label23: TLabel;
|
||||||
|
ADOPrint: TADOQuery;
|
||||||
|
RMDB_MD: TRMDBDataSet;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
Label1: TLabel;
|
||||||
|
note: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
custaddress: TEdit;
|
||||||
|
TBKC: TToolButton;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
procedure custBtnClick(Sender: TObject);
|
||||||
|
procedure v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure v1P_CodeNamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1P_ColorPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
|
procedure TBKCClick(Sender: TObject);
|
||||||
|
procedure CRTypeChange(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
function savedate():Boolean;
|
||||||
|
function YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
procedure DoKc();
|
||||||
|
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fType:integer;
|
||||||
|
fCKName:string;
|
||||||
|
fkeyNO:string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpGdCkEdit: TfrmBpGdCkEdit;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, U_BpRk, U_ZdyAttachCP, U_ZdyAttachment,
|
||||||
|
U_BpkcCk;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmBpGdCkEdit.DoKc();
|
||||||
|
begin
|
||||||
|
Label23.Caption:='数量:0';
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
IF trim(CDS_Main.fieldbyname('P_CodeName').AsString)='' then exit;
|
||||||
|
IF trim(CDS_Main.fieldbyname('P_Color').AsString)='' then exit;
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select AA.* ');
|
||||||
|
sql.Add('FROM( select A.ckName,P_CodeName,A.P_Color,A.QtyUnit,ckQty=0.00,Price=0.00,money=0.00, ');
|
||||||
|
sql.Add(' SUM(case when CRFlag=''入库'' then Qty else -1 * Qty end ) as Qty ');
|
||||||
|
sql.Add('from BP_InOut A ');
|
||||||
|
sql.Add('where P_CodeName='+quotedstr(trim(CDS_Main.fieldbyname('P_CodeName').AsString)) );
|
||||||
|
sql.Add('and P_Color='+quotedstr(trim(CDS_Main.fieldbyname('P_Color').AsString)) );
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) );
|
||||||
|
sql.Add('group by A.ckName,P_CodeName,A.P_Color,A.QtyUnit)AA ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
// Label22.Caption:='匹数:'+trim(ADOQuery1.fieldbyname('kcRollNum').AsString);
|
||||||
|
Label23.Caption:='数量:'+trim(ADOQuery1.fieldbyname('Qty').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
function TfrmBpGdCkEdit.YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
var
|
||||||
|
CRID,YFID,Price,PriceUnit,OrderUnit,FComTaiTou:String;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
|
||||||
|
with Order_Main10 do
|
||||||
|
begin
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where FactoryName='''+Trim(cust.text)+'''');
|
||||||
|
sql.Add('and ZdyStr1=''应收收''');
|
||||||
|
sql.Add('and YFDefFlag1=1 ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
CRID:=ADOQuery1.fieldbyname('CRID').AsString;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||||
|
sql.Add('select * from YF_Money_CRID ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CRID:=ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.text);
|
||||||
|
FieldByName('ZdyStr1').Value:='应收收';
|
||||||
|
FieldByName('YFDefFlag1').Value:=1;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(ckNo)+'''');
|
||||||
|
sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
sql.Add(' and YFName=''广东销售'' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(ckNo)+'''');
|
||||||
|
sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
sql.Add(' and YFName=''广东销售'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取坯布应付最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('YFID').Value:=Trim(YFID);
|
||||||
|
FieldByName('YFTypeId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('CRType').Value:='应收款登记';
|
||||||
|
FieldByName('CRFlag').Value:='应收收';
|
||||||
|
FieldByName('QtyFlag').Value:=1;
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',CRTime.DateTime));
|
||||||
|
FieldByName('YFType').Value:='自动生成';
|
||||||
|
FieldByName('ps').Value:=0;
|
||||||
|
FieldByName('Qty').Value:=Order_Main10.fieldbyname('Qty').AsFloat;
|
||||||
|
FieldByName('Price').Value:=Order_Main10.fieldbyname('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
FieldByName('BBMoney').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
//FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('BZType').Value:='人民币';
|
||||||
|
FieldByName('QtyUnit').Value:=Trim(Order_Main10.fieldbyname('QtyUnit').AsString);
|
||||||
|
FieldByName('ComTaiTou').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('P_CodeName').Value:=trim(Order_Main10.fieldbyname('P_CodeName').AsString);
|
||||||
|
FieldByName('P_Color').Value:=trim(Order_Main10.fieldbyname('P_Color').AsString);
|
||||||
|
FieldByName('YFName').Value:='广东销售';
|
||||||
|
FieldByName('MainId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('subID').Value:=Trim(CkID);
|
||||||
|
FieldByName('YFDefFlag1').Value:=1;
|
||||||
|
FieldByName('syrName').Value:='广东门市部';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
YFID:=Trim(ADOQuery1.fieldbyname('YFID').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
function TfrmBpGdCkEdit.savedate():Boolean;
|
||||||
|
var
|
||||||
|
fkcID,i:integer;
|
||||||
|
Filler:string;
|
||||||
|
FillTime:TdateTime;
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if FType=0 then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fkeyNO,'GC','BP_InOut',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Filler:=DName;
|
||||||
|
FillTime:=SGetServerDateTime(adoqueryTmp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut');
|
||||||
|
sql.Add('where CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
open;
|
||||||
|
Filler:=adoqueryTmp.fieldbyname('Filler').AsString;
|
||||||
|
FillTime:=adoqueryTmp.fieldbyname('FillTime').AsDateTime;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(fkeyNO)+'''');
|
||||||
|
sql.Add(' and YFName=''广东销售'' ');
|
||||||
|
sql.Add('and YFDefFlag1=1 ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from BP_InOut');
|
||||||
|
sql.Add('where CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
i:=1;
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut');
|
||||||
|
sql.Add('where 1=2 ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('CRNO').Value:=trim(fkeyNO);
|
||||||
|
ADOQueryCmd.FieldByName('CRID').Value:=i;
|
||||||
|
ADOQueryCmd.FieldByName('CKName').Value:=trim(fckName);
|
||||||
|
// ADOQueryCmd.FieldByName('mainID').Value:=trim(fmainID);
|
||||||
|
// ADOQueryCmd.FieldByName('subID').Value:=trim(fsubID);
|
||||||
|
ADOQueryCmd.FieldByName('CRTime').Value:=formatdateTime('yyyy-MM-dd',CRTime.Date);
|
||||||
|
ADOQueryCmd.FieldByName('CRType').Value:=trim(crType.Text);
|
||||||
|
ADOQueryCmd.FieldByName('CRFlag').Value:='出库';
|
||||||
|
// ADOQueryCmd.FieldByName('MJID').Value:=trim(fieldbyname('MJID').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('MJXH').Value:=trim(fieldbyname('MJXH').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('CPTYPE').Value:=trim(fieldbyname('CPTYPE').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_Code').Value:=trim(fieldbyname('P_Code').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_CodeName').Value:=trim(fieldbyname('P_CodeName').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_spec').Value:=trim(fieldbyname('P_spec').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_Color').Value:=trim(fieldbyname('P_Color').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_MF').Value:=fieldbyname('P_MF').AsFloat;
|
||||||
|
// ADOQueryCmd.FieldByName('P_KZ').Value:=fieldbyname('P_KZ').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('RollNum').Value:=0;
|
||||||
|
ADOQueryCmd.FieldByName('Qty').Value:=fieldbyname('Qty').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('Price').Value:=fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('money').Value:=fieldbyname('money').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('QtyUnit').Value:=trim(fieldbyname('QtyUnit').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('note').Value:=trim(fieldbyname('note').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=trim(Filler);
|
||||||
|
ADOQueryCmd.FieldByName('FillTime').Value:=dateTimetostr(FillTime);
|
||||||
|
ADOQueryCmd.FieldByName('cust').Value:=trim(cust.Text);
|
||||||
|
ADOQueryCmd.FieldByName('custaddress').Value:=trim(custaddress.Text);
|
||||||
|
ADOQueryCmd.FieldByName('note').Value:=trim(note.Text);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstNo').Value:=trim(FirstName.TxtCode);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstName').Value:=trim(FirstName.Text);
|
||||||
|
if FType=10 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.FieldByName('editer').Value:=trim(dName);
|
||||||
|
ADOQueryCmd.FieldByName('editTime').Value:=SGetServerDateTime(ADOQuery1);
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
IF trim(CRType.Text)='广东零售' then
|
||||||
|
begin
|
||||||
|
if not YSData(fkeyNo,inttostr(i),CDS_Main) then
|
||||||
|
begin
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
i:=i+1;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpGdCkEdit.SetComboBox();
|
||||||
|
begin
|
||||||
|
{ ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and zdyName='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count>0 then ckName.ItemIndex:=0; }
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
// CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCKTYPE''');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and note='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
// CRType.Items.Add('广东盘点出库');
|
||||||
|
if CRType.Items.Count>0 then CRType.ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpGdCkEdit.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.* from BP_InOut A');
|
||||||
|
sql.Add('where A.CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp,CDS_Main);
|
||||||
|
if not CDS_Main.IsEmpty then
|
||||||
|
begin
|
||||||
|
CRTime.Date:= CDS_Main.fieldbyname('CRTime').AsDateTime;
|
||||||
|
// CKName.ItemIndex:=CKName.Items.IndexOf(trim(CDS_Main.fieldbyname('CKName').AsString));
|
||||||
|
CRType.ItemIndex:=CRType.Items.IndexOf(trim(CDS_Main.fieldbyname('CRType').AsString));
|
||||||
|
cust.Text:= trim(CDS_Main.fieldbyname('cust').AsString);
|
||||||
|
custaddress.Text:= trim(CDS_Main.fieldbyname('custaddress').AsString);
|
||||||
|
note.Text:= trim(CDS_Main.fieldbyname('note').AsString);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
if fType=10 then Action:=cahide
|
||||||
|
else Action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpGdCkEdit:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ if fType=10 then
|
||||||
|
begin
|
||||||
|
TOk.Visible:=true;
|
||||||
|
// v1Ssel.Visible:=true;
|
||||||
|
v1ckqty.Visible:=true;
|
||||||
|
v1price.Visible:=true;
|
||||||
|
v1money.Visible:=true;
|
||||||
|
GroupBox1.Visible:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
TOk.Visible:=false;
|
||||||
|
// v1Ssel.Visible:=false;
|
||||||
|
v1ckqty.Visible:=false;
|
||||||
|
v1price.Visible:=false;
|
||||||
|
v1money.Visible:=false;
|
||||||
|
GroupBox1.Visible:=false;
|
||||||
|
end; }
|
||||||
|
readCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
SetComboBox();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//BegDate.Date:=DServerDate-7;
|
||||||
|
// EndDate.Date:=DServerDate;
|
||||||
|
CRTime.date:= DServerDate;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath:string;
|
||||||
|
begin
|
||||||
|
if trim(fkeyNO)='' then exit;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Do_PrintMd ');
|
||||||
|
sql.Add('@mainID='+quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add(',@flag='+quotedstr(trim('广东出库')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单建威广州.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件['+filepath+']不存在!'),'提示信息',MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['dtxz'] :=FormatDateTime('yyyy-mm-dd',date());
|
||||||
|
RMVariables['zdr'] :=trim(DName);
|
||||||
|
RMVariables['Filler'] :=trim(DName);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CRTIME.SetFocus;
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
if trim(CRType.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('出库类型不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if trim(cust.Text)=''then
|
||||||
|
begin
|
||||||
|
application.MessageBox('客户不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if savedate() then
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存成功!','提示信息');
|
||||||
|
TOk.Enabled:=false;
|
||||||
|
TBPrint.Enabled:=true;
|
||||||
|
// ModalResult:=1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存失败!','提示信息',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.custBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
fkhType:='广东客户';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
cust.Text:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||||
|
custaddress.Text:=Trim(CDS_HZ.fieldbyname('defnote1').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,fieldname,qty1,qty2:String;
|
||||||
|
num1:double;
|
||||||
|
|
||||||
|
begin
|
||||||
|
fieldname:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(Trim(fieldname)).Value:=TcxTextEdit(Sender).EditingText;
|
||||||
|
num1:=FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=strtofloat(format('%.2f',[num1]));
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CopyAddRow(Tv1,CDS_Main);
|
||||||
|
CDS_Main.edit;
|
||||||
|
CDS_Main.fieldbyname('QtyUnit').Value:='M';
|
||||||
|
CDS_Main.Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then exit;
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.v1P_CodeNamePropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_CodeName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
DoKc();
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(CDS_Main.fieldbyname('P_CodeName').AsString)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('品名不存在!','提示信息',0);
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_CodeName').Value:='';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.v1P_ColorPropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_Color').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
DoKc();
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(CDS_Main.fieldbyname('P_CodeName').AsString)));
|
||||||
|
sql.Add('and DEFstr3='+quotedstr(trim(CDS_Main.fieldbyname('P_Color').AsString)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('颜色不存在!','提示信息',0);
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_Color').Value:='';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
DoKc();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachCP:=TfrmZdyAttachCP.Create(Application);
|
||||||
|
with frmZdyAttachCP do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_main.Edit;
|
||||||
|
Self.CDS_main.FieldByName('P_Code').Value:=Trim(CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
Self.CDS_main.FieldByName('P_CodeName').Value:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.CDS_main.FieldByName('P_Color').Value:=Trim(CDS_HZ.fieldbyname('DEFstr3').AsString);
|
||||||
|
// Self.Order_Sub.FieldByName('SOrddefstr4').Value:=Trim(ClientDataSet1.fieldbyname('Note').AsString);
|
||||||
|
Self.CDS_main.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachCP.Free;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.Tv1CustomDrawIndicatorCell(
|
||||||
|
Sender: TcxGridTableView; ACanvas: TcxCanvas;
|
||||||
|
AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
FBounds := AViewInfo.Bounds;
|
||||||
|
if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
begin
|
||||||
|
ACanvas.FillRect(FBounds);
|
||||||
|
ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
FValue :=IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index+1);
|
||||||
|
InflateRect(FBounds, -1, -1) ;
|
||||||
|
ACanvas.Font.Color := clBlack;
|
||||||
|
ACanvas.Brush.Style := bsClear;
|
||||||
|
ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
ADone := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.TBKCClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpkcCk:=TfrmBpkcCk.create(self);
|
||||||
|
with frmBpkcCk do
|
||||||
|
begin
|
||||||
|
TOk.Visible:=true;
|
||||||
|
v1Ssel.Visible:=true;
|
||||||
|
fCKName:=self.fCKName;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
self.CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
while not CDS_Main.Eof do
|
||||||
|
begin
|
||||||
|
IF CDS_Main.FieldByName('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
self.CDS_Main.Append;
|
||||||
|
self.CDS_Main.fieldbyname('P_CodeName').Value:=CDS_Main.fieldbyname('P_CodeName').Value;
|
||||||
|
self.CDS_Main.fieldbyname('P_Color').Value:=CDS_Main.fieldbyname('P_Color').Value;
|
||||||
|
self.CDS_Main.fieldbyname('Qty').Value:=CDS_Main.fieldbyname('Qty').AsFloat;
|
||||||
|
self.CDS_Main.fieldbyname('QtyUnit').Value:='M';
|
||||||
|
self.CDS_Main.fieldbyname('price').Value:=0;
|
||||||
|
self.CDS_Main.fieldbyname('money').Value:=0;
|
||||||
|
self.CDS_Main.Post;
|
||||||
|
end;
|
||||||
|
CDS_Main.Next;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
self.CDS_Main.EnableControls;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCkEdit.CRTypeChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBKC.Visible:=false;
|
||||||
|
If pos('盘点',trim(CRType.Text))>0 then
|
||||||
|
begin
|
||||||
|
TBKC.Visible:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
515
坯布仓库/U_BpGdCklist.dfm
Normal file
515
坯布仓库/U_BpGdCklist.dfm
Normal file
|
|
@ -0,0 +1,515 @@
|
||||||
|
object frmBpGdCklist: TfrmBpGdCklist
|
||||||
|
Left = 87
|
||||||
|
Top = 133
|
||||||
|
Width = 1178
|
||||||
|
Height = 579
|
||||||
|
Caption = #20986#24211#21015#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1162
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 95
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20986#24211
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBADD1: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26679#21697#20986#24211
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBADD1Click
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 339
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object Tlook: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#30475
|
||||||
|
ImageIndex = 57
|
||||||
|
OnClick = TlookClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 465
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 528
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#20986#24211#21333
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 627
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1162
|
||||||
|
Height = 45
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 168
|
||||||
|
Top = 16
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 464
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 628
|
||||||
|
Top = 16
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 328
|
||||||
|
Top = 56
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 772
|
||||||
|
Top = 16
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 1000
|
||||||
|
Top = 16
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#21333#25968#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 180
|
||||||
|
Top = 11
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 520
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object P_Color: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 660
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 344
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#38144#21806#20986#24211
|
||||||
|
#21152#24037#20986#24211)
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 356
|
||||||
|
Top = 52
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 5
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object cust: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 804
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 77
|
||||||
|
Width = 1162
|
||||||
|
Height = 384
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnDblClick = Tv1DblClick
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1CRNO: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#32534#21495
|
||||||
|
DataBinding.FieldName = 'CRNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1CRID: TcxGridDBColumn
|
||||||
|
Caption = #24207#27425#21495
|
||||||
|
DataBinding.FieldName = 'CRID'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1CRTime: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1CRType: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CRType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
end
|
||||||
|
object v1cust: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'cust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1custaddress: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#22320#22336
|
||||||
|
DataBinding.FieldName = 'custaddress'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 96
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'RollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Filler: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1FillTime: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 724
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 832
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 856
|
||||||
|
Top = 161
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 876
|
||||||
|
Top = 101
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 508
|
||||||
|
Top = 68
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 848
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 896
|
||||||
|
Top = 8
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 948
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
end
|
||||||
444
坯布仓库/U_BpGdCklist.pas
Normal file
444
坯布仓库/U_BpGdCklist.pas
Normal file
|
|
@ -0,0 +1,444 @@
|
||||||
|
unit U_BpGdCklist;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, RM_System, RM_Dataset, RM_Common, RM_Class, RM_e_Xls,
|
||||||
|
RM_GridReport;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpGdCklist = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1RollNum: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1CRType: TcxGridDBColumn;
|
||||||
|
v1CRTime: TcxGridDBColumn;
|
||||||
|
v1CRNO: TcxGridDBColumn;
|
||||||
|
v1CRID: TcxGridDBColumn;
|
||||||
|
v1Filler: TcxGridDBColumn;
|
||||||
|
v1FillTime: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
P_Color: TEdit;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ckName: TComboBox;
|
||||||
|
Label6: TLabel;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
v1cust: TcxGridDBColumn;
|
||||||
|
ADOPrint: TADOQuery;
|
||||||
|
RMDB_MD: TRMDBDataSet;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
Tlook: TToolButton;
|
||||||
|
cust: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
TBADD1: TToolButton;
|
||||||
|
Label8: TLabel;
|
||||||
|
v1custaddress: TcxGridDBColumn;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure P_CodeNameChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TlookClick(Sender: TObject);
|
||||||
|
procedure Tv1DblClick(Sender: TObject);
|
||||||
|
procedure TBADD1Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fCKName:string;
|
||||||
|
fManage:string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpGdCklist: TfrmBpGdCklist;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, U_BpCk, U_BpkcCk, U_BpGdCkEdit,U_BpGdYPCkEdit;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.SetComboBox();
|
||||||
|
begin
|
||||||
|
ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and zdyName='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count>0 then ckName.ItemIndex:=0;
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCKTYPE''');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and note='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count>0 then CRType.ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpGdCklist.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
sql.Add('where CRTime>='''+formatdateTime('yyyy-MM-dd',begdate.Date)+''' ');
|
||||||
|
sql.Add('and CRTime<'''+formatdateTime('yyyy-MM-dd',enddate.Date+1)+''' ');
|
||||||
|
sql.Add('and CRFlag=''出库'' ');
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) );
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp,CDS_Main);
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select COUNT(distinct CRNo) as CRNo from BP_InOut A');
|
||||||
|
sql.Add('where CRTime>='''+formatdateTime('yyyy-MM-dd',begdate.Date)+''' ');
|
||||||
|
sql.Add('and CRTime<'''+formatdateTime('yyyy-MM-dd',enddate.Date+1)+''' ');
|
||||||
|
sql.Add('and CRFlag=''出库'' ');
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) );
|
||||||
|
open;
|
||||||
|
IF IsEmpty then
|
||||||
|
begin
|
||||||
|
Label8.Caption:='出库单数:0';
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Label8.Caption:='出库单数:'+Fieldbyname('CRNo').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
Action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpGdCklist:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmbpCk:=TfrmbpCk.create(self);
|
||||||
|
with frmbpCk do
|
||||||
|
begin
|
||||||
|
fkeyNo:='';
|
||||||
|
fType:=0;
|
||||||
|
fckName:=self.fckName;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
// self.CDS_Main.Locate('crNo',trim(fkeyNo),[]) ;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.P_CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTmp.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryTmp,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryTmp,CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
readCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
SetComboBox();
|
||||||
|
IF trim(fManage)='高权限' then
|
||||||
|
begin
|
||||||
|
TBedit.Visible:=true;
|
||||||
|
TBDel.Visible:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
TBedit.Visible:=false;
|
||||||
|
TBDel.Visible:=false;
|
||||||
|
end;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BegDate.Date:=DServerDate;
|
||||||
|
EndDate.Date:=DServerDate;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if cds_main.IsEmpty then exit;
|
||||||
|
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能修改!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
frmBpGdCkEdit:=TfrmBpGdCkEdit.create(self);
|
||||||
|
with frmBpGdCkEdit do
|
||||||
|
begin
|
||||||
|
fkeyNo:=self.cds_main.fieldbyname('CRNO').AsString;
|
||||||
|
fType:=10;
|
||||||
|
fckName:=self.fckName;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
self.CDS_Main.Locate('crNo',trim(fkeyNo),[]) ;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
{ if Trim(CDS_Main.fieldbyname('Filler').AsString)<>Trim(DName) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('不能操作他人的数据!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
{ with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where A.kcid='''+Trim(CDS_Main.fieldbyname('kcid').AsString)+''' ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能删除!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
|
||||||
|
|
||||||
|
{ sql.Add('update Contract_Cloth_DH set DHPS=A.DHPS - B.RollNum, DHQty=A.DHQty - B.Qty ');
|
||||||
|
sql.Add('from Contract_Cloth_DH A');
|
||||||
|
sql.Add('inner join BP_INout B on cast(B.kcid as varchar)=A.SXDHID and rtrim(B.FirstName)=rtrim(A.FirstName)');
|
||||||
|
sql.Add('where B.CRNO='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
sql.Add('and B.CRType=''加工出库'' '); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
SQL.Add('where maiNID='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(' where YFDefFlag1=1 ');
|
||||||
|
|
||||||
|
sql.Add('update BP_kc set RollNum=1, Qty=A.Qty + B.Qty ');
|
||||||
|
sql.Add('from BP_kc A');
|
||||||
|
sql.Add('inner join BP_INout B on B.kcid=A.kcid');
|
||||||
|
sql.Add('where B.CRNO='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
|
||||||
|
sql.Add('delete from BP_InOut ');
|
||||||
|
SQL.Add('where CRNO='''+Trim(CDS_Main.fieldbyname('CRNO').AsString)+''' ');
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' '+quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(','+quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(','+quotedstr(trim('出库单删除')));
|
||||||
|
sql.Add(','+quotedstr(trim('出库单号:'+trim(CDS_Main.FieldByName('CRNO').AsString))));
|
||||||
|
sql.Add(','+quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
Application.MessageBox('数据删除失败!','提示信息',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath:string;
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then exit;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Do_PrintMd ');
|
||||||
|
sql.Add('@mainID='+quotedstr(trim(CDS_Main.fieldbyname('cRNo').AsString)));
|
||||||
|
sql.Add(',@flag='+quotedstr(trim('广东出库')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单建威广州.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件['+filepath+']不存在!'),'提示信息',MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['dtxz'] :=FormatDateTime('yyyy-mm-dd',date());
|
||||||
|
RMVariables['zdr'] :=trim(DName);
|
||||||
|
RMVariables['Filler'] :=trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TlookClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
frmBpGdCkEdit:=TfrmBpGdCkEdit.create(self);
|
||||||
|
with frmBpGdCkEdit do
|
||||||
|
begin
|
||||||
|
fkeyNo:=self.cds_main.fieldbyname('CRNO').AsString;
|
||||||
|
fType:=10;
|
||||||
|
fckName:=self.fckName;
|
||||||
|
tok.Enabled:=false;
|
||||||
|
TBPrint.Enabled:=true;
|
||||||
|
tv1.OptionsData.Editing:=false;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
self.CDS_Main.Locate('crNo',trim(fkeyNo),[]) ;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.Tv1DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Tlook.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdCklist.TBADD1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpGdYPCkEdit:=TfrmBpGdYPCkEdit.create(self);
|
||||||
|
with frmBpGdYPCkEdit do
|
||||||
|
begin
|
||||||
|
fkeyNo:='';
|
||||||
|
fType:=0;
|
||||||
|
fckName:=self.fckName;
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
// self.CDS_Main.Locate('crNo',trim(fkeyNo),[]) ;
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
601
坯布仓库/U_BpGdYPCkEdit.dfm
Normal file
601
坯布仓库/U_BpGdYPCkEdit.dfm
Normal file
|
|
@ -0,0 +1,601 @@
|
||||||
|
object frmBpGdYPCkEdit: TfrmBpGdYPCkEdit
|
||||||
|
Left = 213
|
||||||
|
Top = 123
|
||||||
|
Width = 1035
|
||||||
|
Height = 564
|
||||||
|
Caption = #20986#24211#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1019
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TOk: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450#20986#24211
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TOkClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 214
|
||||||
|
Width = 1019
|
||||||
|
Height = 251
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellClick = Tv1CellClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1ckqty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1money
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1ssel: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
Properties.ReadOnly = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1P_CodeNamePropertiesButtonClick
|
||||||
|
Properties.OnEditValueChanged = v1P_CodeNamePropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 152
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnEditValueChanged = v1P_ColorPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v1ckqty: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
Properties.OnEditValueChanged = v1ckqtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
object v1price: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#20215#26684
|
||||||
|
DataBinding.FieldName = 'price'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
Properties.OnEditValueChanged = v1ckqtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1money: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#37329#39069
|
||||||
|
DataBinding.FieldName = 'money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1019
|
||||||
|
Height = 153
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Panel2'
|
||||||
|
TabOrder = 2
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1019
|
||||||
|
Height = 97
|
||||||
|
Align = alTop
|
||||||
|
Caption = #20986#24211#20449#24687
|
||||||
|
Color = clSkyBlue
|
||||||
|
Ctl3D = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentCtl3D = False
|
||||||
|
TabOrder = 0
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 208
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 420
|
||||||
|
Top = 20
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458' '#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 72
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #22791' '#27880
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 44
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#22320#22336
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CRTime: TDateTimePicker
|
||||||
|
Left = 88
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 41509.970132187500000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41509.970132187500000000
|
||||||
|
TabOrder = 0
|
||||||
|
OnKeyPress = CRTimeKeyPress
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 265
|
||||||
|
Top = 16
|
||||||
|
Width = 120
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 1
|
||||||
|
OnKeyPress = CRTimeKeyPress
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#24191#19996#38646#21806)
|
||||||
|
end
|
||||||
|
object cust: TBtnEditA
|
||||||
|
Left = 484
|
||||||
|
Top = 16
|
||||||
|
Width = 297
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 2
|
||||||
|
OnKeyPress = CRTimeKeyPress
|
||||||
|
OnBtnClick = custBtnClick
|
||||||
|
end
|
||||||
|
object note: TEdit
|
||||||
|
Left = 88
|
||||||
|
Top = 68
|
||||||
|
Width = 693
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnKeyPress = CRTimeKeyPress
|
||||||
|
end
|
||||||
|
object custaddress: TEdit
|
||||||
|
Left = 88
|
||||||
|
Top = 40
|
||||||
|
Width = 693
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox2: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1019
|
||||||
|
Height = 56
|
||||||
|
Align = alClient
|
||||||
|
Caption = #20135#21697#20449#24687
|
||||||
|
Color = clSkyBlue
|
||||||
|
Ctl3D = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentCtl3D = False
|
||||||
|
TabOrder = 1
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 28
|
||||||
|
Top = 28
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 208
|
||||||
|
Top = 28
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #25968' '#37327
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 424
|
||||||
|
Top = 28
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #21333' '#20215
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object P_CodeName: TBtnEditA
|
||||||
|
Left = 88
|
||||||
|
Top = 24
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnExit = P_CodeNameExit
|
||||||
|
OnKeyPress = CRTimeKeyPress
|
||||||
|
OnBtnClick = P_CodeNameBtnClick
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 268
|
||||||
|
Top = 24
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnKeyPress = CRTimeKeyPress
|
||||||
|
end
|
||||||
|
object Edit2: TEdit
|
||||||
|
Left = 488
|
||||||
|
Top = 24
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnKeyPress = CRTimeKeyPress
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 620
|
||||||
|
Top = 20
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = #30830#23450
|
||||||
|
TabOrder = 3
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 736
|
||||||
|
Top = 24
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #20840#36873
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 185
|
||||||
|
Width = 1019
|
||||||
|
Height = 29
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 3
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 736
|
||||||
|
Top = 168
|
||||||
|
Width = 213
|
||||||
|
Height = 25
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clSkyBlue
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
object Label23: TLabel
|
||||||
|
Left = 60
|
||||||
|
Top = 4
|
||||||
|
Width = 45
|
||||||
|
Height = 14
|
||||||
|
Caption = #25968#37327#65306
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 536
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 576
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 612
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 12
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 740
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 848
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 896
|
||||||
|
Top = 8
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 948
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
object ADOQuery2: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 828
|
||||||
|
Top = 52
|
||||||
|
end
|
||||||
|
end
|
||||||
888
坯布仓库/U_BpGdYPCkEdit.pas
Normal file
888
坯布仓库/U_BpGdYPCkEdit.pas
Normal file
|
|
@ -0,0 +1,888 @@
|
||||||
|
unit U_BpGdYPCkEdit;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, cxEdit,Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, DB, cxDBData,cxTextEdit,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxCheckBox, BtnEdit, cxCurrencyEdit,strUtils, RM_Common,
|
||||||
|
RM_Class, RM_e_Xls, RM_GridReport, RM_System, RM_Dataset;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpGdYPCkEdit = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
TOk: TToolButton;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
v1ckqty: TcxGridDBColumn;
|
||||||
|
v1price: TcxGridDBColumn;
|
||||||
|
v1money: TcxGridDBColumn;
|
||||||
|
Panel2: TPanel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
CRTime: TDateTimePicker;
|
||||||
|
Label8: TLabel;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
cust: TBtnEditA;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label23: TLabel;
|
||||||
|
ADOPrint: TADOQuery;
|
||||||
|
RMDB_MD: TRMDBDataSet;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
Label1: TLabel;
|
||||||
|
note: TEdit;
|
||||||
|
v1ssel: TcxGridDBColumn;
|
||||||
|
GroupBox2: TGroupBox;
|
||||||
|
Label2: TLabel;
|
||||||
|
P_CodeName: TBtnEditA;
|
||||||
|
Label3: TLabel;
|
||||||
|
Edit1: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
Edit2: TEdit;
|
||||||
|
Button1: TButton;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
custaddress: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
ADOQuery2: TADOQuery;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
procedure custBtnClick(Sender: TObject);
|
||||||
|
procedure v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure v1P_CodeNamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1P_ColorPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure P_CodeNameBtnClick(Sender: TObject);
|
||||||
|
procedure P_CodeNameExit(Sender: TObject);
|
||||||
|
procedure Button1Click(Sender: TObject);
|
||||||
|
procedure CRTimeKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
function savedate():Boolean;
|
||||||
|
function YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
procedure DoKc();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fType:integer;
|
||||||
|
fCKName:string;
|
||||||
|
fkeyNO:string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpGdYPCkEdit: TfrmBpGdYPCkEdit;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, U_BpRk, U_ZdyAttachCP, U_ZdyAttachment;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmBpGdYPCkEdit.DoKc();
|
||||||
|
begin
|
||||||
|
Label23.Caption:='数量:0';
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
IF trim(CDS_Main.fieldbyname('P_CodeName').AsString)='' then exit;
|
||||||
|
IF trim(CDS_Main.fieldbyname('P_Color').AsString)='' then exit;
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select AA.* ');
|
||||||
|
sql.Add('FROM( select A.ckName,P_CodeName,A.P_Color,A.QtyUnit,ckQty=0.00,Price=0.00,money=0.00, ');
|
||||||
|
sql.Add(' SUM(case when CRFlag=''入库'' then Qty else -1 * Qty end ) as Qty ');
|
||||||
|
sql.Add('from BP_InOut A ');
|
||||||
|
sql.Add('where P_CodeName='+quotedstr(trim(CDS_Main.fieldbyname('P_CodeName').AsString)) );
|
||||||
|
sql.Add('and P_Color='+quotedstr(trim(CDS_Main.fieldbyname('P_Color').AsString)) );
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) );
|
||||||
|
sql.Add('group by A.ckName,P_CodeName,A.P_Color,A.QtyUnit)AA ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
// Label22.Caption:='匹数:'+trim(ADOQuery1.fieldbyname('kcRollNum').AsString);
|
||||||
|
Label23.Caption:='数量:'+trim(ADOQuery1.fieldbyname('Qty').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
function TfrmBpGdYPCkEdit.YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
var
|
||||||
|
CRID,YFID,Price,PriceUnit,OrderUnit,FComTaiTou:String;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
with Order_Main10 do
|
||||||
|
begin
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where FactoryName='''+Trim(cust.text)+'''');
|
||||||
|
sql.Add('and YFDefFlag1=1 ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
CRID:=ADOQuery1.fieldbyname('CRID').AsString;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||||
|
sql.Add('select * from YF_Money_CRID ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CRID:=ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.text);
|
||||||
|
FieldByName('ZdyStr1').Value:='应收收';
|
||||||
|
FieldByName('YFDefFlag1').Value:=1;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(ckNo)+'''');
|
||||||
|
sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
sql.Add(' and YFName=''广东销售'' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(ckNo)+'''');
|
||||||
|
sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
sql.Add(' and YFName=''广东销售'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取坯布应付最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('YFID').Value:=Trim(YFID);
|
||||||
|
FieldByName('YFTypeId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('CRType').Value:='应收款登记';
|
||||||
|
FieldByName('CRFlag').Value:='应收收';
|
||||||
|
FieldByName('QtyFlag').Value:=1;
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',CRTime.DateTime));
|
||||||
|
FieldByName('YFType').Value:='自动生成';
|
||||||
|
FieldByName('ps').Value:=0;
|
||||||
|
FieldByName('Qty').Value:=Order_Main10.fieldbyname('Qty').AsFloat;
|
||||||
|
FieldByName('Price').Value:=Order_Main10.fieldbyname('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
FieldByName('BBMoney').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
//FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('BZType').Value:='人民币';
|
||||||
|
FieldByName('QtyUnit').Value:=Trim(Order_Main10.fieldbyname('QtyUnit').AsString);
|
||||||
|
FieldByName('ComTaiTou').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('P_CodeName').Value:=trim(Order_Main10.fieldbyname('P_CodeName').AsString);
|
||||||
|
FieldByName('P_Color').Value:=trim(Order_Main10.fieldbyname('P_Color').AsString);
|
||||||
|
FieldByName('YFName').Value:='广东销售';
|
||||||
|
FieldByName('MainId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('subID').Value:=Trim(ckID);
|
||||||
|
FieldByName('YFDefFlag1').Value:=1;
|
||||||
|
FieldByName('syrName').Value:='广东门市部';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
YFID:=Trim(ADOQuery1.fieldbyname('YFID').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
function TfrmBpGdYPCkEdit.savedate():Boolean;
|
||||||
|
var
|
||||||
|
fkcID,i:integer;
|
||||||
|
Filler:string;
|
||||||
|
FillTime:TdateTime;
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if FType=0 then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fkeyNO,'GC','BP_InOut',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Filler:=DName;
|
||||||
|
FillTime:=SGetServerDateTime(adoqueryTmp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut');
|
||||||
|
sql.Add('where CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
open;
|
||||||
|
Filler:=adoqueryTmp.fieldbyname('Filler').AsString;
|
||||||
|
FillTime:=adoqueryTmp.fieldbyname('FillTime').AsDateTime;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(fkeyNO)+'''');
|
||||||
|
sql.Add(' and YFName=''广东销售'' ');
|
||||||
|
sql.Add('and YFDefFlag1=1 ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from BP_InOut');
|
||||||
|
sql.Add('where CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
i:=1;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut');
|
||||||
|
sql.Add('where 1=2 ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('CRNO').Value:=trim(fkeyNO);
|
||||||
|
ADOQueryCmd.FieldByName('CRID').Value:=i;
|
||||||
|
ADOQueryCmd.FieldByName('CKName').Value:=trim(fckName);
|
||||||
|
// ADOQueryCmd.FieldByName('mainID').Value:=trim(fmainID);
|
||||||
|
// ADOQueryCmd.FieldByName('subID').Value:=trim(fsubID);
|
||||||
|
ADOQueryCmd.FieldByName('CRTime').Value:=formatdateTime('yyyy-MM-dd',CRTime.Date);
|
||||||
|
ADOQueryCmd.FieldByName('CRType').Value:=trim(crType.Text);
|
||||||
|
ADOQueryCmd.FieldByName('CRFlag').Value:='出库';
|
||||||
|
// ADOQueryCmd.FieldByName('MJID').Value:=trim(fieldbyname('MJID').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('MJXH').Value:=trim(fieldbyname('MJXH').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('CPTYPE').Value:=trim(fieldbyname('CPTYPE').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_Code').Value:=trim(fieldbyname('P_Code').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_CodeName').Value:=trim(fieldbyname('P_CodeName').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_spec').Value:=trim(fieldbyname('P_spec').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_Color').Value:=trim(fieldbyname('P_Color').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_MF').Value:=fieldbyname('P_MF').AsFloat;
|
||||||
|
// ADOQueryCmd.FieldByName('P_KZ').Value:=fieldbyname('P_KZ').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('RollNum').Value:=0;
|
||||||
|
ADOQueryCmd.FieldByName('Qty').Value:=fieldbyname('Qty').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('Price').Value:=fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('money').Value:=fieldbyname('money').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('QtyUnit').Value:=trim(fieldbyname('QtyUnit').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('note').Value:=trim(fieldbyname('note').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=trim(Filler);
|
||||||
|
ADOQueryCmd.FieldByName('FillTime').Value:=dateTimetostr(FillTime);
|
||||||
|
ADOQueryCmd.FieldByName('cust').Value:=trim(cust.Text);
|
||||||
|
ADOQueryCmd.FieldByName('custaddress').Value:=trim(custaddress.Text);
|
||||||
|
ADOQueryCmd.FieldByName('note').Value:=trim(note.Text);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstNo').Value:=trim(FirstName.TxtCode);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstName').Value:=trim(FirstName.Text);
|
||||||
|
if FType=1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.FieldByName('editer').Value:=trim(dName);
|
||||||
|
ADOQueryCmd.FieldByName('editTime').Value:=SGetServerDateTime(ADOQuery1);
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
IF trim(CRType.Text)='广东零售' then
|
||||||
|
begin
|
||||||
|
if not YSData(fkeyNo,inttostr(i),CDS_Main) then
|
||||||
|
begin
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
i:=i+1;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpGdYPCkEdit.SetComboBox();
|
||||||
|
begin
|
||||||
|
{ ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and zdyName='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count>0 then ckName.ItemIndex:=0; }
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
// CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCKTYPE''');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and note='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count>0 then CRType.ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpGdYPCkEdit.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.* from BP_InOut A');
|
||||||
|
sql.Add('where A.CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp,CDS_Main);
|
||||||
|
if not CDS_Main.IsEmpty then
|
||||||
|
begin
|
||||||
|
CRTime.Date:= CDS_Main.fieldbyname('CRTime').AsDateTime;
|
||||||
|
// CKName.ItemIndex:=CKName.Items.IndexOf(trim(CDS_Main.fieldbyname('CKName').AsString));
|
||||||
|
CRType.ItemIndex:=CRType.Items.IndexOf(trim(CDS_Main.fieldbyname('CRType').AsString));
|
||||||
|
cust.Text:= trim(CDS_Main.fieldbyname('cust').AsString);
|
||||||
|
custaddress.Text:= trim(CDS_Main.fieldbyname('custaddress').AsString);
|
||||||
|
note.Text:= trim(CDS_Main.fieldbyname('note').AsString);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
if fType=10 then Action:=cahide
|
||||||
|
else Action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpGdYPCkEdit:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ if fType=10 then
|
||||||
|
begin
|
||||||
|
TOk.Visible:=true;
|
||||||
|
// v1Ssel.Visible:=true;
|
||||||
|
v1ckqty.Visible:=true;
|
||||||
|
v1price.Visible:=true;
|
||||||
|
v1money.Visible:=true;
|
||||||
|
GroupBox1.Visible:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
TOk.Visible:=false;
|
||||||
|
// v1Ssel.Visible:=false;
|
||||||
|
v1ckqty.Visible:=false;
|
||||||
|
v1price.Visible:=false;
|
||||||
|
v1money.Visible:=false;
|
||||||
|
GroupBox1.Visible:=false;
|
||||||
|
end; }
|
||||||
|
readCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
SetComboBox();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//BegDate.Date:=DServerDate-7;
|
||||||
|
// EndDate.Date:=DServerDate;
|
||||||
|
CRTime.date:= DServerDate;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath:string;
|
||||||
|
begin
|
||||||
|
if trim(fkeyNO)='' then exit;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Do_PrintMd ');
|
||||||
|
sql.Add('@mainID='+quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add(',@flag='+quotedstr(trim('广东出库')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单建威广州.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件['+filepath+']不存在!'),'提示信息',MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['dtxz'] :=FormatDateTime('yyyy-mm-dd',date());
|
||||||
|
RMVariables['zdr'] :=trim(DName);
|
||||||
|
RMVariables['Filler'] :=trim(DName);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CRTIME.SetFocus;
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
if trim(CRType.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('出库类型不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if trim(cust.Text)=''then
|
||||||
|
begin
|
||||||
|
application.MessageBox('客户不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if savedate() then
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存成功!','提示信息');
|
||||||
|
TOk.Enabled:=false;
|
||||||
|
TBPrint.Enabled:=true;
|
||||||
|
// ModalResult:=1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存失败!','提示信息',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.custBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
fkhType:='广东客户';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
cust.Text:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||||
|
custaddress.Text:=Trim(CDS_HZ.fieldbyname('defnote1').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachment.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,fieldname,qty1,qty2:String;
|
||||||
|
num1:double;
|
||||||
|
|
||||||
|
begin
|
||||||
|
fieldname:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(Trim(fieldname)).Value:=TcxTextEdit(Sender).EditingText;
|
||||||
|
num1:=FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=strtofloat(format('%.2f',[num1]));
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldbyname('ssel').Value:=checkbox1.Checked;
|
||||||
|
post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
// TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CopyAddRow(Tv1,CDS_Main);
|
||||||
|
CDS_Main.edit;
|
||||||
|
CDS_Main.fieldbyname('QtyUnit').Value:='M';
|
||||||
|
CDS_Main.Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then exit;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.Locate('ssel',true,[]) then
|
||||||
|
begin
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
//next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.v1P_CodeNamePropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_CodeName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
DoKc();
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(CDS_Main.fieldbyname('P_CodeName').AsString)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('品名不存在!','提示信息',0);
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_CodeName').Value:='';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.v1P_ColorPropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_Color').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
DoKc();
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(CDS_Main.fieldbyname('P_CodeName').AsString)));
|
||||||
|
sql.Add('and DEFstr3='+quotedstr(trim(CDS_Main.fieldbyname('P_Color').AsString)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('颜色不存在!','提示信息',0);
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_Color').Value:='';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
DoKc();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachCP:=TfrmZdyAttachCP.Create(Application);
|
||||||
|
with frmZdyAttachCP do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_main.Edit;
|
||||||
|
Self.CDS_main.FieldByName('P_Code').Value:=Trim(CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
Self.CDS_main.FieldByName('P_CodeName').Value:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.CDS_main.FieldByName('P_Color').Value:=Trim(CDS_HZ.fieldbyname('DEFstr3').AsString);
|
||||||
|
// Self.Order_Sub.FieldByName('SOrddefstr4').Value:=Trim(ClientDataSet1.fieldbyname('Note').AsString);
|
||||||
|
Self.CDS_main.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachCP.Free;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.P_CodeNameBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachCP:=TfrmZdyAttachCP.Create(Application);
|
||||||
|
with frmZdyAttachCP do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.P_COdeName.Text:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachCP.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.P_CodeNameExit(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=trim(P_CodeName.Text);
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
P_CodeName.Text:= trim(mvalue);
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(mvalue)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('品名不存在!','提示信息',0);
|
||||||
|
P_CodeName.Text:='';
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.Button1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(P_CodeName.Text)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.Last;
|
||||||
|
while not ADOQuery1.Eof do
|
||||||
|
begin
|
||||||
|
CDS_Main.Append;
|
||||||
|
CDS_main.FieldByName('P_Code').Value:=Trim(ADOQuery1.fieldbyname('ZdyCode').AsString);
|
||||||
|
CDS_main.FieldByName('P_CodeName').Value:=Trim(ADOQuery1.fieldbyname('ZDYName').AsString);
|
||||||
|
CDS_main.FieldByName('P_Color').Value:=Trim(ADOQuery1.fieldbyname('DEFstr3').AsString);
|
||||||
|
CDS_main.FieldByName('Qty').Value:=strtofloatdef(trim(edit1.Text),0);
|
||||||
|
CDS_main.FieldByName('Price').Value:=strtofloatdef(trim(edit2.Text),0);
|
||||||
|
CDS_main.FieldByName('Money').Value:=strtofloat(format('%.2f',[CDS_main.FieldByName('Qty').AsFloat * CDS_main.FieldByName('Price').AsFloat]));
|
||||||
|
CDS_Main.Post;
|
||||||
|
ADOQuery1.Next;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpGdYPCkEdit.CRTimeKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
Key:=UpCase(Key);
|
||||||
|
if key=#13 then
|
||||||
|
begin
|
||||||
|
perform(WM_NEXTDLGCTL,0,0);
|
||||||
|
Key := #0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
450
坯布仓库/U_BpJGlist.dfm
Normal file
450
坯布仓库/U_BpJGlist.dfm
Normal file
|
|
@ -0,0 +1,450 @@
|
||||||
|
object frmBpJGlist: TfrmBpJGlist
|
||||||
|
Left = 172
|
||||||
|
Top = 168
|
||||||
|
Width = 1123
|
||||||
|
Height = 501
|
||||||
|
Caption = #24211#23384#20449#24687#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1107
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TOk: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 41
|
||||||
|
Visible = False
|
||||||
|
OnClick = TOkClick
|
||||||
|
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
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1107
|
||||||
|
Height = 41
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 15
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21152#24037#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 176
|
||||||
|
Top = 12
|
||||||
|
Width = 7
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 332
|
||||||
|
Top = 16
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 772
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 212
|
||||||
|
Top = 140
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 72
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 540
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 188
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object cust: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 376
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = custChange
|
||||||
|
end
|
||||||
|
object P_spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 824
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = custChange
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 268
|
||||||
|
Top = 136
|
||||||
|
Width = 120
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = custChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#29983#20135#20837#24211)
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 548
|
||||||
|
Top = 116
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #21547#24211#23384#20026#38646
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 320
|
||||||
|
Top = 68
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 6
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 592
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = custChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 73
|
||||||
|
Width = 1107
|
||||||
|
Height = 316
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column2
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTIme'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 95
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
DataBinding.FieldName = 'cust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 142
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 102
|
||||||
|
end
|
||||||
|
object v1P_SPEC: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'P_SPEC'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #30333#22383#21305#25968
|
||||||
|
DataBinding.FieldName = 'RollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #30333#22383#25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#21305#25968
|
||||||
|
DataBinding.FieldName = 'JGRollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #25104#21697#25968#37327
|
||||||
|
DataBinding.FieldName = 'JGQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#25439#32791
|
||||||
|
DataBinding.FieldName = 'SH_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#32553#29575
|
||||||
|
DataBinding.FieldName = 'SH_Qty_Rate'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.00%;-,0.00%'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 536
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 576
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 612
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 12
|
||||||
|
end
|
||||||
|
end
|
||||||
219
坯布仓库/U_BpJGlist.pas
Normal file
219
坯布仓库/U_BpJGlist.pas
Normal file
|
|
@ -0,0 +1,219 @@
|
||||||
|
unit U_BpJGlist;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxCheckBox, cxCurrencyEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpJGlist = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_SPEC: TcxGridDBColumn;
|
||||||
|
v1RollNum: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
cust: TEdit;
|
||||||
|
P_spec: TEdit;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
TOk: TToolButton;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
ckName: TComboBox;
|
||||||
|
Label6: TLabel;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
Edit1: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure custChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fType:integer;
|
||||||
|
fCKName:string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpJGlist: TfrmBpJGlist;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, U_BpRk;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmBpJGlist.SetComboBox();
|
||||||
|
begin
|
||||||
|
ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and zdyName='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count>0 then ckName.ItemIndex:=0;
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPRKTYPE''');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and note='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count>0 then CRType.ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpJGlist.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Qty_JGSH');
|
||||||
|
sql.add('@begdate='''+formatdateTime('yyyy-MM-dd',begdate.Date)+'''');
|
||||||
|
sql.add(',@enddate='''+formatdateTime('yyyy-MM-dd',enddate.Date+1)+'''');
|
||||||
|
{ sql.Add('select * from BP_KC A');
|
||||||
|
sql.Add('where 1=1');
|
||||||
|
if begdate.Checked then
|
||||||
|
sql.Add('and CRTime>='''+formatdateTime('yyyy-MM-dd',begdate.Date)+''' ');
|
||||||
|
if enddate.Checked then
|
||||||
|
sql.Add('and CRTime<'''+formatdateTime('yyyy-MM-dd',enddate.Date+1)+''' ');
|
||||||
|
if not CheckBox1.Checked then
|
||||||
|
sql.Add('and (RollNum<>0 or qty<>0 ) ');
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) ); }
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp,CDS_Main);
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption,Tv1,'²¼Æ¥²Ö¿â');
|
||||||
|
if fType=10 then Action:=cahide
|
||||||
|
else Action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpJGlist:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.custChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTmp.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryTmp,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryTmp,CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if fType=10 then
|
||||||
|
begin
|
||||||
|
TOk.Visible:=true;
|
||||||
|
end;
|
||||||
|
readCxGrid(self.Caption,Tv1,'²¼Æ¥²Ö¿â');
|
||||||
|
SetComboBox();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BegDate.Date:=DServerDate-7;
|
||||||
|
EndDate.Date:=DServerDate;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.TBPrintClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpJGlist.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
611
坯布仓库/U_BpRk.dfm
Normal file
611
坯布仓库/U_BpRk.dfm
Normal file
|
|
@ -0,0 +1,611 @@
|
||||||
|
object frmbpRk: TfrmbpRk
|
||||||
|
Left = 315
|
||||||
|
Top = 166
|
||||||
|
Width = 1086
|
||||||
|
Height = 500
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
|
Caption = #20837#24211#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 ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1070
|
||||||
|
Height = 29
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 95
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TBSaveClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
Caption = #25171#21360#36864#36135#21333
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 158
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 29
|
||||||
|
Width = 1070
|
||||||
|
Height = 76
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 372
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 212
|
||||||
|
Top = 20
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 148
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #22791' '#27880
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 548
|
||||||
|
Top = 20
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 876
|
||||||
|
Top = 20
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #25968' '#37327
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 876
|
||||||
|
Top = 48
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #22797#21046#34892#25968
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 36
|
||||||
|
Top = 124
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#22320#22336
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 712
|
||||||
|
Top = 20
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CRTime: TDateTimePicker
|
||||||
|
Left = 92
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 41509.970132187500000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41509.970132187500000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Left = 424
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 1
|
||||||
|
Text = #29983#20135#20837#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#29983#20135#20837#24211)
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 244
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 2
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object note: TEdit
|
||||||
|
Left = 92
|
||||||
|
Top = 144
|
||||||
|
Width = 653
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object cust: TBtnEditA
|
||||||
|
Left = 588
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnBtnClick = custBtnClick
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 928
|
||||||
|
Top = 16
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnKeyPress = Edit1KeyPress
|
||||||
|
end
|
||||||
|
object Edit2: TEdit
|
||||||
|
Left = 928
|
||||||
|
Top = 44
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnKeyPress = Edit2KeyPress
|
||||||
|
end
|
||||||
|
object custaddress: TEdit
|
||||||
|
Left = 92
|
||||||
|
Top = 120
|
||||||
|
Width = 653
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object factoryName: TBtnEditA
|
||||||
|
Left = 752
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnBtnClick = factoryNameBtnClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 134
|
||||||
|
Width = 1070
|
||||||
|
Height = 260
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column2
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'orderNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1P_CodeNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'P_SPEC'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1P_ColorPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'gangNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1P_MF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'P_MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_KZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'P_KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1CPType: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'CPType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsEditFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#27491#21697
|
||||||
|
#19968#31561#27425#21697
|
||||||
|
#20108#31561#27425#21697)
|
||||||
|
Properties.ReadOnly = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'RollNum'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1QtyUnitPropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Width = 95
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #24211#20301
|
||||||
|
DataBinding.FieldName = 'KuWei'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = Tv1Column1PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'P_ColorNo'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = Tv1Column2PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 105
|
||||||
|
Width = 1070
|
||||||
|
Height = 29
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 3
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 292
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 344
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 400
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 464
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 556
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 500
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 848
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 896
|
||||||
|
Top = 8
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 948
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
object ADOQuery2: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 312
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
end
|
||||||
1177
坯布仓库/U_BpRk.pas
Normal file
1177
坯布仓库/U_BpRk.pas
Normal file
File diff suppressed because it is too large
Load Diff
971
坯布仓库/U_BpRklist.dfm
Normal file
971
坯布仓库/U_BpRklist.dfm
Normal file
|
|
@ -0,0 +1,971 @@
|
||||||
|
object frmBpRklist: TfrmBpRklist
|
||||||
|
Left = 436
|
||||||
|
Top = 322
|
||||||
|
Width = 1160
|
||||||
|
Height = 500
|
||||||
|
Caption = #20837#24211#21015#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1144
|
||||||
|
Height = 62
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 95
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20316#24223
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object tbcdel: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = tbcdelClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Wrap = True
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#36864#36135#21333
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 162
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #32454#30721#24405#20837
|
||||||
|
ImageIndex = 10
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 249
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 336
|
||||||
|
Top = 30
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 399
|
||||||
|
Top = 30
|
||||||
|
Caption = #25171#21360#20837#24211#21333
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 62
|
||||||
|
Width = 1144
|
||||||
|
Height = 65
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 62
|
||||||
|
Top = 36
|
||||||
|
Width = 13
|
||||||
|
Height = 12
|
||||||
|
Caption = #33267
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 504
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 504
|
||||||
|
Top = 40
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068' '#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 260
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 100
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 748
|
||||||
|
Top = 16
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 884
|
||||||
|
Top = 84
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #21253#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 448
|
||||||
|
Top = 100
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #36135#36816#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 536
|
||||||
|
Top = 96
|
||||||
|
Width = 65
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#21333#25968#65306
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 748
|
||||||
|
Top = 40
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 260
|
||||||
|
Top = 40
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746' '#21333' '#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 11
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 35
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 560
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object P_Color: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 560
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 316
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#29983#20135#20837#24211)
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 320
|
||||||
|
Top = 96
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 5
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object cust: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 792
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object packNo: TEdit
|
||||||
|
Tag = 1
|
||||||
|
Left = 912
|
||||||
|
Top = 80
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object defstr2: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 616
|
||||||
|
Top = 96
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#24555#20214
|
||||||
|
#24930#20214)
|
||||||
|
end
|
||||||
|
object factoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 792
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object orderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 316
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 10
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 147
|
||||||
|
Width = 560
|
||||||
|
Height = 314
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#21333#21495
|
||||||
|
DataBinding.FieldName = 'CRNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1CRTime: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1CRType: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CRType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'orderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1cust: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'cust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
DataBinding.FieldName = 'factoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 99
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_SPEC: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'P_SPEC'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1P_MF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'P_MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_KZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'P_KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1CPType: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'CPType'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1packNO: TcxGridDBColumn
|
||||||
|
Caption = #21253#21495
|
||||||
|
DataBinding.FieldName = 'packNO'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'RollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Filler: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1FillTime: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#22320#22336
|
||||||
|
DataBinding.FieldName = 'custaddress'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1defstr2: TcxGridDBColumn
|
||||||
|
Caption = #36135#36816#31867#22411
|
||||||
|
DataBinding.FieldName = 'defstr2'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1gangNo: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'gangNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1defNote1: TcxGridDBColumn
|
||||||
|
Caption = #29289#27969#22791#27880
|
||||||
|
DataBinding.FieldName = 'defNote1'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #24211#20301
|
||||||
|
DataBinding.FieldName = 'KuWei'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSEL'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxTabControl1: TcxTabControl
|
||||||
|
Left = 0
|
||||||
|
Top = 127
|
||||||
|
Width = 1144
|
||||||
|
Height = 20
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 3
|
||||||
|
Properties.CustomButtons.Buttons = <>
|
||||||
|
Properties.Style = 9
|
||||||
|
Properties.TabIndex = 0
|
||||||
|
Properties.Tabs.Strings = (
|
||||||
|
#26410#20316#24223
|
||||||
|
#24050#20316#24223
|
||||||
|
#20840#37096)
|
||||||
|
OnChange = cxTabControl1Change
|
||||||
|
ClientRectRight = 0
|
||||||
|
ClientRectTop = 0
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 560
|
||||||
|
Top = 147
|
||||||
|
Width = 584
|
||||||
|
Height = 314
|
||||||
|
Align = alRight
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
|
TabOrder = 4
|
||||||
|
object TvMX: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
Position = spFooter
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Position = spFooter
|
||||||
|
Column = cxGridDBColumn8
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBColumn8
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBColumn8
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
Column = vMXColumn3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = vMXColumn2
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 33
|
||||||
|
object TvMXColumn1: TcxGridDBColumn
|
||||||
|
Tag = 9
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSEL'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
end
|
||||||
|
object vMXColumn3: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'MXMJXH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 51
|
||||||
|
end
|
||||||
|
object cxGridDBColumn8: TcxGridDBColumn
|
||||||
|
Caption = #37325#37327
|
||||||
|
DataBinding.FieldName = 'MXQty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object vMXColumn2: TcxGridDBColumn
|
||||||
|
Caption = #38271#24230
|
||||||
|
DataBinding.FieldName = 'MXQTY2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object vMXColumn4: TcxGridDBColumn
|
||||||
|
Caption = #38271#24230#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Y')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = TvMX
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 628
|
||||||
|
Top = 33
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 664
|
||||||
|
Top = 41
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 500
|
||||||
|
Top = 92
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 788
|
||||||
|
Top = 36
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMXLSExport2: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 864
|
||||||
|
Top = 37
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 716
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 752
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object ADOPrint1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 824
|
||||||
|
Top = 36
|
||||||
|
end
|
||||||
|
object RMDB_Sub: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint1
|
||||||
|
Left = 632
|
||||||
|
Top = 160
|
||||||
|
end
|
||||||
|
object ADOQuerySub: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 608
|
||||||
|
Top = 244
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = CDS_Sub
|
||||||
|
Left = 644
|
||||||
|
Top = 245
|
||||||
|
end
|
||||||
|
object CDS_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 245
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 401
|
||||||
|
Top = 279
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 439
|
||||||
|
Top = 278
|
||||||
|
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 = 508
|
||||||
|
Top = 277
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 726
|
||||||
|
Top = 193
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #20840#36873
|
||||||
|
OnClick = N1Click
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #20840#24323
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, 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
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 476
|
||||||
|
Top = 280
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
908
坯布仓库/U_BpRklist.pas
Normal file
908
坯布仓库/U_BpRklist.pas
Normal file
|
|
@ -0,0 +1,908 @@
|
||||||
|
unit U_BpRklist;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||||
|
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset,
|
||||||
|
RM_Common, RM_Class, RM_e_Xls, RM_System, RM_GridReport, cxPC, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, cxCheckBox, cxTextEdit,
|
||||||
|
Menus;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpRklist = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_SPEC: TcxGridDBColumn;
|
||||||
|
v1P_MF: TcxGridDBColumn;
|
||||||
|
v1P_KZ: TcxGridDBColumn;
|
||||||
|
v1RollNum: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1CRType: TcxGridDBColumn;
|
||||||
|
v1CRTime: TcxGridDBColumn;
|
||||||
|
v1Filler: TcxGridDBColumn;
|
||||||
|
v1FillTime: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
P_Color: TEdit;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
v1CPType: TcxGridDBColumn;
|
||||||
|
ckName: TComboBox;
|
||||||
|
Label6: TLabel;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMXLSExport2: TRMXLSExport;
|
||||||
|
ADOPrint: TADOQuery;
|
||||||
|
RMDB_MD: TRMDBDataSet;
|
||||||
|
ADOPrint1: TADOQuery;
|
||||||
|
RMDB_Sub: TRMDBDataSet;
|
||||||
|
Label7: TLabel;
|
||||||
|
cust: TEdit;
|
||||||
|
v1cust: TcxGridDBColumn;
|
||||||
|
v1packNO: TcxGridDBColumn;
|
||||||
|
packNo: TEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
defstr2: TComboBox;
|
||||||
|
v1defstr2: TcxGridDBColumn;
|
||||||
|
v1gangNo: TcxGridDBColumn;
|
||||||
|
v1defNote1: TcxGridDBColumn;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
Label10: TLabel;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
factoryName: TEdit;
|
||||||
|
Label11: TLabel;
|
||||||
|
cxTabControl1: TcxTabControl;
|
||||||
|
tbcdel: TToolButton;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
orderNo: TEdit;
|
||||||
|
Label12: TLabel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
TvMX: TcxGridDBTableView;
|
||||||
|
TvMXColumn1: TcxGridDBColumn;
|
||||||
|
vMXColumn3: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn8: TcxGridDBColumn;
|
||||||
|
vMXColumn2: TcxGridDBColumn;
|
||||||
|
vMXColumn4: TcxGridDBColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
ADOQuerySub: TADOQuery;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
CDS_Sub: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure P_CodeNameChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure cxTabControl1Change(Sender: TObject);
|
||||||
|
procedure tbcdelClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
TblCprk: string;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
procedure CreateTable();
|
||||||
|
procedure DropTable();
|
||||||
|
procedure DoRkNum();
|
||||||
|
procedure Setstatus();
|
||||||
|
procedure PrtData(FJYID: string);
|
||||||
|
procedure PrtRKData(FJYID: string);
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fCKName, fManage: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpRklist: TfrmBpRklist;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun10, U_ZDYHelp, U_BpRk, U_CPCKMXLR, U_Fun;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.SetStatus();
|
||||||
|
begin
|
||||||
|
TBedit.Visible := false;
|
||||||
|
Tbdel.Visible := false;
|
||||||
|
tbcdel.Visible := false;
|
||||||
|
case cxTabControl1.TabIndex of
|
||||||
|
0:
|
||||||
|
begin
|
||||||
|
TBedit.Visible := true;
|
||||||
|
Tbdel.Visible := true;
|
||||||
|
end;
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
tbcdel.Visible := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.DoRkNum();
|
||||||
|
var
|
||||||
|
RKNo: Tstringlist;
|
||||||
|
begin
|
||||||
|
RKNo := Tstringlist.Create;
|
||||||
|
RKNo.Clear;
|
||||||
|
try
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if RKNo.IndexOf(trim(fieldbyname('CRNO').AsString)) < 0 then
|
||||||
|
begin
|
||||||
|
RKNo.Add(trim(fieldbyname('CRNO').AsString));
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
EnableControls;
|
||||||
|
First;
|
||||||
|
end;
|
||||||
|
Label10.Caption := '入库单数:' + inttostr(RKNo.Count);
|
||||||
|
finally
|
||||||
|
RKNo.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.DropTable();
|
||||||
|
var
|
||||||
|
strSQL: string;
|
||||||
|
begin
|
||||||
|
// TblCprk := '[##CP_INOut123' + trim(DCode) + IntToStr(Handle)+formatdatetime('hhnnsszzz',time) + ']';
|
||||||
|
//创建临时表
|
||||||
|
strSQL := 'IF OBJECT_ID(''tempdb..' + TblCprk + ''') IS NOT NULL DROP TABLE ' + TblCprk;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(strSQL);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.CreateTable();
|
||||||
|
var
|
||||||
|
strSQL: string;
|
||||||
|
begin
|
||||||
|
TblCprk := '[##BP_INoutPPack' + trim(DCode) + IntToStr(Handle) + formatdatetime('hhnnsszzz', time) + ']';
|
||||||
|
//创建临时表
|
||||||
|
strSQL := 'IF OBJECT_ID(''tempdb..' + TblCprk + ''') IS NOT NULL DROP TABLE ' + TblCprk + #13 + 'CREATE TABLE ' + TblCprk + ' (' + 'MainID VARCHAR(20),' + 'subID VARCHAR(20),' + 'BCID Varchar(20))'#13;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(strSQL);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.SetComboBox();
|
||||||
|
begin
|
||||||
|
ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName) <> '' then
|
||||||
|
sql.Add('and zdyName=' + quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count > 0 then
|
||||||
|
ckName.ItemIndex := 0;
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPRKTYPE''');
|
||||||
|
if trim(fCKName) <> '' then
|
||||||
|
sql.Add('and note=' + quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count > 0 then
|
||||||
|
CRType.ItemIndex := 0;
|
||||||
|
|
||||||
|
if fCKName = '广东仓库' then
|
||||||
|
ToolButton1.Visible := true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,');
|
||||||
|
sql.Add('orderNo=(select Top 1 orderNo from JYOrder_Main X where X.MainID=A.MainID )');
|
||||||
|
sql.Add('from BP_InOut A ');
|
||||||
|
sql.Add('where CRTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
|
||||||
|
sql.Add('and CRTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
|
||||||
|
sql.Add('and CRFlag=''入库'' ');
|
||||||
|
if trim(FckName) <> '' then
|
||||||
|
sql.Add('and ckName=' + quotedstr(trim(fckName)));
|
||||||
|
if cxTabControl1.TabIndex = 0 then
|
||||||
|
sql.Add('and valid=''Y'' ');
|
||||||
|
if cxTabControl1.TabIndex = 1 then
|
||||||
|
sql.Add('and valid=''N'' ');
|
||||||
|
// ShowMessage(sql.text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp, CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp, CDS_Main);
|
||||||
|
DoRkNum();
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption, Tv1, '布匹仓库');
|
||||||
|
Action := cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpRklist := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmbpRk := TfrmbpRk.create(self);
|
||||||
|
with frmbpRk do
|
||||||
|
begin
|
||||||
|
fkeyNo := '';
|
||||||
|
fType := 0;
|
||||||
|
fckName := self.fckName;
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.P_CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTmp.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryTmp, CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryTmp, CDS_Main);
|
||||||
|
DoRkNum();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
readCxGrid(self.Caption, Tv1, '布匹仓库');
|
||||||
|
SetComboBox();
|
||||||
|
SetStatus();
|
||||||
|
InitGrid();
|
||||||
|
if fckName = '广东仓库' then
|
||||||
|
begin
|
||||||
|
if fmanage = '高权限' then
|
||||||
|
TBDel.Visible := true
|
||||||
|
else
|
||||||
|
TBDel.Visible := false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BegDate.Date := DServerDate;
|
||||||
|
EndDate.Date := DServerDate;
|
||||||
|
cxGrid1.Align := alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if cds_main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if pos('调拨', Trim(CDS_Main.fieldbyname('CRType').AsString)) > 0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('调拨入库不允许删除!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where exists(select CRNO from BP_InOut X where X.KCID=A.KCID and X.CRFlag=''入库'' and X.CRNO=''' + trim(cds_main.fieldbyname('CRNO').AsString) + ''') ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能修改!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from YF_Money_CR ');
|
||||||
|
SQL.Add(' where mainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add(' and status>=''1'' ');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('应付款没有撤销审核,不能修改!', '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
frmbpRk := TfrmbpRk.create(self);
|
||||||
|
with frmbpRk do
|
||||||
|
begin
|
||||||
|
fkeyNo := self.cds_main.fieldbyname('CRNO').AsString;
|
||||||
|
fType := 1;
|
||||||
|
fckName := self.fckName;
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
self.CDS_Main.Locate('crNo', trim(fkeyNo), []);
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
{ if Trim(CDS_Main.fieldbyname('Filler').AsString)<>Trim(DName) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('不能操作他人的数据!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end; }
|
||||||
|
|
||||||
|
if pos('调拨', Trim(CDS_Main.fieldbyname('CRType').AsString)) > 0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('调拨入库不允许删除!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut A');
|
||||||
|
SQL.Add('where exists(select CRNO from BP_InOut X where X.KCID=A.KCID and X.CRFlag=''入库'' and X.CRNO=''' + trim(cds_main.fieldbyname('CRNO').AsString) + ''') ');
|
||||||
|
sQL.Add('and A.CRFlag=''出库''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能作废!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if not ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生出库数据,不能删除!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' select * from YF_Money_CR ');
|
||||||
|
SQL.Add(' where mainID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add(' and status>=''1'' ');
|
||||||
|
Open;
|
||||||
|
if not IsEmpty then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('应付款没有撤销审核,不能作废!', '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Application.MessageBox('确定要做作废数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
SQL.Add('where maiNID=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where YFDefFlag1=1 ');
|
||||||
|
|
||||||
|
|
||||||
|
sql.Add('delete from BP_kc ');
|
||||||
|
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add('update BP_InOut SET valid=''N'' ');
|
||||||
|
SQL.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('入库单删除')));
|
||||||
|
sql.Add(',' + quotedstr(trim('入库单号:' + trim(CDS_Main.FieldByName('CRNO').AsString))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath: string;
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
CreateTable();
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with adoqueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add(' insert into ' + TblCprk + '(MainID,subID) values( ');
|
||||||
|
SQL.Add(' ' + quotedstr(trim(CDS_Main.fieldbyname('CRNO').AsString)));
|
||||||
|
SQL.Add(',' + quotedstr(trim(CDS_Main.fieldbyname('CRID').AsString)));
|
||||||
|
sql.add(')');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_BPRkpackList ');
|
||||||
|
sql.Add('@mainID=' + quotedstr(trim('')));
|
||||||
|
sql.Add(',@TblCprk=' + quotedstr(trim(TblCprk)));
|
||||||
|
sql.Add(',@flag=' + quotedstr(trim('1')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with AdoPrint1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Get_BPRkpackList ');
|
||||||
|
sql.Add('@mainID=' + quotedstr(trim('')));
|
||||||
|
sql.Add(',@TblCprk=' + quotedstr(trim(TblCprk)));
|
||||||
|
sql.Add(',@flag=' + quotedstr(trim('10')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath := ExtractFilePath(Application.ExeName) + 'report\出库单包号.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['begdate'] := FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ' - ' + FormatDateTime('yyyy-MM-dd', enddate.DateTime);
|
||||||
|
RMVariables['dtxz'] := FormatDateTime('yyyy-mm-dd', date());
|
||||||
|
RMVariables['zdr'] := trim(DName);
|
||||||
|
RMVariables['Filler'] := trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
DropTable();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.ToolButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath: string;
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Do_PrintMd ');
|
||||||
|
sql.Add('@mainID=' + quotedstr(trim(CDS_Main.fieldbyname('CRNO').AsString)));
|
||||||
|
sql.Add(',@flag=' + quotedstr(trim('广东出库')));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath := ExtractFilePath(Application.ExeName) + 'report\退货码单建威广州.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['dtxz'] := FormatDateTime('yyyy-mm-dd', date());
|
||||||
|
RMVariables['zdr'] := trim(DName);
|
||||||
|
RMVariables['Filler'] := trim(CDS_Main.fieldbyname('Filler').AsString);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.cxTabControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SetStatus();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.tbcdelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from BP_InOut where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
sql.Add('delete from CK_SXPB_CRMX where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
TBRafresh.Click;
|
||||||
|
except
|
||||||
|
Application.MessageBox('数据删除失败!', '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if cds_main.IsEmpty = true then
|
||||||
|
begin
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
// if CDS_Main.fieldbyname('ssel').value <> true then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('没有选择数据或勾选数据不准确!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
frmCPCKMXLR := TfrmCPCKMXLR.create(self);
|
||||||
|
with frmCPCKMXLR do
|
||||||
|
begin
|
||||||
|
fkeyNo := self.cds_main.fieldbyname('CRNO').AsString;
|
||||||
|
fkeyNoS := self.cds_main.fieldbyname('CRNOS').AsString;
|
||||||
|
fkeyID := self.cds_main.fieldbyname('CRID').AsString;
|
||||||
|
FMXGangHao := self.cds_main.fieldbyname('Gangno').AsString;
|
||||||
|
Edit3.Text := self.cds_main.fieldbyname('qtyunit').AsString;
|
||||||
|
// Edit2.Text := self.cds_main.fieldbyname('FZSPID').AsString;
|
||||||
|
|
||||||
|
FCRTYPE := '入库';
|
||||||
|
|
||||||
|
fType := 0;
|
||||||
|
if showmodal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
// self.InitGrid();
|
||||||
|
// self.CDS_Main.Locate('spid', fkeyNo, [])
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with ADOQuerySub do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CK_SXPB_CRMX A ');
|
||||||
|
sql.Add(' right JOIN BP_InOut B on B.CRID=A.CRID and B.crno=A.crno');
|
||||||
|
sql.Add(' where A.CRNO=' + quotedstr(trim(CDS_Main.fieldbyname('CRNO').AsString)));
|
||||||
|
sql.Add(' and A.CRID=' + quotedstr(trim(CDS_Main.fieldbyname('CRID').AsString)));
|
||||||
|
SQL.Add(' and crzt=''入库''');
|
||||||
|
// SQL.Add('AND NOT EXISTS(SELECT MXID FROM CK_SXPB_CRMX C WHERE C.FZMXID=A.MXID)');
|
||||||
|
sql.Add(' order by MXID');
|
||||||
|
// ShowMessage(SQL.text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQuerySub, CDS_Sub);
|
||||||
|
SInitCDSData20(ADOQuerySub, CDS_Sub);
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_Sub.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_Sub.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_Sub.DisableControls;
|
||||||
|
with CDS_Sub do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Sub.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
PrtData(CDS_Sub.FieldByName('MXID').AsString);
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.PrtData(FJYID: string);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath, Txt2, fImagePath2: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' EXEC P_Print_JYLab ');
|
||||||
|
SQL.Add(' @mjID=''' + Trim(FJYID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryPrint.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('标签内容未找到!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
Txt := Trim(ADOQueryPrint.fieldbyname('MXID').AsString);
|
||||||
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
|
except
|
||||||
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ExportFtErpFile('布匹标签.rmf', ADOQueryTmp);
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\布匹标签.rmf';
|
||||||
|
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
|
||||||
|
RM1.PrintReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.N1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_Sub, True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.N2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_Sub, False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
// if CDS_Sub.IsEmpty then
|
||||||
|
// Exit;
|
||||||
|
if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
PrtRKData(CDS_Main.FieldByName('CRNOS').AsString);
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpRklist.PrtRKData(FJYID: string);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath, Txt2, fImagePath2: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' EXEC P_Print_BPrkLab ');
|
||||||
|
SQL.Add(' @CRNO=''' + Trim(FJYID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryPrint.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('标签内容未找到!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
// Txt := Trim(ADOQueryPrint.fieldbyname('CRNO').AsString);
|
||||||
|
Txt := Trim(ADOQueryPrint.fieldbyname('CRNOS').AsString);
|
||||||
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
|
except
|
||||||
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ExportFtErpFile('布匹入库标签.rmf', ADOQueryTmp);
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\布匹入库标签.rmf';
|
||||||
|
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
// RM1.PrintReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
491
坯布仓库/U_BpYPCkEdit.dfm
Normal file
491
坯布仓库/U_BpYPCkEdit.dfm
Normal file
|
|
@ -0,0 +1,491 @@
|
||||||
|
object frmBpYPCkEdit: TfrmBpYPCkEdit
|
||||||
|
Left = 165
|
||||||
|
Top = 231
|
||||||
|
Width = 1071
|
||||||
|
Height = 512
|
||||||
|
Caption = #20986#24211#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1055
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TOk: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450#20986#24211
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = TOkClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 138
|
||||||
|
Width = 1055
|
||||||
|
Height = 316
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellClick = Tv1CellClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1ckqty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 15
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
OnCustomDrawIndicatorCell = Tv1CustomDrawIndicatorCell
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1P_CodeNamePropertiesButtonClick
|
||||||
|
Properties.OnEditValueChanged = v1P_CodeNamePropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 152
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnEditValueChanged = v1P_ColorPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v1ckqty: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
Properties.OnEditValueChanged = v1ckqtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 92
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1055
|
||||||
|
Height = 77
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Panel2'
|
||||||
|
TabOrder = 2
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1055
|
||||||
|
Height = 77
|
||||||
|
Align = alClient
|
||||||
|
Caption = #20986#24211#20449#24687
|
||||||
|
Color = clSkyBlue
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 0
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 208
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 604
|
||||||
|
Top = 20
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458' '#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 412
|
||||||
|
Top = 21
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#20449#24687
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 888
|
||||||
|
Top = 24
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21333#20215
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 44
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #22791' '#27880
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CRTime: TDateTimePicker
|
||||||
|
Left = 88
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 41509.970132187500000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41509.970132187500000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 265
|
||||||
|
Top = 16
|
||||||
|
Width = 120
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 1
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#29983#20135#20837#24211)
|
||||||
|
end
|
||||||
|
object cust: TBtnEditA
|
||||||
|
Left = 668
|
||||||
|
Top = 16
|
||||||
|
Width = 173
|
||||||
|
Height = 20
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnBtnClick = custBtnClick
|
||||||
|
end
|
||||||
|
object orderNO: TBtnEditA
|
||||||
|
Left = 468
|
||||||
|
Top = 17
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 3
|
||||||
|
OnBtnClick = orderNOBtnClick
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 916
|
||||||
|
Top = 20
|
||||||
|
Width = 60
|
||||||
|
Height = 20
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
Visible = False
|
||||||
|
OnKeyPress = Edit1KeyPress
|
||||||
|
end
|
||||||
|
object note: TEdit
|
||||||
|
Left = 88
|
||||||
|
Top = 40
|
||||||
|
Width = 753
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar2: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 109
|
||||||
|
Width = 1055
|
||||||
|
Height = 29
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 3
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 103
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 764
|
||||||
|
Top = 112
|
||||||
|
Width = 289
|
||||||
|
Height = 25
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clSkyBlue
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
object Label23: TLabel
|
||||||
|
Left = 108
|
||||||
|
Top = 8
|
||||||
|
Width = 45
|
||||||
|
Height = 14
|
||||||
|
Caption = #25968#37327#65306
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 536
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 576
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 612
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 12
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 740
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object ADOPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 816
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMDB_MD: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOPrint
|
||||||
|
Left = 848
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 896
|
||||||
|
Top = 8
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 948
|
||||||
|
Top = 20
|
||||||
|
end
|
||||||
|
end
|
||||||
859
坯布仓库/U_BpYPCkEdit.pas
Normal file
859
坯布仓库/U_BpYPCkEdit.pas
Normal file
|
|
@ -0,0 +1,859 @@
|
||||||
|
unit U_BpYPCkEdit;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, cxEdit,Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, DB, cxDBData,cxTextEdit,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxCheckBox, BtnEdit, cxCurrencyEdit,strUtils, RM_Common,
|
||||||
|
RM_Class, RM_e_Xls, RM_GridReport, RM_System, RM_Dataset;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpYPCkEdit = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
TOk: TToolButton;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
v1ckqty: TcxGridDBColumn;
|
||||||
|
Panel2: TPanel;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
CRTime: TDateTimePicker;
|
||||||
|
Label8: TLabel;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
cust: TBtnEditA;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
ToolBar2: TToolBar;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label23: TLabel;
|
||||||
|
ADOPrint: TADOQuery;
|
||||||
|
RMDB_MD: TRMDBDataSet;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
orderNO: TBtnEditA;
|
||||||
|
Label1: TLabel;
|
||||||
|
Edit1: TEdit;
|
||||||
|
Label2: TLabel;
|
||||||
|
note: TEdit;
|
||||||
|
Label3: TLabel;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
procedure custBtnClick(Sender: TObject);
|
||||||
|
procedure v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure v1P_CodeNamePropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1P_ColorPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure orderNOBtnClick(Sender: TObject);
|
||||||
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
|
private
|
||||||
|
fmainID,fsubID:string;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
function savedate():Boolean;
|
||||||
|
function YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
procedure DoKc();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fType:integer;
|
||||||
|
fCKName:string;
|
||||||
|
fkeyNO:string;
|
||||||
|
fsyrName:string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpYPCkEdit: TfrmBpYPCkEdit;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, U_BpRk, U_ProductOrderNewList,
|
||||||
|
U_ZdyAttachCP;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmBpYPCkEdit.DoKc();
|
||||||
|
begin
|
||||||
|
Label23.Caption:='数量:0';
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
IF trim(CDS_Main.fieldbyname('P_CodeName').AsString)='' then exit;
|
||||||
|
IF trim(CDS_Main.fieldbyname('P_Color').AsString)='' then exit;
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select AA.* ');
|
||||||
|
sql.Add('FROM( select A.ckName,P_CodeName,A.P_Color,A.QtyUnit,ckQty=0.00,Price=0.00,money=0.00, ');
|
||||||
|
sql.Add(' SUM(case when CRFlag=''入库'' then Qty else -1 * Qty end ) as Qty ');
|
||||||
|
sql.Add('from BP_InOut A ');
|
||||||
|
sql.Add('where P_CodeName='+quotedstr(trim(CDS_Main.fieldbyname('P_CodeName').AsString)) );
|
||||||
|
sql.Add('and P_Color='+quotedstr(trim(CDS_Main.fieldbyname('P_Color').AsString)) );
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('and ckName='+quotedstr(trim(FckName)) );
|
||||||
|
sql.Add('group by A.ckName,P_CodeName,A.P_Color,A.QtyUnit)AA ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
// Label22.Caption:='匹数:'+trim(ADOQuery1.fieldbyname('kcRollNum').AsString);
|
||||||
|
Label23.Caption:='数量:'+trim(ADOQuery1.fieldbyname('Qty').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
function TfrmBpYPCkEdit.YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
var
|
||||||
|
CRID,YFID,Price,PriceUnit,OrderUnit,FComTaiTou:String;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
with Order_Main10 do
|
||||||
|
begin
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where FactoryName='''+Trim(cust.text)+'''');
|
||||||
|
sql.Add('and ZdyStr1=''应收收''');
|
||||||
|
sql.Add('and YFDefFlag1=0 ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
CRID:=ADOQuery1.fieldbyname('CRID').AsString;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||||
|
sql.Add('select * from YF_Money_CRID ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CRID:=ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.text);
|
||||||
|
FieldByName('ZdyStr1').Value:='应收收';
|
||||||
|
FieldByName('YFDefFlag1').Value:=0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
{ with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(ckNo)+'''');
|
||||||
|
sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
sql.Add(' and YFName=''样品销售'' ');
|
||||||
|
execsql;
|
||||||
|
end; }
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(ckNo)+'''');
|
||||||
|
sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
sql.Add(' and YFName=''样品销售'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取坯布应付最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('YFID').Value:=Trim(YFID);
|
||||||
|
FieldByName('YFTypeId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('CRType').Value:='应收款登记';
|
||||||
|
FieldByName('CRFlag').Value:='应收收';
|
||||||
|
FieldByName('QtyFlag').Value:=1;
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',CRTime.DateTime));
|
||||||
|
FieldByName('YFType').Value:='自动生成';
|
||||||
|
FieldByName('ps').Value:=0;
|
||||||
|
FieldByName('Qty').Value:=Order_Main10.fieldbyname('Qty').AsFloat;
|
||||||
|
FieldByName('Price').Value:=Order_Main10.fieldbyname('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
FieldByName('BBMoney').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
//FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('BZType').Value:='人民币';
|
||||||
|
FieldByName('QtyUnit').Value:=Trim(Order_Main10.fieldbyname('QtyUnit').AsString);
|
||||||
|
FieldByName('ComTaiTou').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('YFName').Value:='样品销售';
|
||||||
|
FieldByName('MainId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('subID').Value:=Trim(ckID);
|
||||||
|
FieldByName('P_CodeName').Value:=trim(Order_Main10.fieldbyname('P_CodeName').AsString);
|
||||||
|
FieldByName('P_Color').Value:=trim(Order_Main10.fieldbyname('P_Color').AsString);
|
||||||
|
FieldByName('YFDefFlag1').Value:=0;
|
||||||
|
FieldByName('status').Value:='1';
|
||||||
|
FieldByName('syrName').Value:='建威纺织';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
YFID:=Trim(ADOQuery1.fieldbyname('YFID').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
function TfrmBpYPCkEdit.savedate():Boolean;
|
||||||
|
var
|
||||||
|
fkcID,i:integer;
|
||||||
|
Filler:string;
|
||||||
|
FillTime:TdateTime;
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if FType=0 then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,fkeyNO,'CK','BP_InOut',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Filler:=DName;
|
||||||
|
FillTime:=SGetServerDateTime(adoqueryTmp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut');
|
||||||
|
sql.Add('where CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
open;
|
||||||
|
Filler:=adoqueryTmp.fieldbyname('Filler').AsString;
|
||||||
|
FillTime:=adoqueryTmp.fieldbyname('FillTime').AsDateTime;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(fkeyNO)+'''');
|
||||||
|
// sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
sql.Add(' and YFName=''样品销售'' ');
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from BP_InOut');
|
||||||
|
sql.Add('where CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
i:=1;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut');
|
||||||
|
sql.Add('where 1=2 ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('CRNO').Value:=trim(fkeyNO);
|
||||||
|
ADOQueryCmd.FieldByName('CRID').Value:=i;
|
||||||
|
ADOQueryCmd.FieldByName('CKName').Value:=trim(fckName);
|
||||||
|
ADOQueryCmd.FieldByName('mainID').Value:=trim(fieldbyname('mainID').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('subID').Value:=trim(fieldbyname('subID').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('CRTime').Value:=formatdateTime('yyyy-MM-dd',CRTime.Date);
|
||||||
|
ADOQueryCmd.FieldByName('CRType').Value:=trim(crType.Text);
|
||||||
|
ADOQueryCmd.FieldByName('CRFlag').Value:='出库';
|
||||||
|
// ADOQueryCmd.FieldByName('MJID').Value:=trim(fieldbyname('MJID').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('MJXH').Value:=trim(fieldbyname('MJXH').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('CPTYPE').Value:=trim(fieldbyname('CPTYPE').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_Code').Value:=trim(fieldbyname('P_Code').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_CodeName').Value:=trim(fieldbyname('P_CodeName').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_spec').Value:=trim(fieldbyname('P_spec').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_Color').Value:=trim(fieldbyname('P_Color').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_MF').Value:=fieldbyname('P_MF').AsFloat;
|
||||||
|
// ADOQueryCmd.FieldByName('P_KZ').Value:=fieldbyname('P_KZ').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('RollNum').Value:=0;
|
||||||
|
ADOQueryCmd.FieldByName('Qty').Value:=fieldbyname('Qty').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('Price').Value:=fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('money').Value:=fieldbyname('money').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('QtyUnit').Value:=trim(fieldbyname('QtyUnit').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('note').Value:=trim(fieldbyname('note').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=trim(Filler);
|
||||||
|
ADOQueryCmd.FieldByName('FillTime').Value:=dateTimetostr(FillTime);
|
||||||
|
ADOQueryCmd.FieldByName('cust').Value:=trim(cust.Text);
|
||||||
|
ADOQueryCmd.FieldByName('note').Value:=trim(note.Text);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstNo').Value:=trim(FirstName.TxtCode);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstName').Value:=trim(FirstName.Text);
|
||||||
|
if FType=1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.FieldByName('editer').Value:=trim(dName);
|
||||||
|
ADOQueryCmd.FieldByName('editTime').Value:=SGetServerDateTime(ADOQuery1);
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
IF trim(CRType.Text)='样品零售'then
|
||||||
|
begin
|
||||||
|
if not YSData(fkeyNo,inttostr(i),CDS_Main) then
|
||||||
|
begin
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
i:=i+1;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpYPCkEdit.SetComboBox();
|
||||||
|
begin
|
||||||
|
{ ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and zdyName='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count>0 then ckName.ItemIndex:=0; }
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
// CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCKTYPE''');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and note='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count>0 then CRType.ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpYPCkEdit.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.orderNo from BP_InOut A');
|
||||||
|
sql.Add('left join JYOrder_sub B on B.mainID=A.mainID and B.subID=A.subID ');
|
||||||
|
sql.Add('where A.CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp,CDS_Main);
|
||||||
|
if not CDS_Main.IsEmpty then
|
||||||
|
begin
|
||||||
|
CRTime.Date:= CDS_Main.fieldbyname('CRTime').AsDateTime;
|
||||||
|
// CKName.ItemIndex:=CKName.Items.IndexOf(trim(CDS_Main.fieldbyname('CKName').AsString));
|
||||||
|
CRType.ItemIndex:=CRType.Items.IndexOf(trim(CDS_Main.fieldbyname('CRType').AsString));
|
||||||
|
fmainID:=trim(CDS_Main.fieldbyname('MainID').AsString);
|
||||||
|
fsubID:=trim(CDS_Main.fieldbyname('subID').AsString);
|
||||||
|
orderNo.Text:=trim(CDS_Main.fieldbyname('orderNo').AsString);
|
||||||
|
cust.Text:= trim(CDS_Main.fieldbyname('cust').AsString);
|
||||||
|
note.Text:=trim(CDS_Main.fieldbyname('note').AsString);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
if fType=10 then Action:=cahide
|
||||||
|
else Action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpYPCkEdit:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ if fType=10 then
|
||||||
|
begin
|
||||||
|
TOk.Visible:=true;
|
||||||
|
// v1Ssel.Visible:=true;
|
||||||
|
v1ckqty.Visible:=true;
|
||||||
|
v1price.Visible:=true;
|
||||||
|
v1money.Visible:=true;
|
||||||
|
GroupBox1.Visible:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
TOk.Visible:=false;
|
||||||
|
// v1Ssel.Visible:=false;
|
||||||
|
v1ckqty.Visible:=false;
|
||||||
|
v1price.Visible:=false;
|
||||||
|
v1money.Visible:=false;
|
||||||
|
GroupBox1.Visible:=false;
|
||||||
|
end; }
|
||||||
|
readCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
SetComboBox();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//BegDate.Date:=DServerDate-7;
|
||||||
|
// EndDate.Date:=DServerDate;
|
||||||
|
CRTime.date:= DServerDate;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
filepath:string;
|
||||||
|
begin
|
||||||
|
if trim(fkeyNO)='' then exit;
|
||||||
|
|
||||||
|
with AdoPrint do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.cust,A.P_CodeName,A.P_Color,A.QtyUnit,B.orderNo,C.customerNoname,SUM(A.Qty) as Qty,AVG(A.Price) as Price,SUM(A.money) as Money from BP_INout A ');
|
||||||
|
sql.Add('left join JYOrder_sub B on B.mainID=A.mainID and B.subID=A.subID ');
|
||||||
|
sql.Add('left join JYOrder_Main C on C.mainID=A.mainID ');
|
||||||
|
sql.Add('where A.CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add('group by A.cust,A.P_CodeName,A.P_Color,A.QtyUnit,B.orderNo,C.customerNoname');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单样品.rmf';
|
||||||
|
if not FileExists(Pchar(filepath)) then
|
||||||
|
begin
|
||||||
|
application.MessageBox(pchar('文件['+filepath+']不存在!'),'提示信息',MB_IConError);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
RMVariables['dtxz'] :=FormatDateTime('yyyy-mm-dd',date());
|
||||||
|
RMVariables['zdr'] :=trim(DName);
|
||||||
|
RMVariables['Filler'] :=trim(DName);
|
||||||
|
RMGridReport1.LoadFromFile(filepath);
|
||||||
|
RMGridReport1.ShowReport;
|
||||||
|
finally
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CRTIME.SetFocus;
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
if trim(CRType.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('出库类型不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if trim(cust.Text)=''then
|
||||||
|
begin
|
||||||
|
application.MessageBox('客户不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if savedate() then
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存成功!','提示信息');
|
||||||
|
TOk.Enabled:=false;
|
||||||
|
TBPrint.Enabled:=true;
|
||||||
|
// ModalResult:=1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存失败!','提示信息',MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.custBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='GDCustFlag';
|
||||||
|
flagname:='客户名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
cust.Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,fieldname,qty1,qty2:String;
|
||||||
|
num1:double;
|
||||||
|
|
||||||
|
begin
|
||||||
|
fieldname:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(Trim(fieldname)).Value:=TcxTextEdit(Sender).EditingText;
|
||||||
|
num1:=FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=strtofloat(format('%8.2f',[num1]));
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CopyAddRow(Tv1,CDS_Main);
|
||||||
|
CDS_Main.edit;
|
||||||
|
CDS_Main.fieldbyname('QtyUnit').Value:='M';
|
||||||
|
CDS_Main.Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then exit;
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.v1P_CodeNamePropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_CodeName').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(CDS_main.fieldbyname('P_CodeName').AsString)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('品名不存在!','提示信息',0);
|
||||||
|
with CDS_main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_CodeName').Value:='';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
DoKc();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.v1P_ColorPropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_Color').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add('where zdyName='+quotedstr(trim(CDS_main.fieldbyname('P_CodeName').AsString)));
|
||||||
|
sql.Add('and DEFstr3='+quotedstr(trim(CDS_main.fieldbyname('P_Color').AsString)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
IF ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('颜色不存在!','提示信息',0);
|
||||||
|
with CDS_main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('P_Color').Value:='';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
DoKc();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
DoKc();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.orderNOBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmProductOrderNewList:=TfrmProductOrderNewList.Create(Application);
|
||||||
|
with frmProductOrderNewList do
|
||||||
|
begin
|
||||||
|
DParameters1:='高权限';
|
||||||
|
if showmodal=1 then
|
||||||
|
begin
|
||||||
|
self.fmainID:=trim(Order_Main.fieldbyname('MainID').AsString);
|
||||||
|
self.fsubID:=trim(Order_Main.fieldbyname('subID').AsString);
|
||||||
|
self.orderNo.Text:=trim(Order_Main.fieldbyname('orderNo').AsString);
|
||||||
|
self.cust.Text:=trim(Order_Main.fieldbyname('CustomerNoName').AsString);
|
||||||
|
// self.PRTColor.Text:=trim(Order_Main.fieldbyname('PRTColor').AsString);
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from JYOrder_sub ');
|
||||||
|
sql.Add('where mainID='+quotedstr(trim(FmainID)));
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.EmptyDataSet;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
|
||||||
|
IF not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
while not ADOQuery1.Eof do
|
||||||
|
begin
|
||||||
|
CDS_Main.Append;
|
||||||
|
CDS_Main.Fieldbyname('mainID').Value:=trim(ADOQuery1.Fieldbyname('mainID').AsString);
|
||||||
|
CDS_Main.Fieldbyname('subID').Value:=trim(ADOQuery1.Fieldbyname('subID').AsString);
|
||||||
|
CDS_Main.Fieldbyname('P_CodeName').Value:=trim(ADOQuery1.Fieldbyname('PrtCodeName').AsString);
|
||||||
|
CDS_Main.Fieldbyname('P_Color').Value:=trim(ADOQuery1.Fieldbyname('PrtColor').AsString);
|
||||||
|
CDS_Main.Fieldbyname('Qty').Value:=trim(ADOQuery1.Fieldbyname('PrtOrderQty').AsString);
|
||||||
|
CDS_Main.Fieldbyname('QtyUnit').Value:='M';
|
||||||
|
CDS_Main.Post;
|
||||||
|
ADOQuery1.next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.First;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.Edit1KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
var
|
||||||
|
num1:double;
|
||||||
|
begin
|
||||||
|
IF key=#13 then
|
||||||
|
begin
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Price').Value:=strtofloatdef(edit1.Text,0);
|
||||||
|
num1:=FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=strtofloat(format('%8.2f',[num1]));
|
||||||
|
Post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
first;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
Tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.v1P_CodeNamePropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachCP:=TfrmZdyAttachCP.Create(Application);
|
||||||
|
with frmZdyAttachCP do
|
||||||
|
begin
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_main.Edit;
|
||||||
|
Self.CDS_main.FieldByName('P_Code').Value:=Trim(CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
Self.CDS_main.FieldByName('P_CodeName').Value:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.CDS_main.FieldByName('P_Color').Value:=Trim(CDS_HZ.fieldbyname('DEFstr3').AsString);
|
||||||
|
// Self.Order_Sub.FieldByName('SOrddefstr4').Value:=Trim(ClientDataSet1.fieldbyname('Note').AsString);
|
||||||
|
Self.CDS_main.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachCP.Free;
|
||||||
|
end;
|
||||||
|
self.tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpYPCkEdit.Tv1CustomDrawIndicatorCell(
|
||||||
|
Sender: TcxGridTableView; ACanvas: TcxCanvas;
|
||||||
|
AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
FBounds := AViewInfo.Bounds;
|
||||||
|
if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
begin
|
||||||
|
ACanvas.FillRect(FBounds);
|
||||||
|
ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
FValue :=IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index+1);
|
||||||
|
InflateRect(FBounds, -1, -1) ;
|
||||||
|
ACanvas.Font.Color := clBlack;
|
||||||
|
ACanvas.Brush.Style := bsClear;
|
||||||
|
ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
ADone := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
511
坯布仓库/U_BpkcCk.dfm
Normal file
511
坯布仓库/U_BpkcCk.dfm
Normal file
|
|
@ -0,0 +1,511 @@
|
||||||
|
object frmBpkcCk: TfrmBpkcCk
|
||||||
|
Left = 64
|
||||||
|
Top = 128
|
||||||
|
Width = 1143
|
||||||
|
Height = 602
|
||||||
|
Caption = #20986#24211#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1127
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TOk: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450#20986#24211
|
||||||
|
ImageIndex = 41
|
||||||
|
Visible = False
|
||||||
|
OnClick = TOkClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 101
|
||||||
|
Width = 1127
|
||||||
|
Height = 316
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1ckqty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1money
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Ssel: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'Ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 112
|
||||||
|
end
|
||||||
|
object v1P_Color: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 96
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 147
|
||||||
|
end
|
||||||
|
object v1ckqty: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#25968#37327
|
||||||
|
DataBinding.FieldName = 'ckqty'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
Properties.OnEditValueChanged = v1ckqtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 105
|
||||||
|
end
|
||||||
|
object v1price: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#20215#26684
|
||||||
|
DataBinding.FieldName = 'price'
|
||||||
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
|
Properties.DisplayFormat = '0.##'
|
||||||
|
Properties.OnEditValueChanged = v1ckqtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 103
|
||||||
|
end
|
||||||
|
object v1money: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#37329#39069
|
||||||
|
DataBinding.FieldName = 'money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Footer = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Styles.Header = BPCK_DataLink.cxStyle_fontclPurple
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1127
|
||||||
|
Height = 69
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Panel2'
|
||||||
|
TabOrder = 2
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 608
|
||||||
|
Height = 69
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 11
|
||||||
|
Top = 91
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 52
|
||||||
|
Top = 116
|
||||||
|
Width = 13
|
||||||
|
Height = 12
|
||||||
|
Caption = #33267
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 32
|
||||||
|
Top = 28
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 416
|
||||||
|
Top = 104
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 296
|
||||||
|
Top = 84
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 260
|
||||||
|
Top = 28
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 64
|
||||||
|
Top = 87
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
ShowCheckbox = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 64
|
||||||
|
Top = 111
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
ShowCheckbox = True
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 84
|
||||||
|
Top = 24
|
||||||
|
Width = 120
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object P_spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 480
|
||||||
|
Top = 100
|
||||||
|
Width = 120
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 440
|
||||||
|
Top = 24
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #21547#24211#23384#20026#38646
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 320
|
||||||
|
Top = 80
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 5
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object P_Color: TEdit
|
||||||
|
Tag = 1
|
||||||
|
Left = 288
|
||||||
|
Top = 24
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object CheckBox2: TCheckBox
|
||||||
|
Left = 32
|
||||||
|
Top = 48
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #20840#36873
|
||||||
|
TabOrder = 7
|
||||||
|
OnClick = CheckBox2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 608
|
||||||
|
Top = 0
|
||||||
|
Width = 519
|
||||||
|
Height = 69
|
||||||
|
Align = alRight
|
||||||
|
Caption = #20986#24211#20449#24687
|
||||||
|
Color = clSkyBlue
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 1
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 204
|
||||||
|
Top = 20
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20986#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 44
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458' '#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CRTime: TDateTimePicker
|
||||||
|
Left = 88
|
||||||
|
Top = 16
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 41509.970132187500000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41509.970132187500000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 265
|
||||||
|
Top = 16
|
||||||
|
Width = 120
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#29983#20135#20837#24211)
|
||||||
|
end
|
||||||
|
object cust: TBtnEditA
|
||||||
|
Left = 88
|
||||||
|
Top = 40
|
||||||
|
Width = 297
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnBtnClick = custBtnClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 536
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 576
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 612
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 12
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 740
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
end
|
||||||
545
坯布仓库/U_BpkcCk.pas
Normal file
545
坯布仓库/U_BpkcCk.pas
Normal file
|
|
@ -0,0 +1,545 @@
|
||||||
|
unit U_BpkcCk;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, cxEdit,Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, DB, cxDBData,cxTextEdit,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid, DBClient, ADODB, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxCheckBox, BtnEdit, cxCurrencyEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpkcCk = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
TOk: TToolButton;
|
||||||
|
v1P_Color: TcxGridDBColumn;
|
||||||
|
v1ckqty: TcxGridDBColumn;
|
||||||
|
v1price: TcxGridDBColumn;
|
||||||
|
v1money: TcxGridDBColumn;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
P_spec: TEdit;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
ckName: TComboBox;
|
||||||
|
P_Color: TEdit;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
CRTime: TDateTimePicker;
|
||||||
|
Label8: TLabel;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
cust: TBtnEditA;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
v1Ssel: TcxGridDBColumn;
|
||||||
|
CheckBox2: TCheckBox;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure P_CodeNameChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
procedure custBtnClick(Sender: TObject);
|
||||||
|
procedure v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure CheckBox2Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
function savedate():Boolean;
|
||||||
|
function YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fType:integer;
|
||||||
|
fCKName:string;
|
||||||
|
fkeyNO:string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpkcCk: TfrmBpkcCk;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp, U_BpRk;
|
||||||
|
{$R *.dfm}
|
||||||
|
function TfrmBpkcCk.YSData(ckNo,CkID:string;Order_Main10:TClientDataSet):Boolean;
|
||||||
|
var
|
||||||
|
CRID,YFID,Price,PriceUnit,OrderUnit,FComTaiTou:String;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
with Order_Main10 do
|
||||||
|
begin
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where FactoryName='''+Trim(cust.text)+'''');
|
||||||
|
sql.Add('and YFDefFlag1=1 ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if not ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
CRID:=ADOQuery1.fieldbyname('CRID').AsString;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||||
|
sql.Add('select * from YF_Money_CRID ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CRID:=ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.text);
|
||||||
|
FieldByName('ZdyStr1').Value:='应收收';
|
||||||
|
FieldByName('YFDefFlag1').Value:=1;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR ');
|
||||||
|
sql.Add(' where MainID='''+Trim(ckNo)+'''');
|
||||||
|
sql.Add(' and subID='''+Trim(ckID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQuery1.IsEmpty then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',3,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取坯布应付最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from YF_Money_CR where 1<>1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('YFID').Value:=Trim(YFID);
|
||||||
|
FieldByName('YFTypeId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('CRType').Value:='应收款登记';
|
||||||
|
FieldByName('CRFlag').Value:='应收收';
|
||||||
|
FieldByName('QtyFlag').Value:=1;
|
||||||
|
FieldByName('FactoryName').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',date()));
|
||||||
|
FieldByName('YFType').Value:='自动生成';
|
||||||
|
FieldByName('Qty').Value:=Order_Main10.fieldbyname('ckQty').AsFloat;
|
||||||
|
FieldByName('Price').Value:=Order_Main10.fieldbyname('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
FieldByName('BBMoney').Value:=Order_Main10.fieldbyname('Money').AsFloat;
|
||||||
|
//FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('HuiLv').Value:=1;
|
||||||
|
FieldByName('BZType').Value:='人民币';
|
||||||
|
FieldByName('QtyUnit').Value:=Trim(Order_Main10.fieldbyname('QtyUnit').AsString);
|
||||||
|
FieldByName('ComTaiTou').Value:=Trim(cust.Text);
|
||||||
|
FieldByName('YFName').Value:='销售金额';
|
||||||
|
FieldByName('MainId').Value:=Trim(ckNo);
|
||||||
|
FieldByName('subID').Value:=Trim(ckID);
|
||||||
|
FieldByName('YFDefFlag1').Value:=1;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
YFID:=Trim(ADOQueryTmp.fieldbyname('YFID').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
function TfrmBpkcCk.savedate():Boolean;
|
||||||
|
var
|
||||||
|
fkcID,i:integer;
|
||||||
|
Filler:string;
|
||||||
|
FillTime:TdateTime;
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if GetLSNo(ADOQueryCmd,fkeyNO,'CK','BP_InOut',3,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Filler:=DName;
|
||||||
|
FillTime:=SGetServerDateTime(ADOQuery1);
|
||||||
|
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from BP_InOut');
|
||||||
|
sql.Add('where CRNO='+quotedstr(trim(fkeyNO)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
i:=1;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Fieldbyname('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from BP_InOut');
|
||||||
|
sql.Add('where 1=2 ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
ADOQueryCmd.FieldByName('CRNO').Value:=trim(fkeyNO);
|
||||||
|
ADOQueryCmd.FieldByName('CRID').Value:=i;
|
||||||
|
ADOQueryCmd.FieldByName('CKName').Value:=trim(fckName);
|
||||||
|
// ADOQueryCmd.FieldByName('mainID').Value:=trim(fmainID);
|
||||||
|
// ADOQueryCmd.FieldByName('subID').Value:=trim(fsubID);
|
||||||
|
ADOQueryCmd.FieldByName('CRTime').Value:=formatdateTime('yyyy-MM-dd',CRTime.Date);
|
||||||
|
ADOQueryCmd.FieldByName('CRType').Value:=trim(crType.Text);
|
||||||
|
ADOQueryCmd.FieldByName('CRFlag').Value:='出库';
|
||||||
|
// ADOQueryCmd.FieldByName('MJID').Value:=trim(fieldbyname('MJID').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('MJXH').Value:=trim(fieldbyname('MJXH').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('CPTYPE').Value:=trim(fieldbyname('CPTYPE').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_Code').Value:=trim(fieldbyname('P_Code').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_CodeName').Value:=trim(fieldbyname('P_CodeName').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_spec').Value:=trim(fieldbyname('P_spec').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('P_Color').Value:=trim(fieldbyname('P_Color').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('P_MF').Value:=fieldbyname('P_MF').AsFloat;
|
||||||
|
// ADOQueryCmd.FieldByName('P_KZ').Value:=fieldbyname('P_KZ').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('RollNum').Value:=0;
|
||||||
|
ADOQueryCmd.FieldByName('Qty').Value:=fieldbyname('ckQty').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('Price').Value:=fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('money').Value:=fieldbyname('money').AsFloat;
|
||||||
|
ADOQueryCmd.FieldByName('QtyUnit').Value:=trim(fieldbyname('QtyUnit').AsString);
|
||||||
|
// ADOQueryCmd.FieldByName('note').Value:=trim(fieldbyname('note').AsString);
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value:=trim(Filler);
|
||||||
|
ADOQueryCmd.FieldByName('FillTime').Value:=dateTimetostr(FillTime);
|
||||||
|
ADOQueryCmd.FieldByName('cust').Value:=trim(cust.Text);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstNo').Value:=trim(FirstName.TxtCode);
|
||||||
|
// ADOQueryCmd.FieldByName('FirstName').Value:=trim(FirstName.Text);
|
||||||
|
if FType=1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.FieldByName('editer').Value:=trim(dName);
|
||||||
|
ADOQueryCmd.FieldByName('editTime').Value:=SGetServerDateTime(ADOQuery1);
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
if not YSData(fkeyNo,inttostr(i),CDS_Main) then
|
||||||
|
begin
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
i:=i+1;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
result:=true;
|
||||||
|
except
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpkcCk.SetComboBox();
|
||||||
|
begin
|
||||||
|
ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and zdyName='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count>0 then ckName.ItemIndex:=0;
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
// CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCKTYPE''');
|
||||||
|
if trim(fCKName)<>'' then
|
||||||
|
sql.Add('and note='+quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count>0 then CRType.ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
procedure TfrmBpkcCk.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select AA.*,QtyUnit=''M'' ');
|
||||||
|
sql.Add('FROM( select A.ckName,P_CodeName,A.P_Color,ckQty=0.00,Price=0.00,money=0.00, ');
|
||||||
|
sql.Add(' SUM(case when CRFlag=''入库'' then Qty else -1 * Qty end ) as Qty ');
|
||||||
|
sql.Add('from BP_InOut A ');
|
||||||
|
sql.Add('group by A.ckName,P_CodeName,A.P_Color)AA ');
|
||||||
|
if trim(FckName)<>'' then
|
||||||
|
sql.Add('where ckName='+quotedstr(trim(FckName)) );
|
||||||
|
if not checkbox1.Checked then
|
||||||
|
sql.Add('and qty<>0 ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp,CDS_Main);
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
if fType=10 then Action:=cahide
|
||||||
|
else Action:=cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpkcCk:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.P_CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTmp.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryTmp,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryTmp,CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryTmp,CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if fType=10 then
|
||||||
|
begin
|
||||||
|
TOk.Visible:=true;
|
||||||
|
v1Ssel.Visible:=true;
|
||||||
|
v1ckqty.Visible:=true;
|
||||||
|
v1price.Visible:=true;
|
||||||
|
v1money.Visible:=true;
|
||||||
|
GroupBox1.Visible:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
// TOk.Visible:=false;
|
||||||
|
// v1Ssel.Visible:=false;
|
||||||
|
v1ckqty.Visible:=false;
|
||||||
|
v1price.Visible:=false;
|
||||||
|
v1money.Visible:=false;
|
||||||
|
GroupBox1.Visible:=false;
|
||||||
|
end;
|
||||||
|
readCxGrid(self.Caption,Tv1,'布匹仓库');
|
||||||
|
SetComboBox();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BegDate.Date:=DServerDate-7;
|
||||||
|
EndDate.Date:=DServerDate;
|
||||||
|
CRTime.date:= DServerDate;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.TBPrintClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpkcCk.ModalResult:=1;
|
||||||
|
{ CRTIME.SetFocus;
|
||||||
|
if not CDS_Main.Locate('SSel',True,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择出库数据!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if trim(CRType.Text)='' then
|
||||||
|
begin
|
||||||
|
application.MessageBox('出库类型不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if trim(cust.Text)=''then
|
||||||
|
begin
|
||||||
|
application.MessageBox('客户不能为空!','提示信息',0);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if savedate() then
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存成功!','提示信息');
|
||||||
|
InitGrid();
|
||||||
|
fkeyNo:='';
|
||||||
|
// ModalResult:=1;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
application.MessageBox('数据保存失败!','提示信息',MB_ICONERROR);
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.custBtnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='GDCustFlag';
|
||||||
|
flagname:='客户名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
cust.Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.v1ckqtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue,fieldname,qty1,qty2:String;
|
||||||
|
num1:double;
|
||||||
|
|
||||||
|
begin
|
||||||
|
fieldname:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(Trim(fieldname)).Value:=TcxTextEdit(Sender).EditingText;
|
||||||
|
num1:=FieldByName('ckQty').AsFloat * FieldByName('Price').AsFloat;
|
||||||
|
FieldByName('Money').Value:=strtofloat(format('%8.2f',[num1]));
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkcCk.CheckBox2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF CDS_Main.IsEmpty then exit;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldbyname('ssel').Value:=checkbox2.Checked;
|
||||||
|
post;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
First;
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
521
坯布仓库/U_Bpkclist.dfm
Normal file
521
坯布仓库/U_Bpkclist.dfm
Normal file
|
|
@ -0,0 +1,521 @@
|
||||||
|
object frmBpkclist: TfrmBpkclist
|
||||||
|
Left = 378
|
||||||
|
Top = 334
|
||||||
|
Width = 1416
|
||||||
|
Height = 588
|
||||||
|
Caption = #24211#23384#20449#24687#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1400
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26597#35810
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TOk: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 41
|
||||||
|
Visible = False
|
||||||
|
OnClick = TOkClick
|
||||||
|
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
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1400
|
||||||
|
Height = 65
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 64
|
||||||
|
Top = 40
|
||||||
|
Width = 13
|
||||||
|
Height = 12
|
||||||
|
Caption = #33267
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 228
|
||||||
|
Top = 40
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 40
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 228
|
||||||
|
Top = 16
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 288
|
||||||
|
Top = 72
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#24211
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 16
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 616
|
||||||
|
Top = 16
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #32568#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
ShowCheckbox = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 35
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
ShowCheckbox = True
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object P_CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 284
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object factoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 484
|
||||||
|
Top = 36
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object CRType: TComboBox
|
||||||
|
Tag = 2
|
||||||
|
Left = 284
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#29983#20135#20837#24211)
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 772
|
||||||
|
Top = 12
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #21547#24211#23384#20026#38646
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object ckName: TComboBox
|
||||||
|
Left = 320
|
||||||
|
Top = 68
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 6
|
||||||
|
Text = #26679#21697#20179#24211
|
||||||
|
Items.Strings = (
|
||||||
|
#26679#21697#20179#24211)
|
||||||
|
end
|
||||||
|
object cust: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 484
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
object gangNO: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 648
|
||||||
|
Top = 12
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = P_CodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1400
|
||||||
|
Height = 316
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = 'C_Code'
|
||||||
|
Column = v1P_CodeName
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1RollNum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.FocusCellOnTab = True
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Ssel: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'Ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830
|
||||||
|
DataBinding.FieldName = 'cust'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21152#24037#21378
|
||||||
|
DataBinding.FieldName = 'factoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1CRTime: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#26085#26399
|
||||||
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v1CRType: TcxGridDBColumn
|
||||||
|
Caption = #20837#24211#31867#22411
|
||||||
|
DataBinding.FieldName = 'CRType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v1MJID: TcxGridDBColumn
|
||||||
|
Caption = #21367#26465#30721
|
||||||
|
DataBinding.FieldName = 'MJID'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1MJXH: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'MJXH'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_SPEC: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684#22411#21495
|
||||||
|
DataBinding.FieldName = 'P_SPEC'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'gangNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1P_MF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'P_MF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1P_KZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'P_KZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1CPType: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'CPType'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1RollNum: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'RollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Footer = BPCK_DataLink.FontBlue
|
||||||
|
Styles.Header = BPCK_DataLink.FontBlue
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Kg')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Note: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #39044#25187#38500#25968#37327
|
||||||
|
DataBinding.FieldName = 'PreBPqty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 536
|
||||||
|
Top = 4
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 576
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 612
|
||||||
|
Top = 5
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 12
|
||||||
|
end
|
||||||
|
end
|
||||||
253
坯布仓库/U_Bpkclist.pas
Normal file
253
坯布仓库/U_Bpkclist.pas
Normal file
|
|
@ -0,0 +1,253 @@
|
||||||
|
unit U_Bpkclist;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||||
|
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||||
|
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxCheckBox,
|
||||||
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmBpkclist = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_SPEC: TcxGridDBColumn;
|
||||||
|
v1P_MF: TcxGridDBColumn;
|
||||||
|
v1P_KZ: TcxGridDBColumn;
|
||||||
|
v1RollNum: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Note: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1CRType: TcxGridDBColumn;
|
||||||
|
v1CRTime: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
P_CodeName: TEdit;
|
||||||
|
factoryName: TEdit;
|
||||||
|
CRType: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
TOk: TToolButton;
|
||||||
|
v1Ssel: TcxGridDBColumn;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
v1MJID: TcxGridDBColumn;
|
||||||
|
v1MJXH: TcxGridDBColumn;
|
||||||
|
v1CPType: TcxGridDBColumn;
|
||||||
|
ckName: TComboBox;
|
||||||
|
Label6: TLabel;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
cust: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
gangNO: TEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure P_CodeNameChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TOkClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure SetComboBox();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fType: integer;
|
||||||
|
fCKName: string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmBpkclist: TfrmBpkclist;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun10, U_ZDYHelp, U_BpRk;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.SetComboBox();
|
||||||
|
begin
|
||||||
|
ckName.Items.Clear;
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPCK'' ');
|
||||||
|
if trim(fCKName) <> '' then
|
||||||
|
sql.Add('and zdyName=' + quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
ckName.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if ckName.Items.Count > 0 then
|
||||||
|
ckName.ItemIndex := 0;
|
||||||
|
|
||||||
|
CRType.Items.Clear;
|
||||||
|
CRType.Items.Add('');
|
||||||
|
with adoQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_ZDY where Type=''BPRKTYPE''');
|
||||||
|
if trim(fCKName) <> '' then
|
||||||
|
sql.Add('and note=' + quotedstr(trim(fCKName)));
|
||||||
|
open;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
CRType.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if CRType.Items.Count > 0 then
|
||||||
|
CRType.ItemIndex := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
// sql.Add('select A.*,B.cust,B.factoryName from BP_KC A');
|
||||||
|
// sql.Add('inner join BP_inout B on B.KCID=A.KCID and B.CRFlag=''Èë¿â'' ');
|
||||||
|
// sql.Add('where 1=1'); sum(([dbo].[Get_ShuZi](defstr3)) sum((cast(ISNULL(defstr2,0) as float))
|
||||||
|
|
||||||
|
SQL.Add('SELECT count(A.mxid) as RollNum,sum(A.kcqty2) as qty,B.cust,B.factoryName,B.CRTime,B.CRType,B.P_CodeName,B.P_SPEC,B.P_Color,B.gangNo,B.P_KZ,B.P_MF,B.QtyUnit,B.ckName ');
|
||||||
|
SQL.Add(',PreBPqty=(select sum(([dbo].[Get_ShuZi](defstr2))*(isnull(prtorderqty,0))) from JYOrder_Sub X inner join KH_Zdy_CPCB M on M.ZdyCode=X.PRTCode left join JYOrder_Main N on N.mainid=X.mainid ');
|
||||||
|
SQL.Add(' where M.defstr1=B.P_CodeName and M.CBColor=X.prtcolor and left(SOrddefstr5,1)=''A'' and N.Status=''0'')'); // M.CBColor in (B.P_Color)
|
||||||
|
// SQL.Add(' where M.defstr1=B.P_CodeName and M.CBColor=B.P_Color and left(SOrddefstr5,1)=''A'' and N.Status=''0'')');
|
||||||
|
SQL.Add('+(select sum(([dbo].[Get_ShuZi](defstr3))*(isnull(prtorderqty,0)))from JYOrder_Sub X inner join KH_Zdy_CPCB M on M.ZdyCode=X.PRTCode left join JYOrder_Main N on N.mainid=X.mainid ');
|
||||||
|
SQL.Add(' where M.defstr1=B.P_CodeName and M.CBColor=X.prtcolor and left(SOrddefstr5,1)=''C'' and N.Status=''0'' )'); //and M.CBColor=B.P_Color
|
||||||
|
// sql.Add('FROM CK_SXPB_CRMX A inner join BP_InOut B on A.crno=B.crno and B.crid=A.crid');
|
||||||
|
sql.Add('FROM CK_SXPB_CRMX A inner join BP_InOut B on A.crnos=B.crnos ');
|
||||||
|
sql.Add(' where A.crzt=''Èë¿â'' ');
|
||||||
|
// SQL.Add('and exists(select crno from BP_KC d where D.crno=A.crno)');
|
||||||
|
SQL.Add('and exists(select crnoS from BP_KC d where D.crnos=A.crnos)');
|
||||||
|
if begdate.Checked then
|
||||||
|
sql.Add('and B.CRTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
|
||||||
|
if enddate.Checked then
|
||||||
|
sql.Add('and B.CRTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
|
||||||
|
// if not CheckBox1.Checked then
|
||||||
|
// sql.Add('and (A.RollNum<>0 or A.qty<>0 ) ');
|
||||||
|
if trim(FckName) <> '' then
|
||||||
|
sql.Add('and B.ckName=' + quotedstr(trim(FckName)));
|
||||||
|
sql.Add(' GROUP BY A.crnoS,B.cust,B.factoryName,B.CRTime,B.CRType,B.P_CodeName,B.P_SPEC,B.P_Color,B.gangNo,B.P_KZ,B.P_MF,B.QtyUnit,B.ckName ');
|
||||||
|
// ShowMessage(SQL.text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryTmp, CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryTmp, CDS_Main);
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption, Tv1, '²¼Æ¥²Ö¿â');
|
||||||
|
if fType = 10 then
|
||||||
|
Action := cahide
|
||||||
|
else
|
||||||
|
Action := cafree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmBpkclist := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.P_CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryTmp.Active = False then
|
||||||
|
Exit;
|
||||||
|
SDofilter(ADOQueryTmp, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryTmp, CDS_Main);
|
||||||
|
SInitCDSData20(ADOQueryTmp, CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if fType = 10 then
|
||||||
|
begin
|
||||||
|
TOk.Visible := true;
|
||||||
|
v1Ssel.Visible := true;
|
||||||
|
end;
|
||||||
|
readCxGrid(self.Caption, Tv1, '²¼Æ¥²Ö¿â');
|
||||||
|
SetComboBox();
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BegDate.Date := DServerDate - 7;
|
||||||
|
EndDate.Date := DServerDate;
|
||||||
|
cxGrid1.Align := alclient;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.TBPrintClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmBpkclist.TOkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
798
坯布仓库/U_CPCKMXLR.dfm
Normal file
798
坯布仓库/U_CPCKMXLR.dfm
Normal file
|
|
@ -0,0 +1,798 @@
|
||||||
|
object frmCPCKMXLR: TfrmCPCKMXLR
|
||||||
|
Left = 717
|
||||||
|
Top = 211
|
||||||
|
Width = 1000
|
||||||
|
Height = 602
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
|
Caption = #25104#21697#26126#32454#21015#34920
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 984
|
||||||
|
Height = 30
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 15
|
||||||
|
OnClick = TBSaveClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #22686#34892
|
||||||
|
ImageIndex = 57
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 113
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#25171#21360
|
||||||
|
ImageIndex = 22
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26631#31614#39044#35272
|
||||||
|
ImageIndex = 22
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 363
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #19968#38190#26367#25442
|
||||||
|
ImageIndex = 22
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 450
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 21
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 30
|
||||||
|
Width = 984
|
||||||
|
Height = 533
|
||||||
|
Align = alClient
|
||||||
|
Caption = 'Panel3'
|
||||||
|
TabOrder = 1
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 1
|
||||||
|
Top = 143
|
||||||
|
Width = 982
|
||||||
|
Height = 389
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
|
TabOrder = 1
|
||||||
|
object TvMX: TcxGridDBTableView
|
||||||
|
OnKeyDown = TvMXKeyDown
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
Position = spFooter
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Position = spFooter
|
||||||
|
Column = cxGridDBColumn8
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBColumn8
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBColumn8
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skCount
|
||||||
|
Column = vMXColumn3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = vMXColumn2
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
OptionsView.IndicatorWidth = 33
|
||||||
|
OnCustomDrawIndicatorCell = TvMXCustomDrawIndicatorCell
|
||||||
|
object TvMXColumn1: TcxGridDBColumn
|
||||||
|
Tag = 9
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSEL'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
end
|
||||||
|
object vMXColumn3: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'MXMJXH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 51
|
||||||
|
end
|
||||||
|
object vMXColumn1: TcxGridDBColumn
|
||||||
|
Caption = #32568#21495
|
||||||
|
DataBinding.FieldName = 'MXGangHao'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
object cxGridDBColumn8: TcxGridDBColumn
|
||||||
|
Caption = #37325#37327
|
||||||
|
DataBinding.FieldName = 'MXQty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = cxGridDBColumn8PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object vMXColumn2: TcxGridDBColumn
|
||||||
|
Caption = #38271#24230
|
||||||
|
DataBinding.FieldName = 'MXQTY2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = cxGridDBColumn8PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object vMXColumn4: TcxGridDBColumn
|
||||||
|
Caption = #38271#24230#21333#20301
|
||||||
|
DataBinding.FieldName = 'MXUnit'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Y')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 65
|
||||||
|
end
|
||||||
|
object vMXColumn5: TcxGridDBColumn
|
||||||
|
Caption = #25918#30721
|
||||||
|
DataBinding.FieldName = 'MXFM'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Sorting = False
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object TvMXColumn2: TcxGridDBColumn
|
||||||
|
Caption = #25260#22836
|
||||||
|
DataBinding.FieldName = 'mxtt'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object TvMXColumn3: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'mxkh'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object TvMXColumn4: TcxGridDBColumn
|
||||||
|
Caption = #27454#21495
|
||||||
|
DataBinding.FieldName = 'mxkuanno'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object TvMXColumn5: TcxGridDBColumn
|
||||||
|
Caption = #25104#20998
|
||||||
|
DataBinding.FieldName = 'mxspec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = TvMX
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 982
|
||||||
|
Height = 142
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 896
|
||||||
|
Top = 46
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25442#31639#26041#24335
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 212
|
||||||
|
Top = 14
|
||||||
|
Width = 64
|
||||||
|
Height = 16
|
||||||
|
Caption = #25442#31639#31995#25968
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 59
|
||||||
|
Top = 43
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #38271#24230
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 374
|
||||||
|
Top = 13
|
||||||
|
Width = 64
|
||||||
|
Height = 16
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 59
|
||||||
|
Top = 15
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #32568#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 242
|
||||||
|
Top = 42
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #37325#37327
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 27
|
||||||
|
Top = 75
|
||||||
|
Width = 64
|
||||||
|
Height = 16
|
||||||
|
Caption = #26126#32454#22791#27880
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 525
|
||||||
|
Top = 34
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #20221#25968
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 493
|
||||||
|
Top = 63
|
||||||
|
Width = 64
|
||||||
|
Height = 16
|
||||||
|
Caption = #26631#31614#26684#24335
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 58
|
||||||
|
Top = 112
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #25260#22836
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 231
|
||||||
|
Top = 112
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #23458#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 404
|
||||||
|
Top = 110
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #27454#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 573
|
||||||
|
Top = 110
|
||||||
|
Width = 32
|
||||||
|
Height = 16
|
||||||
|
Caption = #25104#20998
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ComboBox1: TComboBox
|
||||||
|
Left = 884
|
||||||
|
Top = 41
|
||||||
|
Width = 145
|
||||||
|
Height = 20
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
Items.Strings = (
|
||||||
|
#37325#37327#25442#31639#38271#24230
|
||||||
|
#38271#24230#25442#31639#37325#37327)
|
||||||
|
end
|
||||||
|
object XS: TEdit
|
||||||
|
Left = 281
|
||||||
|
Top = 9
|
||||||
|
Width = 64
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object Qty: TEdit
|
||||||
|
Left = 97
|
||||||
|
Top = 41
|
||||||
|
Width = 108
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
OnKeyPress = QtyKeyPress
|
||||||
|
end
|
||||||
|
object ComboBox2: TComboBox
|
||||||
|
Left = 443
|
||||||
|
Top = 10
|
||||||
|
Width = 64
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 16
|
||||||
|
ItemIndex = 2
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
Text = 'KG'
|
||||||
|
Items.Strings = (
|
||||||
|
'M'
|
||||||
|
'Y'
|
||||||
|
'KG')
|
||||||
|
end
|
||||||
|
object gangno: TEdit
|
||||||
|
Left = 96
|
||||||
|
Top = 12
|
||||||
|
Width = 108
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object KGQTY: TEdit
|
||||||
|
Left = 278
|
||||||
|
Top = 41
|
||||||
|
Width = 108
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
OnKeyPress = KGQTYKeyPress
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 862
|
||||||
|
Top = 100
|
||||||
|
Width = 108
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 6
|
||||||
|
Visible = False
|
||||||
|
OnKeyPress = QtyKeyPress
|
||||||
|
end
|
||||||
|
object Edit2: TEdit
|
||||||
|
Left = 906
|
||||||
|
Top = 37
|
||||||
|
Width = 108
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 7
|
||||||
|
Visible = False
|
||||||
|
OnKeyPress = QtyKeyPress
|
||||||
|
end
|
||||||
|
object Edit3: TEdit
|
||||||
|
Left = 755
|
||||||
|
Top = 39
|
||||||
|
Width = 108
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 8
|
||||||
|
Visible = False
|
||||||
|
OnKeyPress = QtyKeyPress
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 400
|
||||||
|
Top = 43
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #21333#37325#37327
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
object MXNOTE: TEdit
|
||||||
|
Left = 96
|
||||||
|
Top = 70
|
||||||
|
Width = 344
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 10
|
||||||
|
OnKeyPress = QtyKeyPress
|
||||||
|
end
|
||||||
|
object CheckBox2: TCheckBox
|
||||||
|
Left = 541
|
||||||
|
Top = 11
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
TabOrder = 11
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ComboBox3: TComboBox
|
||||||
|
Left = 561
|
||||||
|
Top = 30
|
||||||
|
Width = 64
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 16
|
||||||
|
ItemIndex = 0
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 12
|
||||||
|
Text = '1'
|
||||||
|
Visible = False
|
||||||
|
Items.Strings = (
|
||||||
|
'1'
|
||||||
|
'2'
|
||||||
|
'3'
|
||||||
|
'4'
|
||||||
|
'5'
|
||||||
|
'6')
|
||||||
|
end
|
||||||
|
object LABNAME: TcxButtonEdit
|
||||||
|
Left = 559
|
||||||
|
Top = 61
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = LABNAMEPropertiesButtonClick
|
||||||
|
TabOrder = 13
|
||||||
|
Visible = False
|
||||||
|
Width = 121
|
||||||
|
end
|
||||||
|
object TT: TEdit
|
||||||
|
Left = 94
|
||||||
|
Top = 107
|
||||||
|
Width = 125
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 14
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object KH: TEdit
|
||||||
|
Left = 266
|
||||||
|
Top = 107
|
||||||
|
Width = 125
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 15
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object KUANHAO: TEdit
|
||||||
|
Left = 437
|
||||||
|
Top = 105
|
||||||
|
Width = 125
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 16
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object GUIGE: TEdit
|
||||||
|
Left = 610
|
||||||
|
Top = 105
|
||||||
|
Width = 125
|
||||||
|
Height = 24
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 17
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 372
|
||||||
|
Top = 234
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 411
|
||||||
|
Top = 234
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 663
|
||||||
|
Top = 391
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 592
|
||||||
|
Top = 393
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 188
|
||||||
|
Top = 229
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 447
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 158
|
||||||
|
Top = 229
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #20840#36873
|
||||||
|
OnClick = N1Click
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #20840#24323
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 401
|
||||||
|
Top = 279
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
ShowPrintDialog = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 475
|
||||||
|
Top = 278
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 439
|
||||||
|
Top = 278
|
||||||
|
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 = 508
|
||||||
|
Top = 277
|
||||||
|
end
|
||||||
|
object ADOQuery1: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 227
|
||||||
|
Top = 294
|
||||||
|
end
|
||||||
|
object ADOQuery2: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 227
|
||||||
|
Top = 294
|
||||||
|
end
|
||||||
|
end
|
||||||
945
坯布仓库/U_CPCKMXLR.pas
Normal file
945
坯布仓库/U_CPCKMXLR.pas
Normal file
|
|
@ -0,0 +1,945 @@
|
||||||
|
unit U_CPCKMXLR;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, StrUtils, Variants, Classes, Graphics, Controls,
|
||||||
|
Forms, Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, MMSystem,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGridLevel, cxClasses, cxControls, cxGridCustomView,
|
||||||
|
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxButtonEdit, cxDropDownEdit,
|
||||||
|
DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, BtnEdit, cxContainer,
|
||||||
|
cxTextEdit, cxCurrencyEdit, cxCheckBox, Menus, RM_Common, RM_Class, RM_e_Xls,
|
||||||
|
RM_Dataset, RM_System, RM_GridReport, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
|
cxNavigator, cxMaskEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPCKMXLR = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBSave: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
CDS_Main: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
Panel3: TPanel;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
TvMX: TcxGridDBTableView;
|
||||||
|
vMXColumn1: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn8: TcxGridDBColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
vMXColumn2: TcxGridDBColumn;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ComboBox1: TComboBox;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
XS: TEdit;
|
||||||
|
vMXColumn3: TcxGridDBColumn;
|
||||||
|
vMXColumn4: TcxGridDBColumn;
|
||||||
|
Label3: TLabel;
|
||||||
|
Qty: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
ComboBox2: TComboBox;
|
||||||
|
Label5: TLabel;
|
||||||
|
gangno: TEdit;
|
||||||
|
vMXColumn5: TcxGridDBColumn;
|
||||||
|
Label6: TLabel;
|
||||||
|
KGQTY: TEdit;
|
||||||
|
Edit1: TEdit;
|
||||||
|
Edit2: TEdit;
|
||||||
|
Edit3: TEdit;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
MXNOTE: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
CheckBox2: TCheckBox;
|
||||||
|
ComboBox3: TComboBox;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
TvMXColumn1: TcxGridDBColumn;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
LABNAME: TcxButtonEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
Label10: TLabel;
|
||||||
|
TT: TEdit;
|
||||||
|
Label11: TLabel;
|
||||||
|
KH: TEdit;
|
||||||
|
Label12: TLabel;
|
||||||
|
KUANHAO: TEdit;
|
||||||
|
Label13: TLabel;
|
||||||
|
GUIGE: TEdit;
|
||||||
|
TvMXColumn2: TcxGridDBColumn;
|
||||||
|
TvMXColumn3: TcxGridDBColumn;
|
||||||
|
TvMXColumn4: TcxGridDBColumn;
|
||||||
|
TvMXColumn5: TcxGridDBColumn;
|
||||||
|
ADOQuery1: TADOQuery;
|
||||||
|
ADOQuery2: TADOQuery;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBSaveClick(Sender: TObject);
|
||||||
|
procedure v1P_CodeNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FHAddressBtnDnClick(Sender: TObject);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure TvMXCustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure cxGridDBColumn8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure TvMXKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure TvMXKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
procedure QtyKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure KGQTYKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure LABNAMEPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure PrtData(FJYID: string);
|
||||||
|
function savedate(): Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fkeyNO,fkeyNOS, fkeyID, FMXGangHao: string;
|
||||||
|
FType: integer;
|
||||||
|
fCKName: string;
|
||||||
|
FCRTYPE: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPCKMXLR: TfrmCPCKMXLR;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun10, U_ZDYHelp, U_ZdyAttachment, U_FUN;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmCPCKMXLR.PrtData(FJYID: string);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath, Txt2, fImagePath2: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' EXEC P_Print_JYLab ');
|
||||||
|
SQL.Add(' @mjID=''' + Trim(FJYID) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryPrint.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('标签内容未找到!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ExportFtErpFile('布匹标签.rmf', ADOQueryTmp);
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\布匹标签.rmf';
|
||||||
|
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['MXMJXH'] := CDS_MAIN.FIELDBYNAME('MXMJXH').ASSTRING;
|
||||||
|
RMVariables['MXGangHao'] := CDS_MAIN.FIELDBYNAME('MXGangHao').ASSTRING;
|
||||||
|
RMVariables['MXQty'] := CDS_MAIN.FIELDBYNAME('MXQty').ASSTRING;
|
||||||
|
RMVariables['MXQTY2'] := CDS_MAIN.FIELDBYNAME('MXQTY2').ASSTRING;
|
||||||
|
RMVariables['MXUnit'] := CDS_MAIN.FIELDBYNAME('MXUnit').ASSTRING;
|
||||||
|
RMVariables['MXFM'] := CDS_MAIN.FIELDBYNAME('MXFM').ASSTRING;
|
||||||
|
|
||||||
|
RMVariables['mxtt'] := CDS_MAIN.FIELDBYNAME('mxtt').ASSTRING;
|
||||||
|
RMVariables['mxkh'] := CDS_MAIN.FIELDBYNAME('mxkh').ASSTRING;
|
||||||
|
RMVariables['mxkuanno'] := CDS_MAIN.FIELDBYNAME('mxkuanno').ASSTRING;
|
||||||
|
RMVariables['mxspec'] := CDS_MAIN.FIELDBYNAME('mxspec').ASSTRING;
|
||||||
|
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
|
||||||
|
RM1.DefaultCopies := strtointdef(trim(ComboBox3.Text), 1);
|
||||||
|
|
||||||
|
RM1.PrintReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmCPCKMXLR.savedate(): Boolean;
|
||||||
|
var
|
||||||
|
MaxNo: string;
|
||||||
|
begin
|
||||||
|
result := false;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
CDS_Main.First;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * ');
|
||||||
|
sql.Add(',MaxRollNo=(select max(isnull(MXMJXH,0)) from CK_SXPB_CRMX X where X.CRNO=''' + trim(fkeyNo) + ''' )');
|
||||||
|
sql.Add(' from CK_SXPB_CRMX A');
|
||||||
|
sql.Add('where MXID=' + quotedstr(Trim(CDS_Main.FieldByName('MXID').AsString)));
|
||||||
|
// ShowMessage(sql.Text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTmp, MaxNo, 'MCM', 'CK_SXPB_CRMX', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * ');
|
||||||
|
// sql.Add(',MaxRollNo=(select max(isnull(MXMJXH,0)) from CK_SXPB_CRMX X where X.CRNO=''' + trim(fkeyNo) + ''' )');
|
||||||
|
// sql.Add(' from CK_SXPB_CRMX A');
|
||||||
|
// sql.Add('where CRNO=' + quotedstr(Trim(fkeyNo)));
|
||||||
|
//// ShowMessage(sql.Text);
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// with CDS_Main do
|
||||||
|
// begin
|
||||||
|
// Edit;
|
||||||
|
// if FieldByName('mxmjxh').AsString = '' then
|
||||||
|
// begin
|
||||||
|
// FieldByName('mxmjxh').Value := ADOQueryCmd.fieldbyname('MaxRollNo').AsInteger + 1;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// Post;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
ADOQueryCmd.Append;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
MaxNo := Trim(CDS_Main.FieldByName('MXID').AsString);
|
||||||
|
ADOQueryCmd.Edit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//保存明细
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd, TvMX, CDS_Main, 'CK_SXPB_CRMX', 0);
|
||||||
|
ADOQueryCmd.fieldbyname('kcqty').Value := CDS_Main.fieldbyname('MXqty').AsString;
|
||||||
|
ADOQueryCmd.fieldbyname('kcqty2').Value := CDS_Main.fieldbyname('MXqty2').AsString;
|
||||||
|
|
||||||
|
ADOQueryCmd.FieldByName('CRZT').Value := trim(FCRTYPE);
|
||||||
|
|
||||||
|
with ADOQuery1 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update CK_SXPB_CRMX Set CKNO=(select kuwei from BP_InOut A where A.crno=CK_SXPB_CRMX.CRNO and A.CRID=CK_SXPB_CRMX.CRID)');
|
||||||
|
sql.Add(' where CRNO=''' + Trim(fkeyNO) + '''');
|
||||||
|
sql.Add(' and crid=''' + Trim(fkeyID) + '''');
|
||||||
|
// ShowMessage(sql.Text);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//保存隐藏ID
|
||||||
|
ADOQueryCmd.FieldByName('CRNO').Value := trim(fkeyNo);
|
||||||
|
ADOQueryCmd.FieldByName('CRNOS').Value := trim(fkeyNoS);
|
||||||
|
ADOQueryCmd.FieldByName('CRID').Value := trim(fkeyID);
|
||||||
|
|
||||||
|
ADOQueryCmd.FieldByName('MXNOTE').Value := trim(MXNOTE.Text);
|
||||||
|
|
||||||
|
ADOQueryCmd.FieldByName('MXID').Value := trim(MaxNo);
|
||||||
|
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
|
||||||
|
CDS_Main.Edit;
|
||||||
|
CDS_Main.FieldByName('MXID').Value := trim(MaxNo);
|
||||||
|
CDS_Main.post;
|
||||||
|
|
||||||
|
// 更新库存
|
||||||
|
if Trim(edit3.Text) = 'Kg' then
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update BP_InOut Set Qty=(select sum(isnull(mxqty,0)) from CK_SXPB_CRMX A where A.crno=BP_InOut.CRNO and A.CRID=BP_InOut.CRID');
|
||||||
|
sql.Add('),RollNum=(select count(mxid) from CK_SXPB_CRMX A where A.crno=BP_InOut.CRNO and A.CRID=BP_InOut.CRID');
|
||||||
|
sql.Add(' ) where CRNO=''' + Trim(fkeyNO) + '''');
|
||||||
|
sql.Add(' and crid=''' + Trim(fkeyID) + '''');
|
||||||
|
// ShowMessage(sql.Text);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('Update BP_InOut Set MXKCQty=(select sum(isnull(Qty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
||||||
|
// sql.Add(',MXKCPiQty=(select sum(isnull(PiQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
||||||
|
// sql.Add(' where SPID=''' + Trim(Edit2.Text) + '''');
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from CK_SXPB_CR where SPID=''' + Trim(Edit2.Text) + '''');
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
// if ADOQueryTmp.FieldByName('MXKCQty').Value < 0 then
|
||||||
|
// begin
|
||||||
|
// CDS_Main.EnableControls;
|
||||||
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
// Application.MessageBox('出库数大于库存数不能保存!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update BP_InOut Set Qty=(select sum(isnull(mxqty2,0)) from CK_SXPB_CRMX A where A.crno=BP_InOut.CRNO and A.CRID=BP_InOut.CRID');
|
||||||
|
sql.Add('),RollNum=(select count(mxid) from CK_SXPB_CRMX A where A.crno=BP_InOut.CRNO and A.CRID=BP_InOut.CRID');
|
||||||
|
sql.Add(' ) where CRNO=''' + Trim(fkeyNO) + '''');
|
||||||
|
sql.Add(' and crid=''' + Trim(fkeyID) + '''');
|
||||||
|
// ShowMessage(sql.Text);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('Update CK_SXPB_CR Set MXKCQty=(select sum(isnull(Qty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
||||||
|
// sql.Add(',MXKCPiQty=(select sum(isnull(PiQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
||||||
|
// sql.Add(' where SPID=''' + Trim(Edit2.Text) + '''');
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from CK_SXPB_CR where SPID=''' + Trim(Edit2.Text) + '''');
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
// if ADOQueryTmp.FieldByName('MXKCQty').Value < 0 then
|
||||||
|
// begin
|
||||||
|
// CDS_Main.EnableControls;
|
||||||
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
// Application.MessageBox('出库数大于库存数不能保存!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQuery2 do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('update CK_SXPB_CRMX set kcqty2=mxqty2-(select isnull(sum(mxqty2),0) from CK_SXPB_CRMX mx where mx.fzmxid=CK_SXPB_CRMX.mxid and crzt=''出库'' ) ');
|
||||||
|
SQL.Add(' where mxid=''' + Trim(MaxNo) + ''' ');
|
||||||
|
// ShowMessage(sql.Text);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
result := true;
|
||||||
|
except
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with adoqueryMain do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CK_SXPB_CRMX A where CRNO=' + quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add(' and CRID=' + quotedstr(trim(fkeyID)));
|
||||||
|
sql.Add(' and CRZT= ''入库''');
|
||||||
|
// SQL.Add('AND CRZT=' + QuotedStr(FCRTYPE));
|
||||||
|
// SQL.Add('AND NOT EXISTS(SELECT MXID FROM CK_SXPB_CRMX C WHERE C.FZMXID=A.MXID)');
|
||||||
|
sql.Add(' order by MXID');
|
||||||
|
// ShowMessage(SQL.Text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(adoqueryMain, CDS_Main);
|
||||||
|
SInitCDSData20(adoqueryMain, CDS_Main);
|
||||||
|
MXNOTE.Text := adoqueryMain.FieldByName('MXNOTE').AsString;
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from JYOrder_Main A inner join JYOrder_sub b on a.mainid=b.mainid ');
|
||||||
|
// SQL.Add('where subid=(select ordsubidrk from CK_SXPB_CR c where c.spid= ' + QuotedStr(Trim(fkeyNO)));
|
||||||
|
// sql.Add(')');
|
||||||
|
//
|
||||||
|
//// ShowMessage(SQL.Text);
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
// if ADOQueryTmp.IsEmpty = false then
|
||||||
|
// begin
|
||||||
|
// KUANHAO.TEXT := ADOQueryTmp.FieldByName('PRTKUANNO').AsString;
|
||||||
|
// KH.TEXT := ADOQueryTmp.FieldByName('BQKH').AsString;
|
||||||
|
// GUIGE.TEXT := ADOQueryTmp.FieldByName('MPRTCF').AsString;
|
||||||
|
// tt.TEXT := ADOQueryTmp.FieldByName('BJTT').AsString;
|
||||||
|
// xs.TEXT := ADOQueryTmp.FieldByName('prtbili').AsString;
|
||||||
|
// end;
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add('select * from CK_SXPB_CRMX A where CRNO=' + quotedstr(trim(fkeyNO)));
|
||||||
|
//
|
||||||
|
// sql.Add(' order by MXID');
|
||||||
|
//// ShowMessage(SQL.Text);
|
||||||
|
// open;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// if ADOQueryTmp.IsEmpty = false then
|
||||||
|
// begin
|
||||||
|
// KUANHAO.TEXT := ADOQueryTmp.FieldByName('mxkuanno').AsString;
|
||||||
|
// KH.TEXT := ADOQueryTmp.FieldByName('mxkh').AsString;
|
||||||
|
// GUIGE.TEXT := ADOQueryTmp.FieldByName('mxspec').AsString;
|
||||||
|
// tt.TEXT := ADOQueryTmp.FieldByName('mxtt').AsString;
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// SQL.Add('select top 1 a.* from CK_SXPB_CRMX a inner join CK_SXPB_CR b on a.crno=b.spid ');
|
||||||
|
// SQL.Add('where b.QCorderNo=(select QCorderNo from CK_SXPB_CR b where spid=' + QuotedStr(Trim(fkeyNO)));
|
||||||
|
// SQL.Add(')');
|
||||||
|
// sql.Add('order by mxid desc');
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
// KUANHAO.TEXT := ADOQueryTmp.FieldByName('mxkuanno').AsString;
|
||||||
|
// KH.TEXT := ADOQueryTmp.FieldByName('mxkh').AsString;
|
||||||
|
// GUIGE.TEXT := ADOQueryTmp.FieldByName('mxspec').AsString;
|
||||||
|
// tt.TEXT := ADOQueryTmp.FieldByName('mxtt').AsString;
|
||||||
|
// if ADOQueryTmp.IsEmpty = True then
|
||||||
|
// begin
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// SQL.Add('SELECT * FROM JYORDER_MAIN A INNER JOIN JYORDER_SUB B ON A.MAINID=B.MAINID WHERE ');
|
||||||
|
// SQL.Add('B.MAINID=(SELECT ORDMAINIDRK FROM CK_SXPB_CR C WHERE C.SPID=' + QuotedStr(Trim(fkeyNO)));
|
||||||
|
// SQL.Add(')');
|
||||||
|
//// ShowMessage(sql.Text);
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
// KUANHAO.TEXT := ADOQueryTmp.FieldByName('prtkuanno').AsString;
|
||||||
|
// KH.TEXT := ADOQueryTmp.FieldByName('CustomerNoName').AsString;
|
||||||
|
// GUIGE.TEXT := ADOQueryTmp.FieldByName('MPRTSpec').AsString;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPCKMXLR := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := cahide;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
fbhType, fInoutNo: string;
|
||||||
|
begin
|
||||||
|
readCxGrid(self.Caption, TvMX, '面料仓库1');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.TBSaveClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
FQTY, FKGQTY, FPIQTY: Double;
|
||||||
|
FQTY1, FPIQTY1: Double;
|
||||||
|
begin
|
||||||
|
if cds_main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
// FKGQTY := TvMX.DataController.Summary.FooterSummaryValues[1];
|
||||||
|
// FQTY := TvMX.DataController.Summary.FooterSummaryValues[3];
|
||||||
|
// FPIQTY := TvMX.DataController.Summary.FooterSummaryValues[2];
|
||||||
|
//
|
||||||
|
// FKGQTY1 := StrToFloatDef(Edit1.Text, 0);
|
||||||
|
// FQTY1 := StrToFloatDef(Edit3.Text, 0);
|
||||||
|
// FPIQTY1 := StrToFloatDef(Edit2.Text, 0);
|
||||||
|
//
|
||||||
|
// if (FKGQTY > FKGQTY1) or (FQTY > FQTY1) or (FPIQTY > FPIQTY1) then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox('出库数大于库存数', '提示信息');
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
if savedate() then
|
||||||
|
begin
|
||||||
|
|
||||||
|
application.MessageBox('数据保存成功!', '提示信息');
|
||||||
|
ModalResult := 1;
|
||||||
|
Exit;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
// application.MessageBox('数据保存失败!', '提示信息', MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.v1P_CodeNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'Cloth';
|
||||||
|
flagname := '坯布名称';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Main.Edit;
|
||||||
|
Self.CDS_Main.FieldByName('P_CodeName').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
Self.CDS_Main.FieldByName('P_Code').Value := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
writeCxGrid(self.Caption, TvMX, '面料仓库1');
|
||||||
|
// ModalResult := 1;
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.FHAddressBtnDnClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBtnEditC(Sender).Text := '';
|
||||||
|
TBtnEditC(Sender).TxtCode := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.N1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_Main, True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.N2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_Main, False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.ToolButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
for i := 1 to 10 do
|
||||||
|
begin
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('MXGangHao').Value := FMXGangHao;
|
||||||
|
FieldByName('MXQty').Value := 0;
|
||||||
|
FieldByName('MXQty2').Value := 0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if cds_main.IsEmpty then
|
||||||
|
exit;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete CK_SXPB_CRMX where MXID=' + quotedstr(Trim(CDS_Main.FieldByName('MXID').AsString)));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
CDS_Main.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.TvMXCustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||||
|
var
|
||||||
|
FValue: string;
|
||||||
|
FBounds: TRect;
|
||||||
|
begin
|
||||||
|
FBounds := AViewInfo.Bounds;
|
||||||
|
if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
|
||||||
|
begin
|
||||||
|
ACanvas.FillRect(FBounds);
|
||||||
|
ACanvas.DrawComplexFrame(FBounds, clBtnHighlight, clBtnShadow, [bBottom, bLeft, bRight], 1);
|
||||||
|
FValue := IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index + 1);
|
||||||
|
InflateRect(FBounds, -1, -1); //Platform specific. May not work on Linux.
|
||||||
|
ACanvas.Font.Color := clBlack;
|
||||||
|
ACanvas.Brush.Style := bsClear;
|
||||||
|
ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
|
||||||
|
ADone := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
OneKeyPost(TvMX, CDS_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.cxGridDBColumn8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
FZL, FCD, FXS: DOUBLE;
|
||||||
|
begin
|
||||||
|
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
FFieldName := Trim(TvMX.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with cds_main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value := (strtofloatdef(trim(mvalue), 0));
|
||||||
|
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with cds_main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FZL := (strtofloatdef(trim(FieldByName('MXQTY').ASSTRING), 0)); //重量
|
||||||
|
FCD := (strtofloatdef(trim(FieldByName('MXQTY2').ASSTRING), 0)); //长度
|
||||||
|
|
||||||
|
FXS := (strtofloatdef(trim(xs.TEXT), 0)); //系数
|
||||||
|
if FFieldName = 'mxqty' then
|
||||||
|
begin
|
||||||
|
FieldByName('mxqty2').Value := FZL * FXS;
|
||||||
|
end;
|
||||||
|
if FFieldName = 'mxqty2' then
|
||||||
|
begin
|
||||||
|
FieldByName('mxqty').Value := FCD * FXS;
|
||||||
|
end;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TvMX.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.TvMXKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
TvMX.OptionsData.Editing := False;
|
||||||
|
if Key = #13 then
|
||||||
|
Key := #40;
|
||||||
|
TvMX.OptionsData.Editing := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.TvMXKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
TvMX.OptionsData.Editing := False;
|
||||||
|
if Key = 13 then
|
||||||
|
Key := 40;
|
||||||
|
TvMX.OptionsData.Editing := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.QtyKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key = #13 then
|
||||||
|
begin
|
||||||
|
CDS_Main.Last;
|
||||||
|
CopyAddRowCDS(CDS_Main);
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('MXGangHao').Value := gangno.Text;
|
||||||
|
|
||||||
|
FieldByName('mxtt').Value := TT.Text;
|
||||||
|
FieldByName('mxkh').Value := KH.Text;
|
||||||
|
FieldByName('mxkuanno').Value := KUANHAO.Text;
|
||||||
|
FieldByName('mxspec').Value := guige.Text;
|
||||||
|
|
||||||
|
FieldByName('MXID').Value := '';
|
||||||
|
FieldByName('CRNO').Value := '';
|
||||||
|
// FieldByName('MXMJXH').Value := null;
|
||||||
|
FieldByName('MXMJXH').Value := StrToFloatDef(FieldByName('MXMJXH').asstring, 0) + 1;
|
||||||
|
if CDS_Main.FieldByName('MXUnit').AsString = '' then
|
||||||
|
FieldByName('MXUnit').Value := 'Y';
|
||||||
|
if XS.Text <> '' then
|
||||||
|
begin
|
||||||
|
if ComboBox2.Text = 'KG' then
|
||||||
|
begin
|
||||||
|
FieldByName('MXQty').Value := strtofloatdef(KGQty.Text, 0);
|
||||||
|
FieldByName('MXQty2').Value := Format('%.1f', [StrToFloatDef(KGQty.Text, 0) * StrToFloatDef(xs.Text, 0)]);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('MXQty2').Value := strtofloatdef(Qty.Text, 0);
|
||||||
|
FieldByName('MXQty').Value := Format('%.1f', [StrToFloatDef(Qty.Text, 0) * StrToFloatDef(xs.Text, 0)]);
|
||||||
|
// FieldByName('MXUnit').Value := combobox2.Text;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('MXQty').Value := strtofloatdef(KGQty.Text, 0);
|
||||||
|
FieldByName('MXQty2').Value := strtofloatdef(Qty.Text, 0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
if CheckBox2.Checked = True then
|
||||||
|
begin
|
||||||
|
PrtData(Edit2.Text);
|
||||||
|
end;
|
||||||
|
Qty.Text := '';
|
||||||
|
KGQTY.Text := '';
|
||||||
|
KGQty.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.KGQTYKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key = #13 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
if CheckBox1.Checked = True then
|
||||||
|
begin
|
||||||
|
CDS_Main.Last;
|
||||||
|
CopyAddRowCDS(CDS_Main);
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('MXGangHao').Value := gangno.Text;
|
||||||
|
FieldByName('mxtt').Value := TT.Text;
|
||||||
|
FieldByName('mxkh').Value := KH.Text;
|
||||||
|
FieldByName('mxkuanno').Value := KUANHAO.Text;
|
||||||
|
FieldByName('mxspec').Value := guige.Text;
|
||||||
|
FieldByName('MXID').Value := '';
|
||||||
|
FieldByName('CRNO').Value := '';
|
||||||
|
// FieldByName('MXMJXH').Value := null;
|
||||||
|
FieldByName('MXMJXH').Value := StrToFloatDef(FieldByName('MXMJXH').asstring, 0) + 1;
|
||||||
|
if CDS_Main.FieldByName('MXUnit').AsString = '' then
|
||||||
|
FieldByName('MXUnit').Value := 'Y';
|
||||||
|
if XS.Text <> '' then
|
||||||
|
begin
|
||||||
|
if ComboBox2.Text = 'KG' then
|
||||||
|
begin
|
||||||
|
FieldByName('MXQty').Value := strtofloatdef(KGQty.Text, 0);
|
||||||
|
FieldByName('MXQty2').Value := Format('%.1f', [StrToFloatDef(KGQty.Text, 0) * StrToFloatDef(xs.Text, 0)]);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('MXQty2').Value := strtofloatdef(Qty.Text, 0);
|
||||||
|
FieldByName('MXQty').Value := Format('%.1f', [StrToFloatDef(Qty.Text, 0) * StrToFloatDef(xs.Text, 0)]);
|
||||||
|
// FieldByName('MXUnit').Value := combobox2.Text;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FieldByName('MXQty').Value := strtofloatdef(KGQty.Text, 0);
|
||||||
|
FieldByName('MXQty2').Value := strtofloatdef(Qty.Text, 0);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
if CheckBox2.Checked = True then
|
||||||
|
begin
|
||||||
|
PrtData(Edit2.Text);
|
||||||
|
end;
|
||||||
|
Qty.Text := '';
|
||||||
|
KGQTY.Text := '';
|
||||||
|
KGQty.SetFocus;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
QTY.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
// if Key = #13 then
|
||||||
|
// begin
|
||||||
|
// CopyAddRowCDS(CDS_Main);
|
||||||
|
// with CDS_Main do
|
||||||
|
// begin
|
||||||
|
// Edit;
|
||||||
|
// FieldByName('MXGangHao').Value := gangno.Text;
|
||||||
|
// FieldByName('MXID').Value := '';
|
||||||
|
// FieldByName('CRNO').Value := '';
|
||||||
|
// FieldByName('MXMJXH').Value := null;
|
||||||
|
// if CDS_Main.FieldByName('MXUnit').AsString = '' then
|
||||||
|
// FieldByName('MXUnit').Value := 'M';
|
||||||
|
// if XS.Text <> '' then
|
||||||
|
// begin
|
||||||
|
// if ComboBox2.Text = 'KG' then
|
||||||
|
// begin
|
||||||
|
// FieldByName('MXQty').Value := strtofloatdef(KGQty.Text, 0);
|
||||||
|
// FieldByName('MXQty2').Value := Format('%.1f', [StrToFloatDef(KGQty.Text, 0) * StrToFloatDef(xs.Text, 0)]);
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// FieldByName('MXQty2').Value := strtofloatdef(Qty.Text, 0);
|
||||||
|
// FieldByName('MXQty').Value := Format('%.1f', [StrToFloatDef(Qty.Text, 0) * StrToFloatDef(xs.Text, 0)]);
|
||||||
|
// FieldByName('MXUnit').Value := combobox2.Text;
|
||||||
|
// end;
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// FieldByName('MXQty').Value := strtofloatdef(KGQty.Text, 0);
|
||||||
|
// FieldByName('MXQty2').Value := strtofloatdef(Qty.Text, 0);
|
||||||
|
// if combobox2.Text <> 'KG' then
|
||||||
|
// begin
|
||||||
|
// FieldByName('MXUnit').Value := combobox2.Text;
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// FieldByName('MXUnit').Value := 'M';
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// Post;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// Qty.Text := '';
|
||||||
|
// KGQTY.Text := '';
|
||||||
|
// Qty.SetFocus;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
with CDS_Main do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_Main.FieldByName('SSel').AsBoolean = True then
|
||||||
|
begin
|
||||||
|
PrtData(CDS_Main.fieldbyname('MXID').AsString);
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath, Txt2, fImagePath2: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' EXEC P_Print_JYLab ');
|
||||||
|
SQL.Add(' @mjID=''' + Trim(CDS_Main.fieldbyname('MXID').AsString) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryPrint.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('标签内容未找到!', '提示信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ExportFtErpFile('布匹标签.rmf', ADOQueryTmp);
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\布匹标签.rmf';
|
||||||
|
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['MXMJXH'] := CDS_MAIN.FIELDBYNAME('MXMJXH').ASSTRING;
|
||||||
|
RMVariables['MXGangHao'] := CDS_MAIN.FIELDBYNAME('MXGangHao').ASSTRING;
|
||||||
|
RMVariables['MXQty'] := CDS_MAIN.FIELDBYNAME('MXQty').ASSTRING;
|
||||||
|
RMVariables['MXQTY2'] := CDS_MAIN.FIELDBYNAME('MXQTY2').ASSTRING;
|
||||||
|
RMVariables['MXUnit'] := CDS_MAIN.FIELDBYNAME('MXUnit').ASSTRING;
|
||||||
|
RMVariables['MXFM'] := CDS_MAIN.FIELDBYNAME('MXFM').ASSTRING;
|
||||||
|
RMVariables['mxtt'] := CDS_MAIN.FIELDBYNAME('mxtt').ASSTRING;
|
||||||
|
RMVariables['mxkh'] := CDS_MAIN.FIELDBYNAME('mxkh').ASSTRING;
|
||||||
|
RMVariables['mxkuanno'] := CDS_MAIN.FIELDBYNAME('mxkuanno').ASSTRING;
|
||||||
|
RMVariables['mxspec'] := CDS_MAIN.FIELDBYNAME('mxspec').ASSTRING;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
|
||||||
|
RM1.DefaultCopies := strtointdef(trim(ComboBox3.Text), 1);
|
||||||
|
|
||||||
|
RM1.showReport;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPCKMXLR.LABNAMEPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
// try
|
||||||
|
// frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
// with frmZDYHelp do
|
||||||
|
// begin
|
||||||
|
// flag := 'LABNAME';
|
||||||
|
// flagname := '标签格式';
|
||||||
|
// if ShowModal = 1 then
|
||||||
|
// begin
|
||||||
|
// Self.LABNAME.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// frmZDYHelp.Free;
|
||||||
|
// end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
317
坯布仓库/U_CPKWListSel.dfm
Normal file
317
坯布仓库/U_CPKWListSel.dfm
Normal file
|
|
@ -0,0 +1,317 @@
|
||||||
|
object frmCPKWListSel: TfrmCPKWListSel
|
||||||
|
Left = 154
|
||||||
|
Top = 77
|
||||||
|
Width = 1038
|
||||||
|
Height = 618
|
||||||
|
Caption = #24211#20301#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1022
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = BPCK_DataLink.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1022
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 203
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 559
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 378
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 235
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 83
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object DEFstr3: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 588
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550)
|
||||||
|
end
|
||||||
|
object defstr2: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 408
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1022
|
||||||
|
Height = 335
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
OnDblClick = Tv2DblClick
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Header = BPCK_DataLink.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 97
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'CPNUm'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 153
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 888
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 700
|
||||||
|
Top = 228
|
||||||
|
end
|
||||||
|
end
|
||||||
161
坯布仓库/U_CPKWListSel.pas
Normal file
161
坯布仓库/U_CPKWListSel.pas
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
unit U_CPKWListSel;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
|
cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPKWListSel = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
defstr1: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr3: TComboBox;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
defstr2: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure defstr1Change(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure Tv2DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWListSel: TfrmCPKWListSel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select A.* ');
|
||||||
|
// sql.Add(' ,cpNum=(select count(MJID) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0)');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add(' where Type=''CPKW'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWListSel:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmCPKWListSel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.Align:=alclient;
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.defstr1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel(self.Caption,cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'供应商资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWListSel.Tv2DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
18108
坯布仓库/U_DataLink.dfm
Normal file
18108
坯布仓库/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
87
坯布仓库/U_DataLink.pas
Normal file
87
坯布仓库/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
unit U_DataLink;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||||
|
Windows, Messages, forms, OleCtnrs, DateUtils, ExtCtrls, AppEvnts, cxClasses;
|
||||||
|
|
||||||
|
var
|
||||||
|
DConString: string; {全局连接字符串}
|
||||||
|
server, dtbase, user, pswd: string; {数据库连接参数}
|
||||||
|
DCurHandle: hwnd; //当前窗体句柄
|
||||||
|
DName: string; //#用户名#//
|
||||||
|
DCode: string; //#用户编号#//
|
||||||
|
Ddatabase: string; //#数据库名称#//
|
||||||
|
DTitCaption: string; //#主窗体名称#//
|
||||||
|
DParameters1, DParameters2, DParameters3, DParameters4, DParameters5: string; // 外部参数;
|
||||||
|
DParameters6, DParameters7, DParameters8, DParameters9, DParameters10: string; //外部参数;
|
||||||
|
OldDllApp: Tapplication; //保存原有句柄
|
||||||
|
NewDllApp: Tapplication; //当前句柄
|
||||||
|
MainApplication: Tapplication;
|
||||||
|
DFormCode: integer; //当前窗口号
|
||||||
|
IsDelphiLanguage: integer;
|
||||||
|
DServerDate: TdateTime; //服务器时间
|
||||||
|
DCompany: string; //公司
|
||||||
|
|
||||||
|
type
|
||||||
|
TBPCK_DataLink = 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;
|
||||||
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
|
cxStyle1: TcxStyle;
|
||||||
|
cxStyle2: TcxStyle;
|
||||||
|
cxStyle_gridRow: TcxStyle;
|
||||||
|
cxStyle_gridFoot: TcxStyle;
|
||||||
|
cxStyle_gridHead: TcxStyle;
|
||||||
|
cxStyle_gridGroupBox: TcxStyle;
|
||||||
|
cxStyle_yellow: TcxStyle;
|
||||||
|
cxStyle_Red: TcxStyle;
|
||||||
|
cxStyle_fontBlack: TcxStyle;
|
||||||
|
cxStyle_fontclFuchsia: TcxStyle;
|
||||||
|
cxStyle_fontclPurple: TcxStyle;
|
||||||
|
cxStyle_fontclGreen: TcxStyle;
|
||||||
|
cxStyle_fontclBlue: TcxStyle;
|
||||||
|
cxStyle_fontclTeal: TcxStyle;
|
||||||
|
cxStyle_fontclOlive: TcxStyle;
|
||||||
|
Timer1: TTimer;
|
||||||
|
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
|
||||||
|
BPCK_DataLink: TBPCK_DataLink;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TBPCK_DataLink.DataModuleDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
BPCK_DataLink := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
293
坯布仓库/U_GetDllForm.pas
Normal file
293
坯布仓库/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,293 @@
|
||||||
|
unit U_GetDllForm;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, dxCore,
|
||||||
|
ActiveX;
|
||||||
|
|
||||||
|
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
||||||
|
|
||||||
|
function ConnData(): Boolean;
|
||||||
|
|
||||||
|
function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_BpRklist, U_Bpcklist, U_Bpkclist, U_ZDYHelp, U_BpJGlist;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// 功能说明:取Dll中得窗体 //
|
||||||
|
// 参数说明:App>>调用应用程序; //
|
||||||
|
// FormH>>调用窗口句柄 ; //
|
||||||
|
// FormID>>窗口号; //
|
||||||
|
// Language>>语言种类; //
|
||||||
|
// WinStyle>>窗口类型; //
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd;
|
||||||
|
var
|
||||||
|
mnewHandle: hwnd;
|
||||||
|
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||||||
|
mstate: TWindowState;
|
||||||
|
mborderstyle: TFormBorderStyle;
|
||||||
|
begin
|
||||||
|
mnewHandle := 0;
|
||||||
|
DName := GName;
|
||||||
|
DCode := GName;
|
||||||
|
DdataBase := DataBase;
|
||||||
|
DTitCaption := Title;
|
||||||
|
DParameters1 := Parameters1;
|
||||||
|
DParameters2 := Parameters2;
|
||||||
|
DParameters3 := Parameters3;
|
||||||
|
DParameters4 := Parameters4;
|
||||||
|
DParameters5 := Parameters5;
|
||||||
|
DParameters6 := Parameters6;
|
||||||
|
DParameters7 := Parameters7;
|
||||||
|
DParameters8 := Parameters8;
|
||||||
|
DParameters9 := Parameters9;
|
||||||
|
DParameters10 := Parameters10;
|
||||||
|
|
||||||
|
MainApplication := App;
|
||||||
|
DCurHandle := FormH;
|
||||||
|
IsDelphiLanguage := Language;
|
||||||
|
|
||||||
|
Application := TApplication(App);
|
||||||
|
DCurHandle := 0;
|
||||||
|
|
||||||
|
|
||||||
|
//赋值链接字符串
|
||||||
|
SetLength(server, 255);
|
||||||
|
SetLength(dtbase, 255);
|
||||||
|
SetLength(user, 255);
|
||||||
|
SetLength(pswd, 255);
|
||||||
|
|
||||||
|
server := '139.224.12.182,7781'; // 122.224.36.142,7781
|
||||||
|
dtbase := 'aidengdata'; //jinzhicaidata
|
||||||
|
user := 'aidengsa';
|
||||||
|
pswd := 'rightsoft@3203';
|
||||||
|
|
||||||
|
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;
|
||||||
|
Parameters1:='布匹仓库';
|
||||||
|
// DParameters1:='1';
|
||||||
|
|
||||||
|
// if GetLinkDog(DCurHandle,DConString)<0 then application.Terminate;
|
||||||
|
if not ConnData() then
|
||||||
|
begin
|
||||||
|
result := 0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
GetsysParam('', '');
|
||||||
|
// 定义窗口类型 、状态
|
||||||
|
if WinStyle = 0 then
|
||||||
|
begin
|
||||||
|
mstyle := fsMDIChild;
|
||||||
|
mstate := wsMaximized;
|
||||||
|
mborderstyle := bsSizeable;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
mstyle := fsNormal;
|
||||||
|
mstate := wsNormal;
|
||||||
|
mborderstyle := bsSizeable;
|
||||||
|
end;
|
||||||
|
|
||||||
|
/////////////////////
|
||||||
|
//调用子模块窗口
|
||||||
|
case FormID of
|
||||||
|
-1:
|
||||||
|
begin
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'BPCK';
|
||||||
|
flagname := '名称';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
-2:
|
||||||
|
begin
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'BPRKTYPE';
|
||||||
|
flagname := '名称';
|
||||||
|
fnote := true;
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
-3:
|
||||||
|
begin
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'BPCKTYPE';
|
||||||
|
flagname := '名称';
|
||||||
|
fnote := true;
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
10: //坯布入库
|
||||||
|
begin
|
||||||
|
if frmBpRklist = nil then
|
||||||
|
begin
|
||||||
|
frmBpRklist := TfrmBpRklist.Create(application.MainForm);
|
||||||
|
with frmBpRklist do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fCkName := trim(Parameters1);
|
||||||
|
fManage := trim(DataBase);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmBpRklist.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmBpRklist.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
20: //坯布出库
|
||||||
|
begin
|
||||||
|
if frmBpCklist = nil then
|
||||||
|
begin
|
||||||
|
frmBpCklist := TfrmBpCklist.Create(application.MainForm);
|
||||||
|
with frmBpCklist do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fCkName := trim(Parameters1);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmBpCklist.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmBpCklist.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
30: //坯布库存
|
||||||
|
begin
|
||||||
|
if frmBpkclist = nil then
|
||||||
|
begin
|
||||||
|
frmBpkclist := TfrmBpkclist.Create(application.MainForm);
|
||||||
|
with frmBpkclist do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fCkName := trim(Parameters1);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmBpkclist.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmBpkclist.Handle;
|
||||||
|
end;
|
||||||
|
31: //坯布库存
|
||||||
|
begin
|
||||||
|
if frmBpJGlist = nil then
|
||||||
|
begin
|
||||||
|
frmBpJGlist := TfrmBpJGlist.Create(application.MainForm);
|
||||||
|
with frmBpJGlist do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fCkName := trim(Parameters1);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmBpJGlist.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmBpJGlist.Handle;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end; // end case
|
||||||
|
|
||||||
|
Result := mnewHandle;
|
||||||
|
// NewDllApp := Application;
|
||||||
|
end;
|
||||||
|
//===========================================================
|
||||||
|
//建立数据库连接池
|
||||||
|
//===========================================================
|
||||||
|
|
||||||
|
function ConnData(): Boolean;
|
||||||
|
begin
|
||||||
|
if not Assigned(BPCK_DataLink) then
|
||||||
|
BPCK_DataLink := TBPCK_DataLink.Create(Application);
|
||||||
|
try
|
||||||
|
with BPCK_DataLink.ADOLink do
|
||||||
|
begin
|
||||||
|
if not Connected then
|
||||||
|
begin
|
||||||
|
Connected := false;
|
||||||
|
ConnectionString := DConString;
|
||||||
|
LoginPrompt := false;
|
||||||
|
Connected := true;
|
||||||
|
// BaseData10_DataLink.Timer1.Enabled:=true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result := true;
|
||||||
|
except
|
||||||
|
Result := false;
|
||||||
|
application.MessageBox('数据库连接失败!', '错误', mb_Ok + MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
//=========================================================
|
||||||
|
//获取系统参数
|
||||||
|
//=========================================================
|
||||||
|
|
||||||
|
function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
|
||||||
|
begin
|
||||||
|
result := true;
|
||||||
|
//////////////////////////////
|
||||||
|
shortDateFormat := 'yyyy-MM-dd';
|
||||||
|
//服务器日期
|
||||||
|
with BPCK_DataLink.AdoDataLink do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select getDate()as dt');
|
||||||
|
open;
|
||||||
|
DServerDate := fieldByName('dt').AsDatetime;
|
||||||
|
end;
|
||||||
|
result := true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
CoInitialize(nil);
|
||||||
|
dxUnitsLoader.Initialize;
|
||||||
|
|
||||||
|
|
||||||
|
finalization
|
||||||
|
BPCK_DataLink.Free;
|
||||||
|
application := NewDllApp;
|
||||||
|
dxUnitsLoader.Finalize;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
648
坯布仓库/U_PackList.dfm
Normal file
648
坯布仓库/U_PackList.dfm
Normal file
|
|
@ -0,0 +1,648 @@
|
||||||
|
object frmPackList: TfrmPackList
|
||||||
|
Left = 77
|
||||||
|
Top = 101
|
||||||
|
Width = 921
|
||||||
|
Height = 634
|
||||||
|
Caption = #25171#21253#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 = 913
|
||||||
|
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 = Packaged_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 47
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 49
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 48
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986#30721#21333
|
||||||
|
ImageIndex = 44
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 913
|
||||||
|
Height = 56
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 239
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #25171#21253#26085#26399
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 240
|
||||||
|
Top = 32
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #35745#21010#21333#21495
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 444
|
||||||
|
Top = 12
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object khName: TEdit
|
||||||
|
Left = 292
|
||||||
|
Top = 7
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = khNameChange
|
||||||
|
end
|
||||||
|
object begdate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 8
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41009.831677152770000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41009.831677152770000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object enddate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 28
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41009.831677152770000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 41009.831677152770000000
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object orderNo: TEdit
|
||||||
|
Left = 292
|
||||||
|
Top = 28
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = khNameChange
|
||||||
|
end
|
||||||
|
object cpName: TEdit
|
||||||
|
Left = 500
|
||||||
|
Top = 8
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = khNameChange
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 444
|
||||||
|
Top = 32
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Caption = #20840#36873
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CXGrid1: TcxGrid
|
||||||
|
Left = 4
|
||||||
|
Top = 89
|
||||||
|
Width = 505
|
||||||
|
Height = 316
|
||||||
|
TabOrder = 2
|
||||||
|
LookAndFeel.Kind = lfStandard
|
||||||
|
object TV1: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellClick = TV1CellClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = V1qtyMi
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = V1qtyjz
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = V1qtyMa
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = V1QtyMz
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = V1QtyPZ
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.ContentOdd = Packaged_DataLink.cxStyle_gridRow
|
||||||
|
Styles.Footer = Packaged_DataLink.cxStyle_gridFoot
|
||||||
|
Styles.GroupByBox = Packaged_DataLink.cxStyle_gridGroupBox
|
||||||
|
Styles.Header = Packaged_DataLink.cxStyle_gridHead
|
||||||
|
object V1SSel: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object V1packID: TcxGridDBColumn
|
||||||
|
Caption = #21253#26465#30721
|
||||||
|
DataBinding.FieldName = 'packID'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object V1FillTime: TcxGridDBColumn
|
||||||
|
Caption = #25171#21253#26085#26399
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object V1packNo: TcxGridDBColumn
|
||||||
|
Caption = #21253#21495
|
||||||
|
DataBinding.FieldName = 'packNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object TV1KHName: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'KHName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object TV1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #35745#21010#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object TV1CPName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'CPName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 109
|
||||||
|
end
|
||||||
|
object V1qtyMi: TcxGridDBColumn
|
||||||
|
Caption = #31859#25968
|
||||||
|
DataBinding.FieldName = 'qtyMi'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = Packaged_DataLink.cxStyle_fontclBlue
|
||||||
|
Styles.Footer = Packaged_DataLink.cxStyle_fontclBlue
|
||||||
|
Styles.Header = Packaged_DataLink.cxStyle_fontclBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object V1qtyjz: TcxGridDBColumn
|
||||||
|
Caption = #20844#26020#25968
|
||||||
|
DataBinding.FieldName = 'qtyjz'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Content = Packaged_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = Packaged_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = Packaged_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object V1qtyMa: TcxGridDBColumn
|
||||||
|
Caption = #30721#25968
|
||||||
|
DataBinding.FieldName = 'qtyMa'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object V1QtyMz: TcxGridDBColumn
|
||||||
|
Caption = #27611#37325
|
||||||
|
DataBinding.FieldName = 'QtyMz'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object V1QtyPZ: TcxGridDBColumn
|
||||||
|
Caption = #30382#37325
|
||||||
|
DataBinding.FieldName = 'QtyPZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object CXGrid1L1: TcxGridLevel
|
||||||
|
GridView = TV1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxSplitter1: TcxSplitter
|
||||||
|
Left = 641
|
||||||
|
Top = 89
|
||||||
|
Width = 8
|
||||||
|
Height = 319
|
||||||
|
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||||
|
AlignSplitter = salRight
|
||||||
|
Control = cxGrid2
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 649
|
||||||
|
Top = 89
|
||||||
|
Width = 264
|
||||||
|
Height = 319
|
||||||
|
Align = alRight
|
||||||
|
TabOrder = 4
|
||||||
|
LookAndFeel.Kind = lfStandard
|
||||||
|
object tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBqtyMi
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBqtyjz
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBqtyMa
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBQtyMz
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBQtyPZ
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsBehavior.FocusCellOnCycle = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.ContentOdd = Packaged_DataLink.cxStyle_gridRow
|
||||||
|
Styles.Footer = Packaged_DataLink.cxStyle_gridFoot
|
||||||
|
Styles.GroupByBox = Packaged_DataLink.cxStyle_gridGroupBox
|
||||||
|
Styles.Header = Packaged_DataLink.cxStyle_gridHead
|
||||||
|
object cxGridDBTMID: TcxGridDBColumn
|
||||||
|
Caption = #21367#26465#30721
|
||||||
|
DataBinding.FieldName = 'TMID'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object cxGridDBJH: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'JH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object cxGridDBColor: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object cxGridDBHX: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411
|
||||||
|
DataBinding.FieldName = 'HX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object cxGridDBqtyMi: TcxGridDBColumn
|
||||||
|
Caption = #31859#25968
|
||||||
|
DataBinding.FieldName = 'qtyMi'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = Packaged_DataLink.cxStyle_fontclBlue
|
||||||
|
Styles.Footer = Packaged_DataLink.cxStyle_fontclBlue
|
||||||
|
Styles.Header = Packaged_DataLink.cxStyle_fontclBlue
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object cxGridDBqtyjz: TcxGridDBColumn
|
||||||
|
Caption = #20844#26020#25968
|
||||||
|
DataBinding.FieldName = 'qtyjz'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Content = Packaged_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Footer = Packaged_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Styles.Header = Packaged_DataLink.cxStyle_fontclFuchsia
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object cxGridDBqtyMa: TcxGridDBColumn
|
||||||
|
Caption = #30721#25968
|
||||||
|
DataBinding.FieldName = 'qtyMa'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object cxGridDBQtyMz: TcxGridDBColumn
|
||||||
|
Caption = #27611#37325
|
||||||
|
DataBinding.FieldName = 'QtyMz'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object cxGridDBQtyPZ: TcxGridDBColumn
|
||||||
|
Caption = #30382#37325
|
||||||
|
DataBinding.FieldName = 'QtyPZ'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid3: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 408
|
||||||
|
Width = 913
|
||||||
|
Height = 194
|
||||||
|
Align = alBottom
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
object TV3: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource3
|
||||||
|
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 TV3ORDERNO: TcxGridDBColumn
|
||||||
|
Caption = 'ORDER NO'
|
||||||
|
DataBinding.FieldName = 'ORDERNO'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.CellMerging = True
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object TV3BALNO: TcxGridDBColumn
|
||||||
|
Caption = 'BAL NO'
|
||||||
|
DataBinding.FieldName = 'PackNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.CellMerging = True
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object TV3TYpe: TcxGridDBColumn
|
||||||
|
DataBinding.FieldName = 'TYPE'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.CellMerging = True
|
||||||
|
Width = 60
|
||||||
|
IsCaptionAssigned = True
|
||||||
|
end
|
||||||
|
object TV3DESNO: TcxGridDBColumn
|
||||||
|
Caption = 'DES NO'
|
||||||
|
DataBinding.FieldName = 'HX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.CellMerging = True
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object TV31: TcxGridDBColumn
|
||||||
|
Caption = '1'
|
||||||
|
DataBinding.FieldName = 'ROW1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV32: TcxGridDBColumn
|
||||||
|
Caption = '2'
|
||||||
|
DataBinding.FieldName = 'ROW2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV33: TcxGridDBColumn
|
||||||
|
Caption = '3'
|
||||||
|
DataBinding.FieldName = 'ROW3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV34: TcxGridDBColumn
|
||||||
|
Caption = '4'
|
||||||
|
DataBinding.FieldName = 'ROW4'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV35: TcxGridDBColumn
|
||||||
|
Caption = '5'
|
||||||
|
DataBinding.FieldName = 'ROW5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV36: TcxGridDBColumn
|
||||||
|
Caption = '6'
|
||||||
|
DataBinding.FieldName = 'ROW6'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV37: TcxGridDBColumn
|
||||||
|
Caption = '7'
|
||||||
|
DataBinding.FieldName = 'ROW7'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV38: TcxGridDBColumn
|
||||||
|
Caption = '8'
|
||||||
|
DataBinding.FieldName = 'ROW8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV39: TcxGridDBColumn
|
||||||
|
Caption = '9'
|
||||||
|
DataBinding.FieldName = 'ROW9'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV310: TcxGridDBColumn
|
||||||
|
Caption = '10'
|
||||||
|
DataBinding.FieldName = 'ROW10'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object TV3TTL: TcxGridDBColumn
|
||||||
|
Caption = 'TTL'
|
||||||
|
DataBinding.FieldName = 'ROWSUM'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid3Level1: TcxGridLevel
|
||||||
|
GridView = TV3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Main
|
||||||
|
Left = 356
|
||||||
|
Top = 181
|
||||||
|
end
|
||||||
|
object ADOQuerymain: TADOQuery
|
||||||
|
Connection = Packaged_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
SQL.Strings = (
|
||||||
|
'SELECT * FROM JD_Pack A'
|
||||||
|
''
|
||||||
|
''
|
||||||
|
''
|
||||||
|
''
|
||||||
|
'')
|
||||||
|
Left = 412
|
||||||
|
Top = 164
|
||||||
|
end
|
||||||
|
object ADOQuerysub: TADOQuery
|
||||||
|
Connection = Packaged_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 684
|
||||||
|
Top = 188
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ADOQuerysub
|
||||||
|
Left = 720
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = Packaged_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 292
|
||||||
|
Top = 408
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 324
|
||||||
|
Top = 408
|
||||||
|
end
|
||||||
|
object ADOQueryCMD: TADOQuery
|
||||||
|
Connection = Packaged_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 644
|
||||||
|
Top = 45
|
||||||
|
end
|
||||||
|
object CDS_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 468
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
end
|
||||||
544
坯布仓库/U_ProductOrderList.dfm
Normal file
544
坯布仓库/U_ProductOrderList.dfm
Normal file
|
|
@ -0,0 +1,544 @@
|
||||||
|
object frmProductOrderList: TfrmProductOrderList
|
||||||
|
Left = 134
|
||||||
|
Top = 115
|
||||||
|
Width = 1094
|
||||||
|
Height = 600
|
||||||
|
Caption = #29983#20135#25351#31034#21333
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1265
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36873#25321
|
||||||
|
ImageIndex = 106
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1265
|
||||||
|
Height = 67
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21046#21333#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 179
|
||||||
|
Top = 15
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 318
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 179
|
||||||
|
Top = 39
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #36319#21333#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 318
|
||||||
|
Top = 39
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 441
|
||||||
|
Top = 39
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 441
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 589
|
||||||
|
Top = 39
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20811#37325
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 589
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #38376#24133
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 35
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object OrderNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 220
|
||||||
|
Top = 11
|
||||||
|
Width = 77
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
object CustomerNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 347
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
object OrdPerson1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 220
|
||||||
|
Top = 35
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
object PRTColor: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 347
|
||||||
|
Top = 35
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
object MPRTCodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 495
|
||||||
|
Top = 35
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
object OrdDefStr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 495
|
||||||
|
Top = 11
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
object MPRTKZ: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 618
|
||||||
|
Top = 35
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
object MPRTMF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 618
|
||||||
|
Top = 11
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = OrderNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 16
|
||||||
|
Top = 104
|
||||||
|
Width = 1249
|
||||||
|
Height = 369
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
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.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.OnGetContentStyle = Tv1StylesGetContentStyle
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 49
|
||||||
|
end
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1OrdDefStr1: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'OrdDefStr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1OrdPerson1: TcxGridDBColumn
|
||||||
|
Caption = #36319#21333#21592
|
||||||
|
DataBinding.FieldName = 'OrdPerson1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1OrdDate: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26085#26399
|
||||||
|
DataBinding.FieldName = 'OrdDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DlyDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
OnCustomDrawCell = v1DeliveryDateCustomDrawCell
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1CustomerNoName: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'CustomerNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1MPRTCodeName: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'MPRTCodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1MPRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'MPRTMF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1MPRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'MPRTKZ'
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 54
|
||||||
|
end
|
||||||
|
object v1PRTColor: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'PRTColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'PRTOrderQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v1PRTPrice: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'PRTPrice'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 544
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 552
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 312
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 440
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 464
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 336
|
||||||
|
Top = 200
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Print
|
||||||
|
Left = 392
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 576
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 288
|
||||||
|
Top = 184
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #26377#20379#24212#21830
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 360
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object CDS_Print: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 344
|
||||||
|
Top = 288
|
||||||
|
end
|
||||||
|
end
|
||||||
527
坯布仓库/U_ProductOrderList.pas
Normal file
527
坯布仓库/U_ProductOrderList.pas
Normal file
|
|
@ -0,0 +1,527 @@
|
||||||
|
unit U_ProductOrderList;
|
||||||
|
|
||||||
|
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, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdFTP,ShellAPI
|
||||||
|
,IniFiles;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmProductOrderList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
OrderNoM: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1OrdDate: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1OrdPerson1: TcxGridDBColumn;
|
||||||
|
v1PRTColor: TcxGridDBColumn;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1CustomerNoName: TcxGridDBColumn;
|
||||||
|
Label4: TLabel;
|
||||||
|
CustomerNoName: TEdit;
|
||||||
|
v1MPRTCodeName: TcxGridDBColumn;
|
||||||
|
v1MPRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N2: TMenuItem;
|
||||||
|
v1PRTPrice: TcxGridDBColumn;
|
||||||
|
Label5: TLabel;
|
||||||
|
OrdPerson1: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
PRTColor: TEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
MPRTCodeName: TEdit;
|
||||||
|
v1MPRTKZ: TcxGridDBColumn;
|
||||||
|
v1OrdDefStr1: TcxGridDBColumn;
|
||||||
|
Label11: TLabel;
|
||||||
|
OrdDefStr1: TEdit;
|
||||||
|
Label12: TLabel;
|
||||||
|
MPRTKZ: TEdit;
|
||||||
|
Label13: TLabel;
|
||||||
|
MPRTMF: TEdit;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
CDS_Print: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure OrderNoMChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBTPClick(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure CheckBox2Click(Sender: TObject);
|
||||||
|
procedure Tv1StylesGetContentStyle(Sender: TcxCustomGridTableView;
|
||||||
|
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
|
||||||
|
out AStyle: TcxStyle);
|
||||||
|
procedure v1DeliveryDateCustomDrawCell(Sender: TcxCustomGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
DQdate:TDateTime;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
procedure InitGridFH();
|
||||||
|
procedure ReadINIFile();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FFInt,FCloth:Integer;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmProductOrderList: TfrmProductOrderList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10;
|
||||||
|
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmProductOrderList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxgrid1.Align:=alClient;
|
||||||
|
//BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp)-7;
|
||||||
|
//EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
DQdate:=SGetServerDate(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
if FCloth<>1 then
|
||||||
|
WriteCxGrid('工作指示单列表',Tv1,'生产指示单管理')
|
||||||
|
else
|
||||||
|
WriteCxGrid('工作指示单列表选择',Tv1,'生产指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.*,A.OrderNo OrderNoM from JYOrder_Main A left join JYOrder_Sub B on A.MainId=B.MainId ');
|
||||||
|
SQL.Add('where OrdDate>=:begdate and OrdDate<:enddate');
|
||||||
|
if Trim(DParameters1)<>'审核' then
|
||||||
|
begin
|
||||||
|
sql.Add(' and A.Filler='''+Trim(DName)+'''');
|
||||||
|
end;
|
||||||
|
Parameters.ParamByName('begdate').Value:=FormatDateTime('yyyy-MM-dd',BegDate.DateTime);
|
||||||
|
Parameters.ParamByName('enddate').Value:=FormatDateTime('yyyy-MM-dd',enddate.DateTime+1);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmProductOrderList.InitGridFH();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec Order_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||||
|
+' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.InitForm();
|
||||||
|
begin
|
||||||
|
if SGetServerDate(ADOQueryTemp)>StrToDate('2014-07-11') then
|
||||||
|
begin
|
||||||
|
ToolBar1.Visible:=False;
|
||||||
|
Application.MessageBox('软件需要升级,请联系供应商!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if FCloth<>1 then
|
||||||
|
ReadCxGrid('工作指示单列表',Tv1,'生产指示单管理')
|
||||||
|
else
|
||||||
|
ReadCxGrid('工作指示单列表选择',Tv1,'生产指示单管理');
|
||||||
|
|
||||||
|
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.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 TfrmProductOrderList.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete JYOrder_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from JYOrder_Sub where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
if IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete JYOrder_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString)='' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete JYOrder_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
// SelExportData(Tv1,ADOQueryMain,'生产指示单列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Porderno:string;
|
||||||
|
i,j:Integer;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单.rmf' ;
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.*,PRTColorEng=(select Note from KH_Zdy CC where ZdyName=B.PRTColor and CC.Type=''OrdColor'' ),ML='' '' ');
|
||||||
|
SQL.Add(',CPQty=(select isnull(Sum(PRTOrderQty),0) from JYOrder_Sub C where C.MainId=A.MainId)');
|
||||||
|
sql.Add(' from JYOrder_Main A inner join JYOrder_Sub B on A.MainId=B.MainId ');
|
||||||
|
sql.Add(' and A.MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||||
|
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||||
|
i:=ADOQueryPrint.RecordCount;
|
||||||
|
ADOQueryPrint.First;
|
||||||
|
if i<14 then
|
||||||
|
begin
|
||||||
|
for j:=1 to 19-i do
|
||||||
|
begin
|
||||||
|
with CDS_Print do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('ML').Value:=' ';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
with CDS_Print do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Note').Value:=Trim(Order_Main.fieldbyname('Note').AsString);
|
||||||
|
FieldByName('OrdDefStr10').Value:=Trim(Order_Main.fieldbyname('OrdDefStr10').AsString);
|
||||||
|
FieldByName('OrdDefStr11').Value:=Trim(Order_Main.fieldbyname('OrdDefStr11').AsString);
|
||||||
|
FieldByName('OrdDefStr12').Value:=Trim(Order_Main.fieldbyname('OrdDefStr12').AsString);
|
||||||
|
FieldByName('OrdDefStr13').Value:=Trim(Order_Main.fieldbyname('OrdDefStr13').AsString);
|
||||||
|
FieldByName('OrdDefStr14').Value:=Trim(Order_Main.fieldbyname('OrdDefStr14').AsString);
|
||||||
|
FieldByName('OrdDefStr15').Value:=Trim(Order_Main.fieldbyname('OrdDefStr15').AsString);
|
||||||
|
FieldByName('OrdDefStr16').Value:=Trim(Order_Main.fieldbyname('OrdDefStr16').AsString);
|
||||||
|
FieldByName('OrdDefStr17').Value:=Trim(Order_Main.fieldbyname('OrdDefStr17').AsString);
|
||||||
|
FieldByName('OrdDefStr18').Value:=Trim(Order_Main.fieldbyname('OrdDefStr18').AsString);
|
||||||
|
FieldByName('OrdDefStr19').Value:=Trim(Order_Main.fieldbyname('OrdDefStr19').AsString);
|
||||||
|
FieldByName('OrdDefStr20').Value:=Trim(Order_Main.fieldbyname('OrdDefStr20').AsString);
|
||||||
|
FieldByName('OrdDefStr21').Value:=Trim(Order_Main.fieldbyname('OrdDefStr21').AsString);
|
||||||
|
FieldByName('OrdPerson1').Value:=Trim(Order_Main.fieldbyname('OrdPerson1').AsString);
|
||||||
|
FieldByName('OrdPerson2').Value:=Trim(Order_Main.fieldbyname('OrdPerson2').AsString);
|
||||||
|
FieldByName('OrdPerson3').Value:=Trim(Order_Main.fieldbyname('OrdPerson3').AsString);
|
||||||
|
FieldByName('OrdPerson4').Value:=Trim(Order_Main.fieldbyname('OrdPerson4').AsString);
|
||||||
|
FieldByName('Filler').Value:=Trim(Order_Main.fieldbyname('Filler').AsString);
|
||||||
|
FieldByName('Chker').Value:=Trim(Order_Main.fieldbyname('Chker').AsString);
|
||||||
|
FieldByName('ML').Value:=' ';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FFInt=1 then
|
||||||
|
begin
|
||||||
|
InitGridFH();
|
||||||
|
end else
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.OrderNoMChange(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 TfrmProductOrderList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.TBTPClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
FQty,FQty1,FMxQty,FPQty,FMxQtyS,FPQtyS:String;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.CheckBox2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.Tv1StylesGetContentStyle(
|
||||||
|
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
|
||||||
|
AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
|
||||||
|
var
|
||||||
|
id,id10:Integer;
|
||||||
|
begin
|
||||||
|
{try
|
||||||
|
if Tv1.GroupedItemCount=0 then
|
||||||
|
begin
|
||||||
|
Id:=Tv1.GetColumnByFieldName('DeliveryDate').Index-tv1.GroupedItemCount;
|
||||||
|
Id10:=Tv1.GetColumnByFieldName('SubStatus').Index-tv1.GroupedItemCount;
|
||||||
|
if Trim(VarToStr(ARecord.Values[id]))='' then Exit;
|
||||||
|
if Id<0 then Exit;
|
||||||
|
if ARecord.Values[id10]='完成' then exit;
|
||||||
|
if (ARecord.Values[id]-DQdate)>=4 then Exit;
|
||||||
|
if ((ARecord.Values[id]-DQdate)>=0) and ((ARecord.Values[id]-DQdate)<4) then
|
||||||
|
AStyle:=DataLink_.QHuangSe
|
||||||
|
else
|
||||||
|
if ARecord.Values[id]-DQdate<0 then
|
||||||
|
begin
|
||||||
|
AStyle:=DataLink_OrderManage.FenHongS;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.v1DeliveryDateCustomDrawCell(
|
||||||
|
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||||
|
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
{ Id:=TV1.GetColumnByFieldName('DeliveryDate').Index;//;-TV1.GroupedItemCount;
|
||||||
|
Id10:=TV1.GetColumnByFieldName('SubStatus').Index;
|
||||||
|
if Id<0 then Exit;
|
||||||
|
if AViewInfo.GridRecord.Values[Id10]='完成' then Exit;
|
||||||
|
if AViewInfo.GridRecord.Values[Id]-SGetServerDate(ADOQueryTemp)>=4 then Exit;
|
||||||
|
if ((AViewInfo.GridRecord.Values[id]-SGetServerDate10(ADOQueryTemp))>=0) and ((AViewInfo.GridRecord.Values[id]-SGetServerDate(ADOQueryTemp))<4) then
|
||||||
|
ACanvas.Brush.Color:=clYellow
|
||||||
|
else
|
||||||
|
if (AViewInfo.GridRecord.Values[id])-(SGetServerDate10(ADOQueryTemp)<0) then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clRed;
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clRed;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Purple' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clPurple;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Olive' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clOlive;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Teal' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clTeal;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Background' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clBackground;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.N1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Porderno:string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单10.rmf' ;
|
||||||
|
SDofilter(ADOQueryMain,' OrderNoM='''+Trim(Order_Main.fieldbyname('OrderNoM').AsString)+'''');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Porderno:=Trim(Order_Main.fieldbyname('OrderNoM').AsString);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单10.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
SDofilter(ADOQueryMain,'');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Order_Main.Locate('ordernoM',Porderno,[]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.N2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Porderno:string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单.rmf' ;
|
||||||
|
SDofilter(ADOQueryMain,' OrderNoM='''+Trim(Order_Main.fieldbyname('OrderNoM').AsString)+'''');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Porderno:=Trim(Order_Main.fieldbyname('OrderNoM').AsString);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
SDofilter(ADOQueryMain,'');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Order_Main.Locate('ordernoM',Porderno,[]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderList.ReadINIFile();
|
||||||
|
var
|
||||||
|
programIni:Tinifile; //配置文件名
|
||||||
|
FileName:string;
|
||||||
|
begin
|
||||||
|
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||||
|
programIni:=Tinifile.create(FileName);
|
||||||
|
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||||
|
programIni.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
632
坯布仓库/U_ProductOrderNewList.dfm
Normal file
632
坯布仓库/U_ProductOrderNewList.dfm
Normal file
|
|
@ -0,0 +1,632 @@
|
||||||
|
object frmProductOrderNewList: TfrmProductOrderNewList
|
||||||
|
Left = 113
|
||||||
|
Top = 117
|
||||||
|
Width = 1094
|
||||||
|
Height = 600
|
||||||
|
Caption = #29983#20135#25351#31034#21333
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1078
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
Caption = #36873#25321
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 185
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1078
|
||||||
|
Height = 65
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21046#21333#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 239
|
||||||
|
Top = 15
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 239
|
||||||
|
Top = 39
|
||||||
|
Width = 40
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458' '#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 314
|
||||||
|
Top = 99
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #26579#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 453
|
||||||
|
Top = 16
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994' '#21153' '#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 588
|
||||||
|
Top = 103
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #25104' '#20998
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 693
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 453
|
||||||
|
Top = 39
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 179
|
||||||
|
Top = 99
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21512#21516#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 729
|
||||||
|
Top = 103
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 437
|
||||||
|
Top = 99
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20844#21496#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 861
|
||||||
|
Top = 115
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20811#37325
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 861
|
||||||
|
Top = 91
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #38376#24133
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 35
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object OrderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 280
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
OnKeyPress = OrderNoKeyPress
|
||||||
|
end
|
||||||
|
object CustomerNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 280
|
||||||
|
Top = 35
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object JGFactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 343
|
||||||
|
Top = 95
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object OrdPerson1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 507
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTCF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 641
|
||||||
|
Top = 99
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object PRTColor: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 722
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object PRTCodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 507
|
||||||
|
Top = 35
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 220
|
||||||
|
Top = 95
|
||||||
|
Width = 77
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTSpec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 758
|
||||||
|
Top = 99
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 10
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object OrdDefStr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 491
|
||||||
|
Top = 95
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 11
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTKZ: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 890
|
||||||
|
Top = 111
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 12
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTMF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 890
|
||||||
|
Top = 87
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 13
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1078
|
||||||
|
Height = 424
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
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
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.OnGetContentStyle = Tv1StylesGetContentStyle
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 49
|
||||||
|
end
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1ConNo: TcxGridDBColumn
|
||||||
|
Caption = #21512#21516#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1OrdPerson1: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'OrdPerson1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1OrdDate: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26085#26399
|
||||||
|
DataBinding.FieldName = 'OrdDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DlyDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
OnCustomDrawCell = v1DeliveryDateCustomDrawCell
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1CustomerNoName: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'CustomerNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v1MPRTCodeName: TcxGridDBColumn
|
||||||
|
Caption = #20013#25991#21517#31216
|
||||||
|
DataBinding.FieldName = 'PRTCodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'PRTColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PRTRollNum'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'PRTOrderQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 97
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880#21450#35201#27714
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 96
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #21457#36135#22320#22336
|
||||||
|
DataBinding.FieldName = 'FHAddress'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXFS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 89
|
||||||
|
end
|
||||||
|
object v1EditTime: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#26085#26399
|
||||||
|
DataBinding.FieldName = 'EditTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1ordderNote1: TcxGridDBColumn
|
||||||
|
Caption = #20462#25913#22791#27880
|
||||||
|
DataBinding.FieldName = 'orddefNote1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 544
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 552
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 312
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 440
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 464
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 336
|
||||||
|
Top = 200
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Print
|
||||||
|
Left = 392
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 576
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 256
|
||||||
|
Top = 176
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #26377#20379#24212#21830
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 360
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object CDS_Print: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 344
|
||||||
|
Top = 288
|
||||||
|
end
|
||||||
|
end
|
||||||
457
坯布仓库/U_ProductOrderNewList.pas
Normal file
457
坯布仓库/U_ProductOrderNewList.pas
Normal file
|
|
@ -0,0 +1,457 @@
|
||||||
|
unit U_ProductOrderNewList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter,
|
||||||
|
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls,
|
||||||
|
Menus;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmProductOrderNewList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
OrderNo: TEdit;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
Label4: TLabel;
|
||||||
|
CustomerNoName: TEdit;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N2: TMenuItem;
|
||||||
|
Label2: TLabel;
|
||||||
|
JGFactoryName: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
OrdPerson1: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
MPRTCF: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
PRTColor: TEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
PRTCodeName: TEdit;
|
||||||
|
Label9: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label10: TLabel;
|
||||||
|
MPRTSpec: TEdit;
|
||||||
|
Label11: TLabel;
|
||||||
|
OrdDefStr1: TEdit;
|
||||||
|
Label12: TLabel;
|
||||||
|
MPRTKZ: TEdit;
|
||||||
|
Label13: TLabel;
|
||||||
|
MPRTMF: TEdit;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
CDS_Print: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1ConNo: TcxGridDBColumn;
|
||||||
|
v1OrdPerson1: TcxGridDBColumn;
|
||||||
|
v1OrdDate: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1CustomerNoName: TcxGridDBColumn;
|
||||||
|
v1MPRTCodeName: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1EditTime: TcxGridDBColumn;
|
||||||
|
v1ordderNote1: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
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 OrderNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBTPClick(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure CheckBox2Click(Sender: TObject);
|
||||||
|
procedure Tv1StylesGetContentStyle(Sender: TcxCustomGridTableView;
|
||||||
|
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
|
||||||
|
out AStyle: TcxStyle);
|
||||||
|
procedure v1DeliveryDateCustomDrawCell(Sender: TcxCustomGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure OrderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
DQdate:TDateTime;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
procedure InitGridFH();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FFInt,FCloth:Integer;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmProductOrderNewList: TfrmProductOrderNewList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10;
|
||||||
|
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmProductOrderNewList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxgrid1.Align:=alClient;
|
||||||
|
//BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp)-7;
|
||||||
|
//EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
DQdate:=SGetServerDate(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
if FCloth<>1 then
|
||||||
|
WriteCxGrid('指示单列表10',Tv1,'生产指示单管理')
|
||||||
|
else
|
||||||
|
WriteCxGrid('指示单列表选择',Tv1,'生产指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.InitGrid();
|
||||||
|
var
|
||||||
|
strwhere:string;
|
||||||
|
begin
|
||||||
|
strwhere:='';
|
||||||
|
|
||||||
|
strwhere:=strwhere+' and isnull(B.status,''0'')='''+inttostr(1)+'''';
|
||||||
|
|
||||||
|
strwhere:=strwhere+' and isnull(B.orderType,''0'')=''剪样单''';
|
||||||
|
strwhere:=strwhere+' and not exists(select mainID from BP_inout X where X.mainID=A.mainID) ';
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('exec P_View_Order :begdate,:enddate,:WSql') ;
|
||||||
|
parameters.ParamByName('WSql').Value:=strwhere;
|
||||||
|
Parameters.ParamByName('begdate').Value:=FormatDateTime('yyyy-MM-dd',BegDate.DateTime);
|
||||||
|
Parameters.ParamByName('enddate').Value:=FormatDateTime('yyyy-MM-dd',enddate.DateTime+1);
|
||||||
|
ExecSQL;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmProductOrderNewList.InitGridFH();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec Order_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||||
|
+' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.InitForm();
|
||||||
|
begin
|
||||||
|
|
||||||
|
if FCloth<>1 then
|
||||||
|
ReadCxGrid('指示单列表10',Tv1,'生产指示单管理')
|
||||||
|
else
|
||||||
|
ReadCxGrid('指示单列表选择',Tv1,'生产指示单管理');
|
||||||
|
|
||||||
|
if FCloth=1 then
|
||||||
|
begin
|
||||||
|
v1Column4.Visible:=True;
|
||||||
|
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
v1Column4.Visible:=False;
|
||||||
|
end;
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
//InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.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 TfrmProductOrderNewList.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FFInt=1 then
|
||||||
|
begin
|
||||||
|
InitGridFH();
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.OrderNoChange(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 TfrmProductOrderNewList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.TBTPClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
FQty,FQty1,FMxQty,FPQty,FMxQtyS,FPQtyS:String;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.CheckBox2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.Tv1StylesGetContentStyle(
|
||||||
|
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
|
||||||
|
AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
|
||||||
|
var
|
||||||
|
id,id10:Integer;
|
||||||
|
begin
|
||||||
|
{try
|
||||||
|
if Tv1.GroupedItemCount=0 then
|
||||||
|
begin
|
||||||
|
Id:=Tv1.GetColumnByFieldName('DeliveryDate').Index-tv1.GroupedItemCount;
|
||||||
|
Id10:=Tv1.GetColumnByFieldName('SubStatus').Index-tv1.GroupedItemCount;
|
||||||
|
if Trim(VarToStr(ARecord.Values[id]))='' then Exit;
|
||||||
|
if Id<0 then Exit;
|
||||||
|
if ARecord.Values[id10]='完成' then exit;
|
||||||
|
if (ARecord.Values[id]-DQdate)>=4 then Exit;
|
||||||
|
if ((ARecord.Values[id]-DQdate)>=0) and ((ARecord.Values[id]-DQdate)<4) then
|
||||||
|
AStyle:=DataLink_.QHuangSe
|
||||||
|
else
|
||||||
|
if ARecord.Values[id]-DQdate<0 then
|
||||||
|
begin
|
||||||
|
AStyle:=DataLink_OrderManage.FenHongS;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.v1DeliveryDateCustomDrawCell(
|
||||||
|
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||||
|
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
{ Id:=TV1.GetColumnByFieldName('DeliveryDate').Index;//;-TV1.GroupedItemCount;
|
||||||
|
Id10:=TV1.GetColumnByFieldName('SubStatus').Index;
|
||||||
|
if Id<0 then Exit;
|
||||||
|
if AViewInfo.GridRecord.Values[Id10]='完成' then Exit;
|
||||||
|
if AViewInfo.GridRecord.Values[Id]-SGetServerDate(ADOQueryTemp)>=4 then Exit;
|
||||||
|
if ((AViewInfo.GridRecord.Values[id]-SGetServerDate10(ADOQueryTemp))>=0) and ((AViewInfo.GridRecord.Values[id]-SGetServerDate(ADOQueryTemp))<4) then
|
||||||
|
ACanvas.Brush.Color:=clYellow
|
||||||
|
else
|
||||||
|
if (AViewInfo.GridRecord.Values[id])-(SGetServerDate10(ADOQueryTemp)<0) then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clRed;
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clRed;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Purple' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clPurple;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Olive' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clOlive;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Teal' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clTeal;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Background' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clBackground;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.N1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Porderno:string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单10.rmf' ;
|
||||||
|
SDofilter(ADOQueryMain,' OrderNoM='''+Trim(Order_Main.fieldbyname('OrderNoM').AsString)+'''');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Porderno:=Trim(Order_Main.fieldbyname('OrderNoM').AsString);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单10.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
SDofilter(ADOQueryMain,'');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Order_Main.Locate('ordernoM',Porderno,[]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.N2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Porderno:string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单.rmf' ;
|
||||||
|
SDofilter(ADOQueryMain,' OrderNoM='''+Trim(Order_Main.fieldbyname('OrderNoM').AsString)+'''');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Porderno:=Trim(Order_Main.fieldbyname('OrderNoM').AsString);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
SDofilter(ADOQueryMain,'');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Order_Main.Locate('ordernoM',Porderno,[]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.OrderNoKeyPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
var
|
||||||
|
fsj:string;
|
||||||
|
begin
|
||||||
|
{ if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(OrderNoM.Text))<4 then Exit;
|
||||||
|
fsj:='%'+Trim(OrderNoM.Text)+'%';
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('exec P_View_Order :begdate,:enddate,:WSql') ;
|
||||||
|
if Trim(DParameters1)<>'高权限' then
|
||||||
|
begin
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and A.Filler='''+Trim(DName)+'''';
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and A.OrderNo like '''+fsj+'''';
|
||||||
|
end;
|
||||||
|
Parameters.ParamByName('begdate').Value:='1900-01-01';
|
||||||
|
Parameters.ParamByName('enddate').Value:='2050-01-01';
|
||||||
|
ExecSQL;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewList.Tv1CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
ToolButton3.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
624
坯布仓库/U_ProductOrderNewListSEl.dfm
Normal file
624
坯布仓库/U_ProductOrderNewListSEl.dfm
Normal file
|
|
@ -0,0 +1,624 @@
|
||||||
|
object frmProductOrderNewListSEl: TfrmProductOrderNewListSEl
|
||||||
|
Left = 89
|
||||||
|
Top = 77
|
||||||
|
Width = 1153
|
||||||
|
Height = 602
|
||||||
|
Caption = #29983#20135#25351#31034#21333
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1137
|
||||||
|
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 = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
Caption = #36873#25321
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 185
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1137
|
||||||
|
Height = 65
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #21046#21333#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 239
|
||||||
|
Top = 15
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 239
|
||||||
|
Top = 39
|
||||||
|
Width = 40
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458' '#25143
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 314
|
||||||
|
Top = 99
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #26579#21378
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 453
|
||||||
|
Top = 16
|
||||||
|
Width = 53
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994' '#21153' '#21592
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 588
|
||||||
|
Top = 103
|
||||||
|
Width = 54
|
||||||
|
Height = 12
|
||||||
|
Caption = #25104' '#20998
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 693
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
Left = 453
|
||||||
|
Top = 39
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 179
|
||||||
|
Top = 99
|
||||||
|
Width = 39
|
||||||
|
Height = 12
|
||||||
|
Caption = #21512#21516#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 729
|
||||||
|
Top = 103
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label11: TLabel
|
||||||
|
Left = 437
|
||||||
|
Top = 99
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20844#21496#32534#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label12: TLabel
|
||||||
|
Left = 861
|
||||||
|
Top = 115
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20811#37325
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 861
|
||||||
|
Top = 91
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #38376#24133
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 11
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 35
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object OrderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 280
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
OnKeyPress = OrderNoKeyPress
|
||||||
|
end
|
||||||
|
object CustomerNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 280
|
||||||
|
Top = 35
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object JGFactoryName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 343
|
||||||
|
Top = 95
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object OrdPerson1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 507
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTCF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 641
|
||||||
|
Top = 99
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object PRTColor: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 722
|
||||||
|
Top = 11
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object PRTCodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 507
|
||||||
|
Top = 35
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object ConNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 220
|
||||||
|
Top = 95
|
||||||
|
Width = 77
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 9
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTSpec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 758
|
||||||
|
Top = 99
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 10
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object OrdDefStr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 491
|
||||||
|
Top = 95
|
||||||
|
Width = 76
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 11
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTKZ: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 890
|
||||||
|
Top = 111
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 12
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
object MPRTMF: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 890
|
||||||
|
Top = 87
|
||||||
|
Width = 56
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 13
|
||||||
|
OnChange = OrderNoChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1137
|
||||||
|
Height = 424
|
||||||
|
Align = alTop
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.OnGetContentStyle = Tv1StylesGetContentStyle
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'SSel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.NullStyle = nssUnchecked
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 49
|
||||||
|
end
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #21512#21516#21495
|
||||||
|
DataBinding.FieldName = 'conNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v1CustomerNoName: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'CustomerNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 120
|
||||||
|
end
|
||||||
|
object v1OrdPerson1: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'OrdPerson1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v1OrdDate: TcxGridDBColumn
|
||||||
|
Caption = #21046#21333#26085#26399
|
||||||
|
DataBinding.FieldName = 'OrdDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DlyDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.ShowTime = False
|
||||||
|
OnCustomDrawCell = v1DeliveryDateCustomDrawCell
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1MPRTCodeName: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'PRTCodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'SOrddefstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'PRTColor'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #33457#22411#33457#21495
|
||||||
|
DataBinding.FieldName = 'PRTHX'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PRTRollNum'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
VisibleForCustomization = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'PRTOrderQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'OrderUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column8: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880#21450#35201#27714
|
||||||
|
DataBinding.FieldName = 'SOrdDefNote1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = BPCK_DataLink.Default
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 544
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 552
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 312
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 440
|
||||||
|
Top = 184
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 464
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 336
|
||||||
|
Top = 200
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_Print
|
||||||
|
Left = 392
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 576
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 256
|
||||||
|
Top = 176
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #26377#20379#24212#21830
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 360
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object CDS_Print: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 344
|
||||||
|
Top = 288
|
||||||
|
end
|
||||||
|
end
|
||||||
452
坯布仓库/U_ProductOrderNewListSEl.pas
Normal file
452
坯布仓库/U_ProductOrderNewListSEl.pas
Normal file
|
|
@ -0,0 +1,452 @@
|
||||||
|
unit U_ProductOrderNewListSEl;
|
||||||
|
|
||||||
|
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, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmProductOrderNewListSEl = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
OrderNo: TEdit;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
Label4: TLabel;
|
||||||
|
CustomerNoName: TEdit;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N2: TMenuItem;
|
||||||
|
Label2: TLabel;
|
||||||
|
JGFactoryName: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
OrdPerson1: TEdit;
|
||||||
|
Label6: TLabel;
|
||||||
|
MPRTCF: TEdit;
|
||||||
|
Label7: TLabel;
|
||||||
|
PRTColor: TEdit;
|
||||||
|
Label8: TLabel;
|
||||||
|
PRTCodeName: TEdit;
|
||||||
|
Label9: TLabel;
|
||||||
|
ConNo: TEdit;
|
||||||
|
Label10: TLabel;
|
||||||
|
MPRTSpec: TEdit;
|
||||||
|
Label11: TLabel;
|
||||||
|
OrdDefStr1: TEdit;
|
||||||
|
Label12: TLabel;
|
||||||
|
MPRTKZ: TEdit;
|
||||||
|
Label13: TLabel;
|
||||||
|
MPRTMF: TEdit;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
CDS_Print: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1OrdPerson1: TcxGridDBColumn;
|
||||||
|
v1OrdDate: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1CustomerNoName: TcxGridDBColumn;
|
||||||
|
v1MPRTCodeName: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1Column8: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
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 OrderNoChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBTPClick(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure CheckBox2Click(Sender: TObject);
|
||||||
|
procedure Tv1StylesGetContentStyle(Sender: TcxCustomGridTableView;
|
||||||
|
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
|
||||||
|
out AStyle: TcxStyle);
|
||||||
|
procedure v1DeliveryDateCustomDrawCell(Sender: TcxCustomGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure OrderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
DQdate:TDateTime;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
procedure InitGridFH();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FFInt,FCloth:Integer;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmProductOrderNewListSEl: TfrmProductOrderNewListSEl;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10;
|
||||||
|
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmProductOrderNewListSEl:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxgrid1.Align:=alClient;
|
||||||
|
//BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp)-7;
|
||||||
|
//EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
DQdate:=SGetServerDate(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
if FCloth<>1 then
|
||||||
|
WriteCxGrid('指示单列表10',Tv1,'生产指示单管理')
|
||||||
|
else
|
||||||
|
WriteCxGrid('指示单列表选择',Tv1,'生产指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.InitGrid();
|
||||||
|
var
|
||||||
|
strwhere:string;
|
||||||
|
begin
|
||||||
|
strwhere:='';
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select B.*,A.* ');
|
||||||
|
sql.Add('from JYorder_sub A');
|
||||||
|
sql.Add('inner join JYorder_main B on B.mainID=A.MainID');
|
||||||
|
sql.Add('where B.FillTime>='''+formatdateTime('yyyy-MM-dd',begdate.DateTime)+'''');
|
||||||
|
sql.Add('and B.FillTime<'''+formatdateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||||
|
// ShowMessage(sql.text);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure TfrmProductOrderNewListSEl.InitGridFH();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select A.*,B.* ');
|
||||||
|
sql.Add('from JYorder_sub A');
|
||||||
|
sql.Add('inner join JYorder_main B on B.mainID=A.MainID');
|
||||||
|
sql.Add('where B.FillTime>='''+formatdateTime('yyyy-MM-dd',begdate.DateTime)+'''');
|
||||||
|
sql.Add('and B.FillTime<'''+formatdateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.InitForm();
|
||||||
|
begin
|
||||||
|
if FCloth<>1 then
|
||||||
|
ReadCxGrid('指示单列表10',Tv1,'生产指示单管理')
|
||||||
|
else
|
||||||
|
ReadCxGrid('指示单列表选择',Tv1,'生产指示单管理');
|
||||||
|
|
||||||
|
if FCloth=1 then
|
||||||
|
begin
|
||||||
|
v1Column4.Visible:=True;
|
||||||
|
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
v1Column4.Visible:=False;
|
||||||
|
end;
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
//InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.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 TfrmProductOrderNewListSEl.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FFInt=1 then
|
||||||
|
begin
|
||||||
|
InitGridFH();
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.OrderNoChange(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 TfrmProductOrderNewListSEl.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.TBTPClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
FQty,FQty1,FMxQty,FPQty,FMxQtyS,FPQtyS:String;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.CheckBox2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.Tv1StylesGetContentStyle(
|
||||||
|
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
|
||||||
|
AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
|
||||||
|
var
|
||||||
|
id,id10:Integer;
|
||||||
|
begin
|
||||||
|
{try
|
||||||
|
if Tv1.GroupedItemCount=0 then
|
||||||
|
begin
|
||||||
|
Id:=Tv1.GetColumnByFieldName('DeliveryDate').Index-tv1.GroupedItemCount;
|
||||||
|
Id10:=Tv1.GetColumnByFieldName('SubStatus').Index-tv1.GroupedItemCount;
|
||||||
|
if Trim(VarToStr(ARecord.Values[id]))='' then Exit;
|
||||||
|
if Id<0 then Exit;
|
||||||
|
if ARecord.Values[id10]='完成' then exit;
|
||||||
|
if (ARecord.Values[id]-DQdate)>=4 then Exit;
|
||||||
|
if ((ARecord.Values[id]-DQdate)>=0) and ((ARecord.Values[id]-DQdate)<4) then
|
||||||
|
AStyle:=DataLink_.QHuangSe
|
||||||
|
else
|
||||||
|
if ARecord.Values[id]-DQdate<0 then
|
||||||
|
begin
|
||||||
|
AStyle:=DataLink_OrderManage.FenHongS;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.v1DeliveryDateCustomDrawCell(
|
||||||
|
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||||
|
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
{ Id:=TV1.GetColumnByFieldName('DeliveryDate').Index;//;-TV1.GroupedItemCount;
|
||||||
|
Id10:=TV1.GetColumnByFieldName('SubStatus').Index;
|
||||||
|
if Id<0 then Exit;
|
||||||
|
if AViewInfo.GridRecord.Values[Id10]='完成' then Exit;
|
||||||
|
if AViewInfo.GridRecord.Values[Id]-SGetServerDate(ADOQueryTemp)>=4 then Exit;
|
||||||
|
if ((AViewInfo.GridRecord.Values[id]-SGetServerDate10(ADOQueryTemp))>=0) and ((AViewInfo.GridRecord.Values[id]-SGetServerDate(ADOQueryTemp))<4) then
|
||||||
|
ACanvas.Brush.Color:=clYellow
|
||||||
|
else
|
||||||
|
if (AViewInfo.GridRecord.Values[id])-(SGetServerDate10(ADOQueryTemp)<0) then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clRed;
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clRed;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Purple' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clPurple;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Olive' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clOlive;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Teal' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clTeal;
|
||||||
|
end else
|
||||||
|
if AViewInfo.GridRecord.Values[Id]='Background' then
|
||||||
|
begin
|
||||||
|
ACanvas.Brush.Color:=clBackground;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.N1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Porderno:string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单10.rmf' ;
|
||||||
|
SDofilter(ADOQueryMain,' OrderNoM='''+Trim(Order_Main.fieldbyname('OrderNoM').AsString)+'''');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Porderno:=Trim(Order_Main.fieldbyname('OrderNoM').AsString);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单10.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
SDofilter(ADOQueryMain,'');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Order_Main.Locate('ordernoM',Porderno,[]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.N2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile:string;
|
||||||
|
Porderno:string;
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单.rmf' ;
|
||||||
|
SDofilter(ADOQueryMain,' OrderNoM='''+Trim(Order_Main.fieldbyname('OrderNoM').AsString)+'''');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Porderno:=Trim(Order_Main.fieldbyname('OrderNoM').AsString);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
SDofilter(ADOQueryMain,'');
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
Order_Main.Locate('ordernoM',Porderno,[]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.OrderNoKeyPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
var
|
||||||
|
fsj:string;
|
||||||
|
begin
|
||||||
|
{ if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(OrderNoM.Text))<4 then Exit;
|
||||||
|
fsj:='%'+Trim(OrderNoM.Text)+'%';
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('exec P_View_Order :begdate,:enddate,:WSql') ;
|
||||||
|
if Trim(DParameters1)<>'高权限' then
|
||||||
|
begin
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and A.Filler='''+Trim(DName)+'''';
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and A.OrderNo like '''+fsj+'''';
|
||||||
|
end;
|
||||||
|
Parameters.ParamByName('begdate').Value:='1900-01-01';
|
||||||
|
Parameters.ParamByName('enddate').Value:='2050-01-01';
|
||||||
|
ExecSQL;
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmProductOrderNewListSEl.Tv1CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
ToolButton3.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
351
坯布仓库/U_ZdyAttachCP.dfm
Normal file
351
坯布仓库/U_ZdyAttachCP.dfm
Normal file
|
|
@ -0,0 +1,351 @@
|
||||||
|
object frmZdyAttachCP: TfrmZdyAttachCP
|
||||||
|
Left = 108
|
||||||
|
Top = 101
|
||||||
|
Width = 1038
|
||||||
|
Height = 618
|
||||||
|
Caption = #20135#21697#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1022
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = BPCK_DataLink.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 311
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 374
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1022
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 191
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 369
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 241
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 71
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 398
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#25104#21697
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1022
|
||||||
|
Height = 510
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
OnCellDblClick = Tv2CellDblClick
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Header = BPCK_DataLink.handBlack
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 53
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2DEFNote1: TcxGridDBColumn
|
||||||
|
Caption = #21517#31216
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 116
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #33457#21495
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #33394#21495
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 888
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
202
坯布仓库/U_ZdyAttachCP.pas
Normal file
202
坯布仓库/U_ZdyAttachCP.pas
Normal file
|
|
@ -0,0 +1,202 @@
|
||||||
|
unit U_ZdyAttachCP;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachCP = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2DEFNote1: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachCP: TfrmZdyAttachCP;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''CP'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('产品资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachCP.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('产品资料',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'客户资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ try
|
||||||
|
frmZdyAttInputCP:=TfrmZdyAttInputCP.Create(Application);
|
||||||
|
with frmZdyAttInputCP do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputCP.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachCP.Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
331
坯布仓库/U_ZdyAttachGYS.dfm
Normal file
331
坯布仓库/U_ZdyAttachGYS.dfm
Normal file
|
|
@ -0,0 +1,331 @@
|
||||||
|
object frmZdyAttachGYS: TfrmZdyAttachGYS
|
||||||
|
Left = 192
|
||||||
|
Top = 103
|
||||||
|
Width = 1038
|
||||||
|
Height = 618
|
||||||
|
Caption = #20379#24212#21830#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1022
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = BPCK_DataLink.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 311
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 374
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1022
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 203
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 60
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 395
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 267
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 83
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 424
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#22383#24067
|
||||||
|
#21152#24037#21378)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1022
|
||||||
|
Height = 510
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
OnDblClick = Tv2DblClick
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Header = BPCK_DataLink.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #20379#24212#21830#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 888
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
213
坯布仓库/U_ZdyAttachGYS.pas
Normal file
213
坯布仓库/U_ZdyAttachGYS.pas
Normal file
|
|
@ -0,0 +1,213 @@
|
||||||
|
unit U_ZdyAttachGYS;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachGYS = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TComboBox;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure Tv2DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachGYS: TfrmZdyAttachGYS;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''GYS'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachGYS:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('供应商资料',Tv2);
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachGYS.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('供应商资料',Tv2);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'客户资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ try
|
||||||
|
frmZdyAttInputGYS:=TfrmZdyAttInputGYS.Create(Application);
|
||||||
|
with frmZdyAttInputGYS do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInputGYS.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachGYS.Tv2DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
332
坯布仓库/U_ZdyAttachment.dfm
Normal file
332
坯布仓库/U_ZdyAttachment.dfm
Normal file
|
|
@ -0,0 +1,332 @@
|
||||||
|
object frmZdyAttachment: TfrmZdyAttachment
|
||||||
|
Left = 130
|
||||||
|
Top = 99
|
||||||
|
Width = 1091
|
||||||
|
Height = 577
|
||||||
|
Caption = #23458#25143#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1075
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = BPCK_DataLink.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 311
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 374
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1075
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 190
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 350
|
||||||
|
Top = 13
|
||||||
|
Width = 36
|
||||||
|
Height = 12
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
end
|
||||||
|
object ZdyName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 238
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 70
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
object DEFstr5: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 388
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ZdyNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 1075
|
||||||
|
Height = 469
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
OnCellDblClick = Tv2CellDblClick
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Header = BPCK_DataLink.handBlack
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 127
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 56
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #30005#35805
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #25163#26426
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20256#30495
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21457#36135#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 165
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 888
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
202
坯布仓库/U_ZdyAttachment.pas
Normal file
202
坯布仓库/U_ZdyAttachment.pas
Normal file
|
|
@ -0,0 +1,202 @@
|
||||||
|
unit U_ZdyAttachment;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyAttachment = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
ZdyName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr5: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ZdyNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
fkhType:string;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyAttachment: TfrmZdyAttachment;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where Type=''KHName'' ');
|
||||||
|
// sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyAttachment:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('客户资料',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmZdyAttachment.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户资料',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ZdyNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'客户资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{ try
|
||||||
|
frmZdyAttInput:=TfrmZdyAttInput.Create(Application);
|
||||||
|
with frmZdyAttInput do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttInput.Free;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyAttachment.Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
278
坯布仓库/U_ZdyYS_Sel.dfm
Normal file
278
坯布仓库/U_ZdyYS_Sel.dfm
Normal file
|
|
@ -0,0 +1,278 @@
|
||||||
|
object frmZdyYS_Sel: TfrmZdyYS_Sel
|
||||||
|
Left = 1087
|
||||||
|
Top = 274
|
||||||
|
Width = 813
|
||||||
|
Height = 662
|
||||||
|
Caption = #39068#33394
|
||||||
|
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 = 31
|
||||||
|
Width = 797
|
||||||
|
Height = 592
|
||||||
|
Align = alClient
|
||||||
|
Caption = 'Panel1'
|
||||||
|
TabOrder = 0
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 1
|
||||||
|
Top = 40
|
||||||
|
Width = 795
|
||||||
|
Height = 551
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnCellDblClick = Tv2CellDblClick
|
||||||
|
OnFocusedRecordChanged = Tv2FocusedRecordChanged
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsCustomize.ColumnSorting = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.IncSearch = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Selection = BPCK_DataLink.SHuangSe
|
||||||
|
Styles.Header = BPCK_DataLink.handBlack
|
||||||
|
object Tv2Column1: TcxGridDBColumn
|
||||||
|
OnGetDisplayText = Tv2Column1GetDisplayText
|
||||||
|
MinWidth = 30
|
||||||
|
Options.HorzSizing = False
|
||||||
|
Width = 30
|
||||||
|
IsCaptionAssigned = True
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394#20195#21495
|
||||||
|
DataBinding.FieldName = 'Code'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394#21517#31216
|
||||||
|
DataBinding.FieldName = 'CodeName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 147
|
||||||
|
end
|
||||||
|
object Tv2Column2: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'ssel'
|
||||||
|
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 795
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 231
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394#21517#31216
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 34
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394#20195#21495
|
||||||
|
end
|
||||||
|
object CodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 281
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = CodeNameChange
|
||||||
|
end
|
||||||
|
object Code: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 83
|
||||||
|
Top = 9
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = CodeChange
|
||||||
|
end
|
||||||
|
object Edit1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 457
|
||||||
|
Top = 13
|
||||||
|
Width = 100
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 797
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = BPCK_DataLink.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = BPCK_DataLink.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 1
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36873#25321
|
||||||
|
ImageIndex = 41
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 357
|
||||||
|
Top = 73
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 401
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 125
|
||||||
|
Top = 169
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 320
|
||||||
|
Top = 148
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 160
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 356
|
||||||
|
Top = 164
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 247
|
||||||
|
Top = 171
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 204
|
||||||
|
Top = 172
|
||||||
|
end
|
||||||
|
object DSsub: TDataSource
|
||||||
|
DataSet = CDSsub
|
||||||
|
Left = 512
|
||||||
|
Top = 272
|
||||||
|
end
|
||||||
|
object CDSsub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 540
|
||||||
|
Top = 268
|
||||||
|
end
|
||||||
|
object ADOQuerysub: TADOQuery
|
||||||
|
Connection = BPCK_DataLink.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 484
|
||||||
|
Top = 276
|
||||||
|
end
|
||||||
|
end
|
||||||
307
坯布仓库/U_ZdyYS_Sel.pas
Normal file
307
坯布仓库/U_ZdyYS_Sel.pas
Normal file
|
|
@ -0,0 +1,307 @@
|
||||||
|
unit U_ZdyYS_Sel;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||||
|
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmZdyYS_Sel = class(TForm)
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
DSsub: TDataSource;
|
||||||
|
CDSsub: TClientDataSet;
|
||||||
|
ADOQuerysub: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Tv2Column1: TcxGridDBColumn;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label1: TLabel;
|
||||||
|
CodeName: TEdit;
|
||||||
|
Code: TEdit;
|
||||||
|
Tv2Column2: TcxGridDBColumn;
|
||||||
|
Edit1: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure TV1Column1GetDisplayText(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AText: string);
|
||||||
|
procedure Tv2FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure v2Column6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure Tv2Column1GetDisplayText(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AText: string);
|
||||||
|
procedure CodeChange(Sender: TObject);
|
||||||
|
procedure CodeNameChange(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitSub();
|
||||||
|
public
|
||||||
|
fDEFstr5: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmZdyYS_Sel: TfrmZdyYS_Sel;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ZDYHelp; //, U_ZdyAttInputGYS, U_ZdyAttachCP10_help
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select mainid=cast(mainid as varchar(30)),* from CP_CMYS where Type=''颜色'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.InitSub();
|
||||||
|
begin
|
||||||
|
with ADOQuerysub do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select subid=cast(subid as varchar(30)),* from CP_CMYS_Sub where Mainid=''' + cds_hz.fieldbyname('Mainid').AsString + ''' ');
|
||||||
|
// ShowMessage(sql.Text);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQuerysub, CDSsub);
|
||||||
|
SInitCDSData20(ADOQuerysub, CDSsub);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmZdyYS_Sel := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption, Tv2, '客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption, Tv2, '客户自定义');
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if cds_hz.IsEmpty then
|
||||||
|
exit;
|
||||||
|
self.ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.TV1Column1GetDisplayText(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AText: string);
|
||||||
|
begin
|
||||||
|
AText := IntToStr(ARecord.Index + 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.Tv2FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
initsub();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.ToolButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
Maxno, x, y: string;
|
||||||
|
begin
|
||||||
|
if cds_hz.IsEmpty then
|
||||||
|
exit;
|
||||||
|
try
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean then
|
||||||
|
begin
|
||||||
|
x := CDS_HZ.FieldByName('CodeName').AsString;
|
||||||
|
if y = '' then
|
||||||
|
begin
|
||||||
|
y := x;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
y := y + ',' + x;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
end;
|
||||||
|
Edit1.Text := Trim(y);
|
||||||
|
self.ModalResult := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.ToolButton3Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
FMainid: string;
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
SQL.Add('select * from CP_CMYS_Sub where 1<>1');
|
||||||
|
Open;
|
||||||
|
|
||||||
|
Append;
|
||||||
|
fieldbyname('Mainid').Value := CDS_HZ.fieldbyname('Mainid').AsString;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
InitSub();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Application.MessageBox('确定要删除颜色吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete CP_CMYS where Mainid=''' + Trim(CDS_HZ.fieldbyname('Mainid').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Application.MessageBox('确定要删除尺码吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete CP_CMYS_Sub where Subid=''' + Trim(CDSsub.fieldbyname('Subid').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
CDSsub.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.v2Column6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
mvalue := '';
|
||||||
|
end;
|
||||||
|
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('UPdate CP_CMYS ');
|
||||||
|
sql.Add(' Set ' + FFieldName + '=' + Trim(mvalue));
|
||||||
|
SQL.Add(' where Mainid=''' + Trim(CDS_HZ.fieldbyname('Mainid').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.Tv2Column1GetDisplayText(Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; var AText: string);
|
||||||
|
begin
|
||||||
|
AText := IntToStr(ARecord.Index + 1)
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.CodeChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel2, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmZdyYS_Sel.CodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel2, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
221
坯布仓库/U_testdll.dfm
Normal file
221
坯布仓库/U_testdll.dfm
Normal file
|
|
@ -0,0 +1,221 @@
|
||||||
|
object Form1: TForm1
|
||||||
|
Left = 97
|
||||||
|
Top = 122
|
||||||
|
Width = 791
|
||||||
|
Height = 554
|
||||||
|
Caption = 'Form1'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
FormStyle = fsMDIForm
|
||||||
|
Menu = MainMenu1
|
||||||
|
OldCreateOrder = False
|
||||||
|
WindowState = wsMaximized
|
||||||
|
OnClose = FormClose
|
||||||
|
OnResize = FormResize
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 783
|
||||||
|
Height = 25
|
||||||
|
ButtonWidth = 57
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Flat = True
|
||||||
|
Images = ImageList1
|
||||||
|
TabOrder = 0
|
||||||
|
object Edit1: TEdit
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 81
|
||||||
|
Height = 22
|
||||||
|
TabOrder = 0
|
||||||
|
Text = '1'
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 81
|
||||||
|
Top = 0
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 0
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 138
|
||||||
|
Top = 0
|
||||||
|
Width = 79
|
||||||
|
Height = 22
|
||||||
|
Caption = ' DllName'#65306
|
||||||
|
end
|
||||||
|
object DllName: TEdit
|
||||||
|
Left = 217
|
||||||
|
Top = 0
|
||||||
|
Width = 135
|
||||||
|
Height = 22
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object MainMenu1: TMainMenu
|
||||||
|
Left = 232
|
||||||
|
Top = 40
|
||||||
|
object test1: TMenuItem
|
||||||
|
Caption = 'test'
|
||||||
|
OnClick = test1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ImageList1: TImageList
|
||||||
|
Left = 320
|
||||||
|
Top = 56
|
||||||
|
Bitmap = {
|
||||||
|
494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||||
|
0000000000003600000028000000400000001000000001002000000000000010
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000EFEFEF000000
|
||||||
|
0000EFEFEF00EFEFEF000000000000000000EFEFEF0000000000000000000000
|
||||||
|
0000EFEFEF00EFEFEF0000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000EFEFEF0000000000EFEFEF00EFEFEF0000000000EFEFEF00000000008080
|
||||||
|
00008080000000000000C0C0C000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000000000000000000EFEFEF00EFEFEF000000
|
||||||
|
0000EFEFEF00EFEFEF000000000000000000C0C0C00000000000000000008080
|
||||||
|
00008080000080800000EFEFEF00EFEFEF000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000EFEFEF0000000000000000000000000000000000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000EFEFEF0000000000808080008080800080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000008080000000000000808080008080800080808000000000008080
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000EFEFEF00EFEF
|
||||||
|
EF0000000000FFFF000080800000000000008080800080808000000000000000
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000FFFF0000FFFF0000808000000000000080808000000000008080
|
||||||
|
0000000000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000808000008080
|
||||||
|
000080800000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000FFFF0000FFFF
|
||||||
|
0000FFFF0000FFFF000000000000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000808000000000000080808000808080008080800080808000FFFF
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000808080008080800080808000808080000000
|
||||||
|
0000808000008080000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||||
|
2800000040000000100000000100010000000000800000000000000000000000
|
||||||
|
000000000000000000000000FFFFFF00FFFF000000000000D343000000000000
|
||||||
|
F4810000000000009340000000000000F801000000000000F001000000000000
|
||||||
|
F001000000000000C001000000000000C001000000000000C001000000000000
|
||||||
|
C201000000000000C001000000000000F001000000000000F001000000000000
|
||||||
|
FC03000000000000FFFF00000000000000000000000000000000000000000000
|
||||||
|
000000000000}
|
||||||
|
end
|
||||||
|
object ADOConnection1: TADOConnection
|
||||||
|
ConnectionString =
|
||||||
|
'Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ' +
|
||||||
|
'ID=sa;Initial Catalog=rzdata;Data Source=6GMFFMYKYMJDZW7'
|
||||||
|
LoginPrompt = False
|
||||||
|
Provider = 'SQLOLEDB.1'
|
||||||
|
Left = 408
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
end
|
||||||
106
坯布仓库/U_testdll.pas
Normal file
106
坯布仓库/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('BPCK.dll');
|
||||||
|
if Th > 0 then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Tp := GetProcAddress(Th, 'GetDllForm');
|
||||||
|
if Tp <> nil then
|
||||||
|
begin
|
||||||
|
Tf := TMyFunc(Tp);
|
||||||
|
newh:=Tf(Application,0,strToint(edit1.text),0,0,
|
||||||
|
PChar('sa'),
|
||||||
|
PChar('dsa'),
|
||||||
|
PChar('bsa'),
|
||||||
|
PChar('tsa'),
|
||||||
|
PChar('d1sa'),
|
||||||
|
PChar('d2sa'),
|
||||||
|
'','','','','','','','',''
|
||||||
|
);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ShowMessage('打印执行错误');
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
// FreeLibrary();
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ShowMessage('找不到'+Trim(DllName.Text));
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
sendmessage(newh,1034,1,0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
2
坯布仓库/consvr.ini
Normal file
2
坯布仓库/consvr.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[SERVER]
|
||||||
|
SERVER=192.168.88.254
|
||||||
38
坯布仓库/testDll.cfg
Normal file
38
坯布仓库/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"d:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"d:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-w-UNSAFE_TYPE
|
||||||
|
-w-UNSAFE_CODE
|
||||||
|
-w-UNSAFE_CAST
|
||||||
136
坯布仓库/testDll.dof
Normal file
136
坯布仓库/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=E:\自学\李建博开发代码\项目代码10\ljb\坯布仓库\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
坯布仓库/testDll.dpr
Normal file
14
坯布仓库/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
坯布仓库/testDll.res
Normal file
BIN
坯布仓库/testDll.res
Normal file
Binary file not shown.
42
基础资料维护(BaseInfo.dll)/BaseInfo.cfg
Normal file
42
基础资料维护(BaseInfo.dll)/BaseInfo.cfg
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
-$A8
|
||||||
|
-$B-
|
||||||
|
-$C+
|
||||||
|
-$D+
|
||||||
|
-$E-
|
||||||
|
-$F-
|
||||||
|
-$G+
|
||||||
|
-$H+
|
||||||
|
-$I+
|
||||||
|
-$J-
|
||||||
|
-$K-
|
||||||
|
-$L+
|
||||||
|
-$M-
|
||||||
|
-$N+
|
||||||
|
-$O+
|
||||||
|
-$P+
|
||||||
|
-$Q-
|
||||||
|
-$R-
|
||||||
|
-$S-
|
||||||
|
-$T-
|
||||||
|
-$U-
|
||||||
|
-$V+
|
||||||
|
-$W-
|
||||||
|
-$X+
|
||||||
|
-$YD
|
||||||
|
-$Z1
|
||||||
|
-cg
|
||||||
|
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
-H+
|
||||||
|
-W+
|
||||||
|
-M
|
||||||
|
-$M16384,1048576
|
||||||
|
-K$00400000
|
||||||
|
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||||
|
-U"D:\말繫ERP"
|
||||||
|
-O"D:\말繫ERP"
|
||||||
|
-I"D:\말繫ERP"
|
||||||
|
-R"D:\말繫ERP"
|
||||||
|
-w-UNSAFE_TYPE
|
||||||
|
-w-UNSAFE_CODE
|
||||||
|
-w-UNSAFE_CAST
|
||||||
138
基础资料维护(BaseInfo.dll)/BaseInfo.dof
Normal file
138
基础资料维护(BaseInfo.dll)/BaseInfo.dof
Normal file
|
|
@ -0,0 +1,138 @@
|
||||||
|
[FileVersion]
|
||||||
|
Version=7.0
|
||||||
|
[Compiler]
|
||||||
|
A=8
|
||||||
|
B=0
|
||||||
|
C=1
|
||||||
|
D=1
|
||||||
|
E=0
|
||||||
|
F=0
|
||||||
|
G=1
|
||||||
|
H=1
|
||||||
|
I=1
|
||||||
|
J=0
|
||||||
|
K=0
|
||||||
|
L=1
|
||||||
|
M=0
|
||||||
|
N=1
|
||||||
|
O=1
|
||||||
|
P=1
|
||||||
|
Q=0
|
||||||
|
R=0
|
||||||
|
S=0
|
||||||
|
T=0
|
||||||
|
U=0
|
||||||
|
V=1
|
||||||
|
W=0
|
||||||
|
X=1
|
||||||
|
Y=1
|
||||||
|
Z=1
|
||||||
|
ShowHints=1
|
||||||
|
ShowWarnings=1
|
||||||
|
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
NamespacePrefix=
|
||||||
|
SymbolDeprecated=1
|
||||||
|
SymbolLibrary=1
|
||||||
|
SymbolPlatform=1
|
||||||
|
UnitLibrary=1
|
||||||
|
UnitPlatform=1
|
||||||
|
UnitDeprecated=1
|
||||||
|
HResultCompat=1
|
||||||
|
HidingMember=1
|
||||||
|
HiddenVirtual=1
|
||||||
|
Garbage=1
|
||||||
|
BoundsError=1
|
||||||
|
ZeroNilCompat=1
|
||||||
|
StringConstTruncated=1
|
||||||
|
ForLoopVarVarPar=1
|
||||||
|
TypedConstVarPar=1
|
||||||
|
AsgToTypedConst=1
|
||||||
|
CaseLabelRange=1
|
||||||
|
ForVariable=1
|
||||||
|
ConstructingAbstract=1
|
||||||
|
ComparisonFalse=1
|
||||||
|
ComparisonTrue=1
|
||||||
|
ComparingSignedUnsigned=1
|
||||||
|
CombiningSignedUnsigned=1
|
||||||
|
UnsupportedConstruct=1
|
||||||
|
FileOpen=1
|
||||||
|
FileOpenUnitSrc=1
|
||||||
|
BadGlobalSymbol=1
|
||||||
|
DuplicateConstructorDestructor=1
|
||||||
|
InvalidDirective=1
|
||||||
|
PackageNoLink=1
|
||||||
|
PackageThreadVar=1
|
||||||
|
ImplicitImport=1
|
||||||
|
HPPEMITIgnored=1
|
||||||
|
NoRetVal=1
|
||||||
|
UseBeforeDef=1
|
||||||
|
ForLoopVarUndef=1
|
||||||
|
UnitNameMismatch=1
|
||||||
|
NoCFGFileFound=1
|
||||||
|
MessageDirective=1
|
||||||
|
ImplicitVariants=1
|
||||||
|
UnicodeToLocale=1
|
||||||
|
LocaleToUnicode=1
|
||||||
|
ImagebaseMultiple=1
|
||||||
|
SuspiciousTypecast=1
|
||||||
|
PrivatePropAccessor=1
|
||||||
|
UnsafeType=0
|
||||||
|
UnsafeCode=0
|
||||||
|
UnsafeCast=0
|
||||||
|
[Linker]
|
||||||
|
MapFile=0
|
||||||
|
OutputObjs=0
|
||||||
|
ConsoleApp=1
|
||||||
|
DebugInfo=0
|
||||||
|
RemoteSymbols=0
|
||||||
|
MinStackSize=16384
|
||||||
|
MaxStackSize=1048576
|
||||||
|
ImageBase=4194304
|
||||||
|
ExeDescription=
|
||||||
|
[Directories]
|
||||||
|
OutputDir=
|
||||||
|
UnitOutputDir=
|
||||||
|
PackageDLLOutputDir=
|
||||||
|
PackageDCPOutputDir=
|
||||||
|
SearchPath=D:\말繫ERP
|
||||||
|
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
|
||||||
|
Conditionals=
|
||||||
|
DebugSourceDirs=
|
||||||
|
UsePackages=0
|
||||||
|
[Parameters]
|
||||||
|
RunParams=
|
||||||
|
HostApplication=D:\其속螺淃커덜쯤\淃커덜쯤\갔되\샘뇟栗죕郭빱(BaseInfo.dll)\testDll.exe
|
||||||
|
Launcher=
|
||||||
|
UseLauncher=0
|
||||||
|
DebugCWD=
|
||||||
|
[Language]
|
||||||
|
ActiveLang=
|
||||||
|
ProjectLang=
|
||||||
|
RootDir=
|
||||||
|
[Version Info]
|
||||||
|
IncludeVerInfo=0
|
||||||
|
AutoIncBuild=0
|
||||||
|
MajorVer=1
|
||||||
|
MinorVer=0
|
||||||
|
Release=0
|
||||||
|
Build=0
|
||||||
|
Debug=0
|
||||||
|
PreRelease=0
|
||||||
|
Special=0
|
||||||
|
Private=0
|
||||||
|
DLL=0
|
||||||
|
Locale=2052
|
||||||
|
CodePage=936
|
||||||
|
[Version Info Keys]
|
||||||
|
CompanyName=
|
||||||
|
FileDescription=
|
||||||
|
FileVersion=1.0.0.0
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=1.0.0.0
|
||||||
|
Comments=
|
||||||
|
[Excluded Packages]
|
||||||
|
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||||
64
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
64
基础资料维护(BaseInfo.dll)/BaseInfo.dpr
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
library BaseInfo;
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils,
|
||||||
|
classes,
|
||||||
|
forms,
|
||||||
|
WinTypes,
|
||||||
|
WinProcs,
|
||||||
|
U_DataLink in 'U_DataLink.pas' {DataLink_BaseInfo: TDataModule},
|
||||||
|
U_GetDllForm in 'U_GetDllForm.pas',
|
||||||
|
U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
|
||||||
|
U_ZDYHelp in '..\..\..\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
|
||||||
|
U_SelExportField in '..\..\..\ThreeFun\Form\U_SelExportField.pas' {frmSelExportField},
|
||||||
|
U_ColumnSet in '..\..\..\ThreeFun\Form\U_ColumnSet.pas' {frmColumnSet},
|
||||||
|
U_ColumnBandSet in '..\..\..\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
|
||||||
|
U_SelPrintFieldNew in '..\..\..\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||||
|
U_ZdyAttInputCP in 'U_ZdyAttInputCP.pas' {frmZdyAttInputCP},
|
||||||
|
U_ZdyAttachCP10_help in 'U_ZdyAttachCP10_help.pas' {frmZdyAttachCP10_help},
|
||||||
|
U_ZdyInput in 'U_ZdyInput.pas' {frmZdyInput},
|
||||||
|
U_HZViewList in 'U_HZViewList.pas' {frmHZViewList},
|
||||||
|
U_NengHaoInput in 'U_NengHaoInput.pas' {frmNengHaoInput},
|
||||||
|
U_CPKWList in 'U_CPKWList.pas' {frmCPKWList},
|
||||||
|
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||||
|
U_ZdyAttachmentBJ_Edit in 'U_ZdyAttachmentBJ_Edit.pas' {frmZdyAttachmentBJ_Edit},
|
||||||
|
getpic in 'getpic.pas' {FormGetPic},
|
||||||
|
U_ZDYHelpSel in '..\..\..\ThreeFun\Form\U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||||
|
U_ZdyYS_Sel in '..\³ÉÆ·²Ö¿â\U_ZdyYS_Sel.pas' {frmZdyYS_Sel},
|
||||||
|
U_FjList_RZ in 'U_FjList_RZ.pas' {frmFjList_RZ},
|
||||||
|
U_CompressionFun in '..\..\..\ThreeFun\Fun\U_CompressionFun.pas',
|
||||||
|
U_ZdyCMZ_Sel in '..\³ÉÆ·²Ö¿â\U_ZdyCMZ_Sel.pas' {frmZdyCMZ_Sel};
|
||||||
|
|
||||||
|
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
||||||
|
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
||||||
|
// U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField},
|
||||||
|
// U_SelPrintFieldNew in '..\..\SelfForm\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||||
|
//U_FormPas in '..\CommonPas\formPas\U_FormPas.pas',
|
||||||
|
//U_CxGridSet in '..\CommonPas\cxgridPas\U_CxGridSet.pas';
|
||||||
|
|
||||||
|
//U_RSFormPas in '..\CommonPas\RSCommon\U_RSFormPas.pas';
|
||||||
|
|
||||||
|
{$R *.res}
|
||||||
|
|
||||||
|
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;
|
||||||
|
begin
|
||||||
|
DLLProc := @DLLEnterPoint;
|
||||||
|
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DLLUnloadProc(Reason: Integer); register;
|
||||||
|
begin
|
||||||
|
// if (Reason = DLL_PROCESS_DETACH) or (Reason=DLL_THREAD_DETACH) then
|
||||||
|
// Application:=NewDllApp;
|
||||||
|
end;
|
||||||
|
exports
|
||||||
|
GetDllForm;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
NewDllApp:=Application;
|
||||||
|
DLLProc := @DLLUnloadProc;
|
||||||
|
except
|
||||||
|
|
||||||
|
end;
|
||||||
|
end.
|
||||||
|
|
||||||
BIN
基础资料维护(BaseInfo.dll)/BaseInfo.res
Normal file
BIN
基础资料维护(BaseInfo.dll)/BaseInfo.res
Normal file
Binary file not shown.
42
基础资料维护(BaseInfo.dll)/CPCK.cfg
Normal file
42
基础资料维护(BaseInfo.dll)/CPCK.cfg
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
-$A8
|
||||||
|
-$B-
|
||||||
|
-$C+
|
||||||
|
-$D+
|
||||||
|
-$E-
|
||||||
|
-$F-
|
||||||
|
-$G+
|
||||||
|
-$H+
|
||||||
|
-$I+
|
||||||
|
-$J-
|
||||||
|
-$K-
|
||||||
|
-$L+
|
||||||
|
-$M-
|
||||||
|
-$N+
|
||||||
|
-$O+
|
||||||
|
-$P+
|
||||||
|
-$Q-
|
||||||
|
-$R-
|
||||||
|
-$S-
|
||||||
|
-$T-
|
||||||
|
-$U-
|
||||||
|
-$V+
|
||||||
|
-$W-
|
||||||
|
-$X+
|
||||||
|
-$YD
|
||||||
|
-$Z1
|
||||||
|
-cg
|
||||||
|
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
-H+
|
||||||
|
-W+
|
||||||
|
-M
|
||||||
|
-$M16384,1048576
|
||||||
|
-K$00400000
|
||||||
|
-LE"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-U"D:\말繫ERP"
|
||||||
|
-O"D:\말繫ERP"
|
||||||
|
-I"D:\말繫ERP"
|
||||||
|
-R"D:\말繫ERP"
|
||||||
|
-w-UNSAFE_TYPE
|
||||||
|
-w-UNSAFE_CODE
|
||||||
|
-w-UNSAFE_CAST
|
||||||
138
基础资料维护(BaseInfo.dll)/CPCK.dof
Normal file
138
基础资料维护(BaseInfo.dll)/CPCK.dof
Normal file
|
|
@ -0,0 +1,138 @@
|
||||||
|
[FileVersion]
|
||||||
|
Version=7.0
|
||||||
|
[Compiler]
|
||||||
|
A=8
|
||||||
|
B=0
|
||||||
|
C=1
|
||||||
|
D=1
|
||||||
|
E=0
|
||||||
|
F=0
|
||||||
|
G=1
|
||||||
|
H=1
|
||||||
|
I=1
|
||||||
|
J=0
|
||||||
|
K=0
|
||||||
|
L=1
|
||||||
|
M=0
|
||||||
|
N=1
|
||||||
|
O=1
|
||||||
|
P=1
|
||||||
|
Q=0
|
||||||
|
R=0
|
||||||
|
S=0
|
||||||
|
T=0
|
||||||
|
U=0
|
||||||
|
V=1
|
||||||
|
W=0
|
||||||
|
X=1
|
||||||
|
Y=1
|
||||||
|
Z=1
|
||||||
|
ShowHints=1
|
||||||
|
ShowWarnings=1
|
||||||
|
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
NamespacePrefix=
|
||||||
|
SymbolDeprecated=1
|
||||||
|
SymbolLibrary=1
|
||||||
|
SymbolPlatform=1
|
||||||
|
UnitLibrary=1
|
||||||
|
UnitPlatform=1
|
||||||
|
UnitDeprecated=1
|
||||||
|
HResultCompat=1
|
||||||
|
HidingMember=1
|
||||||
|
HiddenVirtual=1
|
||||||
|
Garbage=1
|
||||||
|
BoundsError=1
|
||||||
|
ZeroNilCompat=1
|
||||||
|
StringConstTruncated=1
|
||||||
|
ForLoopVarVarPar=1
|
||||||
|
TypedConstVarPar=1
|
||||||
|
AsgToTypedConst=1
|
||||||
|
CaseLabelRange=1
|
||||||
|
ForVariable=1
|
||||||
|
ConstructingAbstract=1
|
||||||
|
ComparisonFalse=1
|
||||||
|
ComparisonTrue=1
|
||||||
|
ComparingSignedUnsigned=1
|
||||||
|
CombiningSignedUnsigned=1
|
||||||
|
UnsupportedConstruct=1
|
||||||
|
FileOpen=1
|
||||||
|
FileOpenUnitSrc=1
|
||||||
|
BadGlobalSymbol=1
|
||||||
|
DuplicateConstructorDestructor=1
|
||||||
|
InvalidDirective=1
|
||||||
|
PackageNoLink=1
|
||||||
|
PackageThreadVar=1
|
||||||
|
ImplicitImport=1
|
||||||
|
HPPEMITIgnored=1
|
||||||
|
NoRetVal=1
|
||||||
|
UseBeforeDef=1
|
||||||
|
ForLoopVarUndef=1
|
||||||
|
UnitNameMismatch=1
|
||||||
|
NoCFGFileFound=1
|
||||||
|
MessageDirective=1
|
||||||
|
ImplicitVariants=1
|
||||||
|
UnicodeToLocale=1
|
||||||
|
LocaleToUnicode=1
|
||||||
|
ImagebaseMultiple=1
|
||||||
|
SuspiciousTypecast=1
|
||||||
|
PrivatePropAccessor=1
|
||||||
|
UnsafeType=0
|
||||||
|
UnsafeCode=0
|
||||||
|
UnsafeCast=0
|
||||||
|
[Linker]
|
||||||
|
MapFile=0
|
||||||
|
OutputObjs=0
|
||||||
|
ConsoleApp=1
|
||||||
|
DebugInfo=0
|
||||||
|
RemoteSymbols=0
|
||||||
|
MinStackSize=16384
|
||||||
|
MaxStackSize=1048576
|
||||||
|
ImageBase=4194304
|
||||||
|
ExeDescription=
|
||||||
|
[Directories]
|
||||||
|
OutputDir=
|
||||||
|
UnitOutputDir=
|
||||||
|
PackageDLLOutputDir=
|
||||||
|
PackageDCPOutputDir=
|
||||||
|
SearchPath=D:\富通ERP
|
||||||
|
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
|
||||||
|
Conditionals=
|
||||||
|
DebugSourceDirs=
|
||||||
|
UsePackages=0
|
||||||
|
[Parameters]
|
||||||
|
RunParams=
|
||||||
|
HostApplication=F:\selfware_83398\selfware\马国钢开发代码\项目代码\self\Dll初始化\testDll.exe
|
||||||
|
Launcher=
|
||||||
|
UseLauncher=0
|
||||||
|
DebugCWD=
|
||||||
|
[Language]
|
||||||
|
ActiveLang=
|
||||||
|
ProjectLang=
|
||||||
|
RootDir=
|
||||||
|
[Version Info]
|
||||||
|
IncludeVerInfo=0
|
||||||
|
AutoIncBuild=0
|
||||||
|
MajorVer=1
|
||||||
|
MinorVer=0
|
||||||
|
Release=0
|
||||||
|
Build=0
|
||||||
|
Debug=0
|
||||||
|
PreRelease=0
|
||||||
|
Special=0
|
||||||
|
Private=0
|
||||||
|
DLL=0
|
||||||
|
Locale=2052
|
||||||
|
CodePage=936
|
||||||
|
[Version Info Keys]
|
||||||
|
CompanyName=
|
||||||
|
FileDescription=
|
||||||
|
FileVersion=1.0.0.0
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=1.0.0.0
|
||||||
|
Comments=
|
||||||
|
[Excluded Packages]
|
||||||
|
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||||
BIN
基础资料维护(BaseInfo.dll)/CPCK.res
Normal file
BIN
基础资料维护(BaseInfo.dll)/CPCK.res
Normal file
Binary file not shown.
2
基础资料维护(BaseInfo.dll)/FieldExportSet/产品资料列表.INI
Normal file
2
基础资料维护(BaseInfo.dll)/FieldExportSet/产品资料列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/产品名称/产品编号/类型/规格/成份/颜色/花号/色号/门幅/克重/备注/名称/工艺/计划缩率(%)
|
||||||
2
基础资料维护(BaseInfo.dll)/FieldExportSet/客户资料列表.INI
Normal file
2
基础资料维护(BaseInfo.dll)/FieldExportSet/客户资料列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[导出设置]
|
||||||
|
导出字段=Begin/产品名称/产品编号/类型/规格/成份/颜色/花号/色号/门幅/克重/备注/名称/工艺/计划缩率(%)
|
||||||
42
基础资料维护(BaseInfo.dll)/JCInfoSet.cfg
Normal file
42
基础资料维护(BaseInfo.dll)/JCInfoSet.cfg
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
-$A8
|
||||||
|
-$B-
|
||||||
|
-$C+
|
||||||
|
-$D+
|
||||||
|
-$E-
|
||||||
|
-$F-
|
||||||
|
-$G+
|
||||||
|
-$H+
|
||||||
|
-$I+
|
||||||
|
-$J-
|
||||||
|
-$K-
|
||||||
|
-$L+
|
||||||
|
-$M-
|
||||||
|
-$N+
|
||||||
|
-$O+
|
||||||
|
-$P+
|
||||||
|
-$Q-
|
||||||
|
-$R-
|
||||||
|
-$S-
|
||||||
|
-$T-
|
||||||
|
-$U-
|
||||||
|
-$V+
|
||||||
|
-$W-
|
||||||
|
-$X+
|
||||||
|
-$YD
|
||||||
|
-$Z1
|
||||||
|
-cg
|
||||||
|
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
-H+
|
||||||
|
-W+
|
||||||
|
-M
|
||||||
|
-$M16384,1048576
|
||||||
|
-K$00400000
|
||||||
|
-LE"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
|
-U"D:\말繫ERP"
|
||||||
|
-O"D:\말繫ERP"
|
||||||
|
-I"D:\말繫ERP"
|
||||||
|
-R"D:\말繫ERP"
|
||||||
|
-w-UNSAFE_TYPE
|
||||||
|
-w-UNSAFE_CODE
|
||||||
|
-w-UNSAFE_CAST
|
||||||
138
基础资料维护(BaseInfo.dll)/JCInfoSet.dof
Normal file
138
基础资料维护(BaseInfo.dll)/JCInfoSet.dof
Normal file
|
|
@ -0,0 +1,138 @@
|
||||||
|
[FileVersion]
|
||||||
|
Version=7.0
|
||||||
|
[Compiler]
|
||||||
|
A=8
|
||||||
|
B=0
|
||||||
|
C=1
|
||||||
|
D=1
|
||||||
|
E=0
|
||||||
|
F=0
|
||||||
|
G=1
|
||||||
|
H=1
|
||||||
|
I=1
|
||||||
|
J=0
|
||||||
|
K=0
|
||||||
|
L=1
|
||||||
|
M=0
|
||||||
|
N=1
|
||||||
|
O=1
|
||||||
|
P=1
|
||||||
|
Q=0
|
||||||
|
R=0
|
||||||
|
S=0
|
||||||
|
T=0
|
||||||
|
U=0
|
||||||
|
V=1
|
||||||
|
W=0
|
||||||
|
X=1
|
||||||
|
Y=1
|
||||||
|
Z=1
|
||||||
|
ShowHints=1
|
||||||
|
ShowWarnings=1
|
||||||
|
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||||
|
NamespacePrefix=
|
||||||
|
SymbolDeprecated=1
|
||||||
|
SymbolLibrary=1
|
||||||
|
SymbolPlatform=1
|
||||||
|
UnitLibrary=1
|
||||||
|
UnitPlatform=1
|
||||||
|
UnitDeprecated=1
|
||||||
|
HResultCompat=1
|
||||||
|
HidingMember=1
|
||||||
|
HiddenVirtual=1
|
||||||
|
Garbage=1
|
||||||
|
BoundsError=1
|
||||||
|
ZeroNilCompat=1
|
||||||
|
StringConstTruncated=1
|
||||||
|
ForLoopVarVarPar=1
|
||||||
|
TypedConstVarPar=1
|
||||||
|
AsgToTypedConst=1
|
||||||
|
CaseLabelRange=1
|
||||||
|
ForVariable=1
|
||||||
|
ConstructingAbstract=1
|
||||||
|
ComparisonFalse=1
|
||||||
|
ComparisonTrue=1
|
||||||
|
ComparingSignedUnsigned=1
|
||||||
|
CombiningSignedUnsigned=1
|
||||||
|
UnsupportedConstruct=1
|
||||||
|
FileOpen=1
|
||||||
|
FileOpenUnitSrc=1
|
||||||
|
BadGlobalSymbol=1
|
||||||
|
DuplicateConstructorDestructor=1
|
||||||
|
InvalidDirective=1
|
||||||
|
PackageNoLink=1
|
||||||
|
PackageThreadVar=1
|
||||||
|
ImplicitImport=1
|
||||||
|
HPPEMITIgnored=1
|
||||||
|
NoRetVal=1
|
||||||
|
UseBeforeDef=1
|
||||||
|
ForLoopVarUndef=1
|
||||||
|
UnitNameMismatch=1
|
||||||
|
NoCFGFileFound=1
|
||||||
|
MessageDirective=1
|
||||||
|
ImplicitVariants=1
|
||||||
|
UnicodeToLocale=1
|
||||||
|
LocaleToUnicode=1
|
||||||
|
ImagebaseMultiple=1
|
||||||
|
SuspiciousTypecast=1
|
||||||
|
PrivatePropAccessor=1
|
||||||
|
UnsafeType=0
|
||||||
|
UnsafeCode=0
|
||||||
|
UnsafeCast=0
|
||||||
|
[Linker]
|
||||||
|
MapFile=0
|
||||||
|
OutputObjs=0
|
||||||
|
ConsoleApp=1
|
||||||
|
DebugInfo=0
|
||||||
|
RemoteSymbols=0
|
||||||
|
MinStackSize=16384
|
||||||
|
MaxStackSize=1048576
|
||||||
|
ImageBase=4194304
|
||||||
|
ExeDescription=
|
||||||
|
[Directories]
|
||||||
|
OutputDir=
|
||||||
|
UnitOutputDir=
|
||||||
|
PackageDLLOutputDir=
|
||||||
|
PackageDCPOutputDir=
|
||||||
|
SearchPath=D:\富通ERP
|
||||||
|
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
|
||||||
|
Conditionals=
|
||||||
|
DebugSourceDirs=
|
||||||
|
UsePackages=0
|
||||||
|
[Parameters]
|
||||||
|
RunParams=
|
||||||
|
HostApplication=F:\selfware_83398\selfware\马国钢开发代码\项目代码\self\Dll初始化\testDll.exe
|
||||||
|
Launcher=
|
||||||
|
UseLauncher=0
|
||||||
|
DebugCWD=
|
||||||
|
[Language]
|
||||||
|
ActiveLang=
|
||||||
|
ProjectLang=
|
||||||
|
RootDir=
|
||||||
|
[Version Info]
|
||||||
|
IncludeVerInfo=0
|
||||||
|
AutoIncBuild=0
|
||||||
|
MajorVer=1
|
||||||
|
MinorVer=0
|
||||||
|
Release=0
|
||||||
|
Build=0
|
||||||
|
Debug=0
|
||||||
|
PreRelease=0
|
||||||
|
Special=0
|
||||||
|
Private=0
|
||||||
|
DLL=0
|
||||||
|
Locale=2052
|
||||||
|
CodePage=936
|
||||||
|
[Version Info Keys]
|
||||||
|
CompanyName=
|
||||||
|
FileDescription=
|
||||||
|
FileVersion=1.0.0.0
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=1.0.0.0
|
||||||
|
Comments=
|
||||||
|
[Excluded Packages]
|
||||||
|
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||||
BIN
基础资料维护(BaseInfo.dll)/JCInfoSet.res
Normal file
BIN
基础资料维护(BaseInfo.dll)/JCInfoSet.res
Normal file
Binary file not shown.
20
基础资料维护(BaseInfo.dll)/ProjectGroup1.bpg
Normal file
20
基础资料维护(BaseInfo.dll)/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
VERSION = BWS.01
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
!ifndef ROOT
|
||||||
|
ROOT = $(MAKEDIR)\..
|
||||||
|
!endif
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||||
|
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||||
|
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
PROJECTS = testDll.exe
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
default: $(PROJECTS)
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
testDll.exe: testDll.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
|
||||||
23
基础资料维护(BaseInfo.dll)/ProjectGroup1.~bpg
Normal file
23
基础资料维护(BaseInfo.dll)/ProjectGroup1.~bpg
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
VERSION = BWS.01
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
!ifndef ROOT
|
||||||
|
ROOT = $(MAKEDIR)\..
|
||||||
|
!endif
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||||
|
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||||
|
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
PROJECTS = testDll.exe ProductPrice.dll
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
default: $(PROJECTS)
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
testDll.exe: testDll.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
ProductPrice.dll: ProductPrice.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
|
|
||||||
6
基础资料维护(BaseInfo.dll)/SYSTEMSET.ini
Normal file
6
基础资料维护(BaseInfo.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[SERVER]
|
||||||
|
服务器地址=139.224.12.182
|
||||||
|
服务器地址类型=15
|
||||||
|
是否自动更新=1
|
||||||
|
软件名称=艾登服饰管理软件
|
||||||
|
|
||||||
201
基础资料维护(BaseInfo.dll)/U_CPKWEdit.dfm
Normal file
201
基础资料维护(BaseInfo.dll)/U_CPKWEdit.dfm
Normal file
|
|
@ -0,0 +1,201 @@
|
||||||
|
object frmCPKWEdit: TfrmCPKWEdit
|
||||||
|
Left = 215
|
||||||
|
Top = 191
|
||||||
|
Width = 920
|
||||||
|
Height = 370
|
||||||
|
Caption = #20179#20301#36755#20837
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 904
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 904
|
||||||
|
Height = 300
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 130
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 89
|
||||||
|
end
|
||||||
|
object v2DEFStr6: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v2DEFStr6PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v2DEFStr7: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550)
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 135
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
302
基础资料维护(BaseInfo.dll)/U_CPKWEdit.pas
Normal file
302
基础资料维护(BaseInfo.dll)/U_CPKWEdit.pas
Normal file
|
|
@ -0,0 +1,302 @@
|
||||||
|
unit U_CPKWEdit;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit,strutils, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPKWEdit = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2DEFStr6: TcxGridDBColumn;
|
||||||
|
v2DEFStr7: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v2DEFStr6PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWEdit: TfrmCPKWEdit;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+''' ');
|
||||||
|
sql.Add(' and type=''CPKW'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWEdit:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmCPKWEdit.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmCPKWEdit.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID,fzdyCode:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'KW','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment X where ATID='''+Trim(FCYID)+''' and defstr3=''固定架'' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('UPDATE CK_BanCP_KC set kckw='''' ');
|
||||||
|
sql.Add('where kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('UPDATE CK_BanCP_CR set kckw='''' ');
|
||||||
|
sql.Add('where kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
FieldByName('zdyCode').Value:=Trim(fzdyCode);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyCode').AsString);
|
||||||
|
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'',0);
|
||||||
|
FieldByName('Type').Value:='CPKW';
|
||||||
|
FieldByName('mrate').Value:=CDS_HZ.fieldbyname('mrate').AsFloat;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment X where ATID='''+Trim(FCYID)+''' and defstr3=''固定架'' ');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if not ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('UPDATE CK_BanCP_KC set kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('where C_CodeName='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr1').AsString)));
|
||||||
|
sql.Add('and C_color='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr2').AsString)));
|
||||||
|
sql.Add('UPDATE CK_BanCP_CR set kckw='+quotedstr(trim(ADOQueryTemp.fieldbyname('zdyCode').AsString)));
|
||||||
|
sql.Add('where C_CodeName='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr1').AsString)));
|
||||||
|
sql.Add('and C_color='+quotedstr(trim(ADOQueryTemp.fieldbyname('defstr2').AsString)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.SetFocus;
|
||||||
|
if Trim(CDS_HZ.FieldByName('ZdyCode').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('仓位编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.v2Column8PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr1').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWEdit.v2DEFStr6PropertiesEditValueChanged(
|
||||||
|
Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue:string;
|
||||||
|
begin
|
||||||
|
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||||
|
|
||||||
|
IF trim(mvalue)='' then exit;
|
||||||
|
|
||||||
|
IF rightBstr(trim(mvalue),1)<>'#'THEN
|
||||||
|
BEGIn
|
||||||
|
mvalue:=trim(mvalue)+'#';
|
||||||
|
END;
|
||||||
|
|
||||||
|
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr2').Value:=Trim(mvalue);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
self.tv2.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
486
基础资料维护(BaseInfo.dll)/U_CPKWList.dfm
Normal file
486
基础资料维护(BaseInfo.dll)/U_CPKWList.dfm
Normal file
|
|
@ -0,0 +1,486 @@
|
||||||
|
object frmCPKWList: TfrmCPKWList
|
||||||
|
Left = 337
|
||||||
|
Top = 337
|
||||||
|
Width = 1360
|
||||||
|
Height = 424
|
||||||
|
Caption = #20379#24212#21830#36164#26009#31649#29702
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1344
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360#26631#31614
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 402
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 465
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1344
|
||||||
|
Height = 39
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 203
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #21697#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 13
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 559
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #31867#22411
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 378
|
||||||
|
Top = 13
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #39068#33394
|
||||||
|
end
|
||||||
|
object defstr1: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 235
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object ZdyCode: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 83
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
object DEFstr3: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 588
|
||||||
|
Top = 8
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = defstr1Change
|
||||||
|
Items.Strings = (
|
||||||
|
''
|
||||||
|
#22266#23450#26550
|
||||||
|
#22791#29992#26550
|
||||||
|
#20020#26102#22791#29992#26550)
|
||||||
|
end
|
||||||
|
object defstr2: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 408
|
||||||
|
Top = 9
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = defstr1Change
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 70
|
||||||
|
Width = 796
|
||||||
|
Height = 315
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = PopupMenu1
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
OnFocusedRecordChanged = Tv2FocusedRecordChanged
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object Tv2Column1: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'ssel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20179#20301#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 97
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'DEFStr2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFStr3'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 85
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #35774#23450#21305#25968
|
||||||
|
DataBinding.FieldName = 'mrate'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 114
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #24211#23384#21305#25968
|
||||||
|
DataBinding.FieldName = 'CPNUm'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 76
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 153
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 796
|
||||||
|
Top = 70
|
||||||
|
Width = 548
|
||||||
|
Height = 315
|
||||||
|
Align = alRight
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DataSource2
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object Tv1Column5: TcxGridDBColumn
|
||||||
|
Caption = #21697#21517
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column6: TcxGridDBColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'P_Color'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21367#21495
|
||||||
|
DataBinding.FieldName = 'MXMJXH'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #37325#37327
|
||||||
|
DataBinding.FieldName = 'KCQTY'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #38271#24230
|
||||||
|
DataBinding.FieldName = 'KCqty2'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #38271#24230#21333#20301
|
||||||
|
DataBinding.FieldName = 'MXUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 584
|
||||||
|
Top = 137
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
ShowPrintDialog = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 683
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 679
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 763
|
||||||
|
Top = 212
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 490
|
||||||
|
Top = 155
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 767
|
||||||
|
Top = 172
|
||||||
|
end
|
||||||
|
object ADOQueryPrint: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 376
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object RMGridReport1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBDataSet1
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 607
|
||||||
|
Top = 216
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBDataSet1: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = ADOQueryPrint
|
||||||
|
Left = 727
|
||||||
|
Top = 180
|
||||||
|
end
|
||||||
|
object PopupMenu1: TPopupMenu
|
||||||
|
Left = 588
|
||||||
|
Top = 296
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = #20840#36873
|
||||||
|
OnClick = N1Click
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = #20840#24323
|
||||||
|
OnClick = N2Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = CDS_Sub
|
||||||
|
Left = 1124
|
||||||
|
Top = 165
|
||||||
|
end
|
||||||
|
object CDS_Sub: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1068
|
||||||
|
Top = 161
|
||||||
|
end
|
||||||
|
object ADOQuerySub: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1024
|
||||||
|
Top = 156
|
||||||
|
end
|
||||||
|
end
|
||||||
346
基础资料维护(BaseInfo.dll)/U_CPKWList.pas
Normal file
346
基础资料维护(BaseInfo.dll)/U_CPKWList.pas
Normal file
|
|
@ -0,0 +1,346 @@
|
||||||
|
unit U_CPKWList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||||
|
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, Menus;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmCPKWList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
defstr1: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZdyCode: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
DEFstr3: TComboBox;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
defstr2: TEdit;
|
||||||
|
Label4: TLabel;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
ADOQueryPrint: TADOQuery;
|
||||||
|
RMGridReport1: TRMGridReport;
|
||||||
|
RMDBDataSet1: TRMDBDataSet;
|
||||||
|
Tv2Column1: TcxGridDBColumn;
|
||||||
|
PopupMenu1: TPopupMenu;
|
||||||
|
N1: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
CDS_Sub: TClientDataSet;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
|
ADOQuerySub: TADOQuery;
|
||||||
|
Tv1Column5: TcxGridDBColumn;
|
||||||
|
Tv1Column6: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure defstr1Change(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure N1Click(Sender: TObject);
|
||||||
|
procedure N2Click(Sender: TObject);
|
||||||
|
procedure Tv2FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
public
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmCPKWList: TfrmCPKWList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun, U_ZDYHelp, U_CPKWEdit;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered := False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select A.* ');
|
||||||
|
// sql.Add(' ,cpNum=(select count(MJID) from CK_BanCP_KC X where X.KCKW=A.zdyCode and X.kcQty>0)');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A ');
|
||||||
|
sql.Add(' where Type=''CPKW'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmCPKWList := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(self.Caption, Tv2, '客户自定义');
|
||||||
|
WriteCxGrid(self.Caption, Tv1, '库存明细');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('ATID').AsString) <> '' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete KH_Zdy_Attachment where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
sql.Add('delete KH_Zdy where ZdyNo=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid2.Align := alclient;
|
||||||
|
ReadCxGrid(self.Caption, Tv2, '客户自定义');
|
||||||
|
ReadCxGrid(self.Caption, Tv1, '库存明细');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.defstr1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
TcxGridToExcel(self.Caption, cxgrid2);
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'供应商资料列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit := TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID := Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmCPKWEdit := TfrmCPKWEdit.Create(Application);
|
||||||
|
with frmCPKWEdit do
|
||||||
|
begin
|
||||||
|
FCYID := '';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
TBRafresh.Click;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmCPKWEdit.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile: string;
|
||||||
|
Txt, fImagePath: string;
|
||||||
|
Moudle: THandle;
|
||||||
|
Makebar: TMakebar;
|
||||||
|
Mixtext: TMixtext;
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
if CDS_HZ.Locate('SSel', True, []) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
CDS_HZ.DisableControls;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if CDS_HZ.FieldByName('SSel').AsBoolean then
|
||||||
|
begin
|
||||||
|
with ADOQueryPrint do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select A.* ');
|
||||||
|
sql.Add(' from KH_Zdy_Attachment A');
|
||||||
|
SQL.Add(' where ATID=''' + Trim(CDS_HZ.fieldbyname('ATID').AsString) + '''');
|
||||||
|
SQL.Add(' and Type=''CPKW'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
Txt := Trim(ADOQueryPrint.fieldbyname('ATID').AsString);
|
||||||
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
|
if FileExists(fImagePath) then
|
||||||
|
DeleteFile(fImagePath);
|
||||||
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
|
except
|
||||||
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\成品库位标签.rmf';
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
RM1.PrintReport;
|
||||||
|
sleep(200);
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
Application.MessageBox(PChar('没有找' + trim(fPrintFile)), '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.EnableControls;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.N1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_HZ, true);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.N2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SelOKNo(CDS_HZ, false);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmCPKWList.Tv2FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
with ADOQuerySub do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CK_SXPB_CRMX A');
|
||||||
|
sql.Add(' INNER JOIN BP_InOut B on B.CRID=A.CRID and B.CRNO=A.CRNO ');
|
||||||
|
sql.Add(' where A.CKNO=' + quotedstr(trim(CDS_HZ.fieldbyname('ZdyCode').AsString)));
|
||||||
|
sql.Add(' and A.CRZT=''入库''');
|
||||||
|
sql.Add(' and A.kcqty2>0');
|
||||||
|
|
||||||
|
// SQL.Add('and not EXISTS(SELECT MXID FROM CK_SXPB_CRMX C WHERE C.FZMXID=A.MXID)');
|
||||||
|
sql.Add(' order by A.MXID');
|
||||||
|
// ShowMessage(SQL.text);
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQuerySub, CDS_Sub);
|
||||||
|
SInitCDSData20(ADOQuerySub, CDS_Sub);
|
||||||
|
finally
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
535
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.dfm
Normal file
535
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.dfm
Normal file
|
|
@ -0,0 +1,535 @@
|
||||||
|
object frmClothContractList_CG_help: TfrmClothContractList_CG_help
|
||||||
|
Left = 133
|
||||||
|
Top = 0
|
||||||
|
Width = 1217
|
||||||
|
Height = 738
|
||||||
|
Caption = #22383#24067#37319#36141#35745#21010#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1201
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_TradeManage.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = TBFindClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object TBEdit: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBEditClick
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBPrint: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
Visible = False
|
||||||
|
OnClick = TBPrintClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 441
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 32
|
||||||
|
Width = 1201
|
||||||
|
Height = 53
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 23
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #30331#35760#26085#26399
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 161
|
||||||
|
Top = 22
|
||||||
|
Width = 6
|
||||||
|
Height = 12
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 267
|
||||||
|
Top = 22
|
||||||
|
Width = 78
|
||||||
|
Height = 12
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 22
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 592
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #35268#26684
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 720
|
||||||
|
Top = 22
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20379#26041
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 76
|
||||||
|
Top = 18
|
||||||
|
Width = 85
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464742650460000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464742650460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 167
|
||||||
|
Top = 18
|
||||||
|
Width = 86
|
||||||
|
Height = 20
|
||||||
|
Date = 40675.464761099540000000
|
||||||
|
Format = 'yyyy-MM-dd'
|
||||||
|
Time = 40675.464761099540000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object ConNoM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 349
|
||||||
|
Top = 18
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
OnKeyPress = conPress
|
||||||
|
end
|
||||||
|
object C_CodeNameM: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 493
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object C_Spec: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 624
|
||||||
|
Top = 18
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
object FactoryNoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 756
|
||||||
|
Top = 18
|
||||||
|
Width = 80
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = ConNoMChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 85
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alTop
|
||||||
|
BorderStyle = bsNone
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1201
|
||||||
|
Height = 497
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnMouseDown = Tv1MouseDown
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
OnCellDblClick = Tv1CellDblClick
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTOrderQty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column1
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1PRTQty
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Selection = DataLink_TradeManage.SHuangSe
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
object v1OrderNo: TcxGridDBColumn
|
||||||
|
Caption = #37319#36141#35745#21010#21333#21495
|
||||||
|
DataBinding.FieldName = 'ConNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v1DeliveryDate: TcxGridDBColumn
|
||||||
|
Caption = #20132#36135#26085#26399
|
||||||
|
DataBinding.FieldName = 'DeliveryDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#26085#26399
|
||||||
|
DataBinding.FieldName = 'QDTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1FactoryNo1Name: TcxGridDBColumn
|
||||||
|
Caption = #20379#26041
|
||||||
|
DataBinding.FieldName = 'FactoryNoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 108
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'C_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1PRTSpec: TcxGridDBColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'C_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v1PRTMF: TcxGridDBColumn
|
||||||
|
Caption = #38376#24133'(cm)'
|
||||||
|
DataBinding.FieldName = 'MFQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTKZ: TcxGridDBColumn
|
||||||
|
Caption = #20811#37325'(g/'#13217')'
|
||||||
|
DataBinding.FieldName = 'KZQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Qty1: TcxGridDBColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'Qty1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 46
|
||||||
|
end
|
||||||
|
object v1PRTOrderQty: TcxGridDBColumn
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'C_Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1OrderUnit: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'C_Unit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 47
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 57
|
||||||
|
end
|
||||||
|
object v1PRTUnit: TcxGridDBColumn
|
||||||
|
Caption = #35745#20215#21333#20301
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
object v1PRTQty: TcxGridDBColumn
|
||||||
|
Caption = #24635#20215
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 58
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'C_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'LXPerson'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column6: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'LXTel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 63
|
||||||
|
end
|
||||||
|
object v1Column7: TcxGridDBColumn
|
||||||
|
Caption = #31614#35746#22320#22336
|
||||||
|
DataBinding.FieldName = 'QDPalce'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Styles.Header = DataLink_TradeManage.Default
|
||||||
|
Width = 61
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 1128
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 936
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1000
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_TradeManage.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 1040
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 1168
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1096
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object ClientDataSet3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 1112
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource2: TDataSource
|
||||||
|
DataSet = ClientDataSet2
|
||||||
|
Left = 880
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object DataSource3: TDataSource
|
||||||
|
DataSet = ClientDataSet3
|
||||||
|
Left = 1112
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object ClientDataSet2: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 920
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDBMain
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 352
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDBMain: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_PRT
|
||||||
|
Left = 400
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object RMXLSExport1: TRMXLSExport
|
||||||
|
ShowAfterExport = True
|
||||||
|
ExportPrecision = 1
|
||||||
|
PagesOfSheet = 1
|
||||||
|
ExportImages = True
|
||||||
|
ExportFrames = True
|
||||||
|
ExportImageFormat = ifBMP
|
||||||
|
JPEGQuality = 0
|
||||||
|
ScaleX = 1.000000000000000000
|
||||||
|
ScaleY = 1.000000000000000000
|
||||||
|
CompressFile = False
|
||||||
|
Left = 416
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_PRT: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
end
|
||||||
576
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.pas
Normal file
576
基础资料维护(BaseInfo.dll)/U_ClothContractList_CG_help.pas
Normal file
|
|
@ -0,0 +1,576 @@
|
||||||
|
unit U_ClothContractList_CG_help;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||||
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter,
|
||||||
|
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
|
||||||
|
cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmClothContractList_CG_help = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBAdd: TToolButton;
|
||||||
|
TBEdit: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBPrint: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Label3: TLabel;
|
||||||
|
ConNoM: TEdit;
|
||||||
|
Label5: TLabel;
|
||||||
|
C_CodeNameM: TEdit;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
C_Spec: TEdit;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1OrderNo: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1DeliveryDate: TcxGridDBColumn;
|
||||||
|
v1FactoryNo1Name: TcxGridDBColumn;
|
||||||
|
v1PRTSpec: TcxGridDBColumn;
|
||||||
|
v1PRTMF: TcxGridDBColumn;
|
||||||
|
v1PRTKZ: TcxGridDBColumn;
|
||||||
|
v1PRTOrderQty: TcxGridDBColumn;
|
||||||
|
v1OrderUnit: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1PRTUnit: TcxGridDBColumn;
|
||||||
|
v1PRTQty: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
ClientDataSet3: TClientDataSet;
|
||||||
|
DataSource2: TDataSource;
|
||||||
|
DataSource3: TDataSource;
|
||||||
|
ClientDataSet2: TClientDataSet;
|
||||||
|
v1Qty1: TcxGridDBColumn;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDBMain: TRMDBDataSet;
|
||||||
|
RMXLSExport1: TRMXLSExport;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1Column6: TcxGridDBColumn;
|
||||||
|
v1Column7: TcxGridDBColumn;
|
||||||
|
CDS_PRT: TClientDataSet;
|
||||||
|
Label6: TLabel;
|
||||||
|
FactoryNoName: TEdit;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
procedure TBEditClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure TBPrintClick(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
procedure ConNoMChange(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column3PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure conPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
private
|
||||||
|
FInt,PFInt:Integer;
|
||||||
|
procedure InitGrid();
|
||||||
|
procedure InitForm();
|
||||||
|
function DelData():Boolean;
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmClothContractList_CG_help: TfrmClothContractList_CG_help;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_ClothContractInPut_CG,U_Fun,U_ProductOrderList,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmClothContractList_CG_help:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScrollBox1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * ');
|
||||||
|
sql.Add('from Contract_Main A');
|
||||||
|
sql.Add('inner join Contract_sub B on B.MainID=A.mainID ');
|
||||||
|
sql.Add('where A.FillTime>= '''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''' ');
|
||||||
|
sql.Add('and A.FillTime< '''+Trim(FormatDateTime('yyyy-MM-dd',endDate.DateTime+1))+''' ');
|
||||||
|
sql.Add('and A.conType=''坯布采购计划'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.InitForm();
|
||||||
|
begin
|
||||||
|
ReadCxGrid(self.Caption,Tv1,'指示单管理');
|
||||||
|
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||||
|
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBFindClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBEditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
with frmClothContractInPut_CG do
|
||||||
|
begin
|
||||||
|
PState:=1;
|
||||||
|
FMainId:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_CG.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已到坯,不能删除坯布合同!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if trim(Order_Main.FieldByName('mainID').AsString)='CM001' then exit;
|
||||||
|
if DelData() then
|
||||||
|
begin
|
||||||
|
Order_Main.Delete;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmClothContractList_CG_help.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete YF_Money_CR where MainID='''+Trim(Order_Main.fieldbyname('MainID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||||
|
// sql.Add(' where CRID='+CRID);
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Trim(Order_Main.fieldbyname('SubId').AsString)='' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('坯布合同订单列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBPrintClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\坯布订购合同.rmf' ;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||||
|
+' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''';
|
||||||
|
Parameters.ParamByName('MainId').Value:=Trim(Order_Main.fieldbyname('MainId').AsString);
|
||||||
|
Parameters.ParamByName('WSql').Value:='';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||||
|
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||||
|
FConNoM:=Trim(CDS_PRT.fieldbyname('ConNoM').AsString);
|
||||||
|
//SDofilter(ADOQueryMain,' ConNoM='''+Trim(Order_Main.fieldbyname('ConNoM').AsString)+'''');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
//RMVariables['begindate']:=begindate.DateTime;
|
||||||
|
//RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\坯布订购合同.rmf'),'提示',0);
|
||||||
|
end;
|
||||||
|
//SDofilter(ADOQueryMain,'');
|
||||||
|
//SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
//SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
//Order_Main.Locate('ConNoM',FConNoM,[]);
|
||||||
|
//SelPrintData(TV4,ADOQueryMain,'合同查询报表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.TBAddClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmClothContractInPut_CG:=TfrmClothContractInPut_CG.Create(Application);
|
||||||
|
with frmClothContractInPut_CG do
|
||||||
|
begin
|
||||||
|
PState:=0;
|
||||||
|
FMainId:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmClothContractInPut_CG.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ConNoMChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitForm();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv2MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1MouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
FInt:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:string;
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MXId').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('到货数量未确定!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ClientDataSet3.Locate('OrderNo',null,[]) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('指定订单编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
BegDate.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
//保存去向表
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'To','Contract_Sub_MxTo',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取去向流水号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(ClientDataSet3.fieldbyname('ToId').AsString);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)='' then
|
||||||
|
Append
|
||||||
|
else
|
||||||
|
Edit;
|
||||||
|
FieldByName('MxId').Value:=Trim(ClientDataSet2.fieldbyname('MxId').AsString);
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
FieldByName('OrdSubId').Value:=Trim(ClientDataSet3.fieldbyname('OrdSubId').AsString);
|
||||||
|
FieldByName('TPDate').Value:=ClientDataSet3.fieldbyname('TPDate').Value;
|
||||||
|
FieldByName('TPPerson').Value:=ClientDataSet3.fieldbyname('TPPerson').Value;
|
||||||
|
FieldByName('TPNote').Value:=ClientDataSet3.fieldbyname('TPNote').Value;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('TPQty').AsString)<>'' then
|
||||||
|
FieldByName('TPQty').Value:=ClientDataSet3.fieldbyname('TPQty').Value
|
||||||
|
else
|
||||||
|
FieldByName('TPQty').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty1').AsString)<>'' then
|
||||||
|
FieldByName('Qty1').Value:=ClientDataSet3.fieldbyname('Qty1').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty1').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty2').AsString)<>'' then
|
||||||
|
FieldByName('Qty2').Value:=ClientDataSet3.fieldbyname('Qty2').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty2').Value:=0;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('Qty3').AsString)<>'' then
|
||||||
|
FieldByName('Qty3').Value:=ClientDataSet3.fieldbyname('Qty3').Value
|
||||||
|
else
|
||||||
|
FieldByName('Qty3').Value:=0;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with ClientDataSet3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('ToId').Value:=Trim(maxno);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('操作成功!','提示',0);
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('操作异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FInt=2 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet2.IsEmpty then Exit;
|
||||||
|
if ClientDataSet3.IsEmpty=false then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已产生坯布领料数据,不能删除到坯记录!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(ClientDataSet2.fieldbyname('MxId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_Mx where MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet2.Delete;
|
||||||
|
end else
|
||||||
|
if FInt=3 then
|
||||||
|
begin
|
||||||
|
if ClientDataSet3.IsEmpty then Exit;
|
||||||
|
if Trim(ClientDataSet3.fieldbyname('ToId').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Contract_Sub_MxTo where ToId='''+Trim(ClientDataSet3.fieldbyname('ToId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ClientDataSet3.Delete;
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
if ClientDataSet3.IsEmpty=False then
|
||||||
|
// FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value-tv3.DataController.Summary.FooterSummaryValues[0]
|
||||||
|
else
|
||||||
|
FieldByName('KCSL').Value:=ClientDataSet2.fieldbyname('MxQty').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.v2Column3PropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='RKPlace';
|
||||||
|
flagname:='入库地点';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with ClientDataSet2 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('RKPlace').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.conPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key=#13 then
|
||||||
|
begin
|
||||||
|
if Length(Trim(ConNoM.Text))<4 then Exit;
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||||
|
Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''';
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothContractList_CG_help.Tv1CellDblClick(
|
||||||
|
Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
IF Order_Main.IsEmpty then exit;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
17974
基础资料维护(BaseInfo.dll)/U_DataLink.dfm
Normal file
17974
基础资料维护(BaseInfo.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
85
基础资料维护(BaseInfo.dll)/U_DataLink.pas
Normal file
85
基础资料维护(BaseInfo.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_BaseInfo = class(TDataModule)
|
||||||
|
AdoDataLink: TADOQuery;
|
||||||
|
ADOLink: TADOConnection;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
ThreeLookAndFeelCol: TcxLookAndFeelController;
|
||||||
|
ThreeColorBase: TcxStyleRepository;
|
||||||
|
SHuangSe: TcxStyle;
|
||||||
|
SkyBlue: TcxStyle;
|
||||||
|
Default: TcxStyle;
|
||||||
|
QHuangSe: TcxStyle;
|
||||||
|
Red: TcxStyle;
|
||||||
|
FontBlue: TcxStyle;
|
||||||
|
TextSHuangSe: TcxStyle;
|
||||||
|
FonePurple: TcxStyle;
|
||||||
|
FoneClMaroon: TcxStyle;
|
||||||
|
FoneRed: TcxStyle;
|
||||||
|
RowColor: TcxStyle;
|
||||||
|
handBlack: TcxStyle;
|
||||||
|
cxBlue: TcxStyle;
|
||||||
|
procedure DataModuleDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
TMakebar = procedure(ucData: pchar; nDataLen: integer; nErrLevel: integer; nMask: integer; nBarEdition: integer; szBmpFileName: pchar; nScale: integer); stdcall;
|
||||||
|
|
||||||
|
TMixtext = procedure(szSrcBmpFileName: PChar; szDstBmpFileName: PChar; sztext: PChar; fontsize, txtheight, hmargin, vmargin, txtcntoneline: integer); stdcall;
|
||||||
|
|
||||||
|
var
|
||||||
|
DataLink_BaseInfo: TDataLink_BaseInfo;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TDataLink_BaseInfo.DataModuleDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DataLink_BaseInfo := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
183
基础资料维护(BaseInfo.dll)/U_FjList_RZ.dfm
Normal file
183
基础资料维护(BaseInfo.dll)/U_FjList_RZ.dfm
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
object frmFjList_RZ: TfrmFjList_RZ
|
||||||
|
Left = 177
|
||||||
|
Top = 159
|
||||||
|
Width = 796
|
||||||
|
Height = 501
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
|
Caption = #38468#20214#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ListView1: TListView
|
||||||
|
Left = 40
|
||||||
|
Top = 20
|
||||||
|
Width = 429
|
||||||
|
Height = 77
|
||||||
|
Columns = <>
|
||||||
|
TabOrder = 0
|
||||||
|
OnDblClick = ListView1DblClick
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 629
|
||||||
|
Top = 0
|
||||||
|
Width = 151
|
||||||
|
Height = 463
|
||||||
|
Align = alRight
|
||||||
|
TabOrder = 1
|
||||||
|
object FileName: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 60
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #28155#21152
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = FileNameClick
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton1: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 96
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #21024#38500
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxButton1Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton2: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 132
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #20445#23384
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = cxButton2Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
object cxButton3: TcxButton
|
||||||
|
Left = 30
|
||||||
|
Top = 172
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Filesother'
|
||||||
|
Caption = #20851#38381
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = cxButton3Click
|
||||||
|
LookAndFeel.Kind = lfOffice11
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 176
|
||||||
|
Top = 140
|
||||||
|
Width = 193
|
||||||
|
Height = 41
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Panel2'
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
OnDblClick = Panel2DblClick
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 8
|
||||||
|
Top = 84
|
||||||
|
Width = 593
|
||||||
|
Height = 345
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
OnDblClick = Tv1DblClick
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.Editing = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Caption = #25991#20214#21517#31216
|
||||||
|
DataBinding.FieldName = 'FileName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 146
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Caption = #25991#20214#20462#25913#26102#38388
|
||||||
|
DataBinding.FieldName = 'TFdate'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Caption = #25805#20316#21592
|
||||||
|
DataBinding.FieldName = 'Filler'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Caption = #19978#20256#26102#38388
|
||||||
|
DataBinding.FieldName = 'FillTime'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 140
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = ADOConnection1
|
||||||
|
Parameters = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 28
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = ADOConnection1
|
||||||
|
Parameters = <>
|
||||||
|
Left = 568
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
object ImageList1: TImageList
|
||||||
|
Left = 536
|
||||||
|
Top = 228
|
||||||
|
end
|
||||||
|
object IdFTP1: TIdFTP
|
||||||
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
|
ProxySettings.ProxyType = fpcmNone
|
||||||
|
ProxySettings.Port = 0
|
||||||
|
Left = 500
|
||||||
|
Top = 198
|
||||||
|
end
|
||||||
|
object ADOConnection1: TADOConnection
|
||||||
|
LoginPrompt = False
|
||||||
|
Left = 532
|
||||||
|
Top = 240
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = ADOQueryTmp
|
||||||
|
Left = 548
|
||||||
|
Top = 140
|
||||||
|
end
|
||||||
|
end
|
||||||
443
基础资料维护(BaseInfo.dll)/U_FjList_RZ.pas
Normal file
443
基础资料维护(BaseInfo.dll)/U_FjList_RZ.pas
Normal file
|
|
@ -0,0 +1,443 @@
|
||||||
|
unit U_FjList_RZ;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, ComCtrls, Menus, cxLookAndFeelPainters, StdCtrls,
|
||||||
|
cxButtons, DB, ADODB, ImgList,shellapi, IdBaseComponent, IdComponent,
|
||||||
|
IdTCPConnection, IdTCPClient, IdFTP, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridCustomTableView,
|
||||||
|
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||||
|
cxGridCustomView, cxGrid;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmFjList_RZ = class(TForm)
|
||||||
|
ListView1: TListView;
|
||||||
|
Panel1: TPanel;
|
||||||
|
FileName: TcxButton;
|
||||||
|
cxButton1: TcxButton;
|
||||||
|
cxButton2: TcxButton;
|
||||||
|
cxButton3: TcxButton;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ImageList1: TImageList;
|
||||||
|
Panel2: TPanel;
|
||||||
|
IdFTP1: TIdFTP;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
procedure cxButton3Click(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FileNameClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ListView1DblClick(Sender: TObject);
|
||||||
|
procedure cxButton1Click(Sender: TObject);
|
||||||
|
procedure cxButton2Click(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure Panel2DblClick(Sender: TObject);
|
||||||
|
procedure Tv1DblClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitData();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
fkeyNO:string;
|
||||||
|
fType:string;
|
||||||
|
fId:integer;
|
||||||
|
fstatus:integer;
|
||||||
|
// fmanage:string;
|
||||||
|
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmFjList_RZ: TfrmFjList_RZ;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun10,U_CompressionFun;
|
||||||
|
{$R *.dfm}
|
||||||
|
procedure TfrmFjList_RZ.InitData();
|
||||||
|
var
|
||||||
|
ListItem: TListItem;
|
||||||
|
Flag: Cardinal;
|
||||||
|
info: SHFILEINFOA;
|
||||||
|
Icon: TIcon;
|
||||||
|
begin
|
||||||
|
ListView1.Items.Clear;
|
||||||
|
try
|
||||||
|
|
||||||
|
with adoqueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File ');
|
||||||
|
sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
open;
|
||||||
|
{ if not IsEmpty then
|
||||||
|
begin
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
with ListView1 do
|
||||||
|
begin
|
||||||
|
LargeImages := ImageList1;
|
||||||
|
Icon := TIcon.Create;
|
||||||
|
ListItem := Items.Add;
|
||||||
|
Listitem.Caption := trim(fieldbyname('fileName').AsString);
|
||||||
|
// Listitem.SubItems.Add(OpenDiaLog.FileName);
|
||||||
|
Flag := (SHGFI_SMALLICON or SHGFI_ICON or SHGFI_USEFILEATTRIBUTES);
|
||||||
|
SHGetFileInfo(Pchar(trim(fieldbyname('fileName').AsString)), 0, info, Sizeof(info), Flag);
|
||||||
|
Icon.Handle := info.hIcon;
|
||||||
|
ImageList1.AddIcon(Icon);
|
||||||
|
ListItem.ImageIndex := ImageList1.Count - 1;
|
||||||
|
end;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.cxButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ADOQueryTmp.Close;
|
||||||
|
ADOQuerycmd.Close;
|
||||||
|
ListView1.Items.Free;
|
||||||
|
ModalResult:=-1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmFjList_RZ:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FileNameClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
OpenDiaLog: TOpenDialog;
|
||||||
|
fFileName:string;
|
||||||
|
fFilePath:string;
|
||||||
|
maxNo:string;
|
||||||
|
// myStream: TADOBlobStream;
|
||||||
|
FJStream : TMemoryStream;
|
||||||
|
mfileSize:integer;
|
||||||
|
mCreationTime:TdateTime;
|
||||||
|
mWriteTime:TdateTime;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
OpenDiaLog := TOpenDialog.Create(Self);
|
||||||
|
if OpenDiaLog.Execute then
|
||||||
|
begin
|
||||||
|
fFilePath:=OpenDiaLog.FileName;
|
||||||
|
fFileName:=ExtractFileName(OpenDiaLog.FileName);
|
||||||
|
|
||||||
|
|
||||||
|
{ with adoqueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select TFId from TP_File ');
|
||||||
|
sql.Add('where WBID<>'+quotedstr(trim(fkeyNO)));
|
||||||
|
sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
open;
|
||||||
|
IF not adoqueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
application.MessageBox('此附件名称已存在,请修改文件名,继续上传!','提示信息',MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
|
Panel2.Caption:='正在上传数据,请稍等...';
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
application.ProcessMessages;
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryCmd,maxNo,'FJ','TP_File',4,1)=False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//获取文件信息
|
||||||
|
GetFileInfo(fFilePath,mfileSize,mCreationTime,mWriteTime);
|
||||||
|
|
||||||
|
adoqueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
|
||||||
|
with adoqueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from TP_File ');
|
||||||
|
sql.Add('where TFID='+quotedstr(trim(maxNO)));
|
||||||
|
// sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||||
|
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
FJStream:=TMemoryStream.Create;
|
||||||
|
with adoqueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from TP_File ');
|
||||||
|
sql.Add('where TFID='+quotedstr(trim(maxNO)));
|
||||||
|
// sql.Add('where WBID='+quotedstr(trim(fkeyNO)));
|
||||||
|
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
open;
|
||||||
|
append;
|
||||||
|
fieldbyname('TFID').Value:=trim(maxNO);
|
||||||
|
fieldbyname('WBID').Value:=trim(fkeyNO);
|
||||||
|
fieldbyname('TFType').Value:=trim(fType);
|
||||||
|
fieldbyname('Filler').Value:=trim(DName);
|
||||||
|
fieldbyname('FileName').Value:=trim(fFileName);
|
||||||
|
fieldbyname('TFDate').Value:=mWriteTime;
|
||||||
|
FJStream.LoadFromFile(fFilePath);
|
||||||
|
CompressionStream(FJStream);
|
||||||
|
tblobfield(FieldByName('Filesother')).LoadFromStream(FJStream);
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ if fFilePath <> '' then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
IdFTP1.Host := PicSvr;
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
IdFTP1.Put(fFilePath, 'FJ\' + Trim(fFileName));
|
||||||
|
IdFTP1.Quit;
|
||||||
|
except
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Application.MessageBox('上传客户图样文件失败,请检查文件服务器!', '提示', MB_ICONWARNING);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
IdFTP1.Quit;
|
||||||
|
}
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
initdata();
|
||||||
|
finally
|
||||||
|
FJStream.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
adoqueryCmd.Connection.CommitTrans;
|
||||||
|
except
|
||||||
|
adoqueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox('附件保存失败!','提示信息',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
cxGrid1.Align:=alclient;
|
||||||
|
fstatus:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IF fstatus=0 then Panel1.Visible:=true
|
||||||
|
else Panel1.Visible:=false;
|
||||||
|
initdata();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.ListView1DblClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
fileName:string;
|
||||||
|
begin
|
||||||
|
if ListView1.Items.Count<1 THEN EXIT;
|
||||||
|
|
||||||
|
if listView1.SelCount<1 then exit;
|
||||||
|
sFieldName:='D:\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
fileName:=ListView1.Selected.Caption;
|
||||||
|
|
||||||
|
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||||
|
|
||||||
|
try
|
||||||
|
IdFTP1.Host := PicSvr;
|
||||||
|
IdFTP1.Username := 'three';
|
||||||
|
IdFTP1.Password := '641010';
|
||||||
|
IdFTP1.Connect();
|
||||||
|
except
|
||||||
|
;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if IdFTP1.Connected then
|
||||||
|
begin
|
||||||
|
|
||||||
|
Panel2.Caption:='正在下载数据,请稍等...';
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
application.ProcessMessages;
|
||||||
|
try
|
||||||
|
IdFTP1.Get('FJ\'+ Trim(fileName), sFieldName,false, true);
|
||||||
|
except
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||||
|
IdFTP1.Quit;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
if IdFTP1.Connected then IdFTP1.Quit;
|
||||||
|
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.cxButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fFileName:string;
|
||||||
|
fFilePath:string;
|
||||||
|
begin
|
||||||
|
// if listView1.SelCount<1 then exit;
|
||||||
|
|
||||||
|
IF ADOQueryTmp.IsEmpty then exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
// fFileName:=ListView1.Selected.Caption;
|
||||||
|
// ADOQueryTmp.Locate('fileName',fFileName,[]);
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete from TP_File ');
|
||||||
|
sql.Add('where TFID='+quotedstr(trim(ADOQueryTmp.fieldbyname('TFID').AsString)));
|
||||||
|
// sql.Add('and TFType='+quotedstr(trim(fType)));
|
||||||
|
// sql.Add('and FileName='+quotedstr(trim(fFileName)));
|
||||||
|
execsql;
|
||||||
|
end;
|
||||||
|
|
||||||
|
initData();
|
||||||
|
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.cxButton2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
SaveDialog: TSaveDialog;
|
||||||
|
fFileName:string;
|
||||||
|
fFilePath:string;
|
||||||
|
ff: TADOBlobStream;
|
||||||
|
FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
if adoqueryTmp.IsEmpty then exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
|
||||||
|
fFileName:=adoqueryTmp.fieldbyname('FileName').AsString;
|
||||||
|
|
||||||
|
SaveDialog := TSaveDialog.Create(Self);
|
||||||
|
|
||||||
|
SaveDialog.FileName:=fFileName;
|
||||||
|
if SaveDialog.Execute then
|
||||||
|
begin
|
||||||
|
Panel2.Caption:='正在保存数据,请稍等...';
|
||||||
|
Panel2.Visible:=true;
|
||||||
|
application.ProcessMessages;
|
||||||
|
fFilePath:=SaveDialog.FileName;
|
||||||
|
|
||||||
|
try
|
||||||
|
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||||
|
|
||||||
|
fjStream:= TMemoryStream.Create ;
|
||||||
|
ff.SaveToStream(fjStream);
|
||||||
|
UnCompressionStream(fjStream);
|
||||||
|
fjStream.SaveToFile(fFilePath);
|
||||||
|
// ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||||
|
finally
|
||||||
|
fjStream.free;
|
||||||
|
ff.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
// if IdFTP1.Connected then IdFTP1.Quit;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
if fId=10 then Action:=cafree
|
||||||
|
else
|
||||||
|
Action:=cahide;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.Panel2DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Panel2.Visible:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmFjList_RZ.Tv1DblClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
sFieldName:string;
|
||||||
|
fileName:string;
|
||||||
|
ff: TADOBlobStream;
|
||||||
|
FJStream : TMemoryStream;
|
||||||
|
begin
|
||||||
|
|
||||||
|
IF adoqueryTmp.IsEmpty then exit;
|
||||||
|
|
||||||
|
sFieldName:='D:\图片查看';
|
||||||
|
|
||||||
|
if not DirectoryExists(pchar(sFieldName)) then
|
||||||
|
CreateDirectory(pchar(sFieldName),nil);
|
||||||
|
|
||||||
|
fileName:=adoqueryTmp.fieldbyname('FileName').AsString;
|
||||||
|
|
||||||
|
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||||
|
|
||||||
|
try
|
||||||
|
ff := TADOBlobstream.Create(adoqueryTmp.fieldByName('FilesOther') as TblobField, bmRead);
|
||||||
|
|
||||||
|
fjStream:= TMemoryStream.Create ;
|
||||||
|
ff.SaveToStream(fjStream);
|
||||||
|
UnCompressionStream(fjStream);
|
||||||
|
fjStream.SaveToFile(sFieldName);
|
||||||
|
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||||
|
finally
|
||||||
|
fjStream.free;
|
||||||
|
ff.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
332
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
332
基础资料维护(BaseInfo.dll)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,332 @@
|
||||||
|
unit U_GetDllForm;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, Dxcore,
|
||||||
|
activex;
|
||||||
|
|
||||||
|
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
||||||
|
|
||||||
|
function ConnData(): Boolean;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_KHInfo, U_ZdyAttachment, U_ZdyAttachGYS, U_ZdyAttachCP,
|
||||||
|
U_NengHaoList, U_HZViewList, U_CPKWlist, U_ZdyAttachCP10, U_ZdyAttachmentBJ;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// 功能说明:取Dll中得窗体 //
|
||||||
|
// 参数说明:App>>调用应用程序; //
|
||||||
|
// FormH>>调用窗口句柄 ; //
|
||||||
|
// FormID>>窗口号; //
|
||||||
|
// Language>>语言种类; //
|
||||||
|
// WinStyle>>窗口类型; //
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd;
|
||||||
|
var
|
||||||
|
mnewHandle: hwnd;
|
||||||
|
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||||||
|
mstate: TWindowState;
|
||||||
|
mborderstyle: TFormBorderStyle;
|
||||||
|
begin
|
||||||
|
mnewHandle := 0;
|
||||||
|
DName := GName;
|
||||||
|
DCode := GCode;
|
||||||
|
DdataBase := DataBase;
|
||||||
|
DTitCaption := Title;
|
||||||
|
DParameters1 := Parameters1;
|
||||||
|
DParameters2 := Parameters2;
|
||||||
|
DParameters3 := Parameters3;
|
||||||
|
DParameters4 := Parameters4;
|
||||||
|
DParameters5 := Parameters5;
|
||||||
|
DParameters6 := Parameters6;
|
||||||
|
DParameters7 := Parameters7;
|
||||||
|
DParameters8 := Parameters8;
|
||||||
|
DParameters9 := Parameters9;
|
||||||
|
DParameters10 := Parameters10;
|
||||||
|
|
||||||
|
MainApplication := App;
|
||||||
|
DCurHandle := FormH;
|
||||||
|
IsDelphiLanguage := Language;
|
||||||
|
|
||||||
|
Application := TApplication(App);
|
||||||
|
DCurHandle := 0;
|
||||||
|
|
||||||
|
|
||||||
|
//赋值链接字符串
|
||||||
|
SetLength(server, 255);
|
||||||
|
SetLength(dtbase, 255);
|
||||||
|
SetLength(user, 255);
|
||||||
|
SetLength(pswd, 255);
|
||||||
|
|
||||||
|
// server := '.';
|
||||||
|
// dtbase := 'rtjydata12';
|
||||||
|
// user := 'sa';
|
||||||
|
// pswd := 'rightsoft';
|
||||||
|
server := '139.224.12.182,7781';
|
||||||
|
dtbase := 'aidengdata';
|
||||||
|
user := 'aidengsa';
|
||||||
|
pswd := 'rightsoft@3203';
|
||||||
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||||
|
if trim(DataBaseStr) <> '' then
|
||||||
|
DConString := DataBaseStr;
|
||||||
|
|
||||||
|
// DParameters1 := '高权限';
|
||||||
|
// DParameters1 := '成本';
|
||||||
|
// DataBase:='加工厂';
|
||||||
|
//DataBase:='';
|
||||||
|
if not ConnData() then
|
||||||
|
begin
|
||||||
|
result := 0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// 定义窗口类型 、状态
|
||||||
|
if WinStyle = 0 then
|
||||||
|
begin
|
||||||
|
mstyle := fsMDIChild;
|
||||||
|
mstate := wsMaximized;
|
||||||
|
mborderstyle := bsSizeable;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
mstyle := fsNormal;
|
||||||
|
mstate := wsNormal;
|
||||||
|
mborderstyle := bsSizeable;
|
||||||
|
end;
|
||||||
|
/////////////////////
|
||||||
|
//调用子模块窗口
|
||||||
|
case FormID of
|
||||||
|
1: //客户资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachment = nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachment := TfrmZdyAttachment.Create(application.MainForm);
|
||||||
|
with frmZdyAttachment do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
fkhType := trim(DataBase);
|
||||||
|
Fmanage := trim(Parameters1);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachment.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmZdyAttachment.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
2: //供应商资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachGYS = nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachGYS := TfrmZdyAttachGYS.Create(application.MainForm);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
// fDEFstr5:=trim('');
|
||||||
|
fDEFstr5 := trim(DataBase);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachGYS.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmZdyAttachGYS.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
3: //产品资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP = nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP := TfrmZdyAttachCP.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
// fkhType:='';
|
||||||
|
fkhType := trim(DataBase);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmZdyAttachCP.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
31: //产品资料维护
|
||||||
|
begin
|
||||||
|
if frmZdyAttachCP10 = nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachCP10 := TfrmZdyAttachCP10.Create(application.MainForm);
|
||||||
|
with frmZdyAttachCP10 do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachCP10.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmZdyAttachCP10.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
4: //能耗登记
|
||||||
|
begin
|
||||||
|
if frmNengHaoList = nil then
|
||||||
|
begin
|
||||||
|
frmNengHaoList := TfrmNengHaoList.Create(application.MainForm);
|
||||||
|
with frmNengHaoList do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmNengHaoList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmNengHaoList.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
5: //统计汇总查询
|
||||||
|
begin
|
||||||
|
if frmHZViewList = nil then
|
||||||
|
begin
|
||||||
|
frmHZViewList := TfrmHZViewList.Create(application.MainForm);
|
||||||
|
with frmHZViewList do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmHZViewList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmHZViewList.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
6: //统计汇总查询
|
||||||
|
begin
|
||||||
|
if frmCPKWList = nil then
|
||||||
|
begin
|
||||||
|
frmCPKWList := TfrmCPKWList.Create(application.MainForm);
|
||||||
|
with frmCPKWList do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPKWList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmCPKWList.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
7: //客户报价
|
||||||
|
begin
|
||||||
|
if frmZdyAttachmentCB = nil then
|
||||||
|
begin
|
||||||
|
frmZdyAttachmentCB := TfrmZdyAttachmentCB.Create(application.MainForm);
|
||||||
|
with frmZdyAttachmentCB do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmZdyAttachmentCB.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmZdyAttachmentCB.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
8: //库位
|
||||||
|
begin
|
||||||
|
if frmCPKWList = nil then
|
||||||
|
begin
|
||||||
|
frmCPKWList := TfrmCPKWList.Create(application.MainForm);
|
||||||
|
with frmCPKWList do
|
||||||
|
begin
|
||||||
|
caption := Trim(Title);
|
||||||
|
FormStyle := mstyle;
|
||||||
|
windowState := mstate;
|
||||||
|
BorderStyle := mborderstyle;
|
||||||
|
//show;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frmCPKWList.BringToFront;
|
||||||
|
//句柄
|
||||||
|
mnewHandle := frmCPKWList.Handle;
|
||||||
|
|
||||||
|
end;
|
||||||
|
end; // end case
|
||||||
|
|
||||||
|
Result := mnewHandle;
|
||||||
|
// NewDllApp := Application;
|
||||||
|
end;
|
||||||
|
//===========================================================
|
||||||
|
//建立数据库连接池
|
||||||
|
//===========================================================
|
||||||
|
|
||||||
|
function ConnData(): Boolean;
|
||||||
|
begin
|
||||||
|
if not Assigned(DataLink_BaseInfo) then
|
||||||
|
DataLink_BaseInfo := TDataLink_BaseInfo.Create(Application);
|
||||||
|
try
|
||||||
|
with DataLink_BaseInfo.ADOLink do
|
||||||
|
begin
|
||||||
|
if not Connected then
|
||||||
|
begin
|
||||||
|
Connected := false;
|
||||||
|
ConnectionString := DConString;
|
||||||
|
LoginPrompt := false;
|
||||||
|
Connected := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result := true;
|
||||||
|
except
|
||||||
|
Result := false;
|
||||||
|
application.MessageBox('数据库连接失败!', '错误', mb_Ok + MB_ICONERROR);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
CoInitialize(nil);
|
||||||
|
dxUnitsLoader.Initialize;
|
||||||
|
|
||||||
|
|
||||||
|
finalization
|
||||||
|
DataLink_Baseinfo.Free;
|
||||||
|
application := NewDllApp;
|
||||||
|
dxUnitsLoader.Finalize;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
797
基础资料维护(BaseInfo.dll)/U_HZViewList.dfm
Normal file
797
基础资料维护(BaseInfo.dll)/U_HZViewList.dfm
Normal file
|
|
@ -0,0 +1,797 @@
|
||||||
|
object frmHZViewList: TfrmHZViewList
|
||||||
|
Left = 49
|
||||||
|
Top = 51
|
||||||
|
Width = 1024
|
||||||
|
Height = 706
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1008
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
Visible = False
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 437
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1008
|
||||||
|
Height = 636
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvSpace
|
||||||
|
BevelKind = bkFlat
|
||||||
|
TabOrder = 1
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1000
|
||||||
|
Height = 48
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 0
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #36710#38388
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 21
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 171
|
||||||
|
Top = 22
|
||||||
|
Width = 12
|
||||||
|
Height = 12
|
||||||
|
Caption = '--'
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 184
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object Chejian: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 328
|
||||||
|
Top = 16
|
||||||
|
Width = 137
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ChejianChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 48
|
||||||
|
Width = 1000
|
||||||
|
Height = 260
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 1
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 353
|
||||||
|
Height = 256
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv1: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_NH
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column4
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #33021#32791#32479#35745
|
||||||
|
Width = 338
|
||||||
|
end>
|
||||||
|
object v1Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'Chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'NHMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 96
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 355
|
||||||
|
Top = 2
|
||||||
|
Width = 345
|
||||||
|
Height = 256
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_JWL
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn3
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn2
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #26426#29289#26009#29992#37327#32479#35745
|
||||||
|
Width = 334
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn1: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn2: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'JWLMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn3: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #21407#26009#21697#21517
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 71
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 47
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid3: TcxGrid
|
||||||
|
Left = 700
|
||||||
|
Top = 2
|
||||||
|
Width = 298
|
||||||
|
Height = 256
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv3: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_RHL
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn6
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn5
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #26579#21270#26009#29992#37327#32479#35745
|
||||||
|
Width = 323
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn4: TcxGridDBBandedColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn5: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'RHLMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 66
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn6: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v3Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #21407#26009#21697#21517
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
Width = 66
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v3Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 44
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel3: TcxGridLevel
|
||||||
|
GridView = Tv3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 308
|
||||||
|
Width = 1000
|
||||||
|
Height = 320
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object cxGrid4: TcxGrid
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 353
|
||||||
|
Height = 316
|
||||||
|
Align = alLeft
|
||||||
|
TabOrder = 0
|
||||||
|
object Tv4: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_PB
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn9
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #22383#24067#29992#37327#32479#35745
|
||||||
|
Width = 338
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn8: TcxGridDBBandedColumn
|
||||||
|
Caption = #22383#24067#21517#31216
|
||||||
|
DataBinding.FieldName = 'YCLName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn9: TcxGridDBBandedColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'CRQty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 98
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'GYSName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CRUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 54
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v4Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'PS'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 40
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel4: TcxGridLevel
|
||||||
|
GridView = Tv4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid5: TcxGrid
|
||||||
|
Left = 355
|
||||||
|
Top = 2
|
||||||
|
Width = 643
|
||||||
|
Height = 316
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv5: TcxGridDBBandedTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
DataController.DataSource = DS_CP
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = cxGridDBBandedColumn12
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v5Column1
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_BaseInfo.Default
|
||||||
|
Styles.BandHeader = DataLink_BaseInfo.FontBlue
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Caption = #25104#21697#29983#20135#32479#35745
|
||||||
|
Width = 673
|
||||||
|
end>
|
||||||
|
object cxGridDBBandedColumn11: TcxGridDBBandedColumn
|
||||||
|
Caption = #25104#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'PCode'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 73
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object cxGridDBBandedColumn12: TcxGridDBBandedColumn
|
||||||
|
Caption = #29983#20135#25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 8
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #35268#26684
|
||||||
|
DataBinding.FieldName = 'PSpec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 53
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #25104#20221
|
||||||
|
DataBinding.FieldName = 'PCF'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 50
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 5
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column3: TcxGridDBBandedColumn
|
||||||
|
Caption = #35746#21333#21495
|
||||||
|
DataBinding.FieldName = 'OrderNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 57
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column4: TcxGridDBBandedColumn
|
||||||
|
Caption = #23458#25143
|
||||||
|
DataBinding.FieldName = 'KHName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column5: TcxGridDBBandedColumn
|
||||||
|
Caption = #39068#33394
|
||||||
|
DataBinding.FieldName = 'ColorNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 52
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 6
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column6: TcxGridDBBandedColumn
|
||||||
|
Caption = #21305#25968
|
||||||
|
DataBinding.FieldName = 'JSL'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 54
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 7
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object Tv5Column7: TcxGridDBBandedColumn
|
||||||
|
Caption = #31867#21035
|
||||||
|
DataBinding.FieldName = 'MJType'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 69
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v5Column1: TcxGridDBBandedColumn
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'CPMoney'
|
||||||
|
FooterAlignmentHorz = taCenter
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 86
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 10
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object v5Column2: TcxGridDBBandedColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'LenUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 47
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 9
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel5: TcxGridLevel
|
||||||
|
GridView = Tv5
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 557
|
||||||
|
Top = 217
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 581
|
||||||
|
Top = 217
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 157
|
||||||
|
Top = 273
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 480
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
|
object DS_NH: TDataSource
|
||||||
|
DataSet = CDS_NH
|
||||||
|
Left = 187
|
||||||
|
Top = 227
|
||||||
|
end
|
||||||
|
object CDS_NH: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 248
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
object CDS_JWL: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 448
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
|
object DS_JWL: TDataSource
|
||||||
|
DataSet = CDS_JWL
|
||||||
|
Left = 419
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object DS_RHL: TDataSource
|
||||||
|
DataSet = CDS_RHL
|
||||||
|
Left = 819
|
||||||
|
Top = 267
|
||||||
|
end
|
||||||
|
object CDS_RHL: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 848
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 880
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_PB: TDataSource
|
||||||
|
DataSet = CDS_PB
|
||||||
|
Left = 163
|
||||||
|
Top = 531
|
||||||
|
end
|
||||||
|
object CDS_PB: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 192
|
||||||
|
Top = 528
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu4: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 224
|
||||||
|
Top = 528
|
||||||
|
end
|
||||||
|
object DS_CP: TDataSource
|
||||||
|
DataSet = CDS_CP
|
||||||
|
Left = 611
|
||||||
|
Top = 547
|
||||||
|
end
|
||||||
|
object CDS_CP: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 640
|
||||||
|
Top = 544
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu5: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 672
|
||||||
|
Top = 544
|
||||||
|
end
|
||||||
|
object dxComponentPrinter1: TdxComponentPrinter
|
||||||
|
CurrentLink = dxComponentPrinter1Link1
|
||||||
|
Version = 0
|
||||||
|
Left = 472
|
||||||
|
Top = 281
|
||||||
|
object dxComponentPrinter1Link1: TdxCustomContainerReportLink
|
||||||
|
Active = True
|
||||||
|
Component = ScrollBox1
|
||||||
|
PrinterPage.DMPaper = 9
|
||||||
|
PrinterPage.Footer = 6350
|
||||||
|
PrinterPage.GrayShading = True
|
||||||
|
PrinterPage.Header = 6350
|
||||||
|
PrinterPage.Margins.Bottom = 12700
|
||||||
|
PrinterPage.Margins.Left = 12700
|
||||||
|
PrinterPage.Margins.Right = 12700
|
||||||
|
PrinterPage.Margins.Top = 12700
|
||||||
|
PrinterPage.Orientation = poLandscape
|
||||||
|
PrinterPage.PageSize.X = 210000
|
||||||
|
PrinterPage.PageSize.Y = 297000
|
||||||
|
PrinterPage._dxMeasurementUnits_ = 0
|
||||||
|
PrinterPage._dxLastMU_ = 2
|
||||||
|
ReportDocument.CreationDate = 45068.620899756940000000
|
||||||
|
ReportTitle.Text = #20135#20540#27719#24635#34920
|
||||||
|
BuiltInReportLink = True
|
||||||
|
HiddenComponents = {}
|
||||||
|
ExcludedComponents = {}
|
||||||
|
AggregatedReportLinks = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
322
基础资料维护(BaseInfo.dll)/U_HZViewList.pas
Normal file
322
基础资料维护(BaseInfo.dll)/U_HZViewList.pas
Normal file
|
|
@ -0,0 +1,322 @@
|
||||||
|
unit U_HZViewList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||||
|
dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev,
|
||||||
|
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, dxPSCore,
|
||||||
|
dxPScxCommon, dxPScxGridLnk, dxPSContainerLnk, cxLookAndFeels,
|
||||||
|
cxLookAndFeelPainters, cxNavigator, dxPSPDFExportCore, dxPSPDFExport,
|
||||||
|
cxDrawTextUtils, dxPSPrVwStd, dxPSPrVwAdv, dxPSPrVwRibbon,
|
||||||
|
dxPScxPageControlProducer, dxPScxGridLayoutViewLnk,
|
||||||
|
dxPScxEditorProducers, dxPScxExtEditorProducers;
|
||||||
|
// dxfQuickTyp,
|
||||||
|
type
|
||||||
|
TfrmHZViewList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_NH: TDataSource;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
CDS_NH: TClientDataSet;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
CDS_JWL: TClientDataSet;
|
||||||
|
DS_JWL: TDataSource;
|
||||||
|
DS_RHL: TDataSource;
|
||||||
|
CDS_RHL: TClientDataSet;
|
||||||
|
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||||
|
DS_PB: TDataSource;
|
||||||
|
CDS_PB: TClientDataSet;
|
||||||
|
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||||
|
DS_CP: TDataSource;
|
||||||
|
CDS_CP: TClientDataSet;
|
||||||
|
cxGridPopupMenu5: TcxGridPopupMenu;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
dxComponentPrinter1: TdxComponentPrinter;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Chejian: TComboBox;
|
||||||
|
Panel2: TPanel;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv1: TcxGridDBBandedTableView;
|
||||||
|
v1Column1: TcxGridDBBandedColumn;
|
||||||
|
v1Column2: TcxGridDBBandedColumn;
|
||||||
|
v1Column3: TcxGridDBBandedColumn;
|
||||||
|
v1Column4: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv2: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn1: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn2: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn3: TcxGridDBBandedColumn;
|
||||||
|
v2Column1: TcxGridDBBandedColumn;
|
||||||
|
v2Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel2: TcxGridLevel;
|
||||||
|
cxGrid3: TcxGrid;
|
||||||
|
Tv3: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn4: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn5: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn6: TcxGridDBBandedColumn;
|
||||||
|
v3Column1: TcxGridDBBandedColumn;
|
||||||
|
v3Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel3: TcxGridLevel;
|
||||||
|
Panel3: TPanel;
|
||||||
|
cxGrid4: TcxGrid;
|
||||||
|
Tv4: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn8: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn9: TcxGridDBBandedColumn;
|
||||||
|
v4Column1: TcxGridDBBandedColumn;
|
||||||
|
v4Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel4: TcxGridLevel;
|
||||||
|
cxGrid5: TcxGrid;
|
||||||
|
Tv5: TcxGridDBBandedTableView;
|
||||||
|
cxGridDBBandedColumn11: TcxGridDBBandedColumn;
|
||||||
|
cxGridDBBandedColumn12: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column1: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column2: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column3: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column4: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column5: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column6: TcxGridDBBandedColumn;
|
||||||
|
Tv5Column7: TcxGridDBBandedColumn;
|
||||||
|
v5Column1: TcxGridDBBandedColumn;
|
||||||
|
v5Column2: TcxGridDBBandedColumn;
|
||||||
|
cxGridLevel5: TcxGridLevel;
|
||||||
|
dxComponentPrinter1Link1: TdxCustomContainerReportLink;
|
||||||
|
v4Column3: TcxGridDBBandedColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure NHBiaoNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ChejianChange(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmHZViewList: TfrmHZViewList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_NengHaoInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(Qty) Qty,sum(Qty*Price) NHMoney,CheJian, NHType from NengHao ');
|
||||||
|
sql.Add(' where NHDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and NHDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add('Group by CheJian ,NHType');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_NH);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_NH);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(CRQty*YCLPrice) JWLMoney,ZdyStr1 chejian,YCLName,CRUnit from CK_YCL_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' and CKName=''机物料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by ZdyStr1,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_JWL);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_JWL);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(CRQty*YCLPrice) RHLMoney,ZdyStr1 chejian,YCLName,CRUnit from CK_YCL_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' and CKName=''染化料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by ZdyStr1,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_RHL);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_RHL);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Sum(CRQty) CRQty,sum(PS) PS,YCLName,CRUnit,GYSName from CK_PB_CR ');
|
||||||
|
sql.Add(' where CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and CRTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
//sql.Add(' and CKName=''染化料仓库'' ');
|
||||||
|
sql.Add(' and CRType=''正常出库'' ');
|
||||||
|
sql.Add('Group by GYSName,YCLName,CRUnit');
|
||||||
|
Open;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_PB);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_PB);
|
||||||
|
end;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select sum(AA.Qty) Qty ,sum(AA.KgQty) KgQty,sum(AA.KgQtyP) KgQtyP,Count(*) JSL,LenUnit,PCode,ColorNo,MJDate,KHName,CKNO,OrderNo ');
|
||||||
|
sql.Add(',PSpec,PCF,PHuaNo,PColorNo ,MJFK,MJSJKZ,MJType,CPMoney=Sum(CPMoney)');
|
||||||
|
SQL.Add(' from(select A.Qty ,A.KgQty ,A.KgQtyP,A.CKNO,D.LenUnit,D.PCode,D.ColorNo,D.OrderNo,CPMoney=Qty*A.Price,');
|
||||||
|
sql.Add('MJDate=convert(varchar(10),A.CRTime,120),A.KHName');
|
||||||
|
sql.Add(',D.PSpec,D.PCF,D.PHuaNo,D.PColorNo,D.MJFK,D.MJSJKZ,D.MJType,D.BatchNo');
|
||||||
|
sql.add('from CK_BanCP_CR A ');
|
||||||
|
Sql.add(' inner join XH_MJJY D on A.MJId=D.MJId');
|
||||||
|
sql.add('where A.CRTime>=:begdate and A.CRTime<:enddate');
|
||||||
|
SQL.Add(' and CRType=''正常出库'' ) AA');
|
||||||
|
sql.Add(' Group by LenUnit,PCode,ColorNo,MJDate,KHName,CKNO,OrderNo,PSpec,PCF,PHuaNo,PColorNo ,MJFK,MJSJKZ,MJType,BatchNo');
|
||||||
|
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime));
|
||||||
|
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1));
|
||||||
|
Open;
|
||||||
|
//ShowMessage(SQL.Text);
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_CP);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_CP);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmHZViewList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxBandedGrid('HZ查询1',Tv1,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询2',Tv2,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询3',Tv3,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询4',Tv4,'客户自定义');
|
||||||
|
WriteCxBandedGrid('HZ查询5',Tv5,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmHZViewList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//ReadCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询1',Tv1,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询2',Tv2,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询3',Tv3,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询4',Tv4,'客户自定义');
|
||||||
|
ReadCxBandedGrid('HZ查询5',Tv5,'客户自定义');
|
||||||
|
//InitGrid();
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Code=ZdyNo,Name=ZdyName from KH_Zdy where Type=''chejian'' ');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
Chejian.Items.Clear;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
Chejian.Items.Add(Trim(ADOQueryTemp.fieldbyname('Name').AsString));
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Chejian.Items.Add('');
|
||||||
|
BegDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||||
|
EndDate.Date:=BegDate.Date;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.NHBiaoNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
// SelExportData(Tv2,ADOQueryMain,'能耗列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ChejianChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_NH.Active=True then
|
||||||
|
SDofilter10(CDS_NH,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_JWL.Active=True then
|
||||||
|
SDofilter10(CDS_JWL,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_RHL.Active=True then
|
||||||
|
SDofilter10(CDS_RHL,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_NH.Active=True then
|
||||||
|
SDofilter10(CDS_NH,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_JWL.Active=True then
|
||||||
|
SDofilter10(CDS_JWL,SGetFilters(Panel1,1,2));
|
||||||
|
if CDS_RHL.Active=True then
|
||||||
|
SDofilter10(CDS_RHL,SGetFilters(Panel1,1,2));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHZViewList.ToolButton5Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
dxComponentPrinter1.Preview(False,nil);
|
||||||
|
dxComponentPrinter1.ReportLink[0].Preview;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
262
基础资料维护(BaseInfo.dll)/U_KHAdd.dfm
Normal file
262
基础资料维护(BaseInfo.dll)/U_KHAdd.dfm
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
object frmKHAdd: TfrmKHAdd
|
||||||
|
Left = 93
|
||||||
|
Top = 232
|
||||||
|
Width = 1130
|
||||||
|
Height = 388
|
||||||
|
Caption = #23458#25143#36164#26009#32534#36753
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1122
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGLWT.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGLWT.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton6: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 111
|
||||||
|
OnClick = ToolButton6Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1122
|
||||||
|
Height = 320
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_BJ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#32534#21495
|
||||||
|
DataBinding.FieldName = 'ZdyCode'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v2Column16: TcxGridDBColumn
|
||||||
|
Caption = #31561#32423
|
||||||
|
DataBinding.FieldName = 'DEFstr1'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2Column14: TcxGridDBColumn
|
||||||
|
Caption = #24402#23646#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr2'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 59
|
||||||
|
end
|
||||||
|
object v2Column10: TcxGridDBColumn
|
||||||
|
Caption = #19994#21153#21592
|
||||||
|
DataBinding.FieldName = 'MainType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 82
|
||||||
|
end
|
||||||
|
object v2Column9: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#20154
|
||||||
|
DataBinding.FieldName = 'DEFstr3'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #32852#31995#26041#24335
|
||||||
|
DataBinding.FieldName = 'DEFNote1'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column7: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#22320#22336
|
||||||
|
DataBinding.FieldName = 'DEFNote2'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#21517#31216
|
||||||
|
DataBinding.FieldName = 'ZdyName'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#21517#31216'('#20013#25991')'
|
||||||
|
DataBinding.FieldName = 'DEFstr9'
|
||||||
|
Width = 100
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#31867#22411
|
||||||
|
DataBinding.FieldName = 'DEFstr4'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column5PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column11: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#26469#28304
|
||||||
|
DataBinding.FieldName = 'DEFstr5'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column12: TcxGridDBColumn
|
||||||
|
Caption = #20027#33829#24066#22330
|
||||||
|
DataBinding.FieldName = 'DEFstr6'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column12PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object v2Column13: TcxGridDBColumn
|
||||||
|
Caption = #20027#33829#20135#21697
|
||||||
|
DataBinding.FieldName = 'DEFstr7'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column13PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 68
|
||||||
|
end
|
||||||
|
object v2Column15: TcxGridDBColumn
|
||||||
|
Caption = #23458#25143#21306#22495
|
||||||
|
DataBinding.FieldName = 'DEFstr8'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v2Column15PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 67
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #20844#21496#24773#20917
|
||||||
|
DataBinding.FieldName = 'DEFstr10'
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v2Column17: TcxGridDBColumn
|
||||||
|
Caption = #20854#20182#20449#24687
|
||||||
|
DataBinding.FieldName = 'DEFNote3'
|
||||||
|
Width = 66
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DS_BJ: TDataSource
|
||||||
|
DataSet = CDS_SQ
|
||||||
|
Left = 435
|
||||||
|
Top = 147
|
||||||
|
end
|
||||||
|
object CDS_SQ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 392
|
||||||
|
Top = 152
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 261
|
||||||
|
Top = 169
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 317
|
||||||
|
Top = 121
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 117
|
||||||
|
end
|
||||||
|
end
|
||||||
303
基础资料维护(BaseInfo.dll)/U_KHAdd.pas
Normal file
303
基础资料维护(BaseInfo.dll)/U_KHAdd.pas
Normal file
|
|
@ -0,0 +1,303 @@
|
||||||
|
unit U_KHAdd;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, BtnEdit, ComCtrls, cxStyles, cxCustomData, cxGraphics,
|
||||||
|
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ToolWin,
|
||||||
|
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, cxCalendar, DBClient,
|
||||||
|
ADODB, cxButtonEdit, cxDropDownEdit, cxGridCustomPopupMenu,
|
||||||
|
cxGridPopupMenu, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHAdd = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ToolButton6: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
DS_BJ: TDataSource;
|
||||||
|
CDS_SQ: TClientDataSet;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column16: TcxGridDBColumn;
|
||||||
|
v2Column14: TcxGridDBColumn;
|
||||||
|
v2Column10: TcxGridDBColumn;
|
||||||
|
v2Column9: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column7: TcxGridDBColumn;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
v2Column11: TcxGridDBColumn;
|
||||||
|
v2Column12: TcxGridDBColumn;
|
||||||
|
v2Column13: TcxGridDBColumn;
|
||||||
|
v2Column15: TcxGridDBColumn;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column17: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure ToolButton6Click(Sender: TObject);
|
||||||
|
procedure v2Column5PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column12PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column13PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column15PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
FCYID,FYSID,FPrice:String;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHAdd: TfrmKHAdd;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHAdd:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
FBZType,fsj:string;
|
||||||
|
begin
|
||||||
|
ReadCxGrid('客户Add',Tv2,'基础数据');
|
||||||
|
fsj:='select UserId code,UserName Name from SY_User where UserId not in(''Admin'',''Test'')';
|
||||||
|
SInitCxGridComboBoxBySql(ADOQueryTemp,v2Column14,fsj,1,False,'');
|
||||||
|
fsj:='select UserId code,UserName Name from SY_User where UserId not in(''Admin'',''Test'')';
|
||||||
|
SInitCxGridComboBoxBySql(ADOQueryTemp,v2Column10,fsj,1,False,'');
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FYSID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_SQ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_SQ);
|
||||||
|
if CDS_SQ.IsEmpty then
|
||||||
|
begin
|
||||||
|
with CDS_SQ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxGrid('客户Add',Tv2,'基础数据');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.ToolButton6Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno:String;
|
||||||
|
begin
|
||||||
|
if Trim(CDS_SQ.fieldbyname('ZdyCode').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('客户编号不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FYSID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxno,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取客户最大ID失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxno:=Trim(FYSID);
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(maxno)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FYSID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('ATID').Value:=Trim(maxno);
|
||||||
|
FieldByName('Type').Value:='KHName';
|
||||||
|
FieldByName('ZdyName').Value:=CDS_SQ.fieldbyname('ZdyName').Value;
|
||||||
|
FieldByName('MainType').Value:=CDS_SQ.fieldbyname('MainType').Value;
|
||||||
|
FieldByName('ZdyCode').Value:=CDS_SQ.fieldbyname('ZdyCode').Value;
|
||||||
|
FieldByName('DEFstr1').Value:=CDS_SQ.fieldbyname('DEFstr1').Value;
|
||||||
|
FieldByName('DEFstr2').Value:=CDS_SQ.fieldbyname('DEFstr2').Value;
|
||||||
|
FieldByName('DEFstr3').Value:=CDS_SQ.fieldbyname('DEFstr3').Value;
|
||||||
|
FieldByName('DEFstr4').Value:=CDS_SQ.fieldbyname('DEFstr4').Value;
|
||||||
|
FieldByName('DEFstr5').Value:=CDS_SQ.fieldbyname('DEFstr5').Value;
|
||||||
|
FieldByName('DEFstr6').Value:=CDS_SQ.fieldbyname('DEFstr6').Value;
|
||||||
|
FieldByName('DEFstr7').Value:=CDS_SQ.fieldbyname('DEFstr7').Value;
|
||||||
|
FieldByName('DEFstr8').Value:=CDS_SQ.fieldbyname('DEFstr8').Value;
|
||||||
|
FieldByName('DEFstr9').Value:=CDS_SQ.fieldbyname('DEFstr9').Value;
|
||||||
|
FieldByName('DEFstr10').Value:=CDS_SQ.fieldbyname('DEFstr10').Value;
|
||||||
|
FieldByName('DEFNote1').Value:=CDS_SQ.fieldbyname('DEFNote1').Value;
|
||||||
|
FieldByName('DEFNote2').Value:=CDS_SQ.fieldbyname('DEFNote2').Value;
|
||||||
|
FieldByName('DEFNote3').Value:=CDS_SQ.fieldbyname('DEFNote3').Value;
|
||||||
|
FieldByName('DEFNote4').Value:=CDS_SQ.fieldbyname('DEFNote4').Value;
|
||||||
|
FieldByName('DEFNote5').Value:=CDS_SQ.fieldbyname('DEFNote5').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select Count(*) FFCount from KH_Zdy_Attachment where ZdyCode='''+Trim(CDS_SQ.fieldbyname('ZdyCode').AsString)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.FieldByName('FFCount').AsInteger>1 then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
//FYSID:='';
|
||||||
|
Application.MessageBox('编号重复!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
FYSID:=Trim(maxno);
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column5PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr4GSLX';
|
||||||
|
flagname:='公司类型';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr4').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column12PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr6ZYSC';
|
||||||
|
flagname:='主营市场';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr6').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column13PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr7ZYCP';
|
||||||
|
flagname:='主营产品';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr7').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHAdd.v2Column15PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='DEFstr8KHQY';
|
||||||
|
flagname:='客户区域';
|
||||||
|
//MainType:=Trim(DName);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_SQ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('DEFstr8').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
17996
基础资料维护(BaseInfo.dll)/U_KHHelp.dfm
Normal file
17996
基础资料维护(BaseInfo.dll)/U_KHHelp.dfm
Normal file
File diff suppressed because it is too large
Load Diff
167
基础资料维护(BaseInfo.dll)/U_KHHelp.pas
Normal file
167
基础资料维护(BaseInfo.dll)/U_KHHelp.pas
Normal file
|
|
@ -0,0 +1,167 @@
|
||||||
|
unit U_KHHelp;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||||
|
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||||
|
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHHelp = class(TForm)
|
||||||
|
TV1: TcxGridDBTableView;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
V1Name: TcxGridDBColumn;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
ClientDataSet1: TClientDataSet;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
ADOConnection1: TADOConnection;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
ZDYName: TEdit;
|
||||||
|
ThreeImgList: TImageList;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
V1Column1: TcxGridDBColumn;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
procedure ZDYNameChange(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure InitGrid();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
flag,flagname,snote,MainType:string;
|
||||||
|
fnote,forderno,fZdyFlag:Boolean;
|
||||||
|
PPSTE:integer;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHHelp: TfrmKHHelp;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
with ADOConnection1 do
|
||||||
|
begin
|
||||||
|
Connected:=false;
|
||||||
|
ConnectionString:=DConString;
|
||||||
|
//ConnectionString:='';
|
||||||
|
Connected:=true;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.InitGrid();
|
||||||
|
var
|
||||||
|
CYType:String;
|
||||||
|
begin
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from SY_User where UserId='''+Trim(DCode)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
CYType:=Trim(ADOQueryTemp.fieldbyname('DPID').AsString);
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('exec P_Select_User_KHName :CYType');
|
||||||
|
Parameters.ParamByName('CYType').Value:=Trim(CYType);
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult:=2;
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
WriteCxGrid('客户名称',TV1,'基础数据');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
ReadCxGrid('客户名称',TV1,'基础数据');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ZDYName.SetFocus;
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||||
|
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||||
|
AShift: TShiftState; var AHandled: Boolean);
|
||||||
|
begin
|
||||||
|
if TV1.OptionsData.Editing=False then
|
||||||
|
begin
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.ZDYNameChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
fsj:String;
|
||||||
|
begin
|
||||||
|
if Trim(ZDYName.Text)<>'' then
|
||||||
|
begin
|
||||||
|
fsj:=' zdyname like '''+'%'+Trim(ZDYName.Text)+'%'+''''
|
||||||
|
+' or ZJM like '''+'%'+Trim(ZDYName.Text)+'%'+'''';
|
||||||
|
end;
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,fsj);
|
||||||
|
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||||
|
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHHelp.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHHelp:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
314
基础资料维护(BaseInfo.dll)/U_KHInfo.dfm
Normal file
314
基础资料维护(BaseInfo.dll)/U_KHInfo.dfm
Normal file
|
|
@ -0,0 +1,314 @@
|
||||||
|
object frmKHInfo: TfrmKHInfo
|
||||||
|
Left = 41
|
||||||
|
Top = 136
|
||||||
|
Width = 1154
|
||||||
|
Height = 577
|
||||||
|
Caption = #23458#25143#20449#24687
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1146
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
Images = DataLink_CPCK.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 2
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBFind: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
end
|
||||||
|
object TBExport: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 75
|
||||||
|
OnClick = TBExportClick
|
||||||
|
end
|
||||||
|
object TBTP: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
Caption = #26356#26032
|
||||||
|
ImageIndex = 106
|
||||||
|
OnClick = TBTPClick
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 248
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 1146
|
||||||
|
Height = 42
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 27
|
||||||
|
Top = 15
|
||||||
|
Width = 52
|
||||||
|
Height = 12
|
||||||
|
Caption = #23458#25143#21517#31216
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 174
|
||||||
|
Top = 15
|
||||||
|
Width = 26
|
||||||
|
Height = 12
|
||||||
|
Caption = #20195#21495
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object OrderNo: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 80
|
||||||
|
Top = 11
|
||||||
|
Width = 77
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = WFBCodeNameChange
|
||||||
|
end
|
||||||
|
object WFBCodeName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 203
|
||||||
|
Top = 11
|
||||||
|
Width = 83
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = WFBCodeNameChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 32
|
||||||
|
Top = 112
|
||||||
|
Width = 969
|
||||||
|
Height = 200
|
||||||
|
TabOrder = 2
|
||||||
|
object TV1: TcxGridDBBandedTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
Width = 174
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 99
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 157
|
||||||
|
end>
|
||||||
|
object V1Column1: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 0
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column2: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column3: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 2
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column4: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 3
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column5: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 4
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column6: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 5
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column7: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 6
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column8: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 7
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column9: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 8
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column10: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 9
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column11: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 10
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column12: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 11
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column13: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 12
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column14: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 13
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column15: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 14
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column16: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 15
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column17: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 16
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column18: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 17
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column19: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 18
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column20: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 19
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column21: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 20
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
object V1Column22: TcxGridDBBandedColumn
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 21
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
GridView = TV1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 760
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = Order_Main
|
||||||
|
Left = 704
|
||||||
|
Top = 136
|
||||||
|
end
|
||||||
|
object Order_Main: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 664
|
||||||
|
Top = 112
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_CPCK.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 648
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_CPCK.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 688
|
||||||
|
Top = 40
|
||||||
|
end
|
||||||
|
end
|
||||||
186
基础资料维护(BaseInfo.dll)/U_KHInfo.pas
Normal file
186
基础资料维护(BaseInfo.dll)/U_KHInfo.pas
Normal file
|
|
@ -0,0 +1,186 @@
|
||||||
|
unit U_KHInfo;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||||
|
cxDataStorage, cxEdit, DB, cxDBData, ADODB, DBClient,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGrid, StdCtrls, ComCtrls, ExtCtrls,
|
||||||
|
ToolWin, cxCalendar, cxButtonEdit, cxCheckBox, cxGridBandedTableView,
|
||||||
|
cxGridDBBandedTableView;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmKHInfo = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBFind: TToolButton;
|
||||||
|
TBExport: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
TBTP: TToolButton;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
OrderNo: TEdit;
|
||||||
|
WFBCodeName: TEdit;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
DataSource1: TDataSource;
|
||||||
|
Order_Main: TClientDataSet;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
TV1: TcxGridDBBandedTableView;
|
||||||
|
V1Column1: TcxGridDBBandedColumn;
|
||||||
|
V1Column2: TcxGridDBBandedColumn;
|
||||||
|
V1Column3: TcxGridDBBandedColumn;
|
||||||
|
V1Column4: TcxGridDBBandedColumn;
|
||||||
|
V1Column5: TcxGridDBBandedColumn;
|
||||||
|
V1Column6: TcxGridDBBandedColumn;
|
||||||
|
V1Column7: TcxGridDBBandedColumn;
|
||||||
|
V1Column8: TcxGridDBBandedColumn;
|
||||||
|
V1Column9: TcxGridDBBandedColumn;
|
||||||
|
V1Column10: TcxGridDBBandedColumn;
|
||||||
|
V1Column11: TcxGridDBBandedColumn;
|
||||||
|
V1Column12: TcxGridDBBandedColumn;
|
||||||
|
V1Column13: TcxGridDBBandedColumn;
|
||||||
|
V1Column14: TcxGridDBBandedColumn;
|
||||||
|
V1Column15: TcxGridDBBandedColumn;
|
||||||
|
V1Column16: TcxGridDBBandedColumn;
|
||||||
|
V1Column17: TcxGridDBBandedColumn;
|
||||||
|
V1Column18: TcxGridDBBandedColumn;
|
||||||
|
V1Column19: TcxGridDBBandedColumn;
|
||||||
|
V1Column20: TcxGridDBBandedColumn;
|
||||||
|
V1Column21: TcxGridDBBandedColumn;
|
||||||
|
V1Column22: TcxGridDBBandedColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure WFBCodeNameChange(Sender: TObject);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TBTPClick(Sender: TObject);
|
||||||
|
procedure TBExportClick(Sender: TObject);
|
||||||
|
procedure v1Column16PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function DelData():Boolean;
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmKHInfo: TfrmKHInfo;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmKHInfo:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
procedure TfrmKHInfo.InitGrid();
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxBandedGrid('状态列表',Tv1,'无纺布订单');
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.WFBCodeNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active=False then Exit;
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||||
|
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
WriteCxBandedGrid('状态列表',Tv1,'无纺布订单');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxGrid1.Align:=alClient;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBTPClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
try
|
||||||
|
except
|
||||||
|
Application.MessageBox('更新失败!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmKHInfo.DelData():Boolean;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Result:=false;
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('delete Order_Sub_KC where KCId='''+Trim(Order_Main.fieldbyname('KCId').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Result:=False;
|
||||||
|
Application.MessageBox('数据删除异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.TBExportClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Order_Main.IsEmpty then Exit;
|
||||||
|
TcxGridToExcel('订单状态列表',cxGrid1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmKHInfo.v1Column16PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='hdmc';
|
||||||
|
flagname:='货代名称';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Order_Main.Edit;
|
||||||
|
Order_Main.FieldByName('OSStr1').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
240
基础资料维护(BaseInfo.dll)/U_NengHaoInput.dfm
Normal file
240
基础资料维护(BaseInfo.dll)/U_NengHaoInput.dfm
Normal file
|
|
@ -0,0 +1,240 @@
|
||||||
|
object frmNengHaoInput: TfrmNengHaoInput
|
||||||
|
Left = 292
|
||||||
|
Top = 254
|
||||||
|
Width = 697
|
||||||
|
Height = 370
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 681
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 681
|
||||||
|
Height = 300
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
item
|
||||||
|
Format = '0'
|
||||||
|
Position = spFooter
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'NHDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v2Column4PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 90
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
|
Properties.DropDownListStyle = lsFixedList
|
||||||
|
Properties.ImmediatePost = True
|
||||||
|
Properties.Items.Strings = (
|
||||||
|
#27827#27700
|
||||||
|
#33258#26469#27700
|
||||||
|
#27745#27700
|
||||||
|
#22825#28982#27668
|
||||||
|
#33976#27773
|
||||||
|
#30005
|
||||||
|
#23792#30005
|
||||||
|
#23574#30005
|
||||||
|
#35895#30005
|
||||||
|
''
|
||||||
|
''
|
||||||
|
'')
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #34920#21517
|
||||||
|
DataBinding.FieldName = 'NHBiaoName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.ReadOnly = True
|
||||||
|
Properties.OnButtonClick = v2Column8PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 83
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Width = 93
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 864
|
||||||
|
Top = 224
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 928
|
||||||
|
Top = 216
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 528
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 899
|
||||||
|
Top = 235
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 872
|
||||||
|
Top = 224
|
||||||
|
end
|
||||||
|
end
|
||||||
254
基础资料维护(BaseInfo.dll)/U_NengHaoInput.pas
Normal file
254
基础资料维护(BaseInfo.dll)/U_NengHaoInput.pas
Normal file
|
|
@ -0,0 +1,254 @@
|
||||||
|
unit U_NengHaoInput;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit, cxDropDownEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmNengHaoInput = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure v2Column4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
procedure v2Column8PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
function SaveData():Boolean;
|
||||||
|
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag,FCYID:String;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmNengHaoInput: TfrmNengHaoInput;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from NengHao where NHID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmNengHaoInput:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('能耗录入',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmNengHaoInput.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('能耗录入',Tv2,'客户自定义');
|
||||||
|
InitGrid();
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Append;
|
||||||
|
CDS_HZ.Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TfrmNengHaoInput.SaveData():Boolean;
|
||||||
|
var
|
||||||
|
maxId,CRID:String;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryCmd,maxId,'NH','NengHao',4,1)=False then
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取最大号失败!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
maxId:=Trim(FCYID);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('select * from NengHao where NHID='''+Trim(FCYID)+'''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(FCYID)='' then
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Editer').Value:=Trim(DName);
|
||||||
|
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||||
|
end;
|
||||||
|
FieldByName('NHID').Value:=Trim(maxId);
|
||||||
|
//FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'NengHao',0);
|
||||||
|
if Trim(CDS_HZ.fieldbyname('Price').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value:=CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FieldByName('Price').Value:=0;
|
||||||
|
end;
|
||||||
|
FieldByName('Filler').Value:=Trim(DName);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
with CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('NHID').Value:=Trim(maxId);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
Result:=True;
|
||||||
|
except
|
||||||
|
Result:=True;
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('保存异常!','提示',0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Trim(CDS_HZ.FieldByName('NHDate').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('日期不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(CDS_HZ.FieldByName('NHType').AsString)='' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('能耗类别不能为空!','提示',0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
ToolBar1.SetFocus;
|
||||||
|
if SaveData() then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('保存成功!','提示',0);
|
||||||
|
ModalResult:=1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.v2Column4PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='chejian';
|
||||||
|
flagname:='车间';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Edit;
|
||||||
|
CDS_HZ.FieldByName('chejian').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoInput.v2Column8PropertiesButtonClick(Sender: TObject;
|
||||||
|
AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag:='NHBiaoName';
|
||||||
|
flagname:='表名';
|
||||||
|
MainType:=Trim(CDS_HZ.fieldbyname('chejian').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
CDS_HZ.Edit;
|
||||||
|
CDS_HZ.FieldByName('NHBiaoName').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
359
基础资料维护(BaseInfo.dll)/U_NengHaoList.dfm
Normal file
359
基础资料维护(BaseInfo.dll)/U_NengHaoList.dfm
Normal file
|
|
@ -0,0 +1,359 @@
|
||||||
|
object frmNengHaoList: TfrmNengHaoList
|
||||||
|
Left = 209
|
||||||
|
Top = 16
|
||||||
|
Width = 1036
|
||||||
|
Height = 618
|
||||||
|
Caption = #33021#32791#30331#35760
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1020
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #36807#28388
|
||||||
|
ImageIndex = 59
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 126
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 189
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 252
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 315
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #23548#20986
|
||||||
|
ImageIndex = 53
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object ToolButton5: TToolButton
|
||||||
|
Left = 378
|
||||||
|
Top = 0
|
||||||
|
Caption = #25171#21360
|
||||||
|
ImageIndex = 12
|
||||||
|
OnClick = ToolButton5Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 437
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 1020
|
||||||
|
Height = 66
|
||||||
|
Align = alTop
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 439
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #34920#21517
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 302
|
||||||
|
Top = 21
|
||||||
|
Width = 24
|
||||||
|
Height = 12
|
||||||
|
Caption = #36710#38388
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 574
|
||||||
|
Top = 20
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 22
|
||||||
|
Top = 21
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #26597#35810#26085#26399
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 142
|
||||||
|
Top = 21
|
||||||
|
Width = 78
|
||||||
|
Height = 12
|
||||||
|
Caption = '-------------'
|
||||||
|
end
|
||||||
|
object NHBiaoName: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 463
|
||||||
|
Top = 17
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
end
|
||||||
|
object Chejian: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 327
|
||||||
|
Top = 17
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
end
|
||||||
|
object NHType: TComboBox
|
||||||
|
Tag = 1
|
||||||
|
Left = 627
|
||||||
|
Top = 17
|
||||||
|
Width = 81
|
||||||
|
Height = 20
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 12
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = NHBiaoNameChange
|
||||||
|
Items.Strings = (
|
||||||
|
#27827#27700
|
||||||
|
#33258#26469#27700
|
||||||
|
#27745#27700
|
||||||
|
#22825#28982#27668
|
||||||
|
#33976#27773
|
||||||
|
#30005
|
||||||
|
#23792#30005
|
||||||
|
#23574#30005
|
||||||
|
#35895#30005
|
||||||
|
'')
|
||||||
|
end
|
||||||
|
object BegDate: TDateTimePicker
|
||||||
|
Left = 72
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object EndDate: TDateTimePicker
|
||||||
|
Left = 184
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 20
|
||||||
|
Date = 41457.671719525460000000
|
||||||
|
Time = 41457.671719525460000000
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid2: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 97
|
||||||
|
Width = 1020
|
||||||
|
Height = 482
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 2
|
||||||
|
object Tv2: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_HZ
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v2Column3
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsBehavior.GoToNextCellOnEnter = True
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Selection = DataLink_BaseInfo.SHuangSe
|
||||||
|
Styles.Header = DataLink_BaseInfo.handBlack
|
||||||
|
object v2Column6: TcxGridDBColumn
|
||||||
|
Caption = #26085#26399
|
||||||
|
DataBinding.FieldName = 'NHDate'
|
||||||
|
PropertiesClassName = 'TcxDateEditProperties'
|
||||||
|
Properties.SaveTime = False
|
||||||
|
Properties.ShowTime = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
|
object v2Column4: TcxGridDBColumn
|
||||||
|
Caption = #36710#38388
|
||||||
|
DataBinding.FieldName = 'chejian'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
|
object v2Column2: TcxGridDBColumn
|
||||||
|
Caption = #33021#32791#31867#21035
|
||||||
|
DataBinding.FieldName = 'NHType'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v2Column8: TcxGridDBColumn
|
||||||
|
Caption = #34920#21517
|
||||||
|
DataBinding.FieldName = 'NHBiaoName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v2Column5: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Editing = False
|
||||||
|
Width = 71
|
||||||
|
end
|
||||||
|
object v2Column3: TcxGridDBColumn
|
||||||
|
Caption = #29992#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object v2Column1: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 949
|
||||||
|
Top = 225
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = False
|
||||||
|
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||||
|
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||||
|
PreviewOptions.RulerVisible = False
|
||||||
|
PreviewOptions.DrawBorder = False
|
||||||
|
PreviewOptions.BorderPen.Color = clGray
|
||||||
|
PreviewOptions.BorderPen.Style = psDash
|
||||||
|
Dataset = RMDB_Main
|
||||||
|
CompressLevel = rmzcFastest
|
||||||
|
CompressThread = False
|
||||||
|
LaterBuildEvents = True
|
||||||
|
OnlyOwnerDataSet = False
|
||||||
|
Left = 728
|
||||||
|
Top = 192
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 688
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid2
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 832
|
||||||
|
Top = 192
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 771
|
||||||
|
Top = 251
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 768
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
end
|
||||||
261
基础资料维护(BaseInfo.dll)/U_NengHaoList.pas
Normal file
261
基础资料维护(BaseInfo.dll)/U_NengHaoList.pas
Normal file
|
|
@ -0,0 +1,261 @@
|
||||||
|
unit U_NengHaoList;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||||
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||||
|
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||||
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||||
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||||
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
|
cxButtonEdit, cxTextEdit;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmNengHaoList = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TBRafresh: TToolButton;
|
||||||
|
TBDel: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
ToolButton1: TToolButton;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
Label3: TLabel;
|
||||||
|
NHBiaoName: TEdit;
|
||||||
|
cxGrid2: TcxGrid;
|
||||||
|
Tv2: TcxGridDBTableView;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
v2Column6: TcxGridDBColumn;
|
||||||
|
v2Column2: TcxGridDBColumn;
|
||||||
|
v2Column3: TcxGridDBColumn;
|
||||||
|
v2Column4: TcxGridDBColumn;
|
||||||
|
Label1: TLabel;
|
||||||
|
Chejian: TEdit;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
v2Column8: TcxGridDBColumn;
|
||||||
|
Label2: TLabel;
|
||||||
|
NHType: TComboBox;
|
||||||
|
BegDate: TDateTimePicker;
|
||||||
|
Label4: TLabel;
|
||||||
|
EndDate: TDateTimePicker;
|
||||||
|
Label5: TLabel;
|
||||||
|
v2Column1: TcxGridDBColumn;
|
||||||
|
v2Column5: TcxGridDBColumn;
|
||||||
|
ToolButton5: TToolButton;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure TBDelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure NHBiaoNameChange(Sender: TObject);
|
||||||
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
procedure InitGrid();
|
||||||
|
|
||||||
|
public
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmNengHaoList: TfrmNengHaoList;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses
|
||||||
|
U_DataLink,U_Fun,U_ZDYHelp,U_NengHaoInput;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.InitGrid();
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ADOQueryMain.DisableControls;
|
||||||
|
with ADOQueryMain do
|
||||||
|
begin
|
||||||
|
Filtered:=False;
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from NengHao ');
|
||||||
|
sql.Add(' where NHDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||||
|
sql.Add(' and NHDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||||
|
sql.Add(' order by Chejian,NHTYpe,NHDate');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
finally
|
||||||
|
ADOQueryMain.EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmNengHaoList:=nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action:=caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
procedure TfrmNengHaoList.TBDelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||||
|
if Trim(CDS_HZ.fieldbyname('NHID').AsString)<>'' then
|
||||||
|
begin
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add('delete NengHao where NHID='''+Trim(CDS_HZ.fieldbyname('NHID').AsString)+'''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_HZ.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid('能耗查询',Tv2,'客户自定义');
|
||||||
|
EndDate.Date:=SGetServerDate(ADOQueryTemp);
|
||||||
|
BegDate.Date:=EndDate.Date;
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.TBRafreshClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.Active then
|
||||||
|
begin
|
||||||
|
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||||
|
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||||
|
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.NHBiaoNameChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ToolButton2.Click;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ADOQueryMain.IsEmpty then Exit;
|
||||||
|
SelExportData(Tv2,ADOQueryMain,'能耗列表');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton4Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmNengHaoInput:=TfrmNengHaoInput.Create(Application);
|
||||||
|
with frmNengHaoInput do
|
||||||
|
begin
|
||||||
|
FCYID:=Trim(Self.CDS_HZ.fieldbyname('NHID').AsString);
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_HZ.Locate('NHID',FCYID,[]);
|
||||||
|
with Self.CDS_HZ do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('NHDate').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHDate').Value;
|
||||||
|
FieldByName('chejian').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('chejian').Value;
|
||||||
|
FieldByName('NHType').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHType').Value;
|
||||||
|
FieldByName('NHBiaoName').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHBiaoName').Value;
|
||||||
|
FieldByName('Price').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
FieldByName('Qty').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Qty').Value;
|
||||||
|
FieldByName('Note').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Note').Value;
|
||||||
|
//FieldByName('NHID').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHID').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmNengHaoInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmNengHaoInput:=TfrmNengHaoInput.Create(Application);
|
||||||
|
with frmNengHaoInput do
|
||||||
|
begin
|
||||||
|
FCYID:='';
|
||||||
|
if ShowModal=1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_HZ do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('NHDate').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHDate').Value;
|
||||||
|
FieldByName('chejian').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('chejian').Value;
|
||||||
|
FieldByName('NHType').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHType').Value;
|
||||||
|
FieldByName('NHBiaoName').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHBiaoName').Value;
|
||||||
|
FieldByName('Price').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Price').Value;
|
||||||
|
FieldByName('Qty').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Qty').Value;
|
||||||
|
FieldByName('Note').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('Note').Value;
|
||||||
|
FieldByName('NHID').Value:=frmNengHaoInput.CDS_HZ.fieldbyname('NHID').Value;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmNengHaoInput.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmNengHaoList.ToolButton5Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
fPrintFile,FConNoM,RPTName:string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if CDS_HZ.IsEmpty then Exit;
|
||||||
|
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\能耗报表.rmf' ;
|
||||||
|
if FileExists(fPrintFile) then
|
||||||
|
begin
|
||||||
|
RMVariables['begdate']:=BegDate.DateTime;
|
||||||
|
RMVariables['enddate']:=enddate.DateTime;
|
||||||
|
//RMVariables['printtime']:=Now;
|
||||||
|
//RMVariables['printer']:=Trim(gUserName);
|
||||||
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
RM1.ShowReport;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+RPTName),'提示',0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
324
基础资料维护(BaseInfo.dll)/U_ReceivableImport.dfm
Normal file
324
基础资料维护(BaseInfo.dll)/U_ReceivableImport.dfm
Normal file
|
|
@ -0,0 +1,324 @@
|
||||||
|
object frmReceivableImport: TfrmReceivableImport
|
||||||
|
Left = 380
|
||||||
|
Top = 419
|
||||||
|
Width = 1546
|
||||||
|
Height = 542
|
||||||
|
Caption = #24212#25910#27454#23548#20837
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poDesktopCenter
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Tag = 1
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 1530
|
||||||
|
Height = 34
|
||||||
|
AutoSize = True
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Images = DataLink_BaseInfo.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 2
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = TSaveClick
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 2
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #25171#24320#25991#20214
|
||||||
|
ImageIndex = 5
|
||||||
|
OnClick = ToolButton4Click
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 2
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#34892
|
||||||
|
ImageIndex = 107
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 2
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid1: TcxGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 34
|
||||||
|
Width = 1530
|
||||||
|
Height = 469
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
object Tv1: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
Navigator.Buttons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DS_1
|
||||||
|
DataController.Filter.AutoDataSetFilter = True
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Qty
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Money
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Kind = skSum
|
||||||
|
Column = v1Column5
|
||||||
|
end>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.Footer = True
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
OptionsView.Indicator = True
|
||||||
|
Styles.Header = DataLink_BaseInfo.FonePurple
|
||||||
|
object v1InvoiceNo: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20135#21697#32534#21495
|
||||||
|
DataBinding.FieldName = 'InvoiceNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 77
|
||||||
|
end
|
||||||
|
object v1InvoiceType: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'InvoiceType'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1InvoiceTypePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1InvoiceDate: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #38754#36741#26009#21517#31216
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 79
|
||||||
|
end
|
||||||
|
object v1FactoryName: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #24037#24207#21517#31216
|
||||||
|
DataBinding.FieldName = 'FactoryName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1FactoryNamePropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column1: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #25104#20998
|
||||||
|
DataBinding.FieldName = 'ToFactoryName1'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column1PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Tag = 1
|
||||||
|
Caption = #23494#24230
|
||||||
|
DataBinding.FieldName = 'SYRName'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = v1Column2PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1Column3: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #19968#32423#20215#26684
|
||||||
|
DataBinding.FieldName = 'P_Code'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 75
|
||||||
|
end
|
||||||
|
object v1P_CodeName: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #20135#21697#21517#31216
|
||||||
|
DataBinding.FieldName = 'P_CodeName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 94
|
||||||
|
end
|
||||||
|
object v1P_Spec: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #25104#21697#35268#26684
|
||||||
|
DataBinding.FieldName = 'P_Spec'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1ToFactoryName: TcxGridDBColumn
|
||||||
|
Caption = #36827#26041
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 72
|
||||||
|
end
|
||||||
|
object v1Qty: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #25968#37327
|
||||||
|
DataBinding.FieldName = 'Qty'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1Price: TcxGridDBColumn
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
Visible = False
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21333#20215
|
||||||
|
DataBinding.FieldName = 'Price'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object v1QtyUnit: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #25968#37327#21333#20301
|
||||||
|
DataBinding.FieldName = 'QtyUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 78
|
||||||
|
end
|
||||||
|
object v1Money: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #37329#39069
|
||||||
|
DataBinding.FieldName = 'Money'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1MoneyPropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
|
object v1PriceUnit: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #24065#31181
|
||||||
|
DataBinding.FieldName = 'PriceUnit'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
object v1Column4: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #31246#29575'(%)'
|
||||||
|
DataBinding.FieldName = 'tax'
|
||||||
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
|
Properties.OnEditValueChanged = v1Column4PropertiesEditValueChanged
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
|
object v1Column5: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #21547#31246#37329#39069
|
||||||
|
DataBinding.FieldName = 'taxMoney'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 70
|
||||||
|
end
|
||||||
|
object v1note: TcxGridDBColumn
|
||||||
|
Tag = 2
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'P_Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 145
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel1: TcxGridLevel
|
||||||
|
GridView = Tv1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DS_1: TDataSource
|
||||||
|
DataSet = CDS_Import
|
||||||
|
Left = 500
|
||||||
|
Top = 248
|
||||||
|
end
|
||||||
|
object CDS_Import: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 384
|
||||||
|
Top = 252
|
||||||
|
end
|
||||||
|
object GPM_1: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 296
|
||||||
|
Top = 104
|
||||||
|
end
|
||||||
|
object ADOQueryTmp: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 88
|
||||||
|
Top = 108
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_BaseInfo.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 188
|
||||||
|
Top = 108
|
||||||
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
Left = 386
|
||||||
|
Top = 170
|
||||||
|
end
|
||||||
|
object CDS_LM: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 504
|
||||||
|
Top = 176
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
|
Grid = cxGrid1
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 484
|
||||||
|
Top = 100
|
||||||
|
end
|
||||||
|
end
|
||||||
545
基础资料维护(BaseInfo.dll)/U_ReceivableImport.pas
Normal file
545
基础资料维护(BaseInfo.dll)/U_ReceivableImport.pas
Normal file
|
|
@ -0,0 +1,545 @@
|
||||||
|
unit U_ReceivableImport;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||||
|
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses,
|
||||||
|
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||||
|
cxGridDBTableView, cxGrid, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB,
|
||||||
|
DBClient, ExtCtrls, StdCtrls, BtnEdit, cxButtonEdit, cxTextEdit,
|
||||||
|
cxDropDownEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxCalendar,
|
||||||
|
dxSkinsCore, dxBarBuiltInMenu, ComObj, cxCheckBox, dxSkinBlack,
|
||||||
|
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
|
||||||
|
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
|
||||||
|
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
|
||||||
|
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
|
||||||
|
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||||
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||||
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||||
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||||
|
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmReceivableImport = class(TForm)
|
||||||
|
DS_1: TDataSource;
|
||||||
|
CDS_Import: TClientDataSet;
|
||||||
|
GPM_1: TcxGridPopupMenu;
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
TSave: TToolButton;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ADOQueryTmp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
ToolButton2: TToolButton;
|
||||||
|
ToolButton4: TToolButton;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
CDS_LM: TClientDataSet;
|
||||||
|
cxGrid1: TcxGrid;
|
||||||
|
Tv1: TcxGridDBTableView;
|
||||||
|
v1InvoiceNo: TcxGridDBColumn;
|
||||||
|
v1InvoiceDate: TcxGridDBColumn;
|
||||||
|
v1InvoiceType: TcxGridDBColumn;
|
||||||
|
v1FactoryName: TcxGridDBColumn;
|
||||||
|
v1Column1: TcxGridDBColumn;
|
||||||
|
v1Column2: TcxGridDBColumn;
|
||||||
|
v1Column3: TcxGridDBColumn;
|
||||||
|
v1P_CodeName: TcxGridDBColumn;
|
||||||
|
v1P_Spec: TcxGridDBColumn;
|
||||||
|
v1ToFactoryName: TcxGridDBColumn;
|
||||||
|
v1Qty: TcxGridDBColumn;
|
||||||
|
v1Price: TcxGridDBColumn;
|
||||||
|
v1QtyUnit: TcxGridDBColumn;
|
||||||
|
v1Money: TcxGridDBColumn;
|
||||||
|
v1PriceUnit: TcxGridDBColumn;
|
||||||
|
v1Column4: TcxGridDBColumn;
|
||||||
|
v1Column5: TcxGridDBColumn;
|
||||||
|
v1note: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure TSaveClick(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
|
procedure v1InvoiceTypePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure v1FactoryNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure v1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure v1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1MoneyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
procedure v1Column4PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure initGrid();
|
||||||
|
procedure SaveDate();
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
FFFID: string;
|
||||||
|
fInvoiceFlag: string;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmReceivableImport: TfrmReceivableImport;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_Fun, U_ZDYHelp, U_dataLink, U_ZdyAttachGYS;
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.SaveDate();
|
||||||
|
var
|
||||||
|
MaxNo, FInvoiceID: string;
|
||||||
|
XH: Integer;
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
try
|
||||||
|
with CDS_Import do
|
||||||
|
begin
|
||||||
|
first;
|
||||||
|
XH := 1;
|
||||||
|
if GetLSNo(ADOQueryTmp, MaxNo, 'DR', 'FD_Invoice', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_Invoice where InvoiceNo=''' + trim(CDS_Import.fieldbyname('InvoiceNo').AsString) + '''');
|
||||||
|
open;
|
||||||
|
if isempty then
|
||||||
|
begin
|
||||||
|
append;
|
||||||
|
ADOQueryCmd.FieldByName('Filler').Value := Trim(DName);
|
||||||
|
ADOQueryCmd.FieldByName('Filltime').Value := SGetServerDateTime(ADOQueryTmp);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
edit;
|
||||||
|
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd, Tv1, CDS_Import, 'FD_Invoice', 1);
|
||||||
|
fieldbyname('Invoiceflag').Value := strtoint('0');
|
||||||
|
fieldbyname('chkstatus').AsString := '0';
|
||||||
|
fieldbyname('ishd').Value := '未核对';
|
||||||
|
fieldbyname('MainID').AsString := MaxNo + '-' + IntToStr(XH);
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
XH := XH + 1;
|
||||||
|
next;
|
||||||
|
end;
|
||||||
|
|
||||||
|
first;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
|
||||||
|
if GetLSNo(ADOQueryTmp, FInvoiceID, 'FP', 'FD_InvoiceSub', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.add('select * from FD_InvoiceSub where InvoiceNo=''' + trim(CDS_Import.fieldbyname('InvoiceNo').AsString) + ''' ');
|
||||||
|
sql.add('and InvoiceID=''' + trim(FInvoiceID) + '''');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
if ADOQueryCmd.IsEmpty then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.append;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.edit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceNo').Value := trim(CDS_Import.fieldbyname('InvoiceNo').AsString);
|
||||||
|
ADOQueryCmd.fieldbyname('InvoiceID').Value := FInvoiceID;
|
||||||
|
SSetSaveDataCDSNew(ADOQueryCmd, Tv1, CDS_Import, 'FD_InvoiceSub', 2);
|
||||||
|
ADOQueryCmd.fieldbyname('Qty').Value := CDS_Import.fieldbyname('Qty').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Price').Value := CDS_Import.fieldbyname('Price').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('Money').Value := CDS_Import.fieldbyname('Money').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('tax').Value := CDS_Import.fieldbyname('tax').AsFloat;
|
||||||
|
ADOQueryCmd.fieldbyname('TaxMoney').Value := CDS_Import.fieldbyname('TaxMoney').AsFloat;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
next;
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.add('delete from FD_InvoiceSub where InvoiceNo=''' + trim(CDS_Import.fieldbyname('InvoiceNo').AsString) + ''' ');
|
||||||
|
// execsql;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
application.MessageBox('保存成功!', '提示');
|
||||||
|
Modalresult := 1;
|
||||||
|
except
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.initGrid();
|
||||||
|
begin
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from FD_Invoice A inner join FD_Invoicesub B on B.InvoiceNo=A.InvoiceNo where 1<>1');
|
||||||
|
open;
|
||||||
|
end;
|
||||||
|
|
||||||
|
SCreateCDS20(ADOQueryTmp, CDS_Import);
|
||||||
|
SInitCDSData20(ADOQueryTmp, CDS_Import);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
writeCxGrid(Self.Caption, Tv1, '发票导入');
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ReadCxGrid(Self.Caption, Tv1, '发票导入');
|
||||||
|
with CDS_LM do
|
||||||
|
begin
|
||||||
|
FieldDefs.Clear;
|
||||||
|
FieldDefs.Add('LXH', ftInteger, 0);
|
||||||
|
FieldDefs.Add('lCode', ftString, 40);
|
||||||
|
FieldDefs.Add('LName', ftString, 40);
|
||||||
|
close;
|
||||||
|
CreateDataSet;
|
||||||
|
end;
|
||||||
|
initGrid();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.TSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Import.Locate('InvoiceNo', null, []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票号码不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CDS_Import.Locate('InvoiceNo', '', []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('发票号码不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CDS_Import.Locate('ToFactoryName', null, []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('对方单位不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CDS_Import.Locate('ToFactoryName', '', []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('对方单位不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CDS_Import.Locate('Money', null, []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('金额不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CDS_Import.Locate('Money', 0, []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('金额不能为0', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CDS_Import.Locate('taxMoney', null, []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('含税金额不能为空', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if CDS_Import.Locate('taxMoney', 0, []) then
|
||||||
|
begin
|
||||||
|
application.MessageBox('含税金额不能为0', '提示');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
SaveDate();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmReceivableImport := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.ToolButton2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_Import.IsEmpty then
|
||||||
|
exit;
|
||||||
|
CDS_Import.delete;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.ToolButton3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WriteCxGrid(Self.Caption, Tv1, '璐㈠姟绠$悊');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.ToolButton4Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
excelApp, WorkBook: Variant;
|
||||||
|
i, j, k, LX, ExcelRowCount: integer;
|
||||||
|
maxId, FCPID, FCPName, t1, t2, t3, FFID: string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
try
|
||||||
|
excelApp := CreateOleObject('Excel.Application');
|
||||||
|
openDialog1.Filter := '*.CSV;*.xls';
|
||||||
|
if opendialog1.Execute then
|
||||||
|
begin
|
||||||
|
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
excelApp.Visible := false;
|
||||||
|
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载EXCEL错误!', '错误信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_LM.EmptyDataSet;
|
||||||
|
|
||||||
|
for j := 0 to Tv1.ColumnCount - 1 do
|
||||||
|
begin
|
||||||
|
with CDS_LM do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
FieldByName('LCode').Value := trim(Tv1.Columns[j].DataBinding.FieldName);
|
||||||
|
FieldByName('LName').Value := trim(Tv1.Columns[j].Caption);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
for i := 1 to 50 do
|
||||||
|
begin
|
||||||
|
if trim(WorkBook.WorkSheets[1].Cells[1, i].value) = '' then
|
||||||
|
continue;
|
||||||
|
if CDS_LM.Locate('LName', trim(WorkBook.WorkSheets[1].Cells[1, i].value), []) then
|
||||||
|
begin
|
||||||
|
with CDS_LM do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('LXH').Value := i;
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
application.MessageBox('加载数组错误!', '错误信息', MB_ICONERROR);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
for i := 2 to ExcelRowCount do
|
||||||
|
begin
|
||||||
|
with CDS_Import do
|
||||||
|
begin
|
||||||
|
Append;
|
||||||
|
CDS_LM.First;
|
||||||
|
while not CDS_LM.Eof do
|
||||||
|
begin
|
||||||
|
if CDS_LM.FieldByName('LXH').AsInteger > 0 then
|
||||||
|
CDS_Import.fieldbyname(CDS_LM.FieldByName('LCode').AsString).Value := WorkBook.WorkSheets[1].Cells[i, CDS_LM.FieldByName('LXH').AsInteger].Value;
|
||||||
|
CDS_LM.Next;
|
||||||
|
end;
|
||||||
|
// CDS_Import.fieldbyname('OurCoNo').Value := '91330602MA2JTEXX4B';
|
||||||
|
// CDS_Import.fieldbyname('OurCoName').Value := '圆中圆';
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
WorkBook.Close;
|
||||||
|
excelApp.Quit;
|
||||||
|
excelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
except
|
||||||
|
WorkBook.Close;
|
||||||
|
excelApp.Quit;
|
||||||
|
excelApp := Unassigned;
|
||||||
|
WorkBook := Unassigned;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.v1InvoiceTypePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'InvoiceType';
|
||||||
|
flagname := '发票类型';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Import.Edit;
|
||||||
|
Self.CDS_Import.FieldByName('InvoiceType').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.v1FactoryNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'DFTaiTou';
|
||||||
|
flagname := '开票单位';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Import.Edit;
|
||||||
|
Self.CDS_Import.FieldByName('FactoryName').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.v1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZdyAttachGYS := TfrmZdyAttachGYS.Create(Application);
|
||||||
|
with frmZdyAttachGYS do
|
||||||
|
begin
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Import.Edit;
|
||||||
|
Self.CDS_Import.FieldByName('TOFactoryName').Value := Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
Self.CDS_Import.FieldByName('FactoryName').Value := Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZdyAttachGYS.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.v1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'SYRName';
|
||||||
|
flagname := '公司抬头';
|
||||||
|
if Trim(flag) = 'SYRName' then
|
||||||
|
begin
|
||||||
|
flag := 'OrdDefStr2';
|
||||||
|
V1Name.Caption := '中文名称';
|
||||||
|
V1Note.Caption := '英文名称';
|
||||||
|
fnote := True;
|
||||||
|
end;
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
Self.CDS_Import.Edit;
|
||||||
|
Self.CDS_Import.FieldByName('SYRName').Value := Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.v1QtyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
mvalue := '0';
|
||||||
|
end;
|
||||||
|
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with CDS_Import do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||||
|
FieldbyName('Money').Value := format('%.2f', [FieldByName('Qty').AsFloat * FieldByName('Price').AsFloat]);
|
||||||
|
FieldbyName('taxMoney').Value := format('%.2f', [FieldByName('money').AsFloat * (1 + FieldByName('tax').AsFloat / 100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.v1MoneyPropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
mvalue := '0';
|
||||||
|
end;
|
||||||
|
with CDS_Import do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('Money').Value := Trim(mvalue);
|
||||||
|
if fieldbyname('Qty').AsFloat > 0 then
|
||||||
|
FieldbyName('price').Value := format('%.4f', [FieldByName('money').AsFloat / FieldByName('Qty').AsFloat])
|
||||||
|
else
|
||||||
|
FieldbyName('price').Value := 0;
|
||||||
|
FieldbyName('taxMoney').Value := format('%.2f', [FieldByName('money').AsFloat * (1 + FieldByName('tax').AsFloat / 100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmReceivableImport.v1Column4PropertiesEditValueChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
mvalue, FFieldName: string;
|
||||||
|
begin
|
||||||
|
mvalue := TcxTextEdit(Sender).EditingText;
|
||||||
|
if Trim(mvalue) = '' then
|
||||||
|
begin
|
||||||
|
mvalue := '0';
|
||||||
|
end;
|
||||||
|
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||||
|
with CDS_Import do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||||
|
FieldbyName('taxMoney').Value := format('%.2f', [FieldByName('money').AsFloat * (1 + FieldByName('tax').AsFloat / 100.00)]);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
tv1.Controller.EditingController.ShowEdit();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
277
基础资料维护(BaseInfo.dll)/U_SYDept.dfm
Normal file
277
基础资料维护(BaseInfo.dll)/U_SYDept.dfm
Normal file
|
|
@ -0,0 +1,277 @@
|
||||||
|
object frmSYDept: TfrmSYDept
|
||||||
|
Left = 209
|
||||||
|
Top = 173
|
||||||
|
Width = 872
|
||||||
|
Height = 509
|
||||||
|
Caption = #32452#32455#32467#26500
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 864
|
||||||
|
Height = 33
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 83
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YPGLWT.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YPGLWT.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object TBRafresh: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21047#26032
|
||||||
|
ImageIndex = 9
|
||||||
|
OnClick = TBRafreshClick
|
||||||
|
end
|
||||||
|
object TBAdd: TToolButton
|
||||||
|
Left = 63
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #26032#22686#23376#31867
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = TBAddClick
|
||||||
|
end
|
||||||
|
object ToolButton1: TToolButton
|
||||||
|
Left = 150
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20445#23384
|
||||||
|
ImageIndex = 14
|
||||||
|
OnClick = ToolButton1Click
|
||||||
|
end
|
||||||
|
object TBDel: TToolButton
|
||||||
|
Left = 213
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #21024#38500
|
||||||
|
ImageIndex = 17
|
||||||
|
OnClick = TBDelClick
|
||||||
|
end
|
||||||
|
object ToolButton2: TToolButton
|
||||||
|
Left = 276
|
||||||
|
Top = 0
|
||||||
|
Caption = #32452#32455#20998#37197
|
||||||
|
ImageIndex = 132
|
||||||
|
OnClick = ToolButton2Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 359
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxDBTreeList1: TcxDBTreeList
|
||||||
|
Left = 0
|
||||||
|
Top = 33
|
||||||
|
Width = 249
|
||||||
|
Height = 439
|
||||||
|
Align = alLeft
|
||||||
|
Bands = <
|
||||||
|
item
|
||||||
|
end>
|
||||||
|
BufferedPaint = False
|
||||||
|
DataController.DataSource = DataSource1
|
||||||
|
DataController.ParentField = 'DPParent'
|
||||||
|
DataController.KeyField = 'DPID'
|
||||||
|
OptionsBehavior.ExpandOnDblClick = False
|
||||||
|
OptionsSelection.CellSelect = False
|
||||||
|
OptionsView.CellAutoHeight = True
|
||||||
|
OptionsView.Headers = False
|
||||||
|
RootValue = -1
|
||||||
|
Styles.Inactive = DataLink_YPGLWT.Red
|
||||||
|
Styles.Selection = DataLink_YPGLWT.Red
|
||||||
|
Styles.IncSearch = DataLink_YPGLWT.Red
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = cxDBTreeList1Click
|
||||||
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
DataBinding.FieldName = 'DPName'
|
||||||
|
Width = 210
|
||||||
|
Position.ColIndex = 1
|
||||||
|
Position.RowIndex = 0
|
||||||
|
Position.BandIndex = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 249
|
||||||
|
Top = 33
|
||||||
|
Width = 315
|
||||||
|
Height = 439
|
||||||
|
Align = alLeft
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 40
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #19978#32423#32452#32455
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 81
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #32452#32455#21517#31216
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 66
|
||||||
|
Top = 121
|
||||||
|
Width = 48
|
||||||
|
Height = 12
|
||||||
|
Caption = #32452#32455#32534#30721
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 16
|
||||||
|
Width = 60
|
||||||
|
Height = 14
|
||||||
|
Caption = #32452#32455#32467#26500
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object DPTopName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 37
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DPName: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 77
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 1
|
||||||
|
OnKeyPress = DPNameKeyPress
|
||||||
|
end
|
||||||
|
object DPNo: TEdit
|
||||||
|
Left = 129
|
||||||
|
Top = 117
|
||||||
|
Width = 121
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGrid4: TcxGrid
|
||||||
|
Left = 564
|
||||||
|
Top = 33
|
||||||
|
Width = 300
|
||||||
|
Height = 439
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 3
|
||||||
|
object Tv4: TcxGridDBTableView
|
||||||
|
NavigatorButtons.ConfirmDelete = False
|
||||||
|
NavigatorButtons.Delete.Enabled = False
|
||||||
|
NavigatorButtons.Delete.Visible = False
|
||||||
|
DataController.DataSource = DSUser
|
||||||
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
DataController.Summary.FooterSummaryItems = <>
|
||||||
|
DataController.Summary.SummaryGroups = <>
|
||||||
|
OptionsCustomize.ColumnFiltering = False
|
||||||
|
OptionsData.Deleting = False
|
||||||
|
OptionsData.DeletingConfirmation = False
|
||||||
|
OptionsView.GroupByBox = False
|
||||||
|
Styles.Inactive = DataLink_YPGLWT.SHuangSe
|
||||||
|
Styles.IncSearch = DataLink_YPGLWT.SHuangSe
|
||||||
|
Styles.Selection = DataLink_YPGLWT.SHuangSe
|
||||||
|
object cxGridDBColumn1: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#32534#21495
|
||||||
|
DataBinding.FieldName = 'UserId'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 84
|
||||||
|
end
|
||||||
|
object cxGridDBColumn7: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#21517#31216
|
||||||
|
DataBinding.FieldName = 'UserName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 87
|
||||||
|
end
|
||||||
|
object cxGridDBColumn8: TcxGridDBColumn
|
||||||
|
Caption = #21592#24037#32452#32455
|
||||||
|
DataBinding.FieldName = 'dept'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Options.Focusing = False
|
||||||
|
Styles.Header = DataLink_YPGLWT.Default
|
||||||
|
Width = 74
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel2: TcxGridLevel
|
||||||
|
GridView = Tv4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DataSource1: TDataSource
|
||||||
|
DataSet = CDS_Tree
|
||||||
|
Left = 147
|
||||||
|
Top = 219
|
||||||
|
end
|
||||||
|
object ADOQueryTree: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 117
|
||||||
|
Top = 145
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 357
|
||||||
|
Top = 177
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YPGLWT.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 397
|
||||||
|
Top = 177
|
||||||
|
end
|
||||||
|
object CDS_Tree: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 96
|
||||||
|
Top = 256
|
||||||
|
end
|
||||||
|
object CDS_User: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 680
|
||||||
|
Top = 272
|
||||||
|
end
|
||||||
|
object DSUser: TDataSource
|
||||||
|
DataSet = CDS_User
|
||||||
|
Left = 675
|
||||||
|
Top = 211
|
||||||
|
end
|
||||||
|
end
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user