~
This commit is contained in:
		
							parent
							
								
									b0ba7b2508
								
							
						
					
					
						commit
						bbe0d4e993
					
				
							
								
								
									
										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
 | 
			
		||||
							
								
								
									
										54
									
								
								样品仓库/BPCK.dpr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								样品仓库/BPCK.dpr
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,54 @@
 | 
			
		|||
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_ZdyAttachmentBJ_Edit in 'U_ZdyAttachmentBJ_Edit.pas' {frmZdyAttachmentBJ_Edit},
 | 
			
		||||
  U_ZdyAttachmentBJ in 'U_ZdyAttachmentBJ.pas' {frmZdyAttachmentCB};
 | 
			
		||||
 | 
			
		||||
{$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
 | 
			
		||||
							
								
								
									
										403
									
								
								样品仓库/U_BpCk.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										403
									
								
								样品仓库/U_BpCk.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,403 @@
 | 
			
		|||
object frmbpCk: TfrmbpCk
 | 
			
		||||
  Left = 198
 | 
			
		||||
  Top = 152
 | 
			
		||||
  Width = 897
 | 
			
		||||
  Height = 442
 | 
			
		||||
  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 = 881
 | 
			
		||||
    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 = 881
 | 
			
		||||
    Height = 64
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 36
 | 
			
		||||
      Top = 20
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20986#24211#26085#26399
 | 
			
		||||
    end
 | 
			
		||||
    object Label2: TLabel
 | 
			
		||||
      Left = 488
 | 
			
		||||
      Top = 24
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20986#24211#31867#22411
 | 
			
		||||
    end
 | 
			
		||||
    object Label3: TLabel
 | 
			
		||||
      Left = 36
 | 
			
		||||
      Top = 80
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #21457#24448#21333#20301
 | 
			
		||||
    end
 | 
			
		||||
    object Label4: TLabel
 | 
			
		||||
      Left = 252
 | 
			
		||||
      Top = 20
 | 
			
		||||
      Width = 24
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20179#24211
 | 
			
		||||
    end
 | 
			
		||||
    object Label5: TLabel
 | 
			
		||||
      Left = 36
 | 
			
		||||
      Top = 40
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #35746#21333#20449#24687
 | 
			
		||||
    end
 | 
			
		||||
    object Label6: TLabel
 | 
			
		||||
      Left = 252
 | 
			
		||||
      Top = 40
 | 
			
		||||
      Width = 24
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20135#21697
 | 
			
		||||
    end
 | 
			
		||||
    object Label7: TLabel
 | 
			
		||||
      Left = 488
 | 
			
		||||
      Top = 40
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #39068'    '#33394
 | 
			
		||||
    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 = 544
 | 
			
		||||
      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 FirstName: TBtnEditA
 | 
			
		||||
      Left = 88
 | 
			
		||||
      Top = 76
 | 
			
		||||
      Width = 557
 | 
			
		||||
      Height = 20
 | 
			
		||||
      ReadOnly = True
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnBtnClick = FirstNameBtnClick
 | 
			
		||||
    end
 | 
			
		||||
    object ckName: TComboBox
 | 
			
		||||
      Left = 280
 | 
			
		||||
      Top = 16
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      ItemIndex = 0
 | 
			
		||||
      TabOrder = 3
 | 
			
		||||
      Text = #26679#21697#20179#24211
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        #26679#21697#20179#24211)
 | 
			
		||||
    end
 | 
			
		||||
    object orderNO: TBtnEditA
 | 
			
		||||
      Left = 88
 | 
			
		||||
      Top = 36
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      ReadOnly = True
 | 
			
		||||
      TabOrder = 4
 | 
			
		||||
      OnBtnClick = orderNOBtnClick
 | 
			
		||||
    end
 | 
			
		||||
    object PRTCodeName: TEdit
 | 
			
		||||
      Left = 280
 | 
			
		||||
      Top = 36
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Enabled = False
 | 
			
		||||
      ReadOnly = True
 | 
			
		||||
      TabOrder = 5
 | 
			
		||||
    end
 | 
			
		||||
    object PRTColor: TEdit
 | 
			
		||||
      Left = 544
 | 
			
		||||
      Top = 36
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Enabled = False
 | 
			
		||||
      ReadOnly = True
 | 
			
		||||
      TabOrder = 6
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid1: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 122
 | 
			
		||||
    Width = 881
 | 
			
		||||
    Height = 260
 | 
			
		||||
    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>
 | 
			
		||||
      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 v1MJID: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#26465#30721
 | 
			
		||||
        DataBinding.FieldName = 'MJID'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 75
 | 
			
		||||
      end
 | 
			
		||||
      object v1MJXH: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#21495
 | 
			
		||||
        DataBinding.FieldName = 'MJXH'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = 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
 | 
			
		||||
        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'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        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 = 60
 | 
			
		||||
      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 v1Note: TcxGridDBColumn
 | 
			
		||||
        Caption = #22791#27880
 | 
			
		||||
        DataBinding.FieldName = 'Note'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 132
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGrid1Level1: TcxGridLevel
 | 
			
		||||
      GridView = Tv1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ToolBar2: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 93
 | 
			
		||||
    Width = 881
 | 
			
		||||
    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
 | 
			
		||||
    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 = 728
 | 
			
		||||
    Top = 101
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										629
									
								
								样品仓库/U_BpCk.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										629
									
								
								样品仓库/U_BpCk.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,629 @@
 | 
			
		|||
unit U_BpCk;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils,StrUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
 | 
			
		||||
  cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
 | 
			
		||||
  cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
 | 
			
		||||
  cxGridCustomView, cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin,
 | 
			
		||||
  cxButtonEdit, cxDropDownEdit, DBClient, ADODB, cxGridCustomPopupMenu,
 | 
			
		||||
  cxGridPopupMenu, BtnEdit;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmbpCk = class(TForm)
 | 
			
		||||
    ToolBar1: TToolBar;
 | 
			
		||||
    TBSave: TToolButton;
 | 
			
		||||
    TBClose: TToolButton;
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    CRTime: TDateTimePicker;
 | 
			
		||||
    Label2: TLabel;
 | 
			
		||||
    CRType: TComboBox;
 | 
			
		||||
    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;
 | 
			
		||||
    ADOQueryCmd: TADOQuery;
 | 
			
		||||
    ADOQueryTmp: TADOQuery;
 | 
			
		||||
    DataSource1: TDataSource;
 | 
			
		||||
    CDS_Main: TClientDataSet;
 | 
			
		||||
    ToolBar2: TToolBar;
 | 
			
		||||
    ToolButton1: TToolButton;
 | 
			
		||||
    ToolButton2: TToolButton;
 | 
			
		||||
    cxGridPopupMenu1: TcxGridPopupMenu;
 | 
			
		||||
    Label3: TLabel;
 | 
			
		||||
    FirstName: TBtnEditA;
 | 
			
		||||
    v1MJID: TcxGridDBColumn;
 | 
			
		||||
    v1MJXH: TcxGridDBColumn;
 | 
			
		||||
    v1CPType: TcxGridDBColumn;
 | 
			
		||||
    ckName: TComboBox;
 | 
			
		||||
    Label4: TLabel;
 | 
			
		||||
    Label5: TLabel;
 | 
			
		||||
    orderNO: TBtnEditA;
 | 
			
		||||
    Label6: TLabel;
 | 
			
		||||
    PRTCodeName: TEdit;
 | 
			
		||||
    Label7: TLabel;
 | 
			
		||||
    PRTColor: TEdit;
 | 
			
		||||
    v1P_Color: TcxGridDBColumn;
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure FormCreate(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 ToolButton1Click(Sender: TObject);
 | 
			
		||||
    procedure ToolButton2Click(Sender: TObject);
 | 
			
		||||
    procedure TBCloseClick(Sender: TObject);
 | 
			
		||||
    procedure FirstNameBtnClick(Sender: TObject);
 | 
			
		||||
    procedure orderNOBtnClick(Sender: TObject);
 | 
			
		||||
  private
 | 
			
		||||
    fmainID,fsubID:string;
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    function savedate():Boolean;
 | 
			
		||||
    procedure SetComboBox();
 | 
			
		||||
    function YSData(Order_Main10:TClientDataSet):Boolean;
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
  public
 | 
			
		||||
    fkeyNO:string;
 | 
			
		||||
    FType:integer;
 | 
			
		||||
    fCKName:string;
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmbpCk: TfrmbpCk;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 uses
 | 
			
		||||
  U_DataLink,U_Fun10,U_ZDYHelp, U_Bpkclist,
 | 
			
		||||
  U_ProductOrderNewList;
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
function TfrmbpCk.YSData(Order_Main10:TClientDataSet):Boolean;
 | 
			
		||||
var
 | 
			
		||||
  CRID,YFID,Price,PriceUnit,OrderUnit,FComTaiTou,cust:String;
 | 
			
		||||
begin
 | 
			
		||||
  Result:=False;
 | 
			
		||||
  with Order_Main10 do
 | 
			
		||||
  begin
 | 
			
		||||
 | 
			
		||||
    with ADOQueryTmp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      sql.Add('select * from JYOrder_main where MainID='''+Trim(Order_Main10.fieldbyname('MainID').AsString)+'''');
 | 
			
		||||
      Open;
 | 
			
		||||
      cust:=FieldbyName('customerNOName').AsString;
 | 
			
		||||
    end;
 | 
			
		||||
    with ADOQueryTmp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      sql.Add('select * from JYOrder_sub where MainID='''+Trim(Order_Main10.fieldbyname('MainID').AsString)+'''');
 | 
			
		||||
      sql.Add(' and subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
 | 
			
		||||
      Open;
 | 
			
		||||
      Price:=FieldbyName('PrtPrice').AsString;
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
    with ADOQueryTmp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      sql.Add('select * from YF_Money_KC where FactoryName='''+Trim(cust)+''' and YFDefFlag1=0 ');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    if not ADOQueryTmp.IsEmpty then
 | 
			
		||||
    begin
 | 
			
		||||
      CRID:=ADOQueryTmp.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);
 | 
			
		||||
          FieldByName('ZdyStr1').Value:='应收收';
 | 
			
		||||
          Post;
 | 
			
		||||
        end;
 | 
			
		||||
    end;
 | 
			
		||||
    with ADOQueryTmp do
 | 
			
		||||
    begin
 | 
			
		||||
        Close;
 | 
			
		||||
        sql.Clear;
 | 
			
		||||
        sql.Add('select * from YF_Money_CR ');
 | 
			
		||||
        sql.Add(' where MainID='''+Trim(Order_Main10.fieldbyname('MainID').AsString)+'''');
 | 
			
		||||
        sql.Add(' and subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
 | 
			
		||||
        sql.Add(' and YFName=''样品销售'' ');
 | 
			
		||||
        Open;
 | 
			
		||||
    end;
 | 
			
		||||
      if ADOQueryTmp.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(Order_Main10.fieldbyname('MainId').AsString);
 | 
			
		||||
          FieldByName('CRID').Value:=StrToInt(CRID);
 | 
			
		||||
          FieldByName('Filler').Value:=Trim(DName);
 | 
			
		||||
          FieldByName('CRType').Value:='应收款登记';
 | 
			
		||||
          FieldByName('CRFlag').Value:='应收收';
 | 
			
		||||
          FieldByName('QtyFlag').Value:=1;
 | 
			
		||||
          FieldByName('FactoryName').Value:=Trim(cust);
 | 
			
		||||
          FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',date()));
 | 
			
		||||
          FieldByName('YFType').Value:='自动生成';
 | 
			
		||||
          FieldByName('Price').Value:=Price;
 | 
			
		||||
          //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);
 | 
			
		||||
          FieldByName('YFName').Value:='样品销售';
 | 
			
		||||
          FieldByName('MainId').Value:=Trim(Order_Main10.fieldbyname('Mainid').AsString);
 | 
			
		||||
          FieldByName('subID').Value:=Trim(Order_Main10.fieldbyname('subID').AsString);
 | 
			
		||||
          Post;
 | 
			
		||||
        end;
 | 
			
		||||
      end
 | 
			
		||||
      else
 | 
			
		||||
      begin
 | 
			
		||||
        YFID:=Trim(ADOQueryTmp.fieldbyname('YFID').AsString);
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
      with ADOQueryCmd do
 | 
			
		||||
      begin
 | 
			
		||||
        Close;
 | 
			
		||||
        sql.Clear;
 | 
			
		||||
        sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(Qty),0) from BP_INout A  ');
 | 
			
		||||
        sql.Add(' where A.mainID=YF_Money_CR.mainID and  A.subiD=YF_Money_CR.subiD and A.CRType=''样品零售''  )');
 | 
			
		||||
        sql.Add(',PS=(select isnull(count(*),0) from BP_INout A  ');
 | 
			
		||||
        sql.Add(' where A.mainID=YF_Money_CR.mainID and  A.subiD=YF_Money_CR.subiD and A.CRType=''样品零售''  )');
 | 
			
		||||
        sql.Add(' where YFID='''+Trim(YFID)+'''');
 | 
			
		||||
        ExecSQL;
 | 
			
		||||
      end;
 | 
			
		||||
      with ADOQueryCmd do
 | 
			
		||||
      begin
 | 
			
		||||
        Close;
 | 
			
		||||
        sql.Clear;
 | 
			
		||||
        sql.Add('Update YF_Money_CR Set Money=Price*Qty,BBMoney=Price*Qty*HuiLv');
 | 
			
		||||
        sql.Add(' where YFID='''+Trim(YFID)+'''');
 | 
			
		||||
        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;
 | 
			
		||||
  end;
 | 
			
		||||
  Result:=True;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmbpCk.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;
 | 
			
		||||
  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;
 | 
			
		||||
function TfrmbpCk.savedate():Boolean;
 | 
			
		||||
var
 | 
			
		||||
  fkcID: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 ADOQueryCmd do
 | 
			
		||||
    begin
 | 
			
		||||
      close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      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='+quotedstr(trim(fkeyNO)));
 | 
			
		||||
      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;
 | 
			
		||||
    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:=recNo;
 | 
			
		||||
        ADOQueryCmd.FieldByName('CKName').Value:=trim(CKName.Text);
 | 
			
		||||
        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:=fieldbyname('RollNum').AsFloat;
 | 
			
		||||
        ADOQueryCmd.FieldByName('Qty').Value:=fieldbyname('Qty').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('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(adoqueryTmp);
 | 
			
		||||
        end;
 | 
			
		||||
        ADOQueryCmd.FieldByName('kcID').Value:=FieldByName('kcID').AsInteger;
 | 
			
		||||
        ADOQueryCmd.Post;
 | 
			
		||||
 | 
			
		||||
        edit;
 | 
			
		||||
        FieldByName('CRNO').Value:=trim(fkeyNO);
 | 
			
		||||
        FieldByName('mainID').Value:=trim(fmainID);
 | 
			
		||||
        FieldByName('subID').Value:=trim(fsubID);
 | 
			
		||||
        post;
 | 
			
		||||
        next;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
       with ADOQueryCmd do
 | 
			
		||||
       begin
 | 
			
		||||
         close;
 | 
			
		||||
         sql.Clear;
 | 
			
		||||
         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='+quotedstr(trim(fkeyNO)));
 | 
			
		||||
         execsql;
 | 
			
		||||
       end;
 | 
			
		||||
       with ADOQueryCmd do
 | 
			
		||||
       begin
 | 
			
		||||
         close;
 | 
			
		||||
         sql.Clear;
 | 
			
		||||
         sql.Add('update BP_kc set RollNum=1');
 | 
			
		||||
         sql.Add('from  BP_kc  A');
 | 
			
		||||
         sql.Add('where A.RollNum=0 and A.Qty<>0 ');
 | 
			
		||||
         execsql;
 | 
			
		||||
       end;
 | 
			
		||||
 | 
			
		||||
       if trim(CRType.Text)='样品零售' then
 | 
			
		||||
       begin
 | 
			
		||||
         if not YSData(CDS_Main) then
 | 
			
		||||
         begin
 | 
			
		||||
           ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
           exit;
 | 
			
		||||
         end;
 | 
			
		||||
       end;
 | 
			
		||||
    end;
 | 
			
		||||
    CDS_Main.EnableControls;
 | 
			
		||||
    ADOQueryCmd.Connection.CommitTrans;
 | 
			
		||||
    result:=true;
 | 
			
		||||
  except
 | 
			
		||||
    CDS_Main.EnableControls;
 | 
			
		||||
    ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmbpCk.InitGrid();
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    with adoqueryTmp do
 | 
			
		||||
    begin
 | 
			
		||||
      close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Add('select A.*,B.orderNo,B.PrtCodeName,B.PrtColor 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);
 | 
			
		||||
      PRTCodeName.Text:=trim(CDS_Main.fieldbyname('PRTCodeName').AsString);
 | 
			
		||||
      PRTColor.Text:=trim(CDS_Main.fieldbyname('PRTColor').AsString);
 | 
			
		||||
   //   FirstName.TxtCode:=trim(CDS_Main.fieldbyname('FirstNo').AsString);
 | 
			
		||||
   //   FirstName.Text:=trim(CDS_Main.fieldbyname('FirstName').AsString);
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmbpCk:=nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.FormCreate(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  CRTime.Date:=DServerDate;
 | 
			
		||||
  cxGrid1.Align:=alclient;
 | 
			
		||||
  readCxGrid(self.Caption,Tv1,'布匹仓库');
 | 
			
		||||
  fmainID:='';
 | 
			
		||||
  fsubID:='';
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
begin
 | 
			
		||||
  writeCxGrid(self.Caption,Tv1,'布匹仓库');
 | 
			
		||||
  Action:=cahide;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  SetComboBox();
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.TBSaveClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if cds_main.IsEmpty then exit;
 | 
			
		||||
  CRTime.SetFocus;
 | 
			
		||||
  if  trim(CRType.Text)='' then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('出库类型不能为空!','提示信息',0);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  if (trim(CRType.Text)='样品零售') and (trim(orderNO.Text)='') then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('订单信息不能为空!','提示信息',0);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  if cds_main.Locate('QtyUnit','',[])  then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('数量单位不能为空!','提示信息',0);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
  if cds_main.Locate('QtyUnit',NULL,[])  then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('数量单位不能为空!','提示信息',0);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  if savedate() then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('数据保存成功!','提示信息');
 | 
			
		||||
    ModalResult:=1;
 | 
			
		||||
  end
 | 
			
		||||
  else
 | 
			
		||||
  begin
 | 
			
		||||
     application.MessageBox('数据保存失败!','提示信息',MB_ICONERROR);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.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 TfrmbpCk.ToolButton1Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmBpkclist:=TfrmBpkclist.create(self);
 | 
			
		||||
  with frmBpkclist do
 | 
			
		||||
  begin
 | 
			
		||||
    fType:=10;
 | 
			
		||||
    fckName:=self.fckName;
 | 
			
		||||
    if showmodal=1 then
 | 
			
		||||
    begin
 | 
			
		||||
      cds_main.DisableControls;
 | 
			
		||||
      cds_main.First;
 | 
			
		||||
      while not cds_main.Eof  do
 | 
			
		||||
      begin
 | 
			
		||||
        if (cds_main.fieldbyname('ssel').AsBoolean) and
 | 
			
		||||
          (not self.cds_main.Locate('kcid',cds_main.fieldbyname('kcid').AsInteger,[])) then
 | 
			
		||||
        begin
 | 
			
		||||
        self.cds_main.Append;
 | 
			
		||||
        self.cds_main.FieldByName('kcid').Value:=trim(cds_main.fieldbyname('kcid').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('MJID').Value:=trim(cds_main.fieldbyname('MJID').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('MJXH').Value:=trim(cds_main.fieldbyname('MJXH').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('CPTYPE').Value:=trim(cds_main.fieldbyname('CPTYPE').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('P_Code').Value:=trim(cds_main.fieldbyname('P_Code').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('P_CodeName').Value:=trim(cds_main.fieldbyname('P_CodeName').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('P_spec').Value:=trim(cds_main.fieldbyname('P_spec').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('P_Color').Value:=trim(cds_main.fieldbyname('P_Color').AsString);
 | 
			
		||||
        self.cds_main.FieldByName('P_MF').Value:=cds_main.fieldbyname('P_MF').AsFloat;
 | 
			
		||||
        self.cds_main.FieldByName('P_KZ').Value:=cds_main.fieldbyname('P_KZ').AsFloat;
 | 
			
		||||
        self.cds_main.FieldByName('RollNum').Value:=cds_main.fieldbyname('RollNum').AsFloat;
 | 
			
		||||
        self.cds_main.FieldByName('Qty').Value:=cds_main.fieldbyname('Qty').AsFloat;
 | 
			
		||||
        self.cds_main.FieldByName('QtyUnit').Value:=trim(cds_main.fieldbyname('QtyUnit').AsString);
 | 
			
		||||
        self.cds_main.Post;
 | 
			
		||||
        end;
 | 
			
		||||
        cds_main.Next;
 | 
			
		||||
      end;
 | 
			
		||||
      cds_main.EnableControls;
 | 
			
		||||
    end;
 | 
			
		||||
    free;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.ToolButton2Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if  CDS_Main.IsEmpty then exit;
 | 
			
		||||
  CDS_Main.Delete;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.TBCloseClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  close;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.FirstNameBtnClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    frmZDYHelp:=TfrmZDYHelp.Create(Application);
 | 
			
		||||
    with frmZDYHelp do
 | 
			
		||||
    begin
 | 
			
		||||
      flag:='Factory';
 | 
			
		||||
      flagname:='入库地点';
 | 
			
		||||
      MainType:='RanFactory';
 | 
			
		||||
      if ShowModal=1 then
 | 
			
		||||
      begin
 | 
			
		||||
        FirstName.Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
 | 
			
		||||
        FirstName.TxtCode:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYNo').AsString);
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    frmZDYHelp.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmbpCk.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.PRTCodeName.Text:=trim(Order_Main.fieldbyname('PRTCodeName').AsString);
 | 
			
		||||
       self.PRTColor.Text:=trim(Order_Main.fieldbyname('PRTColor').AsString);
 | 
			
		||||
     end;
 | 
			
		||||
     free;
 | 
			
		||||
   end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										480
									
								
								样品仓库/U_BpGdCkEdit.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										480
									
								
								样品仓库/U_BpGdCkEdit.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,480 @@
 | 
			
		|||
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
 | 
			
		||||
        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 = 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 = 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
 | 
			
		||||
							
								
								
									
										776
									
								
								样品仓库/U_BpGdCkEdit.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										776
									
								
								样品仓库/U_BpGdCkEdit.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,776 @@
 | 
			
		|||
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;
 | 
			
		||||
    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);
 | 
			
		||||
  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;
 | 
			
		||||
{$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;
 | 
			
		||||
          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 not YSData(fkeyNo,inttostr(i),CDS_Main) then
 | 
			
		||||
          begin
 | 
			
		||||
            CDS_Main.EnableControls;
 | 
			
		||||
            ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
            exit;
 | 
			
		||||
          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;
 | 
			
		||||
  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('%8.0f',[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;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
							
								
								
									
										436
									
								
								样品仓库/U_BpGdCklist.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										436
									
								
								样品仓库/U_BpGdCklist.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,436 @@
 | 
			
		|||
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
 | 
			
		||||
  frmBpGdCkEdit:=TfrmBpGdCkEdit.create(self);
 | 
			
		||||
  with frmBpGdCkEdit 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 TBDel.Visible:=true
 | 
			
		||||
  else TBDel.Visible:=false;
 | 
			
		||||
  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.
 | 
			
		||||
							
								
								
									
										596
									
								
								样品仓库/U_BpGdYPCkEdit.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										596
									
								
								样品仓库/U_BpGdYPCkEdit.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,596 @@
 | 
			
		|||
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
 | 
			
		||||
        ItemIndex = 0
 | 
			
		||||
        TabOrder = 1
 | 
			
		||||
        OnKeyPress = CRTimeKeyPress
 | 
			
		||||
        Items.Strings = (
 | 
			
		||||
          ''
 | 
			
		||||
          #29983#20135#20837#24211)
 | 
			
		||||
      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
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										882
									
								
								样品仓库/U_BpGdYPCkEdit.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										882
									
								
								样品仓库/U_BpGdYPCkEdit.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,882 @@
 | 
			
		|||
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;
 | 
			
		||||
    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;
 | 
			
		||||
          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 not YSData(fkeyNo,inttostr(i),CDS_Main) then
 | 
			
		||||
          begin
 | 
			
		||||
            CDS_Main.EnableControls;
 | 
			
		||||
            ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
            exit;
 | 
			
		||||
          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('%8.0f',[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('%.0f',[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.
 | 
			
		||||
							
								
								
									
										593
									
								
								样品仓库/U_BpRk.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										593
									
								
								样品仓库/U_BpRk.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,593 @@
 | 
			
		|||
object frmbpRk: TfrmbpRk
 | 
			
		||||
  Left = 173
 | 
			
		||||
  Top = 162
 | 
			
		||||
  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 = 96
 | 
			
		||||
    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 = 356
 | 
			
		||||
      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 = 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 Label9: TLabel
 | 
			
		||||
      Left = 36
 | 
			
		||||
      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 Label5: TLabel
 | 
			
		||||
      Left = 876
 | 
			
		||||
      Top = 20
 | 
			
		||||
      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 Label6: TLabel
 | 
			
		||||
      Left = 876
 | 
			
		||||
      Top = 48
 | 
			
		||||
      Width = 52
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #22797#21046#34892#25968
 | 
			
		||||
      Font.Charset = GB2312_CHARSET
 | 
			
		||||
      Font.Color = clWindowText
 | 
			
		||||
      Font.Height = -12
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object Label7: TLabel
 | 
			
		||||
      Left = 404
 | 
			
		||||
      Top = 148
 | 
			
		||||
      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 Label25: TLabel
 | 
			
		||||
      Left = 104
 | 
			
		||||
      Top = 160
 | 
			
		||||
      Width = 52
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20844#21496#25260#22836
 | 
			
		||||
      Font.Charset = GB2312_CHARSET
 | 
			
		||||
      Font.Color = clWindowText
 | 
			
		||||
      Font.Height = -12
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object Label8: TLabel
 | 
			
		||||
      Left = 355
 | 
			
		||||
      Top = 43
 | 
			
		||||
      Width = 53
 | 
			
		||||
      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 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 = 412
 | 
			
		||||
      Top = 16
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      TabOrder = 1
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        #37319#36141#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 = 64
 | 
			
		||||
      Width = 421
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 3
 | 
			
		||||
    end
 | 
			
		||||
    object cust: TBtnEditA
 | 
			
		||||
      Left = 92
 | 
			
		||||
      Top = 40
 | 
			
		||||
      Width = 245
 | 
			
		||||
      Height = 20
 | 
			
		||||
      ReadOnly = True
 | 
			
		||||
      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 = 460
 | 
			
		||||
      Top = 144
 | 
			
		||||
      Width = 333
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Enabled = False
 | 
			
		||||
      TabOrder = 7
 | 
			
		||||
    end
 | 
			
		||||
    object SYRName: TComboBox
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 156
 | 
			
		||||
      Top = 156
 | 
			
		||||
      Width = 253
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      Ctl3D = False
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      ParentCtl3D = False
 | 
			
		||||
      TabOrder = 8
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        #27491#24120#21333
 | 
			
		||||
        #21098#26679#21333)
 | 
			
		||||
    end
 | 
			
		||||
    object FactoryNoName: TEdit
 | 
			
		||||
      Left = 413
 | 
			
		||||
      Top = 39
 | 
			
		||||
      Width = 97
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 9
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid1: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 154
 | 
			
		||||
    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 v1MJXH: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#21495
 | 
			
		||||
        DataBinding.FieldName = 'MJXH'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 50
 | 
			
		||||
      end
 | 
			
		||||
      object v1MJId: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#26465#30721
 | 
			
		||||
        DataBinding.FieldName = 'MJId'
 | 
			
		||||
        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
 | 
			
		||||
        Properties.OnEditValueChanged = v1P_CodeNamePropertiesEditValueChanged
 | 
			
		||||
        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
 | 
			
		||||
        Properties.OnEditValueChanged = v1P_ColorPropertiesEditValueChanged
 | 
			
		||||
        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 = 'TcxComboBoxProperties'
 | 
			
		||||
        Properties.DropDownListStyle = lsFixedList
 | 
			
		||||
        Properties.Items.Strings = (
 | 
			
		||||
          'M'
 | 
			
		||||
          'Kg'
 | 
			
		||||
          #26412)
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #21333#20215
 | 
			
		||||
        DataBinding.FieldName = 'Price'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        Properties.OnEditValueChanged = v1QtyPropertiesEditValueChanged
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      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 = 81
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGrid1Level1: TcxGridLevel
 | 
			
		||||
      GridView = Tv1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ToolBar2: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 125
 | 
			
		||||
    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 = 532
 | 
			
		||||
    Top = 65
 | 
			
		||||
  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
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										1212
									
								
								样品仓库/U_BpRk.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1212
									
								
								样品仓库/U_BpRk.pas
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										630
									
								
								样品仓库/U_BpRklist.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										630
									
								
								样品仓库/U_BpRklist.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,630 @@
 | 
			
		|||
object frmBpRklist: TfrmBpRklist
 | 
			
		||||
  Left = 98
 | 
			
		||||
  Top = 205
 | 
			
		||||
  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
 | 
			
		||||
    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 = #21024#38500
 | 
			
		||||
      ImageIndex = 17
 | 
			
		||||
      OnClick = TBDelClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBExport: TToolButton
 | 
			
		||||
      Left = 315
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #23548#20986
 | 
			
		||||
      ImageIndex = 75
 | 
			
		||||
      OnClick = TBExportClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBPrint: TToolButton
 | 
			
		||||
      Left = 378
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #25171#21360
 | 
			
		||||
      ImageIndex = 12
 | 
			
		||||
      OnClick = TBPrintClick
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton1: TToolButton
 | 
			
		||||
      Left = 441
 | 
			
		||||
      Top = 0
 | 
			
		||||
      Caption = #25171#21360#36864#36135#21333
 | 
			
		||||
      ImageIndex = 12
 | 
			
		||||
      Visible = False
 | 
			
		||||
      OnClick = ToolButton1Click
 | 
			
		||||
    end
 | 
			
		||||
    object TBClose: TToolButton
 | 
			
		||||
      Left = 536
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      ImageIndex = 55
 | 
			
		||||
      OnClick = TBCloseClick
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 32
 | 
			
		||||
    Width = 1144
 | 
			
		||||
    Height = 61
 | 
			
		||||
    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 = 168
 | 
			
		||||
      Top = 16
 | 
			
		||||
      Width = 6
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = '-'
 | 
			
		||||
    end
 | 
			
		||||
    object Label3: TLabel
 | 
			
		||||
      Left = 448
 | 
			
		||||
      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 = 616
 | 
			
		||||
      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 = #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 = 760
 | 
			
		||||
      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 = 896
 | 
			
		||||
      Top = 16
 | 
			
		||||
      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 = 288
 | 
			
		||||
      Top = 40
 | 
			
		||||
      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 = 500
 | 
			
		||||
      Top = 40
 | 
			
		||||
      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 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 = 500
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object P_Color: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 644
 | 
			
		||||
      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 = (
 | 
			
		||||
        ''
 | 
			
		||||
        #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 = 928
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 7
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object defstr2: TComboBox
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 344
 | 
			
		||||
      Top = 36
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      ItemIndex = 0
 | 
			
		||||
      TabOrder = 8
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        ''
 | 
			
		||||
        #24555#20214
 | 
			
		||||
        #24930#20214)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid1: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 93
 | 
			
		||||
    Width = 1144
 | 
			
		||||
    Height = 336
 | 
			
		||||
    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
 | 
			
		||||
      OptionsData.Editing = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      OptionsView.Indicator = True
 | 
			
		||||
      Styles.Header = BPCK_DataLink.Default
 | 
			
		||||
      object v1CRNO: TcxGridDBColumn
 | 
			
		||||
        Caption = #20837#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 = #20837#24211#26085#26399
 | 
			
		||||
        DataBinding.FieldName = 'CRTime'
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1CRType: TcxGridDBColumn
 | 
			
		||||
        Caption = #20837#24211#31867#22411
 | 
			
		||||
        DataBinding.FieldName = 'CRType'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
      end
 | 
			
		||||
      object v1cust: TcxGridDBColumn
 | 
			
		||||
        Caption = #23458#25143
 | 
			
		||||
        DataBinding.FieldName = 'cust'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 77
 | 
			
		||||
      end
 | 
			
		||||
      object v1MJID: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#26465#30721
 | 
			
		||||
        DataBinding.FieldName = 'MJID'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1MJXH: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#21495
 | 
			
		||||
        DataBinding.FieldName = 'MJXH'
 | 
			
		||||
        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
 | 
			
		||||
        Width = 90
 | 
			
		||||
      end
 | 
			
		||||
      object v1P_SPEC: 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'
 | 
			
		||||
        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'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1packNO: TcxGridDBColumn
 | 
			
		||||
        Caption = #21253#21495
 | 
			
		||||
        DataBinding.FieldName = 'packNO'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        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
 | 
			
		||||
      object v1defstr2: TcxGridDBColumn
 | 
			
		||||
        Caption = #36135#36816#31867#22411
 | 
			
		||||
        DataBinding.FieldName = 'defstr2'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1gangNo: TcxGridDBColumn
 | 
			
		||||
        Caption = #32568#21495
 | 
			
		||||
        DataBinding.FieldName = 'gangNo'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1defNote1: TcxGridDBColumn
 | 
			
		||||
        Caption = #29289#27969#22791#27880
 | 
			
		||||
        DataBinding.FieldName = 'defNote1'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 80
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #23458#25143#22320#22336
 | 
			
		||||
        DataBinding.FieldName = 'custaddress'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 80
 | 
			
		||||
      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 = 604
 | 
			
		||||
    Top = 4
 | 
			
		||||
  end
 | 
			
		||||
  object DataSource1: TDataSource
 | 
			
		||||
    DataSet = CDS_Main
 | 
			
		||||
    Left = 628
 | 
			
		||||
    Top = 5
 | 
			
		||||
  end
 | 
			
		||||
  object CDS_Main: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 664
 | 
			
		||||
    Top = 9
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu1: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid1
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 508
 | 
			
		||||
    Top = 140
 | 
			
		||||
  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 = 836
 | 
			
		||||
    Top = 4
 | 
			
		||||
    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 = 912
 | 
			
		||||
    Top = 9
 | 
			
		||||
  end
 | 
			
		||||
  object ADOPrint: TADOQuery
 | 
			
		||||
    Connection = BPCK_DataLink.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 716
 | 
			
		||||
    Top = 4
 | 
			
		||||
  end
 | 
			
		||||
  object RMDB_MD: TRMDBDataSet
 | 
			
		||||
    Visible = True
 | 
			
		||||
    DataSet = ADOPrint
 | 
			
		||||
    Left = 764
 | 
			
		||||
    Top = 4
 | 
			
		||||
  end
 | 
			
		||||
  object ADOPrint1: TADOQuery
 | 
			
		||||
    Connection = BPCK_DataLink.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 864
 | 
			
		||||
    Top = 4
 | 
			
		||||
  end
 | 
			
		||||
  object RMDB_Sub: TRMDBDataSet
 | 
			
		||||
    Visible = True
 | 
			
		||||
    DataSet = ADOPrint1
 | 
			
		||||
    Left = 632
 | 
			
		||||
    Top = 160
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										579
									
								
								样品仓库/U_BpRklist.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										579
									
								
								样品仓库/U_BpRklist.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,579 @@
 | 
			
		|||
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, cxLookAndFeels,
 | 
			
		||||
  cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
 | 
			
		||||
  dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
 | 
			
		||||
  dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
 | 
			
		||||
  dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
 | 
			
		||||
  dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
 | 
			
		||||
  dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
 | 
			
		||||
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
 | 
			
		||||
  dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
 | 
			
		||||
  dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
 | 
			
		||||
  dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
 | 
			
		||||
  dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
 | 
			
		||||
  dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
 | 
			
		||||
  dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
 | 
			
		||||
  dxSkinscxPCPainter, cxNavigator;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  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;
 | 
			
		||||
    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;
 | 
			
		||||
    v1MJID: TcxGridDBColumn;
 | 
			
		||||
    v1MJXH: TcxGridDBColumn;
 | 
			
		||||
    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;
 | 
			
		||||
    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);
 | 
			
		||||
  private
 | 
			
		||||
    TblCprk: string;
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    procedure SetComboBox();
 | 
			
		||||
    procedure CreateTable();
 | 
			
		||||
    procedure DropTable();
 | 
			
		||||
    procedure DoRkNum();
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
  public
 | 
			
		||||
    fCKName, fManage: string;
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmBpRklist: TfrmBpRklist;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  U_DataLink, U_Fun10, U_ZDYHelp, U_BpRk;
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
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 * 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);
 | 
			
		||||
    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();
 | 
			
		||||
  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 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;
 | 
			
		||||
  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 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;
 | 
			
		||||
 | 
			
		||||
  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_InOut ');
 | 
			
		||||
      SQL.Add('where  CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + ''' ');
 | 
			
		||||
      sql.Add('delete  from BP_kc ');
 | 
			
		||||
      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;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										554
									
								
								样品仓库/U_BpYPCkEdit.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										554
									
								
								样品仓库/U_BpYPCkEdit.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,554 @@
 | 
			
		|||
object frmBpYPCkEdit: TfrmBpYPCkEdit
 | 
			
		||||
  Left = 329
 | 
			
		||||
  Top = 239
 | 
			
		||||
  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 = 1053
 | 
			
		||||
    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 = 153
 | 
			
		||||
    Width = 1053
 | 
			
		||||
    Height = 420
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Tv1: TcxGridDBTableView
 | 
			
		||||
      Navigator.Buttons.CustomButtons = <>
 | 
			
		||||
      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
 | 
			
		||||
          Column = v1ckqty
 | 
			
		||||
        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
 | 
			
		||||
      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 v1Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #21333#20215
 | 
			
		||||
        DataBinding.FieldName = 'Price'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
      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 = 80
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGrid1Level1: TcxGridLevel
 | 
			
		||||
      GridView = Tv1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel2: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 32
 | 
			
		||||
    Width = 1053
 | 
			
		||||
    Height = 93
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelOuter = bvNone
 | 
			
		||||
    Caption = 'Panel2'
 | 
			
		||||
    TabOrder = 2
 | 
			
		||||
    object GroupBox1: TGroupBox
 | 
			
		||||
      Left = 0
 | 
			
		||||
      Top = 0
 | 
			
		||||
      Width = 1053
 | 
			
		||||
      Height = 93
 | 
			
		||||
      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 = 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 Label1: TLabel
 | 
			
		||||
        Left = 588
 | 
			
		||||
        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 = 936
 | 
			
		||||
        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 = 410
 | 
			
		||||
        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 Label25: TLabel
 | 
			
		||||
        Left = 410
 | 
			
		||||
        Top = 20
 | 
			
		||||
        Width = 52
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #20844#21496#25260#22836
 | 
			
		||||
        Font.Charset = GB2312_CHARSET
 | 
			
		||||
        Font.Color = clWindowText
 | 
			
		||||
        Font.Height = -12
 | 
			
		||||
        Font.Name = #23435#20307
 | 
			
		||||
        Font.Style = [fsBold]
 | 
			
		||||
        ParentFont = False
 | 
			
		||||
      end
 | 
			
		||||
      object Label4: TLabel
 | 
			
		||||
        Left = 24
 | 
			
		||||
        Top = 68
 | 
			
		||||
        Width = 60
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #21098'  '#26679' '#20154
 | 
			
		||||
        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 = 88
 | 
			
		||||
        Top = 40
 | 
			
		||||
        Width = 297
 | 
			
		||||
        Height = 20
 | 
			
		||||
        Enabled = False
 | 
			
		||||
        TabOrder = 2
 | 
			
		||||
        OnBtnClick = custBtnClick
 | 
			
		||||
      end
 | 
			
		||||
      object orderNO: TBtnEditA
 | 
			
		||||
        Left = 652
 | 
			
		||||
        Top = 17
 | 
			
		||||
        Width = 128
 | 
			
		||||
        Height = 20
 | 
			
		||||
        ReadOnly = True
 | 
			
		||||
        TabOrder = 3
 | 
			
		||||
        OnBtnClick = orderNOBtnClick
 | 
			
		||||
      end
 | 
			
		||||
      object Edit1: TEdit
 | 
			
		||||
        Left = 964
 | 
			
		||||
        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 = 469
 | 
			
		||||
        Top = 40
 | 
			
		||||
        Width = 313
 | 
			
		||||
        Height = 20
 | 
			
		||||
        TabOrder = 5
 | 
			
		||||
      end
 | 
			
		||||
      object SYRName: TComboBox
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 469
 | 
			
		||||
        Top = 16
 | 
			
		||||
        Width = 96
 | 
			
		||||
        Height = 20
 | 
			
		||||
        Style = csDropDownList
 | 
			
		||||
        Ctl3D = False
 | 
			
		||||
        ItemHeight = 12
 | 
			
		||||
        ParentCtl3D = False
 | 
			
		||||
        TabOrder = 6
 | 
			
		||||
        Items.Strings = (
 | 
			
		||||
          #27491#24120#21333
 | 
			
		||||
          #21098#26679#21333)
 | 
			
		||||
      end
 | 
			
		||||
      object defstr1: TBtnEditA
 | 
			
		||||
        Left = 88
 | 
			
		||||
        Top = 64
 | 
			
		||||
        Width = 101
 | 
			
		||||
        Height = 20
 | 
			
		||||
        Enabled = False
 | 
			
		||||
        TabOrder = 7
 | 
			
		||||
        OnBtnClick = custBtnClick
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ToolBar2: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 125
 | 
			
		||||
    Width = 1053
 | 
			
		||||
    Height = 28
 | 
			
		||||
    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 = 128
 | 
			
		||||
    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 = 104
 | 
			
		||||
      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
 | 
			
		||||
    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 = 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
 | 
			
		||||
							
								
								
									
										1054
									
								
								样品仓库/U_BpYPCkEdit.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1054
									
								
								样品仓库/U_BpYPCkEdit.pas
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										567
									
								
								样品仓库/U_Bpcklist.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										567
									
								
								样品仓库/U_Bpcklist.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,567 @@
 | 
			
		|||
object frmBpCklist: TfrmBpCklist
 | 
			
		||||
  Left = 212
 | 
			
		||||
  Top = 134
 | 
			
		||||
  Width = 1088
 | 
			
		||||
  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 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 = 1072
 | 
			
		||||
    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 = #21024#38500
 | 
			
		||||
      ImageIndex = 17
 | 
			
		||||
      OnClick = TBDelClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBExport: TToolButton
 | 
			
		||||
      Left = 315
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #23548#20986
 | 
			
		||||
      ImageIndex = 75
 | 
			
		||||
      OnClick = TBExportClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBPrint: TToolButton
 | 
			
		||||
      Left = 378
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #25171#21360#20986#24211#21333
 | 
			
		||||
      ImageIndex = 12
 | 
			
		||||
      OnClick = TBPrintClick
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton1: TToolButton
 | 
			
		||||
      Left = 477
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #25171#21360#20986#24211#26631#31614
 | 
			
		||||
      ImageIndex = 12
 | 
			
		||||
      OnClick = ToolButton1Click
 | 
			
		||||
    end
 | 
			
		||||
    object TBClose: TToolButton
 | 
			
		||||
      Left = 588
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      ImageIndex = 55
 | 
			
		||||
      OnClick = TBCloseClick
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 32
 | 
			
		||||
    Width = 1072
 | 
			
		||||
    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 = 456
 | 
			
		||||
      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 = 624
 | 
			
		||||
      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 Label8: TLabel
 | 
			
		||||
      Left = 776
 | 
			
		||||
      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 = 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 = 508
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object P_Color: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 652
 | 
			
		||||
      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 customerNoname: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 808
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 6
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid1: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 77
 | 
			
		||||
    Width = 1072
 | 
			
		||||
    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 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 v1SYRName: TcxGridDBColumn
 | 
			
		||||
        Caption = #20844#21496#25260#22836
 | 
			
		||||
        DataBinding.FieldName = 'SYRName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1orderNo: TcxGridDBColumn
 | 
			
		||||
        Caption = #35746#21333#21495
 | 
			
		||||
        DataBinding.FieldName = 'orderNo'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1customerNoname: TcxGridDBColumn
 | 
			
		||||
        Caption = #23458#25143
 | 
			
		||||
        DataBinding.FieldName = 'customerNoname'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 80
 | 
			
		||||
      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 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 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_SPEC: TcxGridDBColumn
 | 
			
		||||
        Caption = #35268#26684#22411#21495
 | 
			
		||||
        DataBinding.FieldName = 'P_SPEC'
 | 
			
		||||
        Visible = False
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Sorting = False
 | 
			
		||||
        Width = 90
 | 
			
		||||
      end
 | 
			
		||||
      object v1P_Color: TcxGridDBColumn
 | 
			
		||||
        Caption = #39068#33394
 | 
			
		||||
        DataBinding.FieldName = 'P_Color'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      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 = #21305#25968
 | 
			
		||||
        DataBinding.FieldName = 'RollNum'
 | 
			
		||||
        Visible = False
 | 
			
		||||
        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
 | 
			
		||||
      object v1Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #21098#26679#20154
 | 
			
		||||
        DataBinding.FieldName = 'defstr1'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      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 = 824
 | 
			
		||||
    Top = 28
 | 
			
		||||
  end
 | 
			
		||||
  object DataSource1: TDataSource
 | 
			
		||||
    DataSet = CDS_Main
 | 
			
		||||
    Left = 936
 | 
			
		||||
    Top = 25
 | 
			
		||||
  end
 | 
			
		||||
  object CDS_Main: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 660
 | 
			
		||||
    Top = 5
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu1: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid1
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 592
 | 
			
		||||
    Top = 52
 | 
			
		||||
  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
 | 
			
		||||
    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 = 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
 | 
			
		||||
							
								
								
									
										499
									
								
								样品仓库/U_Bpcklist.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										499
									
								
								样品仓库/U_Bpcklist.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,499 @@
 | 
			
		|||
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, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
    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;
 | 
			
		||||
    v1MJID: TcxGridDBColumn;
 | 
			
		||||
    v1MJXH: TcxGridDBColumn;
 | 
			
		||||
    v1CPTYPE: TcxGridDBColumn;
 | 
			
		||||
    ckName: TComboBox;
 | 
			
		||||
    Label6: TLabel;
 | 
			
		||||
    v1P_Color: TcxGridDBColumn;
 | 
			
		||||
    ADOPrint: TADOQuery;
 | 
			
		||||
    RMDB_MD: TRMDBDataSet;
 | 
			
		||||
    RMGridReport1: TRMGridReport;
 | 
			
		||||
    RMXLSExport1: TRMXLSExport;
 | 
			
		||||
    v1orderNo: TcxGridDBColumn;
 | 
			
		||||
    v1customerNoname: TcxGridDBColumn;
 | 
			
		||||
    customerNoname: TEdit;
 | 
			
		||||
    Label7: TLabel;
 | 
			
		||||
    Label8: TLabel;
 | 
			
		||||
    v1SYRName: TcxGridDBColumn;
 | 
			
		||||
    v1Column1: TcxGridDBColumn;
 | 
			
		||||
    ToolButton1: TToolButton;
 | 
			
		||||
    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);
 | 
			
		||||
  private
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    procedure SetComboBox();
 | 
			
		||||
    { 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.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;
 | 
			
		||||
      sql.Add('select A.*,B.orderNo,C.customerNoname 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 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);
 | 
			
		||||
  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
 | 
			
		||||
  frmBpYPCkEdit:=TfrmBpYPCkEdit.create(self);
 | 
			
		||||
  with frmBpYPCkEdit 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();
 | 
			
		||||
  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;  }
 | 
			
		||||
 | 
			
		||||
  frmBpYPCkEdit:=TfrmBpYPCkEdit.create(self);
 | 
			
		||||
  with frmBpYPCkEdit 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('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(')');
 | 
			
		||||
      if CDS_Main.FieldByName('CRType').AsString='样品销售出库' then
 | 
			
		||||
      begin
 | 
			
		||||
        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  CRID='''+Trim(CRID)+'''');
 | 
			
		||||
      end;
 | 
			
		||||
      if CDS_Main.FieldByName('CRType').AsString='龙运样品销售出库' then
 | 
			
		||||
      begin
 | 
			
		||||
        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  CRID='''+Trim(CRID)+'''');
 | 
			
		||||
      end;
 | 
			
		||||
      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;
 | 
			
		||||
{  if trim(CDS_Main.FieldByName('CRType').AsString)<>'样品零售' then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('不是样品零售,不能打印出库单!','提示信息',0);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;    }
 | 
			
		||||
 | 
			
		||||
  with AdoPrint do
 | 
			
		||||
  begin
 | 
			
		||||
    close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select A.mainID,A.subID,A.SYRName,A.cust,A.P_CodeName,A.P_Color,A.QtyUnit,B.Sorddefnote1,c.note,C.orderNo,C.customerNoname,C.orddefnote1,C.FHAddress,C.LXFS,C.Filler as xsyg,SUM(A.Qty) as Qty,AVG(A.Price) as Price,SUM(A.money) as Money,  ');
 | 
			
		||||
    sql.Add('customNameAddress=(select Top 1 DEFNote1 from KH_Zdy_Attachment X where X.ZdyName=A.cust),  ');
 | 
			
		||||
    sql.Add('DEFNote2=(select Top 1 DEFNote2 from KH_Zdy_Attachment X where X.ZdyName=A.cust),      ');
 | 
			
		||||
    sql.Add('defstr8=(select Top 1 defstr8 from KH_Zdy_Attachment X where X.ZdyName=A.cust),        ');
 | 
			
		||||
    sql.Add('defstr2=(select Top 1 defstr2 from KH_Zdy_Attachment X where X.ZdyName=A.cust),');
 | 
			
		||||
    sql.Add('DEFNote3=(select Top 1 DEFNote3 from KH_Zdy_Attachment X where X.ZdyName=A.cust),    ');
 | 
			
		||||
    sql.Add('P_CodeNameZW=(select Top 1 defnote3 from KH_Zdy_Attachment X where X.ZdyName=A.P_CodeName and Type=''CP'') ');
 | 
			
		||||
    sql.Add(',P_colorName=(select Top 1 DEFstr6 from KH_Zdy_Attachment X where X.ZdyName=A.P_CodeName and X.DEFstr3=A.P_Color and Type=''CP'') ');
 | 
			
		||||
    sql.Add('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(CDS_Main.fieldbyname('CRNO').AsString)));
 | 
			
		||||
    sql.Add('group by  A.mainID,A.subID,A.SYRName,A.cust,A.P_CodeName,A.P_Color,A.QtyUnit,B.Sorddefnote1,c.note,C.orderNo,C.customerNoname,C.orddefnote1,C.FHAddress,C.LXFS,C.Filler');
 | 
			
		||||
    open;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  try
 | 
			
		||||
 | 
			
		||||
    IF fCKName='样品仓库' then
 | 
			
		||||
    filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单样品.rmf'
 | 
			
		||||
    else
 | 
			
		||||
    filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单样品1.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;
 | 
			
		||||
 | 
			
		||||
    IF fCKName='样品仓库' then
 | 
			
		||||
    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;
 | 
			
		||||
    RMGridReport1.PrintReport;
 | 
			
		||||
  finally
 | 
			
		||||
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBpCklist.TBExportClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then Exit;
 | 
			
		||||
  TcxGridToExcel(self.Caption,cxgrid1);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBpCklist.ToolButton1Click(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  filepath:string;
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then exit;
 | 
			
		||||
{  if trim(CDS_Main.FieldByName('CRType').AsString)<>'样品零售' then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('不是样品零售,不能打印出库单!','提示信息',0);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;    }
 | 
			
		||||
 | 
			
		||||
  with AdoPrint do
 | 
			
		||||
  begin
 | 
			
		||||
    close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select A.mainID,A.subID,A.SYRName,A.cust,A.P_CodeName,A.P_Color,A.QtyUnit,B.Sorddefnote1,c.note,C.orderNo,C.customerNoname,C.orddefnote1,C.FHAddress,C.LXFS,C.Filler as xsyg,SUM(A.Qty) as Qty,AVG(A.Price) as Price,SUM(A.money) as Money,  ');
 | 
			
		||||
    sql.Add('customNameAddress=(select Top 1 DEFNote1 from KH_Zdy_Attachment X where X.ZdyName=A.cust),  ');
 | 
			
		||||
    sql.Add('DEFNote2=(select Top 1 DEFNote2 from KH_Zdy_Attachment X where X.ZdyName=A.cust),      ');
 | 
			
		||||
    sql.Add('defstr8=(select Top 1 defstr8 from KH_Zdy_Attachment X where X.ZdyName=A.cust),        ');
 | 
			
		||||
    sql.Add('defstr2=(select Top 1 defstr2 from KH_Zdy_Attachment X where X.ZdyName=A.cust),');
 | 
			
		||||
    sql.Add('DEFNote3=(select Top 1 DEFNote3 from KH_Zdy_Attachment X where X.ZdyName=A.cust),    ');
 | 
			
		||||
    sql.Add('P_CodeNameZW=(select Top 1 defnote3 from KH_Zdy_Attachment X where X.ZdyName=A.P_CodeName and Type=''CP'') ');
 | 
			
		||||
    sql.Add(',P_colorName=(select Top 1 DEFstr6 from KH_Zdy_Attachment X where X.ZdyName=A.P_CodeName and X.DEFstr3=A.P_Color and Type=''CP'') ');
 | 
			
		||||
    sql.Add('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(CDS_Main.fieldbyname('CRNO').AsString)));
 | 
			
		||||
    sql.Add('group by  A.mainID,A.subID,A.SYRName,A.cust,A.P_CodeName,A.P_Color,A.QtyUnit,B.Sorddefnote1,c.note,C.orderNo,C.customerNoname,C.orddefnote1,C.FHAddress,C.LXFS,C.Filler');
 | 
			
		||||
    open;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  try
 | 
			
		||||
 | 
			
		||||
    filepath:=ExtractFilePath(Application.ExeName) + 'report\出库码单标签1.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;
 | 
			
		||||
    RMGridReport1.PrintReport;
 | 
			
		||||
  finally
 | 
			
		||||
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										494
									
								
								样品仓库/U_BpkcCk.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										494
									
								
								样品仓库/U_BpkcCk.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,494 @@
 | 
			
		|||
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
 | 
			
		||||
  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
 | 
			
		||||
        DataBinding.FieldName = 'sel'
 | 
			
		||||
      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
 | 
			
		||||
    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
 | 
			
		||||
							
								
								
									
										523
									
								
								样品仓库/U_BpkcCk.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										523
									
								
								样品仓库/U_BpkcCk.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,523 @@
 | 
			
		|||
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;
 | 
			
		||||
    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);
 | 
			
		||||
  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 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
 | 
			
		||||
  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;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										442
									
								
								样品仓库/U_Bpkclist.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										442
									
								
								样品仓库/U_Bpkclist.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,442 @@
 | 
			
		|||
object frmBpkclist: TfrmBpkclist
 | 
			
		||||
  Left = 172
 | 
			
		||||
  Top = 168
 | 
			
		||||
  Width = 956
 | 
			
		||||
  Height = 500
 | 
			
		||||
  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
 | 
			
		||||
  OnClose = FormClose
 | 
			
		||||
  OnCreate = FormCreate
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 12
 | 
			
		||||
  object ToolBar1: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 948
 | 
			
		||||
    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 = 948
 | 
			
		||||
    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 = 268
 | 
			
		||||
      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 = 552
 | 
			
		||||
      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 = 268
 | 
			
		||||
      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 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 = 324
 | 
			
		||||
      Top = 36
 | 
			
		||||
      Width = 120
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object P_spec: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 616
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 120
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 3
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object CRType: TComboBox
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 324
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 120
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      ItemIndex = 0
 | 
			
		||||
      TabOrder = 4
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        ''
 | 
			
		||||
        #29983#20135#20837#24211)
 | 
			
		||||
    end
 | 
			
		||||
    object CheckBox1: TCheckBox
 | 
			
		||||
      Left = 556
 | 
			
		||||
      Top = 36
 | 
			
		||||
      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
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid1: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 97
 | 
			
		||||
    Width = 948
 | 
			
		||||
    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>
 | 
			
		||||
      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 v1CRTime: TcxGridDBColumn
 | 
			
		||||
        Caption = #20837#24211#26085#26399
 | 
			
		||||
        DataBinding.FieldName = 'CRTime'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1CRType: TcxGridDBColumn
 | 
			
		||||
        Caption = #20837#24211#31867#22411
 | 
			
		||||
        DataBinding.FieldName = 'CRType'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
      end
 | 
			
		||||
      object v1MJID: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#26465#30721
 | 
			
		||||
        DataBinding.FieldName = 'MJID'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1MJXH: TcxGridDBColumn
 | 
			
		||||
        Caption = #21367#21495
 | 
			
		||||
        DataBinding.FieldName = 'MJXH'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = 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 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'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = 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
 | 
			
		||||
    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_Bpkclist.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										219
									
								
								样品仓库/U_Bpkclist.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,219 @@
 | 
			
		|||
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;
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
    P_spec: 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;
 | 
			
		||||
    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 * 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 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.
 | 
			
		||||
							
								
								
									
										18108
									
								
								样品仓库/U_DataLink.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18108
									
								
								样品仓库/U_DataLink.dfm
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										99
									
								
								样品仓库/U_DataLink.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								样品仓库/U_DataLink.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,99 @@
 | 
			
		|||
unit U_DataLink;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
 | 
			
		||||
  Windows,Messages,forms,OleCtnrs,DateUtils, ExtCtrls, AppEvnts, 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 ;     //#用户编号#//
 | 
			
		||||
   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;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  BPCK_DataLink: TBPCK_DataLink;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
procedure TBPCK_DataLink.DataModuleDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  BPCK_DataLink:=nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										344
									
								
								样品仓库/U_GetDllForm.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										344
									
								
								样品仓库/U_GetDllForm.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,344 @@
 | 
			
		|||
 | 
			
		||||
unit U_GetDllForm;
 | 
			
		||||
interface
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB,IniFiles, dxcore,activeX;
 | 
			
		||||
 | 
			
		||||
function GetDllForm(App:Tapplication; FormH:hwnd; FormID:integer;
 | 
			
		||||
                  Language: integer; WinStyle:integer;
 | 
			
		||||
                  GCode: Pchar; GName: Pchar; DataBase:Pchar;Title:PChar;
 | 
			
		||||
                  Parameters1:PChar;Parameters2:PChar;Parameters3:PChar;Parameters4:PChar;
 | 
			
		||||
                  Parameters5:PChar;Parameters6:PChar;Parameters7:PChar;Parameters8:PChar;
 | 
			
		||||
                  Parameters9:PChar;Parameters10:PChar;DataBaseStr:PChar):hwnd;export;stdcall;
 | 
			
		||||
function ConnData():Boolean;
 | 
			
		||||
Function GetsysParam(muserId:pchar;fparam1:pchar):Boolean;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
uses
 | 
			
		||||
  U_DataLink,U_BpRklist,U_Bpcklist,U_Bpkclist,U_ZDYHelp,U_BpkcCk,U_BpGdCklist,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:=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:='47.100.182.1,7781';
 | 
			
		||||
   dtbase:='guihuadata';
 | 
			
		||||
   user:='sa';
 | 
			
		||||
 //  pswd:='flora@111011';
 | 
			
		||||
    pswd:='rightsoft@123';
 | 
			
		||||
   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;
 | 
			
		||||
     21:  //坯布出库
 | 
			
		||||
     begin
 | 
			
		||||
       if frmBpGdCklist=nil then
 | 
			
		||||
       begin
 | 
			
		||||
         frmBpGdCklist:= TfrmBpGdCklist.Create(application.MainForm);
 | 
			
		||||
         with frmBpGdCklist do
 | 
			
		||||
         begin
 | 
			
		||||
           caption:=Trim(Title);
 | 
			
		||||
           fManage:=trim(DataBase);
 | 
			
		||||
           fCkName:=trim(Parameters1);
 | 
			
		||||
           FormStyle := mstyle ;
 | 
			
		||||
           windowState := mstate ;
 | 
			
		||||
           BorderStyle := mborderstyle;
 | 
			
		||||
           //show;
 | 
			
		||||
         end;
 | 
			
		||||
       end
 | 
			
		||||
       else
 | 
			
		||||
         frmBpGdCklist.BringToFront;
 | 
			
		||||
       //句柄
 | 
			
		||||
       mNewHandle:=frmBpGdCklist.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 frmBpkcCk=nil then
 | 
			
		||||
       begin
 | 
			
		||||
         frmBpkcCk:= TfrmBpkcCk.Create(application.MainForm);
 | 
			
		||||
         with frmBpkcCk do
 | 
			
		||||
         begin
 | 
			
		||||
           caption:=Trim(Title);
 | 
			
		||||
           fCkName:=trim(Parameters1);
 | 
			
		||||
           FormStyle := mstyle ;
 | 
			
		||||
           windowState := mstate ;
 | 
			
		||||
           BorderStyle := mborderstyle;
 | 
			
		||||
           //show;
 | 
			
		||||
         end;
 | 
			
		||||
       end
 | 
			
		||||
       else
 | 
			
		||||
         frmBpkcCk.BringToFront;
 | 
			
		||||
       //句柄
 | 
			
		||||
       mNewHandle:=frmBpkcCk.Handle;
 | 
			
		||||
 | 
			
		||||
     end;
 | 
			
		||||
 | 
			
		||||
      40:  //样品报价
 | 
			
		||||
     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;
 | 
			
		||||
   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.
 | 
			
		||||
							
								
								
									
										682
									
								
								样品仓库/U_ProductOrderNewList.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										682
									
								
								样品仓库/U_ProductOrderNewList.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,682 @@
 | 
			
		|||
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 = 73
 | 
			
		||||
    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 = 85
 | 
			
		||||
      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 = 85
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnChange = OrderNoChange
 | 
			
		||||
      OnKeyPress = OrderNoKeyPress
 | 
			
		||||
    end
 | 
			
		||||
    object CustomerNoName: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 280
 | 
			
		||||
      Top = 35
 | 
			
		||||
      Width = 85
 | 
			
		||||
      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 = 85
 | 
			
		||||
      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 = 85
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 7
 | 
			
		||||
      OnChange = OrderNoChange
 | 
			
		||||
    end
 | 
			
		||||
    object PRTCodeName: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 507
 | 
			
		||||
      Top = 35
 | 
			
		||||
      Width = 85
 | 
			
		||||
      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
 | 
			
		||||
    object SYRName: TComboBox
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 433
 | 
			
		||||
      Top = 120
 | 
			
		||||
      Width = 96
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      Ctl3D = False
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      ParentCtl3D = False
 | 
			
		||||
      TabOrder = 14
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        #20426#21326#32442#32455
 | 
			
		||||
        #19968#31859#32442#32455
 | 
			
		||||
        #40857#36816#32442#32455)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid1: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 125
 | 
			
		||||
    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 = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column2
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1PRTOrderQty
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsData.Editing = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      OptionsView.Indicator = True
 | 
			
		||||
      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 v1SYRName: TcxGridDBColumn
 | 
			
		||||
        Caption = #20844#21496#25260#22836
 | 
			
		||||
        DataBinding.FieldName = 'SYRName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      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 = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v1PRTOrderQty: TcxGridDBColumn
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'PRTOrderQty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Styles.Header = BPCK_DataLink.Default
 | 
			
		||||
        Width = 60
 | 
			
		||||
      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 cxTabControl1: TcxTabControl
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 105
 | 
			
		||||
    Width = 1078
 | 
			
		||||
    Height = 20
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    Style = 9
 | 
			
		||||
    TabIndex = 0
 | 
			
		||||
    TabOrder = 3
 | 
			
		||||
    Tabs.Strings = (
 | 
			
		||||
      #26410#20986#24211
 | 
			
		||||
      #24050#20986#24211
 | 
			
		||||
      #20840#37096)
 | 
			
		||||
    OnChange = cxTabControl1Change
 | 
			
		||||
    ClientRectBottom = 20
 | 
			
		||||
    ClientRectRight = 1078
 | 
			
		||||
    ClientRectTop = 19
 | 
			
		||||
  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
 | 
			
		||||
							
								
								
									
										472
									
								
								样品仓库/U_ProductOrderNewList.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										472
									
								
								样品仓库/U_ProductOrderNewList.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,472 @@
 | 
			
		|||
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, cxPC;
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
    v1SYRName: TcxGridDBColumn;
 | 
			
		||||
    cxTabControl1: TcxTabControl;
 | 
			
		||||
    SYRName: TComboBox;
 | 
			
		||||
    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);
 | 
			
		||||
    procedure cxTabControl1Change(Sender: TObject);
 | 
			
		||||
  private
 | 
			
		||||
    DQdate:TDateTime;
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    procedure InitForm();
 | 
			
		||||
    function  DelData():Boolean;
 | 
			
		||||
    procedure InitGridFH();
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
  public
 | 
			
		||||
    FFInt,FCloth:Integer;
 | 
			
		||||
    fsyrName:string;
 | 
			
		||||
    { 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 isnull(B.syrName,''0'')='''+fsyrName+'''';
 | 
			
		||||
  IF cxTabControl1.TabIndex=0 then
 | 
			
		||||
  strwhere:=strwhere+' and not exists(select mainID from BP_inout X where X.mainID=A.mainID) ';
 | 
			
		||||
  IF cxTabControl1.TabIndex=1 then
 | 
			
		||||
  strwhere:=strwhere+' and 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);
 | 
			
		||||
    TBFind.Click;
 | 
			
		||||
  finally
 | 
			
		||||
    ADOQueryMain.EnableControls;
 | 
			
		||||
    TBFind.Click;
 | 
			
		||||
  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;
 | 
			
		||||
 | 
			
		||||
procedure TfrmProductOrderNewList.cxTabControl1Change(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										632
									
								
								样品仓库/U_ProductOrderNewListSEl.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										632
									
								
								样品仓库/U_ProductOrderNewListSEl.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,632 @@
 | 
			
		|||
object frmProductOrderNewListSEl: TfrmProductOrderNewListSEl
 | 
			
		||||
  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
 | 
			
		||||
							
								
								
									
										461
									
								
								样品仓库/U_ProductOrderNewListSEl.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										461
									
								
								样品仓库/U_ProductOrderNewListSEl.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,461 @@
 | 
			
		|||
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;
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
    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
 | 
			
		||||
  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:='';
 | 
			
		||||
 | 
			
		||||
  strwhere:=strwhere+' and isnull(B.status,''0'')='''+inttostr(1)+'''';
 | 
			
		||||
 | 
			
		||||
  strwhere:=strwhere+' and isnull(B.orderType,''0'')=''剪样单''';
 | 
			
		||||
  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 TfrmProductOrderNewListSEl.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 TfrmProductOrderNewListSEl.InitForm();
 | 
			
		||||
begin
 | 
			
		||||
  if SGetServerDate(ADOQueryTemp)>StrToDate('2014-07-11') then
 | 
			
		||||
  begin
 | 
			
		||||
    ToolBar1.Visible:=False;
 | 
			
		||||
    Application.MessageBox('软件需要升级,请联系供应商!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  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
 | 
			
		||||
  if Order_Main.IsEmpty then exit;
 | 
			
		||||
  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.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										333
									
								
								样品仓库/U_ZdyAttachment.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										333
									
								
								样品仓库/U_ZdyAttachment.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,333 @@
 | 
			
		|||
object frmZdyAttachment: TfrmZdyAttachment
 | 
			
		||||
  Left = -8
 | 
			
		||||
  Top = -8
 | 
			
		||||
  Width = 1382
 | 
			
		||||
  Height = 754
 | 
			
		||||
  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
 | 
			
		||||
  WindowState = wsMaximized
 | 
			
		||||
  OnClose = FormClose
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 12
 | 
			
		||||
  object ToolBar1: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 1366
 | 
			
		||||
    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 = 1366
 | 
			
		||||
    Height = 39
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label3: TLabel
 | 
			
		||||
      Left = 190
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #23458#25143#21517#31216
 | 
			
		||||
    end
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 22
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #23458#25143#32534#21495
 | 
			
		||||
    end
 | 
			
		||||
    object Label2: TLabel
 | 
			
		||||
      Left = 350
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 36
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #19994#21153#21592
 | 
			
		||||
    end
 | 
			
		||||
    object 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 = 1366
 | 
			
		||||
    Height = 646
 | 
			
		||||
    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.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										553
									
								
								样品仓库/U_ZdyAttachmentBJ.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										553
									
								
								样品仓库/U_ZdyAttachmentBJ.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,553 @@
 | 
			
		|||
object frmZdyAttachmentCB: TfrmZdyAttachmentCB
 | 
			
		||||
  Left = 15
 | 
			
		||||
  Top = 92
 | 
			
		||||
  Width = 1297
 | 
			
		||||
  Height = 578
 | 
			
		||||
  Caption = #23458#25143#25253#20215#31649#29702
 | 
			
		||||
  Color = clBtnFace
 | 
			
		||||
  Font.Charset = GB2312_CHARSET
 | 
			
		||||
  Font.Color = clWindowText
 | 
			
		||||
  Font.Height = -12
 | 
			
		||||
  Font.Name = #23435#20307
 | 
			
		||||
  Font.Style = []
 | 
			
		||||
  OldCreateOrder = False
 | 
			
		||||
  OnClose = FormClose
 | 
			
		||||
  OnCreate = FormCreate
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 12
 | 
			
		||||
  object ToolBar1: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 1281
 | 
			
		||||
    Height = 31
 | 
			
		||||
    ButtonHeight = 30
 | 
			
		||||
    ButtonWidth = 83
 | 
			
		||||
    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 TBADD: TToolButton
 | 
			
		||||
      Left = 126
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #26032#22686
 | 
			
		||||
      ImageIndex = 3
 | 
			
		||||
      OnClick = TBADDClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBedit: TToolButton
 | 
			
		||||
      Left = 189
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20462#25913
 | 
			
		||||
      ImageIndex = 54
 | 
			
		||||
      OnClick = TBeditClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBDel: TToolButton
 | 
			
		||||
      Left = 252
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #21024#38500
 | 
			
		||||
      ImageIndex = 17
 | 
			
		||||
      OnClick = TBDelClick
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton3: TToolButton
 | 
			
		||||
      Left = 315
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #22797#21046
 | 
			
		||||
      ImageIndex = 57
 | 
			
		||||
      OnClick = ToolButton3Click
 | 
			
		||||
    end
 | 
			
		||||
    object Tchk: TToolButton
 | 
			
		||||
      Left = 378
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #23457#26680
 | 
			
		||||
      ImageIndex = 41
 | 
			
		||||
      OnClick = TchkClick
 | 
			
		||||
    end
 | 
			
		||||
    object Tnochk: TToolButton
 | 
			
		||||
      Left = 441
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #25764#38144#23457#26680
 | 
			
		||||
      ImageIndex = 86
 | 
			
		||||
      OnClick = TnochkClick
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton1: TToolButton
 | 
			
		||||
      Left = 528
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #23548#20986
 | 
			
		||||
      ImageIndex = 53
 | 
			
		||||
      OnClick = ToolButton1Click
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton5: TToolButton
 | 
			
		||||
      Left = 591
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #25171#21360
 | 
			
		||||
      ImageIndex = 12
 | 
			
		||||
      OnClick = ToolButton5Click
 | 
			
		||||
    end
 | 
			
		||||
    object TBClose: TToolButton
 | 
			
		||||
      Left = 654
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      ImageIndex = 55
 | 
			
		||||
      OnClick = TBCloseClick
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 31
 | 
			
		||||
    Width = 1281
 | 
			
		||||
    Height = 42
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label3: TLabel
 | 
			
		||||
      Left = 346
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #23458#25143#32534#21495
 | 
			
		||||
    end
 | 
			
		||||
    object Label5: TLabel
 | 
			
		||||
      Left = 28
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #25253#20215#26085#26399
 | 
			
		||||
    end
 | 
			
		||||
    object Label6: TLabel
 | 
			
		||||
      Left = 184
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 6
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = '-'
 | 
			
		||||
    end
 | 
			
		||||
    object Label2: TLabel
 | 
			
		||||
      Left = 518
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #23458#25143#21517#31216
 | 
			
		||||
    end
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 850
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 24
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #39068#33394
 | 
			
		||||
    end
 | 
			
		||||
    object Label4: TLabel
 | 
			
		||||
      Left = 694
 | 
			
		||||
      Top = 13
 | 
			
		||||
      Width = 24
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #21697#21517
 | 
			
		||||
    end
 | 
			
		||||
    object custNo: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 398
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 89
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 0
 | 
			
		||||
      OnChange = custNoChange
 | 
			
		||||
    end
 | 
			
		||||
    object begdate: TDateTimePicker
 | 
			
		||||
      Left = 80
 | 
			
		||||
      Top = 8
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Date = 42391.664898645830000000
 | 
			
		||||
      Time = 42391.664898645830000000
 | 
			
		||||
      TabOrder = 1
 | 
			
		||||
    end
 | 
			
		||||
    object enddate: TDateTimePicker
 | 
			
		||||
      Left = 192
 | 
			
		||||
      Top = 8
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Date = 42391.664898645830000000
 | 
			
		||||
      Time = 42391.664898645830000000
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
    end
 | 
			
		||||
    object custName: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 570
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 89
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 3
 | 
			
		||||
      OnChange = custNoChange
 | 
			
		||||
    end
 | 
			
		||||
    object P_Color: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 874
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 89
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 4
 | 
			
		||||
      OnChange = custNoChange
 | 
			
		||||
    end
 | 
			
		||||
    object P_CodeName: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 726
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 89
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 5
 | 
			
		||||
      OnChange = custNoChange
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid2: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 93
 | 
			
		||||
    Width = 1281
 | 
			
		||||
    Height = 446
 | 
			
		||||
    Align = alClient
 | 
			
		||||
    TabOrder = 2
 | 
			
		||||
    object Tv2: TcxGridDBTableView
 | 
			
		||||
      Navigator.Buttons.CustomButtons = <>
 | 
			
		||||
      Navigator.Buttons.Delete.Enabled = False
 | 
			
		||||
      Navigator.Buttons.Delete.Visible = False
 | 
			
		||||
      DataController.DataSource = DS_Main
 | 
			
		||||
      DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
      DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v2Column18
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsBehavior.GoToNextCellOnEnter = True
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsData.Deleting = False
 | 
			
		||||
      OptionsData.DeletingConfirmation = False
 | 
			
		||||
      OptionsData.Editing = False
 | 
			
		||||
      OptionsSelection.CellSelect = 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 v2DEFStr7: TcxGridDBColumn
 | 
			
		||||
        Caption = #25253#20215#26085#26399
 | 
			
		||||
        DataBinding.FieldName = 'CRTime'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 83
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column4: TcxGridDBColumn
 | 
			
		||||
        Caption = #25253#20215#21333#21495
 | 
			
		||||
        DataBinding.FieldName = 'BJNO'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 88
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column2: TcxGridDBColumn
 | 
			
		||||
        Caption = #23458#25143#32534#21495
 | 
			
		||||
        DataBinding.FieldName = 'custNO'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 82
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column6: TcxGridDBColumn
 | 
			
		||||
        Caption = #23458#25143#21517#31216
 | 
			
		||||
        DataBinding.FieldName = 'custName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 127
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column10: TcxGridDBColumn
 | 
			
		||||
        Caption = #22269#23478
 | 
			
		||||
        DataBinding.FieldName = 'custcustCountry'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 71
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column11: TcxGridDBColumn
 | 
			
		||||
        Caption = #20986#36816#28207
 | 
			
		||||
        DataBinding.FieldName = 'FromPlace'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 65
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column19: TcxGridDBColumn
 | 
			
		||||
        Caption = #30446#30340#28207
 | 
			
		||||
        DataBinding.FieldName = 'Toplace'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column3: TcxGridDBColumn
 | 
			
		||||
        Caption = #32852#31995#30005#35805
 | 
			
		||||
        DataBinding.FieldName = 'custphone'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 71
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column5: TcxGridDBColumn
 | 
			
		||||
        Caption = #26377#25928#26399
 | 
			
		||||
        DataBinding.FieldName = 'DlyDate'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 68
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column7: TcxGridDBColumn
 | 
			
		||||
        Caption = #20215#26684#26465#27454
 | 
			
		||||
        DataBinding.FieldName = 'priceNote'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 67
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column8: TcxGridDBColumn
 | 
			
		||||
        Caption = #26679#21697#32534#21495
 | 
			
		||||
        DataBinding.FieldName = 'P_Code'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 78
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column9: TcxGridDBColumn
 | 
			
		||||
        Caption = #21697#21517
 | 
			
		||||
        DataBinding.FieldName = 'P_CodeName'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 75
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column16: TcxGridDBColumn
 | 
			
		||||
        Caption = #39068#33394
 | 
			
		||||
        DataBinding.FieldName = 'P_Color'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column17: TcxGridDBColumn
 | 
			
		||||
        Caption = #35268#26684
 | 
			
		||||
        DataBinding.FieldName = 'P_spec'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column20: TcxGridDBColumn
 | 
			
		||||
        Caption = #25104#20998
 | 
			
		||||
        DataBinding.FieldName = 'P_CF'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column21: TcxGridDBColumn
 | 
			
		||||
        Caption = #38376#24133
 | 
			
		||||
        DataBinding.FieldName = 'P_MF'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column22: TcxGridDBColumn
 | 
			
		||||
        Caption = #20811#37325
 | 
			
		||||
        DataBinding.FieldName = 'P_KZ'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column15: TcxGridDBColumn
 | 
			
		||||
        Caption = #38144#21806#20215#26684
 | 
			
		||||
        DataBinding.FieldName = 'price'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column14: TcxGridDBColumn
 | 
			
		||||
        Caption = #27719#29575
 | 
			
		||||
        DataBinding.FieldName = 'huilv'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column18: TcxGridDBColumn
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column28: TcxGridDBColumn
 | 
			
		||||
        Caption = #36215#35746#37327
 | 
			
		||||
        DataBinding.FieldName = 'BJstr6'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #22791#27880
 | 
			
		||||
        DataBinding.FieldName = 'Note'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 89
 | 
			
		||||
      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 = 151
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column23: TcxGridDBColumn
 | 
			
		||||
        Caption = #35814#32454#25551#36848
 | 
			
		||||
        DataBinding.FieldName = 'Note1'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 90
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column24: TcxGridDBColumn
 | 
			
		||||
        Caption = #35745#20215#21333#20301
 | 
			
		||||
        DataBinding.FieldName = 'BJstr7'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGridLevel1: TcxGridLevel
 | 
			
		||||
      GridView = Tv2
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxTabControl1: TcxTabControl
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 73
 | 
			
		||||
    Width = 1281
 | 
			
		||||
    Height = 20
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    TabOrder = 3
 | 
			
		||||
    Properties.CustomButtons.Buttons = <>
 | 
			
		||||
    Properties.Style = 9
 | 
			
		||||
    Properties.TabIndex = 0
 | 
			
		||||
    Properties.Tabs.Strings = (
 | 
			
		||||
      #26410#23457#26680
 | 
			
		||||
      #24050#23457#26680
 | 
			
		||||
      #20840#37096)
 | 
			
		||||
    OnChange = cxTabControl1Change
 | 
			
		||||
    ClientRectRight = 0
 | 
			
		||||
    ClientRectTop = 0
 | 
			
		||||
  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 = 533
 | 
			
		||||
    Top = 193
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu2: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid2
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 660
 | 
			
		||||
    Top = 132
 | 
			
		||||
  end
 | 
			
		||||
  object DS_Main: TDataSource
 | 
			
		||||
    DataSet = CDS_Main
 | 
			
		||||
    Left = 899
 | 
			
		||||
    Top = 235
 | 
			
		||||
  end
 | 
			
		||||
  object CDS_Main: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 460
 | 
			
		||||
    Top = 168
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryPrint: TADOQuery
 | 
			
		||||
    Connection = BPCK_DataLink.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 740
 | 
			
		||||
    Top = 156
 | 
			
		||||
  end
 | 
			
		||||
  object RM1: TRMGridReport
 | 
			
		||||
    ThreadPrepareReport = True
 | 
			
		||||
    InitialZoom = pzDefault
 | 
			
		||||
    PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
 | 
			
		||||
    DefaultCollate = False
 | 
			
		||||
    SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
 | 
			
		||||
    PreviewOptions.RulerUnit = rmutScreenPixels
 | 
			
		||||
    PreviewOptions.RulerVisible = False
 | 
			
		||||
    PreviewOptions.DrawBorder = False
 | 
			
		||||
    PreviewOptions.BorderPen.Color = clGray
 | 
			
		||||
    PreviewOptions.BorderPen.Style = psDash
 | 
			
		||||
    CompressLevel = rmzcFastest
 | 
			
		||||
    CompressThread = False
 | 
			
		||||
    LaterBuildEvents = True
 | 
			
		||||
    OnlyOwnerDataSet = False
 | 
			
		||||
    Left = 372
 | 
			
		||||
    Top = 300
 | 
			
		||||
    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 = 684
 | 
			
		||||
    Top = 336
 | 
			
		||||
  end
 | 
			
		||||
  object RMDBDataSet1: TRMDBDataSet
 | 
			
		||||
    Visible = True
 | 
			
		||||
    DataSet = ADOQueryPrint
 | 
			
		||||
    Left = 356
 | 
			
		||||
    Top = 252
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										405
									
								
								样品仓库/U_ZdyAttachmentBJ.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										405
									
								
								样品仓库/U_ZdyAttachmentBJ.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,405 @@
 | 
			
		|||
unit U_ZdyAttachmentBJ;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
 | 
			
		||||
  cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
 | 
			
		||||
  StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
 | 
			
		||||
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
 | 
			
		||||
  cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
 | 
			
		||||
  cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
 | 
			
		||||
  RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
 | 
			
		||||
  IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
 | 
			
		||||
  cxButtonEdit, cxTextEdit, cxDBLookupComboBox, RM_e_Xls, RM_E_llPDF, cxPC,
 | 
			
		||||
  cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu,
 | 
			
		||||
  dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
 | 
			
		||||
  dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
 | 
			
		||||
  dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
 | 
			
		||||
  dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
 | 
			
		||||
  dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
 | 
			
		||||
  dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
 | 
			
		||||
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
 | 
			
		||||
  dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
 | 
			
		||||
  dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
 | 
			
		||||
  dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
 | 
			
		||||
  dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
 | 
			
		||||
  dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
 | 
			
		||||
  dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
 | 
			
		||||
  dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmZdyAttachmentCB = class(TForm)
 | 
			
		||||
    ToolBar1: TToolBar;
 | 
			
		||||
    TBRafresh: TToolButton;
 | 
			
		||||
    TBDel: TToolButton;
 | 
			
		||||
    TBClose: TToolButton;
 | 
			
		||||
    ADOQueryTemp: TADOQuery;
 | 
			
		||||
    ADOQueryCmd: TADOQuery;
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    ToolButton2: TToolButton;
 | 
			
		||||
    ADOQueryMain: TADOQuery;
 | 
			
		||||
    ToolButton1: TToolButton;
 | 
			
		||||
    Label3: TLabel;
 | 
			
		||||
    custNo: TEdit;
 | 
			
		||||
    cxGrid2: TcxGrid;
 | 
			
		||||
    Tv2: TcxGridDBTableView;
 | 
			
		||||
    cxGridLevel1: TcxGridLevel;
 | 
			
		||||
    cxGridPopupMenu2: TcxGridPopupMenu;
 | 
			
		||||
    DS_Main: TDataSource;
 | 
			
		||||
    CDS_Main: TClientDataSet;
 | 
			
		||||
    TBADD: TToolButton;
 | 
			
		||||
    v2Column6: TcxGridDBColumn;
 | 
			
		||||
    v2Column1: TcxGridDBColumn;
 | 
			
		||||
    v2Column2: TcxGridDBColumn;
 | 
			
		||||
    v2Column3: TcxGridDBColumn;
 | 
			
		||||
    v2Column5: TcxGridDBColumn;
 | 
			
		||||
    v2Column7: TcxGridDBColumn;
 | 
			
		||||
    v2Column8: TcxGridDBColumn;
 | 
			
		||||
    v2Column9: TcxGridDBColumn;
 | 
			
		||||
    v2Column10: TcxGridDBColumn;
 | 
			
		||||
    TBedit: TToolButton;
 | 
			
		||||
    v2Column11: TcxGridDBColumn;
 | 
			
		||||
    v2DEFStr7: TcxGridDBColumn;
 | 
			
		||||
    v2Column12: TcxGridDBColumn;
 | 
			
		||||
    v2Column13: TcxGridDBColumn;
 | 
			
		||||
    Label5: TLabel;
 | 
			
		||||
    begdate: TDateTimePicker;
 | 
			
		||||
    Label6: TLabel;
 | 
			
		||||
    enddate: TDateTimePicker;
 | 
			
		||||
    v2Column4: TcxGridDBColumn;
 | 
			
		||||
    custName: TEdit;
 | 
			
		||||
    Label2: TLabel;
 | 
			
		||||
    v2Column15: TcxGridDBColumn;
 | 
			
		||||
    ToolButton5: TToolButton;
 | 
			
		||||
    ADOQueryPrint: TADOQuery;
 | 
			
		||||
    RM1: TRMGridReport;
 | 
			
		||||
//    RMllPDFExport1: TRMllPDFExport;
 | 
			
		||||
    RMXLSExport1: TRMXLSExport;
 | 
			
		||||
    RMDBDataSet1: TRMDBDataSet;
 | 
			
		||||
    v2Column19: TcxGridDBColumn;
 | 
			
		||||
    v2Column14: TcxGridDBColumn;
 | 
			
		||||
    v2Column16: TcxGridDBColumn;
 | 
			
		||||
    v2Column17: TcxGridDBColumn;
 | 
			
		||||
    v2Column20: TcxGridDBColumn;
 | 
			
		||||
    v2Column21: TcxGridDBColumn;
 | 
			
		||||
    v2Column22: TcxGridDBColumn;
 | 
			
		||||
    v2Column28: TcxGridDBColumn;
 | 
			
		||||
    Tchk: TToolButton;
 | 
			
		||||
    Tnochk: TToolButton;
 | 
			
		||||
    cxTabControl1: TcxTabControl;
 | 
			
		||||
    v2Column23: TcxGridDBColumn;
 | 
			
		||||
    P_Color: TEdit;
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    v2Column24: TcxGridDBColumn;
 | 
			
		||||
    P_CodeName: TEdit;
 | 
			
		||||
    Label4: TLabel;
 | 
			
		||||
    ToolButton3: TToolButton;
 | 
			
		||||
    v2Column18: TcxGridDBColumn;
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
    procedure TBCloseClick(Sender: TObject);
 | 
			
		||||
    procedure TBDelClick(Sender: TObject);
 | 
			
		||||
    procedure FormShow(Sender: TObject);
 | 
			
		||||
    procedure TBRafreshClick(Sender: TObject);
 | 
			
		||||
    procedure ToolButton2Click(Sender: TObject);
 | 
			
		||||
    procedure custNoChange(Sender: TObject);
 | 
			
		||||
    procedure ToolButton1Click(Sender: TObject);
 | 
			
		||||
    procedure TBeditClick(Sender: TObject);
 | 
			
		||||
    procedure TBADDClick(Sender: TObject);
 | 
			
		||||
    procedure FormCreate(Sender: TObject);
 | 
			
		||||
    procedure ToolButton5Click(Sender: TObject);
 | 
			
		||||
    procedure TchkClick(Sender: TObject);
 | 
			
		||||
    procedure TnochkClick(Sender: TObject);
 | 
			
		||||
    procedure cxTabControl1Change(Sender: TObject);
 | 
			
		||||
    procedure ToolButton3Click(Sender: TObject);
 | 
			
		||||
  private
 | 
			
		||||
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    procedure SetStatus();
 | 
			
		||||
  public
 | 
			
		||||
    fkhType:string;
 | 
			
		||||
    Fmanage:string;
 | 
			
		||||
    canshu1:string;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmZdyAttachmentCB: TfrmZdyAttachmentCB;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
uses
 | 
			
		||||
  U_DataLink,U_Fun10,U_ZDYHelp,
 | 
			
		||||
  U_ZdyAttachmentBJ_Edit;
 | 
			
		||||
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.SetStatus();
 | 
			
		||||
begin
 | 
			
		||||
  TBedit.Visible:=false;
 | 
			
		||||
  Tbdel.Visible:=false;
 | 
			
		||||
  Tchk.Visible:=false;
 | 
			
		||||
  Tnochk.Visible:=false;
 | 
			
		||||
  IF trim(canshu1)='业务员' then
 | 
			
		||||
  begin
 | 
			
		||||
    case cxTabControl1.TabIndex of
 | 
			
		||||
    0:begin
 | 
			
		||||
       TBedit.Visible:=true;
 | 
			
		||||
       Tbdel.Visible:=true;
 | 
			
		||||
      end;
 | 
			
		||||
    1:begin
 | 
			
		||||
     //  tbcdel.Visible:=true;
 | 
			
		||||
      end;
 | 
			
		||||
     end;
 | 
			
		||||
   end
 | 
			
		||||
   else
 | 
			
		||||
   begin
 | 
			
		||||
    case cxTabControl1.TabIndex of
 | 
			
		||||
    0:begin
 | 
			
		||||
       TBedit.Visible:=true;
 | 
			
		||||
       Tbdel.Visible:=true;
 | 
			
		||||
       Tchk.Visible:=true;
 | 
			
		||||
      end;
 | 
			
		||||
    1:begin
 | 
			
		||||
       Tnochk.Visible:=true;
 | 
			
		||||
      end;
 | 
			
		||||
     end;
 | 
			
		||||
   end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.InitGrid();
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    ADOQueryMain.DisableControls;
 | 
			
		||||
    with ADOQueryMain do
 | 
			
		||||
    begin
 | 
			
		||||
 | 
			
		||||
      Close;
 | 
			
		||||
      Filtered:=False;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      sql.Add('select A.* from KH_CP_BJ A');
 | 
			
		||||
      sql.Add(' where A.CRTime>='''+formatdateTime('yyyy-MM-dd',begdate.DateTime)+'''');
 | 
			
		||||
      sql.Add(' and A.CRTime<'''+formatdateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
 | 
			
		||||
      IF trim(canshu1)='业务员'then
 | 
			
		||||
      sql.Add(' and A.Filler='+quotedstr(trim(DName)));
 | 
			
		||||
      if cxTabControl1.TabIndex<2 then
 | 
			
		||||
      sql.Add('and A.status='''+inttostr(cxTabControl1.TabIndex)+''' ');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    SCreateCDS20(ADOQueryMain,CDS_Main);
 | 
			
		||||
    SInitCDSData20(ADOQueryMain,CDS_Main);
 | 
			
		||||
  finally
 | 
			
		||||
    ADOQueryMain.EnableControls;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmZdyAttachmentCB:=nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
begin
 | 
			
		||||
  Action:=caFree;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.TBCloseClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  WriteCxGrid(self.Caption+'1',Tv2,'客户自定义');
 | 
			
		||||
  Close;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmZdyAttachmentCB.TBDelClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then Exit;
 | 
			
		||||
  if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
 | 
			
		||||
 | 
			
		||||
    with ADOQueryCmd do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      sql.Add('delete KH_CP_BJ where BJNO='''+Trim(CDS_Main.fieldbyname('BJNO').AsString)+'''');
 | 
			
		||||
      ExecSQL;
 | 
			
		||||
    end;
 | 
			
		||||
  initgrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  ReadCxGrid(self.Caption+'1',Tv2,'客户自定义');
 | 
			
		||||
  SetStatus();
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.TBRafreshClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.ToolButton2Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if ADOQueryMain.Active then
 | 
			
		||||
  begin
 | 
			
		||||
    SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
 | 
			
		||||
    SCreateCDS20(ADOQueryMain,CDS_Main);
 | 
			
		||||
    SInitCDSData20(ADOQueryMain,CDS_Main);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.custNoChange(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  ToolButton2.Click;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.ToolButton1Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if ADOQueryMain.IsEmpty then Exit;
 | 
			
		||||
  TcxGridToExcel(self.Caption,cxgrid2);
 | 
			
		||||
 // SelExportData(Tv2,ADOQueryMain,'客户资料列表');
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.TBeditClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  IF CDS_main.IsEmpty then exit;
 | 
			
		||||
  try
 | 
			
		||||
    frmZdyAttachmentBJ_Edit:=TfrmZdyAttachmentBJ_Edit.Create(Application);
 | 
			
		||||
    with frmZdyAttachmentBJ_Edit do
 | 
			
		||||
    begin
 | 
			
		||||
      fkeyNo:=self.cds_main.fieldbyname('BJNO').asstring;
 | 
			
		||||
      fType:=1;
 | 
			
		||||
        canshu1:=self.canshu1;
 | 
			
		||||
      if ShowModal=1 then
 | 
			
		||||
      begin
 | 
			
		||||
        TBRafresh.Click;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    frmZdyAttachmentBJ_Edit.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.TBADDClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    frmZdyAttachmentBJ_Edit:=TfrmZdyAttachmentBJ_Edit.Create(Application);
 | 
			
		||||
    with frmZdyAttachmentBJ_Edit do
 | 
			
		||||
    begin
 | 
			
		||||
      fkeyNO:='';
 | 
			
		||||
      fType:=0;
 | 
			
		||||
      canshu1:=self.canshu1;
 | 
			
		||||
      if ShowModal=1 then
 | 
			
		||||
      begin
 | 
			
		||||
        TBRafresh.Click;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    frmZdyAttachmentBJ_Edit.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.FormCreate(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  enddate.Date:=date();
 | 
			
		||||
  begdate.Date:=strtodate(formatdateTime('yyyy-MM',enddate.Date)+'-01');
 | 
			
		||||
  canshu1:=trim(DParameters2);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.ToolButton5Click(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
   fPrintFile:string;
 | 
			
		||||
   Porderno:string;
 | 
			
		||||
   i,j:Integer;
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then Exit;
 | 
			
		||||
  fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\报价信息表.rmf' ;
 | 
			
		||||
  with ADOQueryPrint do
 | 
			
		||||
  begin
 | 
			
		||||
    Close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select A.*,  ');
 | 
			
		||||
    sql.Add('FileOthers=(select Top 1 FilesOther from TP_File X1,CP_YDang X2 where X1.WBID=X2.CYID and X2.CYNo=A.P_Code)  ');
 | 
			
		||||
    sql.Add('from KH_CP_BJ A  ');
 | 
			
		||||
    sql.Add('Where A.BJNO='''+Trim(CDS_Main.fieldbyname('BJNO').AsString)+'''');
 | 
			
		||||
    Open;
 | 
			
		||||
  end;
 | 
			
		||||
  if FileExists(fPrintFile) then
 | 
			
		||||
  begin
 | 
			
		||||
    RM1.LoadFromFile(fPrintFile);
 | 
			
		||||
    RM1.ShowReport;
 | 
			
		||||
  end else
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox(PChar('没有找'+trim(fPrintFile)),'提示',0);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.TchkClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then exit;
 | 
			
		||||
  try
 | 
			
		||||
    with ADOQueryCmd do
 | 
			
		||||
    begin
 | 
			
		||||
      close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Add('update  KH_CP_BJ SET status=''1'' ');
 | 
			
		||||
      sql.Add('where BJNO='+quotedstr(trim(CDS_Main.fieldbyname('BJNO').AsString)));
 | 
			
		||||
      execsql;
 | 
			
		||||
    end;
 | 
			
		||||
    application.MessageBox('审核成功!','提示信息');
 | 
			
		||||
    TBRafresh.Click;
 | 
			
		||||
  except
 | 
			
		||||
   application.MessageBox('审核失败!','提示信息',0);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.TnochkClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then exit;
 | 
			
		||||
  try
 | 
			
		||||
    with ADOQueryCmd do
 | 
			
		||||
    begin
 | 
			
		||||
      close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Add('update  KH_CP_BJ SET status=''0'' ');
 | 
			
		||||
      sql.Add('where BJNO='+quotedstr(trim(CDS_Main.fieldbyname('BJNO').AsString)));
 | 
			
		||||
      execsql;
 | 
			
		||||
    end;
 | 
			
		||||
    application.MessageBox('撤销审核成功!','提示信息');
 | 
			
		||||
    TBRafresh.Click;
 | 
			
		||||
  except
 | 
			
		||||
   application.MessageBox('撤销审核失败!','提示信息',0);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.cxTabControl1Change(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  SetStatus();
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentCB.ToolButton3Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  IF CDS_main.IsEmpty then exit;
 | 
			
		||||
  try
 | 
			
		||||
    frmZdyAttachmentBJ_Edit:=TfrmZdyAttachmentBJ_Edit.Create(Application);
 | 
			
		||||
    with frmZdyAttachmentBJ_Edit do
 | 
			
		||||
    begin
 | 
			
		||||
      fkeyNo:=self.cds_main.fieldbyname('BJNO').asstring;
 | 
			
		||||
      fType:=2;
 | 
			
		||||
      canshu1:=self.canshu1;
 | 
			
		||||
      if ShowModal=1 then
 | 
			
		||||
      begin
 | 
			
		||||
        TBRafresh.Click;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    frmZdyAttachmentBJ_Edit.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										533
									
								
								样品仓库/U_ZdyAttachmentBJ_Edit.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										533
									
								
								样品仓库/U_ZdyAttachmentBJ_Edit.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,533 @@
 | 
			
		|||
object frmZdyAttachmentBJ_Edit: TfrmZdyAttachmentBJ_Edit
 | 
			
		||||
  Left = 169
 | 
			
		||||
  Top = 131
 | 
			
		||||
  Width = 989
 | 
			
		||||
  Height = 549
 | 
			
		||||
  Caption = #25253#20215#20449#24687#24405#20837
 | 
			
		||||
  Color = clBtnFace
 | 
			
		||||
  Font.Charset = GB2312_CHARSET
 | 
			
		||||
  Font.Color = clWindowText
 | 
			
		||||
  Font.Height = -12
 | 
			
		||||
  Font.Name = #23435#20307
 | 
			
		||||
  Font.Style = []
 | 
			
		||||
  OldCreateOrder = False
 | 
			
		||||
  Position = poScreenCenter
 | 
			
		||||
  OnCreate = FormCreate
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 12
 | 
			
		||||
  object Label17: TLabel
 | 
			
		||||
    Left = 32
 | 
			
		||||
    Top = 96
 | 
			
		||||
    Width = 48
 | 
			
		||||
    Height = 12
 | 
			
		||||
    Caption = #20960' '#39068' '#33394
 | 
			
		||||
  end
 | 
			
		||||
  object Label9: TLabel
 | 
			
		||||
    Left = 836
 | 
			
		||||
    Top = 124
 | 
			
		||||
    Width = 48
 | 
			
		||||
    Height = 12
 | 
			
		||||
    Caption = #25104#20154#25104#26412
 | 
			
		||||
  end
 | 
			
		||||
  object ToolBar1: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 973
 | 
			
		||||
    Height = 29
 | 
			
		||||
    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 Tsave: TToolButton
 | 
			
		||||
      Left = 0
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20445#23384
 | 
			
		||||
      ImageIndex = 14
 | 
			
		||||
      OnClick = TsaveClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBClose: TToolButton
 | 
			
		||||
      Left = 63
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      ImageIndex = 55
 | 
			
		||||
      OnClick = TBCloseClick
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 29
 | 
			
		||||
    Width = 973
 | 
			
		||||
    Height = 482
 | 
			
		||||
    Align = alClient
 | 
			
		||||
    BevelOuter = bvNone
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object GroupBox1: TGroupBox
 | 
			
		||||
      Left = 0
 | 
			
		||||
      Top = 0
 | 
			
		||||
      Width = 973
 | 
			
		||||
      Height = 145
 | 
			
		||||
      Align = alTop
 | 
			
		||||
      Color = clSkyBlue
 | 
			
		||||
      ParentColor = False
 | 
			
		||||
      TabOrder = 0
 | 
			
		||||
      object Label1: TLabel
 | 
			
		||||
        Left = 36
 | 
			
		||||
        Top = 28
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #25253#20215#26085#26399
 | 
			
		||||
        Font.Charset = GB2312_CHARSET
 | 
			
		||||
        Font.Color = clBlue
 | 
			
		||||
        Font.Height = -12
 | 
			
		||||
        Font.Name = #23435#20307
 | 
			
		||||
        Font.Style = []
 | 
			
		||||
        ParentFont = False
 | 
			
		||||
      end
 | 
			
		||||
      object Label2: TLabel
 | 
			
		||||
        Left = 289
 | 
			
		||||
        Top = 28
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #23458#25143#32534#21495
 | 
			
		||||
      end
 | 
			
		||||
      object Label3: TLabel
 | 
			
		||||
        Left = 840
 | 
			
		||||
        Top = 258
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #20215#26684#26465#27454
 | 
			
		||||
        Visible = False
 | 
			
		||||
      end
 | 
			
		||||
      object Label6: TLabel
 | 
			
		||||
        Left = 541
 | 
			
		||||
        Top = 29
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #23458#25143#21517#31216
 | 
			
		||||
      end
 | 
			
		||||
      object Label12: TLabel
 | 
			
		||||
        Left = 336
 | 
			
		||||
        Top = 234
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #22269'    '#23478
 | 
			
		||||
        Visible = False
 | 
			
		||||
      end
 | 
			
		||||
      object Label39: TLabel
 | 
			
		||||
        Left = 841
 | 
			
		||||
        Top = 234
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #20986' '#36816' '#28207
 | 
			
		||||
        Visible = False
 | 
			
		||||
      end
 | 
			
		||||
      object Label4: TLabel
 | 
			
		||||
        Left = 36
 | 
			
		||||
        Top = 54
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #32852#31995#30005#35805
 | 
			
		||||
      end
 | 
			
		||||
      object Label5: TLabel
 | 
			
		||||
        Left = 289
 | 
			
		||||
        Top = 54
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #26377' '#25928' '#26399
 | 
			
		||||
      end
 | 
			
		||||
      object Label7: TLabel
 | 
			
		||||
        Left = 36
 | 
			
		||||
        Top = 83
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #22791'    '#27880
 | 
			
		||||
      end
 | 
			
		||||
      object Label8: TLabel
 | 
			
		||||
        Left = 108
 | 
			
		||||
        Top = 230
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #24065'    '#31181
 | 
			
		||||
      end
 | 
			
		||||
      object Label11: TLabel
 | 
			
		||||
        Left = 336
 | 
			
		||||
        Top = 258
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #30446' '#30340' '#28207
 | 
			
		||||
        Visible = False
 | 
			
		||||
      end
 | 
			
		||||
      object Label13: TLabel
 | 
			
		||||
        Left = 336
 | 
			
		||||
        Top = 283
 | 
			
		||||
        Width = 48
 | 
			
		||||
        Height = 12
 | 
			
		||||
        Caption = #27719'    '#29575
 | 
			
		||||
        Visible = False
 | 
			
		||||
      end
 | 
			
		||||
      object custName: TEdit
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 593
 | 
			
		||||
        Top = 25
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        TabOrder = 0
 | 
			
		||||
        Text = 'Edit1'
 | 
			
		||||
      end
 | 
			
		||||
      object FromPlace: TEdit
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 893
 | 
			
		||||
        Top = 230
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        TabOrder = 1
 | 
			
		||||
        Text = 'Edit1'
 | 
			
		||||
        Visible = False
 | 
			
		||||
      end
 | 
			
		||||
      object custphone: TEdit
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 88
 | 
			
		||||
        Top = 50
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        TabOrder = 2
 | 
			
		||||
        Text = 'custphone'
 | 
			
		||||
      end
 | 
			
		||||
      object note: TMemo
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 88
 | 
			
		||||
        Top = 76
 | 
			
		||||
        Width = 645
 | 
			
		||||
        Height = 57
 | 
			
		||||
        Lines.Strings = (
 | 
			
		||||
          'note')
 | 
			
		||||
        ScrollBars = ssVertical
 | 
			
		||||
        TabOrder = 3
 | 
			
		||||
      end
 | 
			
		||||
      object priceNote: TComboBox
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 892
 | 
			
		||||
        Top = 256
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        Style = csDropDownList
 | 
			
		||||
        ItemHeight = 12
 | 
			
		||||
        TabOrder = 4
 | 
			
		||||
        Visible = False
 | 
			
		||||
        Items.Strings = (
 | 
			
		||||
          'FOB'
 | 
			
		||||
          'CIF'
 | 
			
		||||
          'CNF'
 | 
			
		||||
          'EXW'
 | 
			
		||||
          #21547#31246#21547#36816
 | 
			
		||||
          #21547#31246#19981#21547#36816
 | 
			
		||||
          ''
 | 
			
		||||
          '')
 | 
			
		||||
      end
 | 
			
		||||
      object CRTime: TDateTimePicker
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 88
 | 
			
		||||
        Top = 24
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        Date = 42680.847243599540000000
 | 
			
		||||
        Format = 'yyyy-MM-dd'
 | 
			
		||||
        Time = 42680.847243599540000000
 | 
			
		||||
        TabOrder = 5
 | 
			
		||||
      end
 | 
			
		||||
      object DlyDate: TDateTimePicker
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 340
 | 
			
		||||
        Top = 48
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        Date = 42680.847243599540000000
 | 
			
		||||
        Format = 'yyyy-MM-dd'
 | 
			
		||||
        Time = 42680.847243599540000000
 | 
			
		||||
        TabOrder = 6
 | 
			
		||||
      end
 | 
			
		||||
      object Priceunit: TComboBox
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 160
 | 
			
		||||
        Top = 228
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        Style = csDropDownList
 | 
			
		||||
        ItemHeight = 12
 | 
			
		||||
        TabOrder = 7
 | 
			
		||||
        OnChange = PriceunitChange
 | 
			
		||||
        Items.Strings = (
 | 
			
		||||
          'USD'
 | 
			
		||||
          'RMB'
 | 
			
		||||
          ''
 | 
			
		||||
          '')
 | 
			
		||||
      end
 | 
			
		||||
      object custNo: TBtnEditA
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 340
 | 
			
		||||
        Top = 24
 | 
			
		||||
        Width = 141
 | 
			
		||||
        Height = 20
 | 
			
		||||
        ReadOnly = True
 | 
			
		||||
        TabOrder = 8
 | 
			
		||||
        OnBtnClick = custNoBtnClick
 | 
			
		||||
      end
 | 
			
		||||
      object huilv: TcxCurrencyEdit
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 388
 | 
			
		||||
        Top = 280
 | 
			
		||||
        Properties.DisplayFormat = '0.##'
 | 
			
		||||
        Properties.NullString = '1'
 | 
			
		||||
        Properties.OnEditValueChanged = huilvPropertiesEditValueChanged
 | 
			
		||||
        TabOrder = 9
 | 
			
		||||
        Visible = False
 | 
			
		||||
        Width = 140
 | 
			
		||||
      end
 | 
			
		||||
      object ToPlace: TEdit
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 388
 | 
			
		||||
        Top = 254
 | 
			
		||||
        Width = 140
 | 
			
		||||
        Height = 20
 | 
			
		||||
        TabOrder = 10
 | 
			
		||||
        Text = 'ToPlace'
 | 
			
		||||
        Visible = False
 | 
			
		||||
      end
 | 
			
		||||
      object custCountry: TBtnEditA
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Left = 388
 | 
			
		||||
        Top = 228
 | 
			
		||||
        Width = 141
 | 
			
		||||
        Height = 20
 | 
			
		||||
        TabOrder = 11
 | 
			
		||||
        Visible = False
 | 
			
		||||
        OnBtnClick = custCountryBtnClick
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object Panel2: TPanel
 | 
			
		||||
      Left = 0
 | 
			
		||||
      Top = 145
 | 
			
		||||
      Width = 973
 | 
			
		||||
      Height = 337
 | 
			
		||||
      Align = alClient
 | 
			
		||||
      BevelOuter = bvNone
 | 
			
		||||
      Caption = 'Panel2'
 | 
			
		||||
      TabOrder = 1
 | 
			
		||||
      object Panel3: TPanel
 | 
			
		||||
        Left = 0
 | 
			
		||||
        Top = 0
 | 
			
		||||
        Width = 973
 | 
			
		||||
        Height = 337
 | 
			
		||||
        Align = alClient
 | 
			
		||||
        BevelOuter = bvNone
 | 
			
		||||
        Caption = 'Panel3'
 | 
			
		||||
        TabOrder = 0
 | 
			
		||||
        object ToolBar2: TToolBar
 | 
			
		||||
          Left = 0
 | 
			
		||||
          Top = 0
 | 
			
		||||
          Width = 973
 | 
			
		||||
          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 ToolButton1: TToolButton
 | 
			
		||||
            Left = 0
 | 
			
		||||
            Top = 0
 | 
			
		||||
            AutoSize = True
 | 
			
		||||
            Caption = #22686#21152
 | 
			
		||||
            ImageIndex = 22
 | 
			
		||||
            OnClick = ToolButton1Click
 | 
			
		||||
          end
 | 
			
		||||
          object ToolButton2: TToolButton
 | 
			
		||||
            Left = 63
 | 
			
		||||
            Top = 0
 | 
			
		||||
            AutoSize = True
 | 
			
		||||
            Caption = #21024#38500
 | 
			
		||||
            ImageIndex = 100
 | 
			
		||||
            OnClick = ToolButton2Click
 | 
			
		||||
          end
 | 
			
		||||
          object CYID: TEdit
 | 
			
		||||
            Left = 126
 | 
			
		||||
            Top = 0
 | 
			
		||||
            Width = 247
 | 
			
		||||
            Height = 30
 | 
			
		||||
            Font.Charset = GB2312_CHARSET
 | 
			
		||||
            Font.Color = clRed
 | 
			
		||||
            Font.Height = -16
 | 
			
		||||
            Font.Name = #23435#20307
 | 
			
		||||
            Font.Style = [fsBold]
 | 
			
		||||
            ParentFont = False
 | 
			
		||||
            TabOrder = 0
 | 
			
		||||
            Visible = False
 | 
			
		||||
            OnKeyPress = CYIDKeyPress
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
        object cxGrid1: TcxGrid
 | 
			
		||||
          Left = 0
 | 
			
		||||
          Top = 31
 | 
			
		||||
          Width = 973
 | 
			
		||||
          Height = 306
 | 
			
		||||
          Align = alClient
 | 
			
		||||
          TabOrder = 1
 | 
			
		||||
          object TV1: TcxGridDBTableView
 | 
			
		||||
            NavigatorButtons.ConfirmDelete = False
 | 
			
		||||
            DataController.DataSource = DS1
 | 
			
		||||
            DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
 | 
			
		||||
            DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
            DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
              item
 | 
			
		||||
                Kind = skSum
 | 
			
		||||
              end
 | 
			
		||||
              item
 | 
			
		||||
                Kind = skSum
 | 
			
		||||
              end>
 | 
			
		||||
            DataController.Summary.SummaryGroups = <>
 | 
			
		||||
            OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
            OptionsCustomize.ColumnSorting = False
 | 
			
		||||
            OptionsView.GroupByBox = False
 | 
			
		||||
            OptionsView.Indicator = True
 | 
			
		||||
            Styles.Header = BPCK_DataLink.Default
 | 
			
		||||
            object V1Column2: TcxGridDBColumn
 | 
			
		||||
              Caption = #21697#21517
 | 
			
		||||
              DataBinding.FieldName = 'P_CodeName'
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 100
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column10: TcxGridDBColumn
 | 
			
		||||
              Caption = #39068#33394
 | 
			
		||||
              DataBinding.FieldName = 'P_Color'
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 100
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column4: TcxGridDBColumn
 | 
			
		||||
              Caption = #38376#24133
 | 
			
		||||
              DataBinding.FieldName = 'P_MF'
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 60
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column8: TcxGridDBColumn
 | 
			
		||||
              Caption = #20811#37325
 | 
			
		||||
              DataBinding.FieldName = 'P_KZ'
 | 
			
		||||
              PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
              Properties.OnEditValueChanged = V1Column8PropertiesEditValueChanged
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 60
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column6: TcxGridDBColumn
 | 
			
		||||
              Caption = #25968#37327
 | 
			
		||||
              DataBinding.FieldName = 'Qty'
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 60
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column15: TcxGridDBColumn
 | 
			
		||||
              Caption = #36215#35746#37327
 | 
			
		||||
              DataBinding.FieldName = 'BJstr6'
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 88
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column13: TcxGridDBColumn
 | 
			
		||||
              Caption = #38144#21806#20215#26684
 | 
			
		||||
              DataBinding.FieldName = 'Price'
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 80
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column5: TcxGridDBColumn
 | 
			
		||||
              Caption = #35745#20215#21333#20301
 | 
			
		||||
              DataBinding.FieldName = 'BJstr7'
 | 
			
		||||
              PropertiesClassName = 'TcxComboBoxProperties'
 | 
			
		||||
              Properties.Items.Strings = (
 | 
			
		||||
                'RMB/Y'
 | 
			
		||||
                'RMB/M'
 | 
			
		||||
                'RMB/KG'
 | 
			
		||||
                'USD/Y'
 | 
			
		||||
                'USD/M'
 | 
			
		||||
                'USD/KG'
 | 
			
		||||
                '')
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 70
 | 
			
		||||
            end
 | 
			
		||||
            object V1Column7: TcxGridDBColumn
 | 
			
		||||
              Caption = #35814#32454#25551#36848
 | 
			
		||||
              DataBinding.FieldName = 'Note1'
 | 
			
		||||
              HeaderAlignmentHorz = taCenter
 | 
			
		||||
              Width = 112
 | 
			
		||||
            end
 | 
			
		||||
          end
 | 
			
		||||
          object cxGrid1Level1: TcxGridLevel
 | 
			
		||||
            GridView = TV1
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object PopupMenu1: TPopupMenu
 | 
			
		||||
    Left = 1140
 | 
			
		||||
    Top = 103
 | 
			
		||||
    object N1: TMenuItem
 | 
			
		||||
      Caption = #21024#38500
 | 
			
		||||
    end
 | 
			
		||||
    object N3: TMenuItem
 | 
			
		||||
      Caption = '-'
 | 
			
		||||
    end
 | 
			
		||||
    object N2: TMenuItem
 | 
			
		||||
      Caption = #21478#23384#20026'...'
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryCmd: TADOQuery
 | 
			
		||||
    Connection = BPCK_DataLink.ADOLink
 | 
			
		||||
    EnableBCD = False
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 932
 | 
			
		||||
    Top = 87
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryTmp: TADOQuery
 | 
			
		||||
    Connection = BPCK_DataLink.ADOLink
 | 
			
		||||
    EnableBCD = False
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 844
 | 
			
		||||
    Top = 95
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQuerymain: TADOQuery
 | 
			
		||||
    Connection = BPCK_DataLink.ADOLink
 | 
			
		||||
    EnableBCD = False
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 716
 | 
			
		||||
    Top = 191
 | 
			
		||||
  end
 | 
			
		||||
  object CDS1: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 144
 | 
			
		||||
    Top = 283
 | 
			
		||||
  end
 | 
			
		||||
  object DS1: TDataSource
 | 
			
		||||
    DataSet = CDS1
 | 
			
		||||
    Left = 464
 | 
			
		||||
    Top = 288
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu1: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid1
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 780
 | 
			
		||||
    Top = 149
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										561
									
								
								样品仓库/U_ZdyAttachmentBJ_Edit.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										561
									
								
								样品仓库/U_ZdyAttachmentBJ_Edit.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,561 @@
 | 
			
		|||
unit U_ZdyAttachmentBJ_Edit;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, ExtCtrls, cxPC, cxControls, ComCtrls, ToolWin, StdCtrls, Menus,
 | 
			
		||||
  cxTextEdit, cxCurrencyEdit, BtnEdit, cxContainer, cxEdit, cxImage, DB,
 | 
			
		||||
  ADODB, cxDBEdit, cxLookAndFeelPainters, cxButtons, IdBaseComponent,
 | 
			
		||||
  IdComponent, IdTCPConnection, IdTCPClient, IdFTP,ShellAPI, cxStyles,
 | 
			
		||||
  cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxDBData,
 | 
			
		||||
  cxGridLevel, cxClasses, cxGridCustomView, cxGridCustomTableView,
 | 
			
		||||
  cxGridTableView, cxGridDBTableView, cxGrid, DBClient, cxButtonEdit,
 | 
			
		||||
  cxGridCustomPopupMenu, cxGridPopupMenu, cxDropDownEdit;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmZdyAttachmentBJ_Edit = class(TForm)
 | 
			
		||||
    ToolBar1: TToolBar;
 | 
			
		||||
    Tsave: TToolButton;
 | 
			
		||||
    TBClose: TToolButton;
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    GroupBox1: TGroupBox;
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    Label2: TLabel;
 | 
			
		||||
    Label3: TLabel;
 | 
			
		||||
    Label6: TLabel;
 | 
			
		||||
    custName: TEdit;
 | 
			
		||||
    Label17: TLabel;
 | 
			
		||||
    PopupMenu1: TPopupMenu;
 | 
			
		||||
    N1: TMenuItem;
 | 
			
		||||
    N2: TMenuItem;
 | 
			
		||||
    N3: TMenuItem;
 | 
			
		||||
    ADOQueryCmd: TADOQuery;
 | 
			
		||||
    ADOQueryTmp: TADOQuery;
 | 
			
		||||
    ADOQuerymain: TADOQuery;
 | 
			
		||||
    Label12: TLabel;
 | 
			
		||||
    Label39: TLabel;
 | 
			
		||||
    FromPlace: TEdit;
 | 
			
		||||
    custphone: TEdit;
 | 
			
		||||
    Label4: TLabel;
 | 
			
		||||
    Label5: TLabel;
 | 
			
		||||
    note: TMemo;
 | 
			
		||||
    Label7: TLabel;
 | 
			
		||||
    priceNote: TComboBox;
 | 
			
		||||
    Panel2: TPanel;
 | 
			
		||||
    Panel3: TPanel;
 | 
			
		||||
    ToolBar2: TToolBar;
 | 
			
		||||
    ToolButton1: TToolButton;
 | 
			
		||||
    ToolButton2: TToolButton;
 | 
			
		||||
    TV1: TcxGridDBTableView;
 | 
			
		||||
    cxGrid1Level1: TcxGridLevel;
 | 
			
		||||
    cxGrid1: TcxGrid;
 | 
			
		||||
    CDS1: TClientDataSet;
 | 
			
		||||
    Label9: TLabel;
 | 
			
		||||
    DS1: TDataSource;
 | 
			
		||||
    CRTime: TDateTimePicker;
 | 
			
		||||
    DlyDate: TDateTimePicker;
 | 
			
		||||
    V1Column2: TcxGridDBColumn;
 | 
			
		||||
    V1Column4: TcxGridDBColumn;
 | 
			
		||||
    Label8: TLabel;
 | 
			
		||||
    Priceunit: TComboBox;
 | 
			
		||||
    custNo: TBtnEditA;
 | 
			
		||||
    cxGridPopupMenu1: TcxGridPopupMenu;
 | 
			
		||||
    huilv: TcxCurrencyEdit;
 | 
			
		||||
    V1Column8: TcxGridDBColumn;
 | 
			
		||||
    ToPlace: TEdit;
 | 
			
		||||
    Label11: TLabel;
 | 
			
		||||
    Label13: TLabel;
 | 
			
		||||
    V1Column13: TcxGridDBColumn;
 | 
			
		||||
    custCountry: TBtnEditA;
 | 
			
		||||
    V1Column7: TcxGridDBColumn;
 | 
			
		||||
    V1Column10: TcxGridDBColumn;
 | 
			
		||||
    V1Column15: TcxGridDBColumn;
 | 
			
		||||
    CYID: TEdit;
 | 
			
		||||
    V1Column5: TcxGridDBColumn;
 | 
			
		||||
    V1Column6: TcxGridDBColumn;
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure TBCloseClick(Sender: TObject);
 | 
			
		||||
    procedure FormCreate(Sender: TObject);
 | 
			
		||||
    procedure TsaveClick(Sender: TObject);
 | 
			
		||||
    procedure FormShow(Sender: TObject);
 | 
			
		||||
    procedure cxDBImage1DblClick(Sender: TObject);
 | 
			
		||||
    procedure FileNameClick(Sender: TObject);
 | 
			
		||||
    procedure MTypeBtnDnClick(Sender: TObject);
 | 
			
		||||
    procedure ToolButton2Click(Sender: TObject);
 | 
			
		||||
    procedure ToolButton1Click(Sender: TObject);
 | 
			
		||||
    procedure custNoBtnClick(Sender: TObject);
 | 
			
		||||
    procedure PriceunitChange(Sender: TObject);
 | 
			
		||||
    procedure V1Column8PropertiesEditValueChanged(Sender: TObject);
 | 
			
		||||
    procedure huilvPropertiesEditValueChanged(Sender: TObject);
 | 
			
		||||
    procedure custCountryBtnClick(Sender: TObject);
 | 
			
		||||
    procedure CYIDKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
  private
 | 
			
		||||
    function savedata():Boolean;
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    procedure InitImage();
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
  public
 | 
			
		||||
    fkeyNo:string;
 | 
			
		||||
    FType:integer;
 | 
			
		||||
    canshu1:string;
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmZdyAttachmentBJ_Edit: TfrmZdyAttachmentBJ_Edit;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 uses
 | 
			
		||||
  U_DataLink,U_Fun10, U_ZDYHelp, U_ZdyAttachment, U_ZdyAttachCP;
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
function TfrmZdyAttachmentBJ_Edit.savedata():Boolean;
 | 
			
		||||
var
 | 
			
		||||
  Filler,fmxType:string;
 | 
			
		||||
  FillTime:TdateTime;
 | 
			
		||||
begin
 | 
			
		||||
  result:=false;
 | 
			
		||||
 | 
			
		||||
  ADOQueryCmd.Connection.BeginTrans;
 | 
			
		||||
  try
 | 
			
		||||
    IF FType=0 then
 | 
			
		||||
    begin
 | 
			
		||||
      fmxType:='BJ'+uppercase(formatdateTime('yyyyMMdd',DServerDate));
 | 
			
		||||
      if GetLSNo(ADOQueryTmp,fkeyNo,fmxType,'KH_CP_BJ',3,0)=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 KH_CP_BJ where BJNO='''+Trim(fkeyNo)+'''');
 | 
			
		||||
        Open;
 | 
			
		||||
      end;
 | 
			
		||||
        Filler:=adoqueryTmp.fieldbyname('Filler').AsString;
 | 
			
		||||
        FillTime:=adoqueryTmp.fieldbyname('FillTime').AsDateTime;
 | 
			
		||||
    end;
 | 
			
		||||
    with ADOQueryCmd do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      sql.Add('delete  from KH_CP_BJ where BJNO='''+Trim(fkeyNo)+'''');
 | 
			
		||||
      execsql;
 | 
			
		||||
    end;
 | 
			
		||||
    with ADOQueryCmd do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      sql.Add('select * from KH_CP_BJ where BJNO='''+Trim(fkeyNo)+'''');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    with cds1 do
 | 
			
		||||
    begin
 | 
			
		||||
      DisableControls;
 | 
			
		||||
      First;
 | 
			
		||||
      while not eof do
 | 
			
		||||
      begin
 | 
			
		||||
        ADOQueryCmd.Append;
 | 
			
		||||
        SSetsaveSqlNew(ADOQueryCmd,'KH_CP_BJ',GroupBox1,2);
 | 
			
		||||
        RTSetSaveDataCDS(ADOQueryCmd,Tv1,cds1,'KH_CP_BJ',0);
 | 
			
		||||
        ADOQueryCmd.FieldByName('BJNO').Value:=trim(fkeyNO);
 | 
			
		||||
        ADOQueryCmd.FieldByName('BJID').Value:=recNo;
 | 
			
		||||
        ADOQueryCmd.FieldByName('Filler').Value:=Trim(Filler);
 | 
			
		||||
        ADOQueryCmd.FieldByName('FillTime').Value:=FillTime;
 | 
			
		||||
        ADOQueryCmd.FieldByName('CRTime').Value:=formatdateTime('yyyy-MM-dd',CRTime.DateTime);
 | 
			
		||||
        ADOQueryCmd.FieldByName('DlyDate').Value:=formatdateTime('yyyy-MM-dd',DlyDate.DateTime);
 | 
			
		||||
        ADOQueryCmd.FieldByName('FillTime').Value:=FillTime;
 | 
			
		||||
        ADOQueryCmd.FieldByName('Qty').Value:=cds1.fieldbyname('Qty').AsFloat;
 | 
			
		||||
        ADOQueryCmd.FieldByName('price').Value:=cds1.fieldbyname('price').AsFloat;
 | 
			
		||||
        ADOQueryCmd.FieldByName('price1').Value:=cds1.fieldbyname('price1').AsFloat;
 | 
			
		||||
        ADOQueryCmd.FieldByName('price2').Value:=cds1.fieldbyname('price2').AsFloat;
 | 
			
		||||
        ADOQueryCmd.FieldByName('price3').Value:=cds1.fieldbyname('price3').AsFloat;
 | 
			
		||||
        ADOQueryCmd.FieldByName('BJQty1').Value:=cds1.fieldbyname('BJQty1').AsFloat;
 | 
			
		||||
        if FType=1 then
 | 
			
		||||
        begin
 | 
			
		||||
          ADOQueryCmd.FieldByName('editer').Value:=trim(dName);
 | 
			
		||||
          ADOQueryCmd.FieldByName('editTime').Value:=SGetServerDateTime(adoqueryTmp);
 | 
			
		||||
        end;
 | 
			
		||||
        ADOQueryCmd.Post;
 | 
			
		||||
 | 
			
		||||
        next;
 | 
			
		||||
      end;
 | 
			
		||||
      EnableControls;
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
    result:=true;
 | 
			
		||||
    ADOQueryCmd.Connection.CommitTrans;
 | 
			
		||||
  except
 | 
			
		||||
    ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.InitGrid();
 | 
			
		||||
begin
 | 
			
		||||
  with ADOQueryMain do
 | 
			
		||||
  begin
 | 
			
		||||
    close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select A.* from KH_CP_BJ A');
 | 
			
		||||
    sql.Add('where BJNO='+quotedstr(trim(fkeyNo)));
 | 
			
		||||
    open;
 | 
			
		||||
  end;
 | 
			
		||||
  IF not ADOQueryMain.IsEmpty then
 | 
			
		||||
  begin
 | 
			
		||||
    SCSHDataNew(ADOQueryMain,GroupBox1,2);
 | 
			
		||||
  end;
 | 
			
		||||
  SCreateCDS20(ADOQueryMain,CDS1);
 | 
			
		||||
  SInitCDSData20(ADOQueryMain,CDS1);
 | 
			
		||||
 | 
			
		||||
  IF fType=2 then
 | 
			
		||||
  begin
 | 
			
		||||
    fType:=0;
 | 
			
		||||
    fkeyNo:='';
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.InitImage();
 | 
			
		||||
begin
 | 
			
		||||
 { with ADOQueryImage do
 | 
			
		||||
  begin
 | 
			
		||||
    close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select * from TP_File A');
 | 
			
		||||
    sql.Add('where TFid='+quotedstr(trim(zdyCode.Text)));
 | 
			
		||||
    open;
 | 
			
		||||
  end; }
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmZdyAttachmentBJ_Edit:=nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.TBCloseClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
   WriteCxGrid(self.Caption+'1',Tv1);
 | 
			
		||||
  close;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.FormCreate(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  Panel1.Align:=alclient;
 | 
			
		||||
  clearControl(GroupBox1,2);
 | 
			
		||||
  huilv.Text:='1';
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.TsaveClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
//  zdyName.SetFocus;
 | 
			
		||||
  cxgrid1.SetFocus;
 | 
			
		||||
  if cds1.IsEmpty then exit;
 | 
			
		||||
  IF trim(custName.Text)='' then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('客户名称不能为空!','提示信息',MB_ICONERROR);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  try
 | 
			
		||||
    IF not savedata() then
 | 
			
		||||
    begin
 | 
			
		||||
      application.MessageBox('数据保存失败!','提示信息',MB_ICONERROR);
 | 
			
		||||
    end
 | 
			
		||||
    else
 | 
			
		||||
    begin
 | 
			
		||||
      application.MessageBox('数据保存成功!','提示信息');
 | 
			
		||||
      self.ModalResult:=1;
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
  except
 | 
			
		||||
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  readCxGrid(self.Caption+'1',Tv1);
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.cxDBImage1DblClick(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  sFieldName:string;
 | 
			
		||||
  fileName:string;
 | 
			
		||||
begin
 | 
			
		||||
{
 | 
			
		||||
  IF TcxDBImage(Sender).Picture.Height=0 then exit;
 | 
			
		||||
 | 
			
		||||
  sFieldName:='D:\图片查看';
 | 
			
		||||
 | 
			
		||||
  if not DirectoryExists(pchar(sFieldName)) then
 | 
			
		||||
  CreateDirectory(pchar(sFieldName),nil);
 | 
			
		||||
 | 
			
		||||
  fileName:=adoqueryImage.fieldbyname(TcxDBImage(Sender).Hint).asstring;
 | 
			
		||||
 | 
			
		||||
  sFieldName:=sFieldName+'\'+trim(fileName);
 | 
			
		||||
  try
 | 
			
		||||
    IdFTP1.Host := PicSvr;
 | 
			
		||||
    IdFTP1.Username := 'three';
 | 
			
		||||
		IdFTP1.Password := '641010';
 | 
			
		||||
    IdFTP1.Connect();
 | 
			
		||||
  except
 | 
			
		||||
    ;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  if IdFTP1.Connected then
 | 
			
		||||
  begin
 | 
			
		||||
    try
 | 
			
		||||
      IdFTP1.Get('TP\'+ Trim(fileName), sFieldName,false, true);
 | 
			
		||||
    except
 | 
			
		||||
      Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
 | 
			
		||||
      IdFTP1.Quit;
 | 
			
		||||
      Exit;
 | 
			
		||||
    end;
 | 
			
		||||
  end
 | 
			
		||||
  else
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
 | 
			
		||||
    IdFTP1.Quit;
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
   if IdFTP1.Connected then IdFTP1.Quit;
 | 
			
		||||
  ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);    }
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.FileNameClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  {IF trim(custNo.Text)='' then
 | 
			
		||||
  begin
 | 
			
		||||
    application.MessageBox('产品编号不能为空!','提示信息',MB_ICONERROR);
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  try
 | 
			
		||||
	  FormGetPic := TFormGetPic.Create(Application);
 | 
			
		||||
    with FormGetPic do
 | 
			
		||||
    begin
 | 
			
		||||
      fkeyNO:=trim(zdyCode.Text);
 | 
			
		||||
      pat1:=TCXbutton(Sender).Name;
 | 
			
		||||
      pic1:=TCXbutton(Sender).Hint;
 | 
			
		||||
      FTFType:='产品';
 | 
			
		||||
 //   pat1:='PatFile1';
 | 
			
		||||
//   pic1:='Picture1';
 | 
			
		||||
      IF ShowModal = 1 then
 | 
			
		||||
      begin
 | 
			
		||||
     // self.Timage(Tbutton(Sender).Hint).Picture.Assign(FormGetPic.Image2.Picture.Bitmap);
 | 
			
		||||
        zdycode.Enabled:=false;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
      Release;
 | 
			
		||||
    end;
 | 
			
		||||
    Initimage();
 | 
			
		||||
  except
 | 
			
		||||
    if FormGetPic<>nil then FormGetPic.Release;
 | 
			
		||||
  end;}
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.MTypeBtnDnClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  TBtnEditC(Sender).Text:='';
 | 
			
		||||
  TBtnEditC(Sender).TxtCode:='';
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.ToolButton2Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  IF CDS1.IsEmpty then exit;
 | 
			
		||||
  CDS1.Delete;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.ToolButton1Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
 | 
			
		||||
 try
 | 
			
		||||
    frmZdyAttachCP:=TfrmZdyAttachCP.Create(Application);
 | 
			
		||||
    with frmZdyAttachCP do
 | 
			
		||||
    begin
 | 
			
		||||
      if ShowModal=1 then
 | 
			
		||||
      begin
 | 
			
		||||
        Self.CDS1.append;
 | 
			
		||||
        Self.CDS1.FieldByName('P_Code').Value:=Trim(CDS_HZ.fieldbyname('ZdyCode').AsString);
 | 
			
		||||
        Self.CDS1.FieldByName('P_CodeName').Value:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
 | 
			
		||||
        Self.CDS1.FieldByName('P_Color').Value:=Trim(CDS_HZ.fieldbyname('DEFstr3').AsString);
 | 
			
		||||
    //    Self.Order_Sub.FieldByName('SOrddefstr4').Value:=Trim(ClientDataSet1.fieldbyname('Note').AsString);
 | 
			
		||||
        Self.CDS1.Post;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    frmZdyAttachCP.Free;
 | 
			
		||||
  end;
 | 
			
		||||
{  frmCPManageSel:=TfrmCPManageSel.create(self);
 | 
			
		||||
  with frmCPManageSel do
 | 
			
		||||
  begin
 | 
			
		||||
    IF showmodal=1 then
 | 
			
		||||
    begin
 | 
			
		||||
      cds_main.DisableControls;
 | 
			
		||||
      cds_main.first;
 | 
			
		||||
      while not cds_main.Eof do
 | 
			
		||||
      begin
 | 
			
		||||
        if cds_main.FieldByName('ssel').AsBoolean then
 | 
			
		||||
        begin
 | 
			
		||||
         cds1.append;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
         cds1.FieldByName('P_Code').Value:=trim(cds_main.fieldbyname('CYNo').AsString);
 | 
			
		||||
         cds1.FieldByName('P_CodeName').Value:=trim(cds_main.fieldbyname('CYName').AsString);
 | 
			
		||||
         cds1.FieldByName('P_CodeNameE').Value:=trim(cds_main.fieldbyname('CYEName').AsString);
 | 
			
		||||
         cds1.FieldByName('P_spec').Value:=trim(cds_main.fieldbyname('CYSpec').AsString);
 | 
			
		||||
         cds1.FieldByName('P_cf').Value:=trim(cds_main.fieldbyname('CYCF').AsString);
 | 
			
		||||
         cds1.FieldByName('P_MF').Value:=trim(cds_main.fieldbyname('CYMF').AsString);
 | 
			
		||||
         cds1.FieldByName('P_KZ').Value:=trim(cds_main.fieldbyname('CYKZ').AsString);
 | 
			
		||||
         cds1.FieldByName('BJstr7').Value:=trim(cds_main.fieldbyname('defstr14').AsString);
 | 
			
		||||
 | 
			
		||||
         cds1.FieldByName('Price').Value:=cds_main.fieldbyname('Price6').AsFloat;
 | 
			
		||||
         cds1.FieldByName('BJQty1').Value:=cds_main.fieldbyname('kcQty').AsFloat;
 | 
			
		||||
         cds1.Post;
 | 
			
		||||
        end;
 | 
			
		||||
        cds_main.next;
 | 
			
		||||
      end;
 | 
			
		||||
      cds_main.EnableControls;
 | 
			
		||||
    end;
 | 
			
		||||
    free;
 | 
			
		||||
  end;                        }
 | 
			
		||||
  tv1.Controller.EditingController.ShowEdit();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.custNoBtnClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmZdyAttachment:=TfrmZdyAttachment.create(self);
 | 
			
		||||
  with frmZdyAttachment do
 | 
			
		||||
  begin
 | 
			
		||||
  //  if canshu1='业务员' then fywy:=DName;
 | 
			
		||||
    fkhType:='桂华纺织';
 | 
			
		||||
    if showmodal=1 then
 | 
			
		||||
    begin
 | 
			
		||||
      custNo.Text:=trim(cds_hz.fieldbyname('zdyCode').AsString);
 | 
			
		||||
      custName.Text:=trim(cds_hz.fieldbyname('zdyName').AsString);
 | 
			
		||||
      custCountry.Text:=trim(cds_hz.fieldbyname('DEFStr7').AsString);
 | 
			
		||||
      custphone.Text:=trim(cds_hz.fieldbyname('DEFstr1').AsString);
 | 
			
		||||
    end;
 | 
			
		||||
    free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.PriceunitChange(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  IF trim(huilv.Text)='' then
 | 
			
		||||
  begin
 | 
			
		||||
    huilv.Text:='1';
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.V1Column8PropertiesEditValueChanged(
 | 
			
		||||
  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 CDS1 do
 | 
			
		||||
  begin
 | 
			
		||||
    Edit;
 | 
			
		||||
    FieldByName(FFieldName).Value:=Trim(mvalue);
 | 
			
		||||
    FieldByName('Price').Value:=format('%.2f',[fieldbyname('Price1').AsFloat * strtofloatdef(trim(huilv.Text),1)]);
 | 
			
		||||
    Post;
 | 
			
		||||
  end;
 | 
			
		||||
  tv1.Controller.EditingController.ShowEdit();}
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.huilvPropertiesEditValueChanged(
 | 
			
		||||
  Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  mvalue,FFieldName:string;
 | 
			
		||||
begin
 | 
			
		||||
  mvalue:=TcxCurrencyEdit(Sender).EditingText;
 | 
			
		||||
  if Trim(mvalue)='' then
 | 
			
		||||
  begin
 | 
			
		||||
    mvalue:='1';
 | 
			
		||||
  end;
 | 
			
		||||
  huilv.Text:= mvalue;
 | 
			
		||||
  IF not cds1.Active then exit;
 | 
			
		||||
  IF cds1.IsEmpty then exit;
 | 
			
		||||
  with cds1 do
 | 
			
		||||
  begin
 | 
			
		||||
    DisableControls;
 | 
			
		||||
    first;
 | 
			
		||||
    while not eof do
 | 
			
		||||
    begin
 | 
			
		||||
      Edit;
 | 
			
		||||
      FieldByName('Price').Value:=format('%.2f',[fieldbyname('Price1').AsFloat * strtofloatdef(trim(huilv.Text),1)]);
 | 
			
		||||
      Post;
 | 
			
		||||
      next;
 | 
			
		||||
    end;
 | 
			
		||||
    EnableControls;
 | 
			
		||||
  end;
 | 
			
		||||
  tv1.Controller.EditingController.ShowEdit();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.custCountryBtnClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    frmZDYHelp:=TfrmZDYHelp.Create(Application);
 | 
			
		||||
    with frmZDYHelp do
 | 
			
		||||
    begin
 | 
			
		||||
      flag:='custCountry';
 | 
			
		||||
      flagname:='国家名称';
 | 
			
		||||
      if ShowModal=1 then
 | 
			
		||||
      begin
 | 
			
		||||
        custCountry.Text:=Trim(ClientDataSet1.fieldbyname('zdyName').AsString);
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    frmZDYHelp.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmZdyAttachmentBJ_Edit.CYIDKeyPress(Sender: TObject;
 | 
			
		||||
  var Key: Char);
 | 
			
		||||
begin
 | 
			
		||||
  IF key=#13 then
 | 
			
		||||
  begin
 | 
			
		||||
    with ADOQueryTmp do
 | 
			
		||||
    begin
 | 
			
		||||
      close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Add('select * from CP_YDang where CYID='''+trim(CYID.Text)+''' ');
 | 
			
		||||
      open;
 | 
			
		||||
    end;
 | 
			
		||||
    IF not ADOQueryTmp.IsEmpty then
 | 
			
		||||
    begin
 | 
			
		||||
         cds1.append;
 | 
			
		||||
         cds1.FieldByName('P_Code').Value:=trim(ADOQueryTmp.fieldbyname('CYNo').AsString);
 | 
			
		||||
         cds1.FieldByName('P_CodeName').Value:=trim(ADOQueryTmp.fieldbyname('CYName').AsString);
 | 
			
		||||
         cds1.FieldByName('P_CodeNameE').Value:=trim(ADOQueryTmp.fieldbyname('CYEName').AsString);
 | 
			
		||||
         cds1.FieldByName('P_spec').Value:=trim(ADOQueryTmp.fieldbyname('CYSpec').AsString);
 | 
			
		||||
         cds1.FieldByName('P_cf').Value:=trim(ADOQueryTmp.fieldbyname('CYCF').AsString);
 | 
			
		||||
         cds1.FieldByName('P_MF').Value:=trim(ADOQueryTmp.fieldbyname('CYMF').AsString);
 | 
			
		||||
         cds1.FieldByName('P_KZ').Value:=trim(ADOQueryTmp.fieldbyname('CYKZ').AsString);
 | 
			
		||||
         cds1.FieldByName('BJstr7').Value:=trim(ADOQueryTmp.fieldbyname('defstr14').AsString);
 | 
			
		||||
         cds1.FieldByName('Price').Value:=ADOQueryTmp.fieldbyname('Price6').AsFloat;
 | 
			
		||||
         cds1.FieldByName('BJQty1').Value:=ADOQueryTmp.fieldbyname('kcQty').AsFloat;
 | 
			
		||||
         cds1.Post;
 | 
			
		||||
         CYID.Text:='';
 | 
			
		||||
    end
 | 
			
		||||
    else
 | 
			
		||||
    begin
 | 
			
		||||
      application.MessageBox('此条码错误!','提示信息',MB_ICONERROR);
 | 
			
		||||
      CYID.Text:='';
 | 
			
		||||
    end;
 | 
			
		||||
  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.
										
									
								
							| 
						 | 
				
			
			@ -4,7 +4,7 @@ uses
 | 
			
		|||
  SysUtils,                    
 | 
			
		||||
  classes,                             
 | 
			
		||||
  forms,                                                  
 | 
			
		||||
  WinTypes,                                     
 | 
			
		||||
  WinTypes,                                       
 | 
			
		||||
  WinProcs,
 | 
			
		||||
  U_DataLink in 'U_DataLink.pas' {DataLink_TradeManage: TDataModule},
 | 
			
		||||
  U_GetDllForm in 'U_GetDllForm.pas',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -10,7 +10,20 @@ uses
 | 
			
		|||
  cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
 | 
			
		||||
  ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
 | 
			
		||||
  cxDropDownEdit, MovePanel, cxCheckBox, BtnEdit, strutils, cxSplitter,
 | 
			
		||||
  cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
 | 
			
		||||
  cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore, dxSkinBlack,
 | 
			
		||||
  dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
 | 
			
		||||
  dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
 | 
			
		||||
  dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
 | 
			
		||||
  dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
 | 
			
		||||
  dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
 | 
			
		||||
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
 | 
			
		||||
  dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
 | 
			
		||||
  dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
 | 
			
		||||
  dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
 | 
			
		||||
  dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
 | 
			
		||||
  dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
 | 
			
		||||
  dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
 | 
			
		||||
  dxSkinscxPCPainter;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmCKProductCK = class(TForm)
 | 
			
		||||
| 
						 | 
				
			
			@ -160,6 +173,7 @@ type
 | 
			
		|||
    IsCreateSel: boolean;
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    procedure InitGridNull();
 | 
			
		||||
    function YFData(fkeyNo: string): Boolean;
 | 
			
		||||
    function savedate(): boolean;
 | 
			
		||||
    function SaveJG(fCkNO: string): boolean;
 | 
			
		||||
    function SaveJG10(fCkNO: string): boolean;
 | 
			
		||||
| 
						 | 
				
			
			@ -179,6 +193,131 @@ uses
 | 
			
		|||
  U_DataLink, U_Fun10, U_ZDYHelp, U_ZdyAttachGYS, U_ZdyAttachCP;
 | 
			
		||||
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
function TfrmCKProductCK.YFData(fkeyNo: string): Boolean;
 | 
			
		||||
var
 | 
			
		||||
  CRID, YFID, Price, PriceUnit, OrderUnit, FComTaiTou: string;
 | 
			
		||||
begin
 | 
			
		||||
  Result := False;
 | 
			
		||||
 | 
			
		||||
  with ADOQueryTemp do
 | 
			
		||||
  begin
 | 
			
		||||
    Close;
 | 
			
		||||
    SQL.Clear;
 | 
			
		||||
    sql.Add('select * from YF_Money_KC where FactoryName=''' + Trim(defstr1.text) + '''');
 | 
			
		||||
    sql.Add(' and YFDefFlag1=0 ');
 | 
			
		||||
    Open;
 | 
			
		||||
  end;
 | 
			
		||||
  if not ADOQueryTemp.IsEmpty then
 | 
			
		||||
  begin
 | 
			
		||||
    CRID := ADOQueryTemp.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(defstr1.text);
 | 
			
		||||
      FieldByName('YFDefFlag1').Value := 0;
 | 
			
		||||
      FieldByName('ZdyStr1').Value := '壇마마';
 | 
			
		||||
      Post;
 | 
			
		||||
    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=''툰꼈藁새'' ');
 | 
			
		||||
    execsql;
 | 
			
		||||
  end;
 | 
			
		||||
  with ADOQueryTemp do                    
 | 
			
		||||
  begin
 | 
			
		||||
    Close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select C_CodeName,C_Color,SUM(RollNum) as RollNum,SUM(Qty) as Qty from CK_BanCP_CR  ');
 | 
			
		||||
    sql.Add(' where CKOrdNo=''' + Trim(fkeyNo) + '''');
 | 
			
		||||
    sql.Add(' and CRType=''툰꼈藁새'' ');
 | 
			
		||||
    sql.Add(' group by C_CodeName,C_Color  ');
 | 
			
		||||
    Open;
 | 
			
		||||
  end;
 | 
			
		||||
  while not ADOQueryTemp.eof do
 | 
			
		||||
  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(fkeyNo);
 | 
			
		||||
      FieldByName('CRID').Value := StrToInt(CRID);
 | 
			
		||||
      FieldByName('Filler').Value := Trim(DName);
 | 
			
		||||
      FieldByName('CRType').Value := '壇마운되션';
 | 
			
		||||
      FieldByName('CRFlag').Value := '壇마마';
 | 
			
		||||
      FieldByName('QtyFlag').Value := 1;
 | 
			
		||||
      FieldByName('FactoryName').Value := trim(defstr1.text);
 | 
			
		||||
      FieldByName('CRTime').Value := Trim(FormatDateTime('yyyy-MM-dd', CRTIME.DateTime));
 | 
			
		||||
      FieldByName('YFType').Value := '菱땡<E88FB1>냥';
 | 
			
		||||
      FieldByName('Price').Value := 0;
 | 
			
		||||
      FieldByName('PS').Value := -1 * ADOQueryTemp.fieldbyname('RollNum').AsFloat;
 | 
			
		||||
      FieldByName('Qty').Value := -1 * ADOQueryTemp.fieldbyname('Qty').AsFloat;
 | 
			
		||||
      FieldByName('P_CodeName').Value := ADOQueryTemp.fieldbyname('C_CodeName').AsString;
 | 
			
		||||
      FieldByName('P_Color').Value := ADOQueryTemp.fieldbyname('C_Color').AsString;
 | 
			
		||||
          //FieldByName('HuiLv').Value:=1;
 | 
			
		||||
      FieldByName('HuiLv').Value := 1;
 | 
			
		||||
      FieldByName('BZType').Value := '훙췽귑';
 | 
			
		||||
      FieldByName('QtyUnit').Value := 'M';
 | 
			
		||||
      FieldByName('ComTaiTou').Value := trim(defstr1.text);
 | 
			
		||||
      FieldByName('YFName').Value := '툰꼈藁새';
 | 
			
		||||
      FieldByName('MainId').Value := Trim(fkeyNo);
 | 
			
		||||
      FieldByName('subID').Value := '';
 | 
			
		||||
      FieldByName('YFDefFlag1').Value := 0;
 | 
			
		||||
     //     FieldByName('status').Value:='1';
 | 
			
		||||
      Post;
 | 
			
		||||
    end;
 | 
			
		||||
    ADOQueryTemp.next;
 | 
			
		||||
  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;
 | 
			
		||||
  Result := True;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
function TfrmCKProductCK.SaveJG10(fCkNO: string): boolean;
 | 
			
		||||
var
 | 
			
		||||
  FmainID, fsubID, fconNo: string;
 | 
			
		||||
| 
						 | 
				
			
			@ -201,7 +340,7 @@ begin
 | 
			
		|||
  end; }
 | 
			
		||||
 | 
			
		||||
  with ADOQueryTemp do
 | 
			
		||||
  begin                            
 | 
			
		||||
  begin
 | 
			
		||||
    close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select BCGangNO='''',QtyUnit=''M'',sum(RollNum) as RollNum,suM(Qty) as Qty ');
 | 
			
		||||
| 
						 | 
				
			
			@ -669,6 +808,14 @@ begin
 | 
			
		|||
        exit;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
    if (trim(CRType.Text) = '툰꼈藁새') then
 | 
			
		||||
    begin
 | 
			
		||||
      if not YFData(fkeyNo) then
 | 
			
		||||
      begin
 | 
			
		||||
        ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
        exit;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
    ADOQueryCmd.Connection.CommitTrans;
 | 
			
		||||
    result := true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										652
									
								
								桂华管理系统/U_CP_COL_XLYJ.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										652
									
								
								桂华管理系统/U_CP_COL_XLYJ.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,652 @@
 | 
			
		|||
object frmCP_COL_XLYJ: TfrmCP_COL_XLYJ
 | 
			
		||||
  Left = 306
 | 
			
		||||
  Top = 350
 | 
			
		||||
  Width = 1220
 | 
			
		||||
  Height = 592
 | 
			
		||||
  Caption = #20135#21697#39068#33394#24211#23384#39044#35686
 | 
			
		||||
  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 = 1204
 | 
			
		||||
    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 TBexcel: TToolButton
 | 
			
		||||
      Left = 126
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #23548#20986
 | 
			
		||||
      ImageIndex = 75
 | 
			
		||||
      OnClick = TBexcelClick
 | 
			
		||||
    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 = 32
 | 
			
		||||
    Width = 1204
 | 
			
		||||
    Height = 45
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 43
 | 
			
		||||
      Top = 15
 | 
			
		||||
      Width = 26
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #26085#26399
 | 
			
		||||
      Font.Charset = GB2312_CHARSET
 | 
			
		||||
      Font.Color = clWindowText
 | 
			
		||||
      Font.Height = -12
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object Label4: TLabel
 | 
			
		||||
      Left = 314
 | 
			
		||||
      Top = 15
 | 
			
		||||
      Width = 26
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #21697#21517
 | 
			
		||||
      Font.Charset = GB2312_CHARSET
 | 
			
		||||
      Font.Color = clWindowText
 | 
			
		||||
      Font.Height = -12
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object Label9: TLabel
 | 
			
		||||
      Left = 495
 | 
			
		||||
      Top = 55
 | 
			
		||||
      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 Label2: TLabel
 | 
			
		||||
      Left = 164
 | 
			
		||||
      Top = 16
 | 
			
		||||
      Width = 6
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = '-'
 | 
			
		||||
    end
 | 
			
		||||
    object Label3: TLabel
 | 
			
		||||
      Left = 490
 | 
			
		||||
      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 Label5: TLabel
 | 
			
		||||
      Left = 642
 | 
			
		||||
      Top = 15
 | 
			
		||||
      Width = 52
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #39044#35686#21305#25968
 | 
			
		||||
      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 = 172
 | 
			
		||||
      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 = 343
 | 
			
		||||
      Top = 11
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object ConNoM: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 536
 | 
			
		||||
      Top = 51
 | 
			
		||||
      Width = 77
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 3
 | 
			
		||||
    end
 | 
			
		||||
    object P_color: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 519
 | 
			
		||||
      Top = 11
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 4
 | 
			
		||||
      OnChange = P_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object YJPS: TEdit
 | 
			
		||||
      Left = 698
 | 
			
		||||
      Top = 11
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 5
 | 
			
		||||
      OnKeyPress = YJPSKeyPress
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid1: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 77
 | 
			
		||||
    Width = 729
 | 
			
		||||
    Height = 476
 | 
			
		||||
    Align = alLeft
 | 
			
		||||
    TabOrder = 2
 | 
			
		||||
    object Tv1: TcxGridDBBandedTableView
 | 
			
		||||
      Navigator.Buttons.CustomButtons = <>
 | 
			
		||||
      OnCellClick = Tv1CellClick
 | 
			
		||||
      OnCustomDrawCell = Tv1CustomDrawCell
 | 
			
		||||
      DataController.DataSource = DS_Main
 | 
			
		||||
      DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
      DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column2
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column3
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column4
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column5
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column6
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column7
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column8
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column9
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column10
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column11
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column12
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column13
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column14
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column15
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column16
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column17
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsCustomize.ColumnMoving = False
 | 
			
		||||
      OptionsCustomize.BandHiding = True
 | 
			
		||||
      OptionsCustomize.BandMoving = False
 | 
			
		||||
      OptionsCustomize.BandSizing = False
 | 
			
		||||
      OptionsData.Deleting = False
 | 
			
		||||
      OptionsData.Inserting = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      OptionsView.Indicator = True
 | 
			
		||||
      Styles.Header = DataLink_TradeManage.cxStyle_fontBlack
 | 
			
		||||
      Styles.BandHeader = DataLink_TradeManage.cxStyle_fontBlack
 | 
			
		||||
      Bands = <
 | 
			
		||||
        item
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Caption = #26690#21326#32442#32455
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Caption = #23578#32654#29305
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Caption = #37329#40718#20016#38376#24066#37096
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Caption = #21512#35745
 | 
			
		||||
        end>
 | 
			
		||||
      object v1Column1: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #21697#21517
 | 
			
		||||
        DataBinding.FieldName = 'P_CodeName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 120
 | 
			
		||||
        Position.BandIndex = 0
 | 
			
		||||
        Position.ColIndex = 0
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column18: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #39068#33394
 | 
			
		||||
        DataBinding.FieldName = 'P_Color'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 0
 | 
			
		||||
        Position.ColIndex = 1
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column2: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #21305#25968
 | 
			
		||||
        DataBinding.FieldName = 'J_ps'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 1
 | 
			
		||||
        Position.ColIndex = 0
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column3: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'J_Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 1
 | 
			
		||||
        Position.ColIndex = 1
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column4: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #37329#39069
 | 
			
		||||
        DataBinding.FieldName = 'J_money'
 | 
			
		||||
        Visible = False
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 1
 | 
			
		||||
        Position.ColIndex = 2
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column5: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #21305#25968
 | 
			
		||||
        DataBinding.FieldName = 'G_ps'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 2
 | 
			
		||||
        Position.ColIndex = 0
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column6: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'G_Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 2
 | 
			
		||||
        Position.ColIndex = 1
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column7: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #37329#39069
 | 
			
		||||
        DataBinding.FieldName = 'G_money'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 2
 | 
			
		||||
        Position.ColIndex = 2
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column8: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #21305#25968
 | 
			
		||||
        DataBinding.FieldName = 'H_ps'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 3
 | 
			
		||||
        Position.ColIndex = 0
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column9: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'H_Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 3
 | 
			
		||||
        Position.ColIndex = 1
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column10: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #37329#39069
 | 
			
		||||
        DataBinding.FieldName = 'H_Money'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 3
 | 
			
		||||
        Position.ColIndex = 2
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column11: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #21305#25968
 | 
			
		||||
        DataBinding.FieldName = 'ps'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 4
 | 
			
		||||
        Position.ColIndex = 0
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column12: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 4
 | 
			
		||||
        Position.ColIndex = 1
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column13: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #37329#39069
 | 
			
		||||
        DataBinding.FieldName = 'money'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 4
 | 
			
		||||
        Position.ColIndex = 2
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column14: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #24211#23384#21305#25968
 | 
			
		||||
        DataBinding.FieldName = 'J_KCRollNum'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 1
 | 
			
		||||
        Position.ColIndex = 3
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column15: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #24211#23384#25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'J_KCQty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 1
 | 
			
		||||
        Position.ColIndex = 4
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column16: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #24211#23384#21305#25968
 | 
			
		||||
        DataBinding.FieldName = 'G_KCRollNum'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 2
 | 
			
		||||
        Position.ColIndex = 3
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column17: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #24211#23384#25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'G_KCQty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Editing = False
 | 
			
		||||
        Width = 80
 | 
			
		||||
        Position.BandIndex = 2
 | 
			
		||||
        Position.ColIndex = 4
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object Tv1Column1: TcxGridDBBandedColumn
 | 
			
		||||
        Caption = #26159#21542#39044#35686
 | 
			
		||||
        DataBinding.FieldName = 'ISYJ'
 | 
			
		||||
        PropertiesClassName = 'TcxComboBoxProperties'
 | 
			
		||||
        Properties.ImmediatePost = True
 | 
			
		||||
        Properties.Items.Strings = (
 | 
			
		||||
          #26159
 | 
			
		||||
          #21542)
 | 
			
		||||
        Properties.OnEditValueChanged = Tv1Column1PropertiesEditValueChanged
 | 
			
		||||
        Position.BandIndex = 1
 | 
			
		||||
        Position.ColIndex = 5
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
      object Tv1Column2: TcxGridDBBandedColumn
 | 
			
		||||
        DataBinding.FieldName = 'YJstatus'
 | 
			
		||||
        Visible = False
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 40
 | 
			
		||||
        Position.BandIndex = 1
 | 
			
		||||
        Position.ColIndex = 6
 | 
			
		||||
        Position.RowIndex = 0
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGrid1Level1: TcxGridLevel
 | 
			
		||||
      GridView = Tv1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object GroupBox1: TGroupBox
 | 
			
		||||
    Left = 792
 | 
			
		||||
    Top = 77
 | 
			
		||||
    Width = 412
 | 
			
		||||
    Height = 476
 | 
			
		||||
    Align = alRight
 | 
			
		||||
    Caption = #23458#25143#38144#21806#20998#26512
 | 
			
		||||
    TabOrder = 3
 | 
			
		||||
    object cxGrid2: TcxGrid
 | 
			
		||||
      Left = 2
 | 
			
		||||
      Top = 14
 | 
			
		||||
      Width = 408
 | 
			
		||||
      Height = 460
 | 
			
		||||
      Align = alClient
 | 
			
		||||
      TabOrder = 0
 | 
			
		||||
      object TV2: TcxGridDBTableView
 | 
			
		||||
        Navigator.Buttons.CustomButtons = <>
 | 
			
		||||
        DataController.DataSource = DS_sub
 | 
			
		||||
        DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
        DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
          item
 | 
			
		||||
            Kind = skSum
 | 
			
		||||
            Column = V2Column3
 | 
			
		||||
          end
 | 
			
		||||
          item
 | 
			
		||||
            Kind = skSum
 | 
			
		||||
            Column = V2Column4
 | 
			
		||||
          end
 | 
			
		||||
          item
 | 
			
		||||
            Kind = skSum
 | 
			
		||||
            Column = V2Column6
 | 
			
		||||
          end>
 | 
			
		||||
        DataController.Summary.SummaryGroups = <>
 | 
			
		||||
        OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
        OptionsCustomize.ColumnSorting = False
 | 
			
		||||
        OptionsData.Deleting = False
 | 
			
		||||
        OptionsData.Editing = False
 | 
			
		||||
        OptionsView.Footer = True
 | 
			
		||||
        OptionsView.GroupByBox = False
 | 
			
		||||
        OptionsView.Indicator = True
 | 
			
		||||
        object V2Column1: TcxGridDBColumn
 | 
			
		||||
          Caption = #23458#25143
 | 
			
		||||
          DataBinding.FieldName = 'factoryName'
 | 
			
		||||
          HeaderAlignmentHorz = taCenter
 | 
			
		||||
          Options.Editing = False
 | 
			
		||||
          Width = 75
 | 
			
		||||
        end
 | 
			
		||||
        object V2Column2: TcxGridDBColumn
 | 
			
		||||
          Caption = #21457#36135#26085#26399
 | 
			
		||||
          DataBinding.FieldName = 'CRTime'
 | 
			
		||||
          HeaderAlignmentHorz = taCenter
 | 
			
		||||
          Options.Editing = False
 | 
			
		||||
          Width = 77
 | 
			
		||||
        end
 | 
			
		||||
        object V2Column3: TcxGridDBColumn
 | 
			
		||||
          Caption = #21305#25968
 | 
			
		||||
          DataBinding.FieldName = 'ps'
 | 
			
		||||
          HeaderAlignmentHorz = taCenter
 | 
			
		||||
          Options.Editing = False
 | 
			
		||||
          Width = 39
 | 
			
		||||
        end
 | 
			
		||||
        object V2Column4: TcxGridDBColumn
 | 
			
		||||
          Caption = #25968#37327
 | 
			
		||||
          DataBinding.FieldName = 'Qty'
 | 
			
		||||
          HeaderAlignmentHorz = taCenter
 | 
			
		||||
          Options.Editing = False
 | 
			
		||||
          Width = 75
 | 
			
		||||
        end
 | 
			
		||||
        object V2Column5: TcxGridDBColumn
 | 
			
		||||
          Caption = #21333#20215
 | 
			
		||||
          DataBinding.FieldName = 'Price'
 | 
			
		||||
          Visible = False
 | 
			
		||||
          HeaderAlignmentHorz = taCenter
 | 
			
		||||
          Options.Editing = False
 | 
			
		||||
          Width = 48
 | 
			
		||||
        end
 | 
			
		||||
        object V2Column6: TcxGridDBColumn
 | 
			
		||||
          Caption = #37329#39069
 | 
			
		||||
          DataBinding.FieldName = 'money'
 | 
			
		||||
          Visible = False
 | 
			
		||||
          HeaderAlignmentHorz = taCenter
 | 
			
		||||
          Options.Editing = False
 | 
			
		||||
          Width = 60
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
      object cxGrid2Level1: TcxGridLevel
 | 
			
		||||
        GridView = TV2
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryMain: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 300
 | 
			
		||||
    Top = 172
 | 
			
		||||
  end
 | 
			
		||||
  object DS_Main: TDataSource
 | 
			
		||||
    DataSet = CDS_main
 | 
			
		||||
    Left = 400
 | 
			
		||||
    Top = 160
 | 
			
		||||
  end
 | 
			
		||||
  object CDS_main: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 452
 | 
			
		||||
    Top = 168
 | 
			
		||||
  end
 | 
			
		||||
  object ADO_Sub: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 776
 | 
			
		||||
    Top = 44
 | 
			
		||||
  end
 | 
			
		||||
  object DS_sub: TDataSource
 | 
			
		||||
    DataSet = ADO_Sub
 | 
			
		||||
    Left = 700
 | 
			
		||||
    Top = 160
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQuery1: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 84
 | 
			
		||||
    Top = 188
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										270
									
								
								桂华管理系统/U_CP_COL_XLYJ.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										270
									
								
								桂华管理系统/U_CP_COL_XLYJ.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,270 @@
 | 
			
		|||
unit U_CP_COL_XLYJ;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, StdCtrls, ComCtrls, ExtCtrls, ToolWin, DBClient, DB, ADODB, cxStyles,
 | 
			
		||||
  cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData,
 | 
			
		||||
  cxGridCustomTableView, cxGridTableView, cxGridBandedTableView,
 | 
			
		||||
  cxGridDBBandedTableView, cxControls, cxGridCustomView, cxClasses, cxGridLevel,
 | 
			
		||||
  cxGrid, cxGridDBTableView, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
 | 
			
		||||
  dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
 | 
			
		||||
  dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
 | 
			
		||||
  dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
 | 
			
		||||
  dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
 | 
			
		||||
  dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
 | 
			
		||||
  dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
 | 
			
		||||
  dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
 | 
			
		||||
  dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
 | 
			
		||||
  dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
 | 
			
		||||
  dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
 | 
			
		||||
  dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
 | 
			
		||||
  dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
 | 
			
		||||
  dxSkinXmas2008Blue, dxSkinscxPCPainter, cxDropDownEdit;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmCP_COL_XLYJ = class(TForm)
 | 
			
		||||
    ToolBar1: TToolBar;
 | 
			
		||||
    TBRafresh: TToolButton;
 | 
			
		||||
    TBFind: TToolButton;
 | 
			
		||||
    TBClose: TToolButton;
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    Label4: TLabel;
 | 
			
		||||
    Label9: TLabel;
 | 
			
		||||
    BegDate: TDateTimePicker;
 | 
			
		||||
    EndDate: TDateTimePicker;
 | 
			
		||||
    P_CodeName: TEdit;
 | 
			
		||||
    ConNoM: TEdit;
 | 
			
		||||
    Label2: TLabel;
 | 
			
		||||
    ADOQueryMain: TADOQuery;
 | 
			
		||||
    DS_Main: TDataSource;
 | 
			
		||||
    CDS_main: TClientDataSet;
 | 
			
		||||
    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;
 | 
			
		||||
    P_color: TEdit;
 | 
			
		||||
    Label3: TLabel;
 | 
			
		||||
    TBexcel: TToolButton;
 | 
			
		||||
    GroupBox1: TGroupBox;
 | 
			
		||||
    TV2: TcxGridDBTableView;
 | 
			
		||||
    cxGrid2Level1: TcxGridLevel;
 | 
			
		||||
    cxGrid2: TcxGrid;
 | 
			
		||||
    V2Column1: TcxGridDBColumn;
 | 
			
		||||
    V2Column2: TcxGridDBColumn;
 | 
			
		||||
    V2Column3: TcxGridDBColumn;
 | 
			
		||||
    V2Column4: TcxGridDBColumn;
 | 
			
		||||
    V2Column5: TcxGridDBColumn;
 | 
			
		||||
    V2Column6: TcxGridDBColumn;
 | 
			
		||||
    ADO_Sub: TADOQuery;
 | 
			
		||||
    DS_sub: TDataSource;
 | 
			
		||||
    Tv1Column1: TcxGridDBBandedColumn;
 | 
			
		||||
    Label5: TLabel;
 | 
			
		||||
    YJPS: TEdit;
 | 
			
		||||
    Tv1Column2: TcxGridDBBandedColumn;
 | 
			
		||||
    ADOQuery1: TADOQuery;
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
    procedure FormCreate(Sender: TObject);
 | 
			
		||||
    procedure TBCloseClick(Sender: TObject);
 | 
			
		||||
    procedure TBFindClick(Sender: TObject);
 | 
			
		||||
    procedure P_CodeNameChange(Sender: TObject);
 | 
			
		||||
    procedure TBRafreshClick(Sender: TObject);
 | 
			
		||||
    procedure FormShow(Sender: TObject);
 | 
			
		||||
    procedure TBexcelClick(Sender: TObject);
 | 
			
		||||
    procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
 | 
			
		||||
    procedure YJPSKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
    procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
 | 
			
		||||
    procedure Tv1Column1PropertiesEditValueChanged(Sender: TObject);
 | 
			
		||||
  private
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
    procedure initSub();
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
  public
 | 
			
		||||
    canshu1: string;
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmCP_COL_XLYJ: TfrmCP_COL_XLYJ;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  U_DataLink, U_Fun10;
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.Initsub();
 | 
			
		||||
begin
 | 
			
		||||
  ADO_Sub.Close;
 | 
			
		||||
  if CDS_Main.IsEmpty then
 | 
			
		||||
    exit;
 | 
			
		||||
  with ADO_Sub do
 | 
			
		||||
  begin
 | 
			
		||||
    close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('select * from YF_money_CR ');
 | 
			
		||||
    sql.Add('where CRTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' ');
 | 
			
		||||
    sql.Add('and CRTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
 | 
			
		||||
    sql.Add('and P_CodeName=' + quotedstr(trim(CDS_Main.fieldbyName('P_CodeName').AsString)));
 | 
			
		||||
    sql.Add('and P_Color=' + quotedstr(trim(CDS_Main.fieldbyName('P_Color').AsString)));
 | 
			
		||||
    sql.Add('and SYRName=''' + trim(canshu1) + '''');
 | 
			
		||||
    sql.Add('and CRType=''应收款登记'' ');
 | 
			
		||||
    sql.Add('order by CRTime desc ');
 | 
			
		||||
    open;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.InitGrid();
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    ADOQueryMain.DisableControls;
 | 
			
		||||
    with ADOQueryMain do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      Filtered := False;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Add(' exec P_Get_CP_COL_XlYJ ');
 | 
			
		||||
      SQL.Add(' @begdate=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + '''');
 | 
			
		||||
      SQL.Add(',@enddate=''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + '''');
 | 
			
		||||
      sql.Add(',@YJPS=''' + trim(YJPS.text) + '''');
 | 
			
		||||
//      ShowMessage(SQL.text);
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    SCreateCDS20(ADOQueryMain, CDS_Main);
 | 
			
		||||
    SInitCDSData20(ADOQueryMain, CDS_Main);
 | 
			
		||||
  finally
 | 
			
		||||
    ADOQueryMain.EnableControls;
 | 
			
		||||
  end;
 | 
			
		||||
  TBfind.Click;
 | 
			
		||||
  Initsub();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmCP_COL_XLYJ := nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
begin
 | 
			
		||||
  Action := cafree;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.FormCreate(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  enddate.DateTime := now();
 | 
			
		||||
  begdate.DateTime := enddate.DateTime - 30;
 | 
			
		||||
  cxGrid1.Align := alclient;
 | 
			
		||||
  canshu1 := trim(DParameters1);
 | 
			
		||||
  YJPS.Text := '0';
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.TBCloseClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  close;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.TBFindClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if ADOQueryMain.Active = False then
 | 
			
		||||
    Exit;
 | 
			
		||||
  SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
 | 
			
		||||
  SCreateCDS20(ADOQueryMain, CDS_Main);
 | 
			
		||||
  SInitCDSData20(ADOQueryMain, CDS_Main);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.P_CodeNameChange(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  TBfind.Click;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.TBRafreshClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  initGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if trim(canshu1) = '桂华纺织' then
 | 
			
		||||
  begin
 | 
			
		||||
    tv1.Bands[2].Visible := false;
 | 
			
		||||
    tv1.Bands[3].Visible := false;
 | 
			
		||||
    tv1.Bands[4].Visible := false;
 | 
			
		||||
  end;
 | 
			
		||||
  if trim(canshu1) = '尚美特' then
 | 
			
		||||
  begin
 | 
			
		||||
    tv1.Bands[1].Visible := false;
 | 
			
		||||
    tv1.Bands[3].Visible := false;
 | 
			
		||||
    tv1.Bands[4].Visible := false;
 | 
			
		||||
  end;
 | 
			
		||||
  if trim(canshu1) = '金鼎丰门市部' then
 | 
			
		||||
  begin
 | 
			
		||||
    tv1.Bands[1].Visible := false;
 | 
			
		||||
    tv1.Bands[2].Visible := false;
 | 
			
		||||
    tv1.Bands[4].Visible := false;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.TBexcelClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if ADOQueryMain.IsEmpty then
 | 
			
		||||
    exit;
 | 
			
		||||
  TcxGridToExcel(self.Caption, cxGrid1);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
 | 
			
		||||
begin
 | 
			
		||||
  Initsub();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.YJPSKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
begin
 | 
			
		||||
  if Key = #13 then
 | 
			
		||||
  begin
 | 
			
		||||
    InitGrid();
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
 | 
			
		||||
begin
 | 
			
		||||
  if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('YJstatus').Index] = '1' then
 | 
			
		||||
    ACanvas.Brush.Color := clRed;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmCP_COL_XLYJ.Tv1Column1PropertiesEditValueChanged(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  with ADOQuery1 do
 | 
			
		||||
  begin
 | 
			
		||||
    Close;                                    
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    sql.Add('UPdate KH_Zdy_Attachment ');
 | 
			
		||||
    sql.Add(' Set ISYJ=''' + Trim(CDS_Main.fieldbyname('ISYJ').AsString) + '''  ');
 | 
			
		||||
    SQL.Add(' where ZDYName=''' + Trim(CDS_Main.fieldbyname('P_CodeName').AsString) + ''' ');
 | 
			
		||||
    SQL.Add(' and  DEFstr3=''' + Trim(CDS_Main.fieldbyname('P_color').AsString) + ''' ');
 | 
			
		||||
//    ShowMessage(sql.text);
 | 
			
		||||
    ExecSQL;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -165,7 +165,7 @@ begin
 | 
			
		|||
    with ADOQueryMain do                
 | 
			
		||||
    begin                                     
 | 
			
		||||
      Close;                                 
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Clear;                                      
 | 
			
		||||
      Filtered:=False;
 | 
			
		||||
      sql.Add('exec P_Get_FabricStockHz_PC_TZ');
 | 
			
		||||
      sql.Add('@begdate='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''' ');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,7 +33,7 @@ uses
 | 
			
		|||
  U_CP_COL_XL_ZD, U_CKPDlist, U_ClothContractList_HZ, U_ProductOrderNewList_ZD,
 | 
			
		||||
  U_ClothContractList_SJDCK, U_KH_XS_YP_list, U_ProductOrderNewList_BH,
 | 
			
		||||
  U_ClothContractList_HZ1, U_ClothContractList_CP, U_ClothContractList_SJD,
 | 
			
		||||
  U_ClothContractList_SJDMX, U_ClothContractList_PBKC;
 | 
			
		||||
  U_ClothContractList_SJDMX, U_ClothContractList_PBKC, U_CP_COL_XLYJ;
 | 
			
		||||
 | 
			
		||||
       /////////////////////////////////////////////////////////////////
 | 
			
		||||
      //         功能说明:取Dll中得窗体                              //
 | 
			
		||||
| 
						 | 
				
			
			@ -621,10 +621,10 @@ begin
 | 
			
		|||
            BorderStyle := mborderstyle;
 | 
			
		||||
           //show;
 | 
			
		||||
          end;
 | 
			
		||||
        end                                              
 | 
			
		||||
        end
 | 
			
		||||
        else
 | 
			
		||||
          frmCpRkSaoMNew.BringToFront;
 | 
			
		||||
       //¾ä±ú                                           
 | 
			
		||||
       //¾ä±ú
 | 
			
		||||
        mnewHandle := frmCpRkSaoMNew.Handle;
 | 
			
		||||
 | 
			
		||||
      end;
 | 
			
		||||
| 
						 | 
				
			
			@ -1382,6 +1382,27 @@ begin
 | 
			
		|||
       //句柄
 | 
			
		||||
        mnewHandle := frmCP_XL.Handle;
 | 
			
		||||
      end;
 | 
			
		||||
    440:  //²úÆ·Ô¤¾¯ÐÅÏ¢
 | 
			
		||||
      begin
 | 
			
		||||
        if frmCP_COL_XLYJ <> nil then
 | 
			
		||||
          frmCP_COL_XLYJ.Free;
 | 
			
		||||
        if frmCP_COL_XLYJ = nil then
 | 
			
		||||
        begin
 | 
			
		||||
          frmCP_COL_XLYJ := TfrmCP_COL_XLYJ.Create(application.MainForm);
 | 
			
		||||
          with frmCP_COL_XLYJ do
 | 
			
		||||
          begin
 | 
			
		||||
            caption := Trim(Title);
 | 
			
		||||
            FormStyle := mstyle;
 | 
			
		||||
            windowState := mstate;
 | 
			
		||||
            BorderStyle := mborderstyle;
 | 
			
		||||
           //show;
 | 
			
		||||
          end;
 | 
			
		||||
        end
 | 
			
		||||
        else
 | 
			
		||||
          frmCP_COL_XLYJ.BringToFront;
 | 
			
		||||
       //¾ä±ú
 | 
			
		||||
        mnewHandle := frmCP_COL_XLYJ.Handle;
 | 
			
		||||
      end;
 | 
			
		||||
    40:  //产品销量信息
 | 
			
		||||
      begin
 | 
			
		||||
        if frmCP_COL_XL <> nil then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,20 @@ uses
 | 
			
		|||
  cxGrid, StdCtrls, cxContainer, cxTextEdit, cxCurrencyEdit, BtnEdit, ExtCtrls,
 | 
			
		||||
  ComCtrls, ToolWin, DBClient, ADODB, MovePanel, RM_Dataset, RM_System,
 | 
			
		||||
  RM_Common, RM_Class, RM_GridReport, cxLookAndFeels, cxLookAndFeelPainters,
 | 
			
		||||
  cxNavigator;
 | 
			
		||||
  cxNavigator, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
 | 
			
		||||
  dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
 | 
			
		||||
  dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
 | 
			
		||||
  dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
 | 
			
		||||
  dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
 | 
			
		||||
  dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
 | 
			
		||||
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
 | 
			
		||||
  dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
 | 
			
		||||
  dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
 | 
			
		||||
  dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
 | 
			
		||||
  dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
 | 
			
		||||
  dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
 | 
			
		||||
  dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
 | 
			
		||||
  dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
 | 
			
		||||
 | 
			
		||||
function CommOpen(fhandle: hwnd; sCommName: PAnsiChar; IntTime: integer; IsMessage: integer): integer; stdcall; external 'JCYData.DLL';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,21 @@ uses
 | 
			
		|||
  ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
 | 
			
		||||
  cxDropDownEdit, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System,
 | 
			
		||||
  RM_GridReport, cxCheckBox, Menus, MovePanel, cxTextEdit, Buttons,
 | 
			
		||||
  cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
 | 
			
		||||
  cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
 | 
			
		||||
  dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
 | 
			
		||||
  dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
 | 
			
		||||
  dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
 | 
			
		||||
  dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
 | 
			
		||||
  dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
 | 
			
		||||
  dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
 | 
			
		||||
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
 | 
			
		||||
  dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
 | 
			
		||||
  dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
 | 
			
		||||
  dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
 | 
			
		||||
  dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
 | 
			
		||||
  dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
 | 
			
		||||
  dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
 | 
			
		||||
  dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
 | 
			
		||||
 | 
			
		||||
function CommOpen(fhandle: hwnd; sCommName: PAnsiChar; IntTime: integer; IsMessage: integer): integer; stdcall; external 'JCYData10.DLL';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -469,7 +483,7 @@ begin
 | 
			
		|||
    if CommOpen(frmMJManageNewFDNew.Handle, '', 500, 1) < 1 then
 | 
			
		||||
    begin                             
 | 
			
		||||
      showmessage('´ò¿ª´®¿Ú´íÎó');
 | 
			
		||||
    end;
 | 
			
		||||
    end;                                                         
 | 
			
		||||
  end;
 | 
			
		||||
  APID.SetFocus;
 | 
			
		||||
end;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										317
									
								
								桂华管理系统/桂华管理系统/AES.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										317
									
								
								桂华管理系统/桂华管理系统/AES.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,317 @@
 | 
			
		|||
(**************************************************)
 | 
			
		||||
 | 
			
		||||
unit AES;                  
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  SysUtils, Classes, Math, ElAES;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TKeyBit = (kb128, kb192, kb256);
 | 
			
		||||
 | 
			
		||||
function StrToHex(Value: string): string;
 | 
			
		||||
function HexToStr(Value: string): string;
 | 
			
		||||
function EncryptString(Value: string; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): string;
 | 
			
		||||
function DecryptString(Value: string; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): string;
 | 
			
		||||
function EncryptStream(Stream: TStream; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): TStream;
 | 
			
		||||
function DecryptStream(Stream: TStream; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): TStream;
 | 
			
		||||
procedure EncryptFile(SourceFile, DestFile: string;
 | 
			
		||||
  Key: string; KeyBit: TKeyBit = kb128);
 | 
			
		||||
procedure DecryptFile(SourceFile, DestFile: string;
 | 
			
		||||
  Key: string; KeyBit: TKeyBit = kb128);
 | 
			
		||||
  
 | 
			
		||||
implementation
 | 
			
		||||
 | 
			
		||||
function StrToHex(Value: string): string;
 | 
			
		||||
var
 | 
			
		||||
  I: Integer;
 | 
			
		||||
begin
 | 
			
		||||
  Result := '';
 | 
			
		||||
  for I := 1 to Length(Value) do
 | 
			
		||||
    Result := Result + IntToHex(Ord(Value[I]), 2);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
function HexToStr(Value: string): string;
 | 
			
		||||
var
 | 
			
		||||
  I: Integer;
 | 
			
		||||
begin
 | 
			
		||||
  Result := '';
 | 
			
		||||
  for I := 1 to Length(Value) do
 | 
			
		||||
  begin
 | 
			
		||||
    if ((I mod 2) = 1) then
 | 
			
		||||
      Result := Result + Chr(StrToInt('0x'+ Copy(Value, I, 2)));
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{  --  字符串加密函数 默认按照 128 位密匙加密 --  }
 | 
			
		||||
function EncryptString(Value: string; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): string;
 | 
			
		||||
var
 | 
			
		||||
  SS, DS: TStringStream;
 | 
			
		||||
  Size: Int64;
 | 
			
		||||
  AESKey128: TAESKey128;
 | 
			
		||||
  AESKey192: TAESKey192;
 | 
			
		||||
  AESKey256: TAESKey256;
 | 
			
		||||
begin
 | 
			
		||||
  Result := '';
 | 
			
		||||
  SS := TStringStream.Create(Value);
 | 
			
		||||
  DS := TStringStream.Create('');
 | 
			
		||||
  try
 | 
			
		||||
    Size := SS.Size;
 | 
			
		||||
    DS.WriteBuffer(Size, SizeOf(Size));
 | 
			
		||||
    {  --  128 位密匙最大长度为 16 个字符 --  }
 | 
			
		||||
    if KeyBit = kb128 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey128, SizeOf(AESKey128), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
 | 
			
		||||
      EncryptAESStreamECB(SS, 0, AESKey128, DS);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  192 位密匙最大长度为 24 个字符 --  }
 | 
			
		||||
    if KeyBit = kb192 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey192, SizeOf(AESKey192), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
 | 
			
		||||
      EncryptAESStreamECB(SS, 0, AESKey192, DS);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  256 位密匙最大长度为 32 个字符 --  }
 | 
			
		||||
    if KeyBit = kb256 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey256, SizeOf(AESKey256), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
 | 
			
		||||
      EncryptAESStreamECB(SS, 0, AESKey256, DS);
 | 
			
		||||
    end;
 | 
			
		||||
    Result := StrToHex(DS.DataString);
 | 
			
		||||
  finally
 | 
			
		||||
    SS.Free;
 | 
			
		||||
    DS.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{  --  字符串解密函数 默认按照 128 位密匙解密 --  }
 | 
			
		||||
function DecryptString(Value: string; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): string;
 | 
			
		||||
var
 | 
			
		||||
  SS, DS: TStringStream;
 | 
			
		||||
  Size: Int64;
 | 
			
		||||
  AESKey128: TAESKey128;
 | 
			
		||||
  AESKey192: TAESKey192;
 | 
			
		||||
  AESKey256: TAESKey256;
 | 
			
		||||
begin
 | 
			
		||||
  Result := '';
 | 
			
		||||
  SS := TStringStream.Create(HexToStr(Value));
 | 
			
		||||
  DS := TStringStream.Create('');
 | 
			
		||||
  try
 | 
			
		||||
    Size := SS.Size;
 | 
			
		||||
    SS.ReadBuffer(Size, SizeOf(Size));
 | 
			
		||||
    {  --  128 位密匙最大长度为 16 个字符 --  }
 | 
			
		||||
    if KeyBit = kb128 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey128, SizeOf(AESKey128), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
 | 
			
		||||
      DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey128, DS);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  192 位密匙最大长度为 24 个字符 --  }
 | 
			
		||||
    if KeyBit = kb192 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey192, SizeOf(AESKey192), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
 | 
			
		||||
      DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey192, DS);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  256 位密匙最大长度为 32 个字符 --  }
 | 
			
		||||
    if KeyBit = kb256 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey256, SizeOf(AESKey256), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
 | 
			
		||||
      DecryptAESStreamECB(SS, SS.Size - SS.Position, AESKey256, DS);
 | 
			
		||||
    end;
 | 
			
		||||
    Result := DS.DataString;
 | 
			
		||||
  finally
 | 
			
		||||
    SS.Free;
 | 
			
		||||
    DS.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{  --  流加密函数 默认按照 128 位密匙解密 --  }
 | 
			
		||||
function EncryptStream(Stream: TStream; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): TStream;
 | 
			
		||||
var
 | 
			
		||||
  Count: Int64;
 | 
			
		||||
  OutStrm: TStream;
 | 
			
		||||
  AESKey128: TAESKey128;
 | 
			
		||||
  AESKey192: TAESKey192;
 | 
			
		||||
  AESKey256: TAESKey256;
 | 
			
		||||
begin
 | 
			
		||||
  OutStrm := TStream.Create;
 | 
			
		||||
  Stream.Position := 0;
 | 
			
		||||
  Count := Stream.Size;
 | 
			
		||||
  OutStrm.Write(Count, SizeOf(Count));
 | 
			
		||||
  try
 | 
			
		||||
    {  --  128 位密匙最大长度为 16 个字符 --  }
 | 
			
		||||
    if KeyBit = kb128 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey128, SizeOf(AESKey128), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
 | 
			
		||||
      EncryptAESStreamECB(Stream, 0, AESKey128, OutStrm);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  192 位密匙最大长度为 24 个字符 --  }
 | 
			
		||||
    if KeyBit = kb192 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey192, SizeOf(AESKey192), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
 | 
			
		||||
      EncryptAESStreamECB(Stream, 0, AESKey192, OutStrm);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  256 位密匙最大长度为 32 个字符 --  }
 | 
			
		||||
    if KeyBit = kb256 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey256, SizeOf(AESKey256), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
 | 
			
		||||
      EncryptAESStreamECB(Stream, 0, AESKey256, OutStrm);
 | 
			
		||||
    end;
 | 
			
		||||
    Result := OutStrm;
 | 
			
		||||
  finally
 | 
			
		||||
    OutStrm.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{  --  流解密函数 默认按照 128 位密匙解密 --  }
 | 
			
		||||
function DecryptStream(Stream: TStream; Key: string;
 | 
			
		||||
  KeyBit: TKeyBit = kb128): TStream;
 | 
			
		||||
var
 | 
			
		||||
  Count, OutPos: Int64;
 | 
			
		||||
  OutStrm: TStream;
 | 
			
		||||
  AESKey128: TAESKey128;
 | 
			
		||||
  AESKey192: TAESKey192;
 | 
			
		||||
  AESKey256: TAESKey256;
 | 
			
		||||
begin
 | 
			
		||||
  OutStrm := TStream.Create;
 | 
			
		||||
  Stream.Position := 0;
 | 
			
		||||
  OutPos :=OutStrm.Position;
 | 
			
		||||
  Stream.ReadBuffer(Count, SizeOf(Count));
 | 
			
		||||
  try
 | 
			
		||||
    {  --  128 位密匙最大长度为 16 个字符 --  }
 | 
			
		||||
    if KeyBit = kb128 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey128, SizeOf(AESKey128), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
 | 
			
		||||
      DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
 | 
			
		||||
        AESKey128, OutStrm);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  192 位密匙最大长度为 24 个字符 --  }
 | 
			
		||||
    if KeyBit = kb192 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey192, SizeOf(AESKey192), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
 | 
			
		||||
      DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
 | 
			
		||||
        AESKey192, OutStrm);
 | 
			
		||||
    end;
 | 
			
		||||
    {  --  256 位密匙最大长度为 32 个字符 --  }
 | 
			
		||||
    if KeyBit = kb256 then
 | 
			
		||||
    begin
 | 
			
		||||
      FillChar(AESKey256, SizeOf(AESKey256), 0 );
 | 
			
		||||
      Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
 | 
			
		||||
      DecryptAESStreamECB(Stream, Stream.Size - Stream.Position,
 | 
			
		||||
        AESKey256, OutStrm);
 | 
			
		||||
    end;
 | 
			
		||||
    OutStrm.Size := OutPos + Count;
 | 
			
		||||
    OutStrm.Position := OutPos;
 | 
			
		||||
    Result := OutStrm;
 | 
			
		||||
  finally
 | 
			
		||||
    OutStrm.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{  --  文件加密函数 默认按照 128 位密匙解密 --  }
 | 
			
		||||
procedure EncryptFile(SourceFile, DestFile: string;
 | 
			
		||||
  Key: string; KeyBit: TKeyBit = kb128);
 | 
			
		||||
var
 | 
			
		||||
  SFS, DFS: TFileStream;
 | 
			
		||||
  Size: Int64;
 | 
			
		||||
  AESKey128: TAESKey128;
 | 
			
		||||
  AESKey192: TAESKey192;
 | 
			
		||||
  AESKey256: TAESKey256;
 | 
			
		||||
begin
 | 
			
		||||
  SFS := TFileStream.Create(SourceFile, fmOpenRead);
 | 
			
		||||
  try
 | 
			
		||||
    DFS := TFileStream.Create(DestFile, fmCreate);
 | 
			
		||||
    try
 | 
			
		||||
      Size := SFS.Size;
 | 
			
		||||
      DFS.WriteBuffer(Size, SizeOf(Size));
 | 
			
		||||
      {  --  128 位密匙最大长度为 16 个字符 --  }
 | 
			
		||||
      if KeyBit = kb128 then
 | 
			
		||||
      begin
 | 
			
		||||
        FillChar(AESKey128, SizeOf(AESKey128), 0 );
 | 
			
		||||
        Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
 | 
			
		||||
        EncryptAESStreamECB(SFS, 0, AESKey128, DFS);
 | 
			
		||||
      end;
 | 
			
		||||
      {  --  192 位密匙最大长度为 24 个字符 --  }
 | 
			
		||||
      if KeyBit = kb192 then
 | 
			
		||||
      begin
 | 
			
		||||
        FillChar(AESKey192, SizeOf(AESKey192), 0 );
 | 
			
		||||
        Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
 | 
			
		||||
        EncryptAESStreamECB(SFS, 0, AESKey192, DFS);
 | 
			
		||||
      end;
 | 
			
		||||
      {  --  256 位密匙最大长度为 32 个字符 --  }
 | 
			
		||||
      if KeyBit = kb256 then
 | 
			
		||||
      begin
 | 
			
		||||
        FillChar(AESKey256, SizeOf(AESKey256), 0 );
 | 
			
		||||
        Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
 | 
			
		||||
        EncryptAESStreamECB(SFS, 0, AESKey256, DFS);
 | 
			
		||||
      end;
 | 
			
		||||
    finally
 | 
			
		||||
      DFS.Free;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    SFS.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{  --  文件解密函数 默认按照 128 位密匙解密 --  }
 | 
			
		||||
procedure DecryptFile(SourceFile, DestFile: string;
 | 
			
		||||
  Key: string; KeyBit: TKeyBit = kb128);
 | 
			
		||||
var
 | 
			
		||||
  SFS, DFS: TFileStream;
 | 
			
		||||
  Size: Int64;
 | 
			
		||||
  AESKey128: TAESKey128;
 | 
			
		||||
  AESKey192: TAESKey192;
 | 
			
		||||
  AESKey256: TAESKey256;
 | 
			
		||||
begin
 | 
			
		||||
  SFS := TFileStream.Create(SourceFile, fmOpenRead);
 | 
			
		||||
  try
 | 
			
		||||
    SFS.ReadBuffer(Size, SizeOf(Size));
 | 
			
		||||
    DFS := TFileStream.Create(DestFile, fmCreate);
 | 
			
		||||
    try
 | 
			
		||||
      {  --  128 位密匙最大长度为 16 个字符 --  }
 | 
			
		||||
      if KeyBit = kb128 then
 | 
			
		||||
      begin
 | 
			
		||||
        FillChar(AESKey128, SizeOf(AESKey128), 0 );
 | 
			
		||||
        Move(PChar(Key)^, AESKey128, Min(SizeOf(AESKey128), Length(Key)));
 | 
			
		||||
        DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey128, DFS);
 | 
			
		||||
      end;
 | 
			
		||||
      {  --  192 位密匙最大长度为 24 个字符 --  }
 | 
			
		||||
      if KeyBit = kb192 then
 | 
			
		||||
      begin
 | 
			
		||||
        FillChar(AESKey192, SizeOf(AESKey192), 0 );
 | 
			
		||||
        Move(PChar(Key)^, AESKey192, Min(SizeOf(AESKey192), Length(Key)));
 | 
			
		||||
        DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey192, DFS);
 | 
			
		||||
      end;
 | 
			
		||||
      {  --  256 位密匙最大长度为 32 个字符 --  }
 | 
			
		||||
      if KeyBit = kb256 then
 | 
			
		||||
      begin
 | 
			
		||||
        FillChar(AESKey256, SizeOf(AESKey256), 0 );
 | 
			
		||||
        Move(PChar(Key)^, AESKey256, Min(SizeOf(AESKey256), Length(Key)));
 | 
			
		||||
        DecryptAESStreamECB(SFS, SFS.Size - SFS.Position, AESKey256, DFS);
 | 
			
		||||
      end;
 | 
			
		||||
      DFS.Size := Size;
 | 
			
		||||
    finally
 | 
			
		||||
      DFS.Free;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    SFS.Free;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										2488
									
								
								桂华管理系统/桂华管理系统/ElAES.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2488
									
								
								桂华管理系统/桂华管理系统/ElAES.pas
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										3
									
								
								桂华管理系统/桂华管理系统/File.INI
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								桂华管理系统/桂华管理系统/File.INI
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
[生产车间配置]
 | 
			
		||||
卷条码机台标志=X
 | 
			
		||||
机台个数=8
 | 
			
		||||
							
								
								
									
										7
									
								
								桂华管理系统/桂华管理系统/JCYData.INI
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								桂华管理系统/桂华管理系统/JCYData.INI
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
[系统配置]
 | 
			
		||||
串口号=com6
 | 
			
		||||
波特率=4800
 | 
			
		||||
校验位=0
 | 
			
		||||
数据位=8
 | 
			
		||||
停止位=0
 | 
			
		||||
频率=100
 | 
			
		||||
							
								
								
									
										7
									
								
								桂华管理系统/桂华管理系统/JCYData10.INI
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								桂华管理系统/桂华管理系统/JCYData10.INI
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
[系统配置]
 | 
			
		||||
串口号=com1
 | 
			
		||||
波特率=19200
 | 
			
		||||
校验位=0
 | 
			
		||||
数据位=8
 | 
			
		||||
停止位=0
 | 
			
		||||
频率=100
 | 
			
		||||
							
								
								
									
										138
									
								
								桂华管理系统/桂华管理系统/OrderManage.dof
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										138
									
								
								桂华管理系统/桂华管理系统/OrderManage.dof
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,138 @@
 | 
			
		|||
[FileVersion]
 | 
			
		||||
Version=7.0
 | 
			
		||||
[Compiler]
 | 
			
		||||
A=8
 | 
			
		||||
B=0
 | 
			
		||||
C=1
 | 
			
		||||
D=1
 | 
			
		||||
E=0
 | 
			
		||||
F=0
 | 
			
		||||
G=1
 | 
			
		||||
H=1
 | 
			
		||||
I=1
 | 
			
		||||
J=0
 | 
			
		||||
K=0
 | 
			
		||||
L=1
 | 
			
		||||
M=0
 | 
			
		||||
N=1
 | 
			
		||||
O=1
 | 
			
		||||
P=1
 | 
			
		||||
Q=0
 | 
			
		||||
R=0
 | 
			
		||||
S=0
 | 
			
		||||
T=0
 | 
			
		||||
U=0
 | 
			
		||||
V=1
 | 
			
		||||
W=0
 | 
			
		||||
X=1
 | 
			
		||||
Y=1
 | 
			
		||||
Z=1
 | 
			
		||||
ShowHints=1
 | 
			
		||||
ShowWarnings=1
 | 
			
		||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 | 
			
		||||
NamespacePrefix=
 | 
			
		||||
SymbolDeprecated=1
 | 
			
		||||
SymbolLibrary=1
 | 
			
		||||
SymbolPlatform=1
 | 
			
		||||
UnitLibrary=1
 | 
			
		||||
UnitPlatform=1
 | 
			
		||||
UnitDeprecated=1
 | 
			
		||||
HResultCompat=1
 | 
			
		||||
HidingMember=1
 | 
			
		||||
HiddenVirtual=1
 | 
			
		||||
Garbage=1
 | 
			
		||||
BoundsError=1
 | 
			
		||||
ZeroNilCompat=1
 | 
			
		||||
StringConstTruncated=1
 | 
			
		||||
ForLoopVarVarPar=1
 | 
			
		||||
TypedConstVarPar=1
 | 
			
		||||
AsgToTypedConst=1
 | 
			
		||||
CaseLabelRange=1
 | 
			
		||||
ForVariable=1
 | 
			
		||||
ConstructingAbstract=1
 | 
			
		||||
ComparisonFalse=1
 | 
			
		||||
ComparisonTrue=1
 | 
			
		||||
ComparingSignedUnsigned=1
 | 
			
		||||
CombiningSignedUnsigned=1
 | 
			
		||||
UnsupportedConstruct=1
 | 
			
		||||
FileOpen=1
 | 
			
		||||
FileOpenUnitSrc=1
 | 
			
		||||
BadGlobalSymbol=1
 | 
			
		||||
DuplicateConstructorDestructor=1
 | 
			
		||||
InvalidDirective=1
 | 
			
		||||
PackageNoLink=1
 | 
			
		||||
PackageThreadVar=1
 | 
			
		||||
ImplicitImport=1
 | 
			
		||||
HPPEMITIgnored=1
 | 
			
		||||
NoRetVal=1
 | 
			
		||||
UseBeforeDef=1
 | 
			
		||||
ForLoopVarUndef=1
 | 
			
		||||
UnitNameMismatch=1
 | 
			
		||||
NoCFGFileFound=1
 | 
			
		||||
MessageDirective=1
 | 
			
		||||
ImplicitVariants=1
 | 
			
		||||
UnicodeToLocale=1
 | 
			
		||||
LocaleToUnicode=1
 | 
			
		||||
ImagebaseMultiple=1
 | 
			
		||||
SuspiciousTypecast=1
 | 
			
		||||
PrivatePropAccessor=1
 | 
			
		||||
UnsafeType=0
 | 
			
		||||
UnsafeCode=0
 | 
			
		||||
UnsafeCast=0
 | 
			
		||||
[Linker]
 | 
			
		||||
MapFile=0
 | 
			
		||||
OutputObjs=0
 | 
			
		||||
ConsoleApp=1
 | 
			
		||||
DebugInfo=0
 | 
			
		||||
RemoteSymbols=0
 | 
			
		||||
MinStackSize=16384
 | 
			
		||||
MaxStackSize=1048576
 | 
			
		||||
ImageBase=4194304
 | 
			
		||||
ExeDescription=
 | 
			
		||||
[Directories]
 | 
			
		||||
OutputDir=
 | 
			
		||||
UnitOutputDir=
 | 
			
		||||
PackageDLLOutputDir=
 | 
			
		||||
PackageDCPOutputDir=
 | 
			
		||||
SearchPath=D:\富通ERP
 | 
			
		||||
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
 | 
			
		||||
Conditionals=
 | 
			
		||||
DebugSourceDirs=
 | 
			
		||||
UsePackages=0
 | 
			
		||||
[Parameters]
 | 
			
		||||
RunParams=
 | 
			
		||||
HostApplication=F:\selfware_83398\selfware\马国钢开发代码\项目代码\self\订单\testDll.exe
 | 
			
		||||
Launcher=
 | 
			
		||||
UseLauncher=0
 | 
			
		||||
DebugCWD=
 | 
			
		||||
[Language]
 | 
			
		||||
ActiveLang=
 | 
			
		||||
ProjectLang=
 | 
			
		||||
RootDir=
 | 
			
		||||
[Version Info]
 | 
			
		||||
IncludeVerInfo=0
 | 
			
		||||
AutoIncBuild=0
 | 
			
		||||
MajorVer=1
 | 
			
		||||
MinorVer=0
 | 
			
		||||
Release=0
 | 
			
		||||
Build=0
 | 
			
		||||
Debug=0
 | 
			
		||||
PreRelease=0
 | 
			
		||||
Special=0
 | 
			
		||||
Private=0
 | 
			
		||||
DLL=0
 | 
			
		||||
Locale=2052
 | 
			
		||||
CodePage=936
 | 
			
		||||
[Version Info Keys]
 | 
			
		||||
CompanyName=
 | 
			
		||||
FileDescription=
 | 
			
		||||
FileVersion=1.0.0.0
 | 
			
		||||
InternalName=
 | 
			
		||||
LegalCopyright=
 | 
			
		||||
LegalTrademarks=
 | 
			
		||||
OriginalFilename=
 | 
			
		||||
ProductName=
 | 
			
		||||
ProductVersion=1.0.0.0
 | 
			
		||||
Comments=
 | 
			
		||||
[Excluded Packages]
 | 
			
		||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
 | 
			
		||||
							
								
								
									
										20
									
								
								桂华管理系统/桂华管理系统/ProjectGroup1.bpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								桂华管理系统/桂华管理系统/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
									
								
								桂华管理系统/桂华管理系统/ProjectGroup1.~bpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								桂华管理系统/桂华管理系统/ProjectGroup1.~bpg
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
#------------------------------------------------------------------------------
 | 
			
		||||
VERSION = BWS.01
 | 
			
		||||
#------------------------------------------------------------------------------
 | 
			
		||||
!ifndef ROOT
 | 
			
		||||
ROOT = $(MAKEDIR)\..
 | 
			
		||||
!endif
 | 
			
		||||
#------------------------------------------------------------------------------
 | 
			
		||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
 | 
			
		||||
DCC = $(ROOT)\bin\dcc32.exe $**
 | 
			
		||||
BRCC = $(ROOT)\bin\brcc32.exe $**
 | 
			
		||||
#------------------------------------------------------------------------------
 | 
			
		||||
PROJECTS = testDll.exe ProductPrice.dll
 | 
			
		||||
#------------------------------------------------------------------------------
 | 
			
		||||
default: $(PROJECTS)
 | 
			
		||||
#------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
testDll.exe: testDll.dpr
 | 
			
		||||
  $(DCC)
 | 
			
		||||
 | 
			
		||||
ProductPrice.dll: ProductPrice.dpr
 | 
			
		||||
  $(DCC)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										38
									
								
								桂华管理系统/桂华管理系统/RCInspection.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								桂华管理系统/桂华管理系统/RCInspection.cfg
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,38 @@
 | 
			
		|||
-$A8
 | 
			
		||||
-$B-
 | 
			
		||||
-$C+
 | 
			
		||||
-$D+
 | 
			
		||||
-$E-
 | 
			
		||||
-$F-
 | 
			
		||||
-$G+
 | 
			
		||||
-$H+
 | 
			
		||||
-$I+
 | 
			
		||||
-$J-
 | 
			
		||||
-$K-
 | 
			
		||||
-$L+
 | 
			
		||||
-$M-
 | 
			
		||||
-$N+
 | 
			
		||||
-$O+
 | 
			
		||||
-$P+
 | 
			
		||||
-$Q-
 | 
			
		||||
-$R-
 | 
			
		||||
-$S-
 | 
			
		||||
-$T-
 | 
			
		||||
-$U-
 | 
			
		||||
-$V+
 | 
			
		||||
-$W-
 | 
			
		||||
-$X+
 | 
			
		||||
-$YD
 | 
			
		||||
-$Z1
 | 
			
		||||
-cg
 | 
			
		||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 | 
			
		||||
-H+
 | 
			
		||||
-W+
 | 
			
		||||
-M
 | 
			
		||||
-$M16384,1048576
 | 
			
		||||
-K$00400000
 | 
			
		||||
-LE"c:\program files\borland\delphi7\Projects\Bpl"
 | 
			
		||||
-LN"c:\program files\borland\delphi7\Projects\Bpl"
 | 
			
		||||
-w-UNSAFE_TYPE
 | 
			
		||||
-w-UNSAFE_CODE
 | 
			
		||||
-w-UNSAFE_CAST
 | 
			
		||||
							
								
								
									
										141
									
								
								桂华管理系统/桂华管理系统/RCInspection.dof
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								桂华管理系统/桂华管理系统/RCInspection.dof
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,141 @@
 | 
			
		|||
[FileVersion]
 | 
			
		||||
Version=7.0
 | 
			
		||||
[Compiler]
 | 
			
		||||
A=8
 | 
			
		||||
B=0
 | 
			
		||||
C=1
 | 
			
		||||
D=1
 | 
			
		||||
E=0
 | 
			
		||||
F=0
 | 
			
		||||
G=1
 | 
			
		||||
H=1
 | 
			
		||||
I=1
 | 
			
		||||
J=0
 | 
			
		||||
K=0
 | 
			
		||||
L=1
 | 
			
		||||
M=0
 | 
			
		||||
N=1
 | 
			
		||||
O=1
 | 
			
		||||
P=1
 | 
			
		||||
Q=0
 | 
			
		||||
R=0
 | 
			
		||||
S=0
 | 
			
		||||
T=0
 | 
			
		||||
U=0
 | 
			
		||||
V=1
 | 
			
		||||
W=0
 | 
			
		||||
X=1
 | 
			
		||||
Y=1
 | 
			
		||||
Z=1
 | 
			
		||||
ShowHints=1
 | 
			
		||||
ShowWarnings=1
 | 
			
		||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 | 
			
		||||
NamespacePrefix=
 | 
			
		||||
SymbolDeprecated=1
 | 
			
		||||
SymbolLibrary=1
 | 
			
		||||
SymbolPlatform=1
 | 
			
		||||
UnitLibrary=1
 | 
			
		||||
UnitPlatform=1
 | 
			
		||||
UnitDeprecated=1
 | 
			
		||||
HResultCompat=1
 | 
			
		||||
HidingMember=1
 | 
			
		||||
HiddenVirtual=1
 | 
			
		||||
Garbage=1
 | 
			
		||||
BoundsError=1
 | 
			
		||||
ZeroNilCompat=1
 | 
			
		||||
StringConstTruncated=1
 | 
			
		||||
ForLoopVarVarPar=1
 | 
			
		||||
TypedConstVarPar=1
 | 
			
		||||
AsgToTypedConst=1
 | 
			
		||||
CaseLabelRange=1
 | 
			
		||||
ForVariable=1
 | 
			
		||||
ConstructingAbstract=1
 | 
			
		||||
ComparisonFalse=1
 | 
			
		||||
ComparisonTrue=1
 | 
			
		||||
ComparingSignedUnsigned=1
 | 
			
		||||
CombiningSignedUnsigned=1
 | 
			
		||||
UnsupportedConstruct=1
 | 
			
		||||
FileOpen=1
 | 
			
		||||
FileOpenUnitSrc=1
 | 
			
		||||
BadGlobalSymbol=1
 | 
			
		||||
DuplicateConstructorDestructor=1
 | 
			
		||||
InvalidDirective=1
 | 
			
		||||
PackageNoLink=1
 | 
			
		||||
PackageThreadVar=1
 | 
			
		||||
ImplicitImport=1
 | 
			
		||||
HPPEMITIgnored=1
 | 
			
		||||
NoRetVal=1
 | 
			
		||||
UseBeforeDef=1
 | 
			
		||||
ForLoopVarUndef=1
 | 
			
		||||
UnitNameMismatch=1
 | 
			
		||||
NoCFGFileFound=1
 | 
			
		||||
MessageDirective=1
 | 
			
		||||
ImplicitVariants=1
 | 
			
		||||
UnicodeToLocale=1
 | 
			
		||||
LocaleToUnicode=1
 | 
			
		||||
ImagebaseMultiple=1
 | 
			
		||||
SuspiciousTypecast=1
 | 
			
		||||
PrivatePropAccessor=1
 | 
			
		||||
UnsafeType=0
 | 
			
		||||
UnsafeCode=0
 | 
			
		||||
UnsafeCast=0
 | 
			
		||||
[Linker]
 | 
			
		||||
MapFile=0
 | 
			
		||||
OutputObjs=0
 | 
			
		||||
ConsoleApp=1
 | 
			
		||||
DebugInfo=0
 | 
			
		||||
RemoteSymbols=0
 | 
			
		||||
MinStackSize=16384
 | 
			
		||||
MaxStackSize=1048576
 | 
			
		||||
ImageBase=4194304
 | 
			
		||||
ExeDescription=
 | 
			
		||||
[Directories]
 | 
			
		||||
OutputDir=
 | 
			
		||||
UnitOutputDir=
 | 
			
		||||
PackageDLLOutputDir=
 | 
			
		||||
PackageDCPOutputDir=
 | 
			
		||||
SearchPath=
 | 
			
		||||
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
 | 
			
		||||
Conditionals=
 | 
			
		||||
DebugSourceDirs=
 | 
			
		||||
UsePackages=0
 | 
			
		||||
[Parameters]
 | 
			
		||||
RunParams=
 | 
			
		||||
HostApplication=D:\selfware_83398\selfware\马国钢开发代码\项目代码\self\染厂检验管理\testDll.exe
 | 
			
		||||
Launcher=
 | 
			
		||||
UseLauncher=0
 | 
			
		||||
DebugCWD=
 | 
			
		||||
[Language]
 | 
			
		||||
ActiveLang=
 | 
			
		||||
ProjectLang=
 | 
			
		||||
RootDir=
 | 
			
		||||
[Version Info]
 | 
			
		||||
IncludeVerInfo=0
 | 
			
		||||
AutoIncBuild=0
 | 
			
		||||
MajorVer=1
 | 
			
		||||
MinorVer=0
 | 
			
		||||
Release=0
 | 
			
		||||
Build=0
 | 
			
		||||
Debug=0
 | 
			
		||||
PreRelease=0
 | 
			
		||||
Special=0
 | 
			
		||||
Private=0
 | 
			
		||||
DLL=0
 | 
			
		||||
Locale=2052
 | 
			
		||||
CodePage=936
 | 
			
		||||
[Version Info Keys]
 | 
			
		||||
CompanyName=
 | 
			
		||||
FileDescription=
 | 
			
		||||
FileVersion=1.0.0.0
 | 
			
		||||
InternalName=
 | 
			
		||||
LegalCopyright=
 | 
			
		||||
LegalTrademarks=
 | 
			
		||||
OriginalFilename=
 | 
			
		||||
ProductName=
 | 
			
		||||
ProductVersion=1.0.0.0
 | 
			
		||||
Comments=
 | 
			
		||||
[Excluded Packages]
 | 
			
		||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
 | 
			
		||||
[HistoryLists\hlUnitAliases]
 | 
			
		||||
Count=1
 | 
			
		||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								桂华管理系统/桂华管理系统/RCInspection.res
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								桂华管理系统/桂华管理系统/RCInspection.res
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										3
									
								
								桂华管理系统/桂华管理系统/SYSTEMSET.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								桂华管理系统/桂华管理系统/SYSTEMSET.ini
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
[SERVER]
 | 
			
		||||
服务器地址=192.168.1.246
 | 
			
		||||
软件名称=XXXXXXX1
 | 
			
		||||
							
								
								
									
										38
									
								
								桂华管理系统/桂华管理系统/TradeManage.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								桂华管理系统/桂华管理系统/TradeManage.cfg
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,38 @@
 | 
			
		|||
-$A8
 | 
			
		||||
-$B-
 | 
			
		||||
-$C+
 | 
			
		||||
-$D+
 | 
			
		||||
-$E-
 | 
			
		||||
-$F-
 | 
			
		||||
-$G+
 | 
			
		||||
-$H+
 | 
			
		||||
-$I+
 | 
			
		||||
-$J-
 | 
			
		||||
-$K-
 | 
			
		||||
-$L+
 | 
			
		||||
-$M-
 | 
			
		||||
-$N+
 | 
			
		||||
-$O+
 | 
			
		||||
-$P+
 | 
			
		||||
-$Q-
 | 
			
		||||
-$R-
 | 
			
		||||
-$S-
 | 
			
		||||
-$T-
 | 
			
		||||
-$U-
 | 
			
		||||
-$V+
 | 
			
		||||
-$W-
 | 
			
		||||
-$X+
 | 
			
		||||
-$YD
 | 
			
		||||
-$Z1
 | 
			
		||||
-cg
 | 
			
		||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 | 
			
		||||
-H+
 | 
			
		||||
-W+
 | 
			
		||||
-M
 | 
			
		||||
-$M16384,1048576
 | 
			
		||||
-K$00400000
 | 
			
		||||
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
 | 
			
		||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
 | 
			
		||||
-w-UNSAFE_TYPE
 | 
			
		||||
-w-UNSAFE_CODE
 | 
			
		||||
-w-UNSAFE_CAST
 | 
			
		||||
							
								
								
									
										138
									
								
								桂华管理系统/桂华管理系统/TradeManage.dof
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										138
									
								
								桂华管理系统/桂华管理系统/TradeManage.dof
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,138 @@
 | 
			
		|||
[FileVersion]
 | 
			
		||||
Version=7.0
 | 
			
		||||
[Compiler]
 | 
			
		||||
A=8
 | 
			
		||||
B=0
 | 
			
		||||
C=1
 | 
			
		||||
D=1
 | 
			
		||||
E=0
 | 
			
		||||
F=0
 | 
			
		||||
G=1
 | 
			
		||||
H=1
 | 
			
		||||
I=1
 | 
			
		||||
J=0
 | 
			
		||||
K=0
 | 
			
		||||
L=1
 | 
			
		||||
M=0
 | 
			
		||||
N=1
 | 
			
		||||
O=1
 | 
			
		||||
P=1
 | 
			
		||||
Q=0
 | 
			
		||||
R=0
 | 
			
		||||
S=0
 | 
			
		||||
T=0
 | 
			
		||||
U=0
 | 
			
		||||
V=1
 | 
			
		||||
W=0
 | 
			
		||||
X=1
 | 
			
		||||
Y=1
 | 
			
		||||
Z=1
 | 
			
		||||
ShowHints=1
 | 
			
		||||
ShowWarnings=1
 | 
			
		||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 | 
			
		||||
NamespacePrefix=
 | 
			
		||||
SymbolDeprecated=1
 | 
			
		||||
SymbolLibrary=1
 | 
			
		||||
SymbolPlatform=1
 | 
			
		||||
UnitLibrary=1
 | 
			
		||||
UnitPlatform=1
 | 
			
		||||
UnitDeprecated=1
 | 
			
		||||
HResultCompat=1
 | 
			
		||||
HidingMember=1
 | 
			
		||||
HiddenVirtual=1
 | 
			
		||||
Garbage=1
 | 
			
		||||
BoundsError=1
 | 
			
		||||
ZeroNilCompat=1
 | 
			
		||||
StringConstTruncated=1
 | 
			
		||||
ForLoopVarVarPar=1
 | 
			
		||||
TypedConstVarPar=1
 | 
			
		||||
AsgToTypedConst=1
 | 
			
		||||
CaseLabelRange=1
 | 
			
		||||
ForVariable=1
 | 
			
		||||
ConstructingAbstract=1
 | 
			
		||||
ComparisonFalse=1
 | 
			
		||||
ComparisonTrue=1
 | 
			
		||||
ComparingSignedUnsigned=1
 | 
			
		||||
CombiningSignedUnsigned=1
 | 
			
		||||
UnsupportedConstruct=1
 | 
			
		||||
FileOpen=1
 | 
			
		||||
FileOpenUnitSrc=1
 | 
			
		||||
BadGlobalSymbol=1
 | 
			
		||||
DuplicateConstructorDestructor=1
 | 
			
		||||
InvalidDirective=1
 | 
			
		||||
PackageNoLink=1
 | 
			
		||||
PackageThreadVar=1
 | 
			
		||||
ImplicitImport=1
 | 
			
		||||
HPPEMITIgnored=1
 | 
			
		||||
NoRetVal=1
 | 
			
		||||
UseBeforeDef=1
 | 
			
		||||
ForLoopVarUndef=1
 | 
			
		||||
UnitNameMismatch=1
 | 
			
		||||
NoCFGFileFound=1
 | 
			
		||||
MessageDirective=1
 | 
			
		||||
ImplicitVariants=1
 | 
			
		||||
UnicodeToLocale=1
 | 
			
		||||
LocaleToUnicode=1
 | 
			
		||||
ImagebaseMultiple=1
 | 
			
		||||
SuspiciousTypecast=1
 | 
			
		||||
PrivatePropAccessor=1
 | 
			
		||||
UnsafeType=0
 | 
			
		||||
UnsafeCode=0
 | 
			
		||||
UnsafeCast=0
 | 
			
		||||
[Linker]
 | 
			
		||||
MapFile=0
 | 
			
		||||
OutputObjs=0
 | 
			
		||||
ConsoleApp=1
 | 
			
		||||
DebugInfo=0
 | 
			
		||||
RemoteSymbols=0
 | 
			
		||||
MinStackSize=16384
 | 
			
		||||
MaxStackSize=1048576
 | 
			
		||||
ImageBase=4194304
 | 
			
		||||
ExeDescription=
 | 
			
		||||
[Directories]
 | 
			
		||||
OutputDir=
 | 
			
		||||
UnitOutputDir=
 | 
			
		||||
PackageDLLOutputDir=
 | 
			
		||||
PackageDCPOutputDir=
 | 
			
		||||
SearchPath=
 | 
			
		||||
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL
 | 
			
		||||
Conditionals=
 | 
			
		||||
DebugSourceDirs=
 | 
			
		||||
UsePackages=0
 | 
			
		||||
[Parameters]
 | 
			
		||||
RunParams=
 | 
			
		||||
HostApplication=D:\徐加艳项目代码\项目代码\桂华\桂华管理系统\testDll.exe
 | 
			
		||||
Launcher=
 | 
			
		||||
UseLauncher=0
 | 
			
		||||
DebugCWD=
 | 
			
		||||
[Language]
 | 
			
		||||
ActiveLang=
 | 
			
		||||
ProjectLang=
 | 
			
		||||
RootDir=
 | 
			
		||||
[Version Info]
 | 
			
		||||
IncludeVerInfo=0
 | 
			
		||||
AutoIncBuild=0
 | 
			
		||||
MajorVer=1
 | 
			
		||||
MinorVer=0
 | 
			
		||||
Release=0
 | 
			
		||||
Build=0
 | 
			
		||||
Debug=0
 | 
			
		||||
PreRelease=0
 | 
			
		||||
Special=0
 | 
			
		||||
Private=0
 | 
			
		||||
DLL=0
 | 
			
		||||
Locale=2052
 | 
			
		||||
CodePage=936
 | 
			
		||||
[Version Info Keys]
 | 
			
		||||
CompanyName=
 | 
			
		||||
FileDescription=
 | 
			
		||||
FileVersion=1.0.0.0
 | 
			
		||||
InternalName=
 | 
			
		||||
LegalCopyright=
 | 
			
		||||
LegalTrademarks=
 | 
			
		||||
OriginalFilename=
 | 
			
		||||
ProductName=
 | 
			
		||||
ProductVersion=1.0.0.0
 | 
			
		||||
Comments=
 | 
			
		||||
[Excluded Packages]
 | 
			
		||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
 | 
			
		||||
							
								
								
									
										92
									
								
								桂华管理系统/桂华管理系统/TradeManage.dpr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								桂华管理系统/桂华管理系统/TradeManage.dpr
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,92 @@
 | 
			
		|||
library TradeManage;
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  SysUtils,                    
 | 
			
		||||
  classes,                             
 | 
			
		||||
  forms,                                                  
 | 
			
		||||
  WinTypes,                                       
 | 
			
		||||
  WinProcs,
 | 
			
		||||
  U_DataLink in 'U_DataLink.pas' {DataLink_TradeManage: TDataModule},
 | 
			
		||||
  U_GetDllForm in 'U_GetDllForm.pas',
 | 
			
		||||
  U_Fun in '..\..\..\ThreeFun\Fun\U_Fun.pas',
 | 
			
		||||
  U_SelExportField in '..\..\..\ThreeFun\Fun\U_SelExportField.pas' {frmSelExportField},
 | 
			
		||||
  U_ColumnSet in '..\..\..\ThreeFun\Form\U_ColumnSet.pas' {frmColumnSet},
 | 
			
		||||
  U_GetAddRess in '..\..\..\ThreeFun\Form\U_GetAddRess.pas',
 | 
			
		||||
  U_iniParam in 'U_iniParam.pas',
 | 
			
		||||
  AES in 'AES.pas',
 | 
			
		||||
  ElAES in 'ElAES.pas',
 | 
			
		||||
  U_ColumnBandSet in '..\..\..\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
 | 
			
		||||
  U_SelPrintFieldNew in '..\..\..\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
 | 
			
		||||
  U_LabelPrint in 'U_LabelPrint.pas' {frmLabelPrint},
 | 
			
		||||
  U_ConInPut in 'U_ConInPut.pas' {frmConInPut},
 | 
			
		||||
  U_MJManageNewFDNew_other in 'U_MJManageNewFDNew_other.pas' {frmMJManageNewFDNew_other},
 | 
			
		||||
  U_MJEdit_other in 'U_MJEdit_other.pas' {frmMJEdit_other},
 | 
			
		||||
  U_BanCpCkSaoM in 'U_BanCpCkSaoM.pas' {frmBanCpCkSaoM},
 | 
			
		||||
  U_CpRkSaoMNew in 'U_CpRkSaoMNew.pas' {frmCpRkSaoMNew},
 | 
			
		||||
  U_PbSelCK in 'U_PbSelCK.pas' {frmPbSelCK},
 | 
			
		||||
  U_CrkAccount in 'U_CrkAccount.pas' {frmCrkAccount},
 | 
			
		||||
  U_BanCpHCSaoM in 'U_BanCpHCSaoM.pas' {frmBanCpHCSaoM},
 | 
			
		||||
  U_ClothHCList in 'U_ClothHCList.pas' {frmClothHCList},
 | 
			
		||||
  U_ClothContractInPut_CG in 'U_ClothContractInPut_CG.pas' {frmClothContractInPut_CG},
 | 
			
		||||
  U_ContractList in 'U_ContractList.pas' {frmContractList},
 | 
			
		||||
  U_ClothContractListDH in 'U_ClothContractListDH.pas' {frmClothContractListDH},
 | 
			
		||||
  U_OrderJDList in 'U_OrderJDList.pas' {frmOrderJDList},
 | 
			
		||||
  U_ClothContractListWJG in 'U_ClothContractListWJG.pas' {frmClothContractListWJG},
 | 
			
		||||
  U_OrderInPutXH in 'U_OrderInPutXH.pas' {frmOrderInPutXH},
 | 
			
		||||
  U_ProductOrderListSel in 'U_ProductOrderListSel.pas' {frmProductOrderListSel},
 | 
			
		||||
  U_BefChkHX in 'U_BefChkHX.pas' {frmBefChkHX},
 | 
			
		||||
  U_Printckmd in 'U_Printckmd.pas' {frmPrintckmd},
 | 
			
		||||
  U_ProductOrderListNew in 'U_ProductOrderListNew.pas' {frmProductOrderListNew},
 | 
			
		||||
  U_ProductOrder_Ph10 in 'U_ProductOrder_Ph10.pas' {frmProductOrder_Ph10},
 | 
			
		||||
  U_CpCkSaoMNewSel in 'U_CpCkSaoMNewSel.pas' {frmCpCkSaoMNewSel},
 | 
			
		||||
  U_CPRK in 'U_CPRK.pas' {frmCPRK},
 | 
			
		||||
  U_kcchEdit in 'U_kcchEdit.pas' {frmkcchEdit},
 | 
			
		||||
  U_CKProductCK_Other in 'U_CKProductCK_Other.pas' {frmCKProductCK_Other},
 | 
			
		||||
  U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
 | 
			
		||||
  U_YGList in 'U_YGList.pas' {frmYGlist},
 | 
			
		||||
  U_ZDYHelp in '..\..\..\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
 | 
			
		||||
  U_ZDYHelpSel in '..\..\..\ThreeFun\Form\U_ZDYHelpSel.pas' {frmZDYHelpSel},
 | 
			
		||||
  U_ZdyAttachment in 'U_ZdyAttachment.pas' {frmZdyAttachment},
 | 
			
		||||
  U_ZdyAttachCP in 'U_ZdyAttachCP.pas' {frmZdyAttachCP},
 | 
			
		||||
  U_ZdyAttachGYS in 'U_ZdyAttachGYS.pas' {frmZdyAttachGYS},
 | 
			
		||||
  U_CP_CRC in 'U_CP_CRC.pas' {frmCP_CRC},
 | 
			
		||||
  U_UserHelp in '..\..\..\ThreeFun\Form\U_UserHelp.pas' {frmUserHelp},
 | 
			
		||||
  U_ProductOrderNewListXH in 'U_ProductOrderNewListXH.pas' {frmProductOrderNewListXH},
 | 
			
		||||
  U_ProductOrderNewListSEl in 'U_ProductOrderNewListSEl.pas' {frmProductOrderNewListSEl},
 | 
			
		||||
  U_ProductOrderNewList_JD in 'U_ProductOrderNewList_JD.pas' {frmProductOrderNewList_JD},
 | 
			
		||||
  U_RKSMEdit_Other in 'U_RKSMEdit_Other.pas' {frmRKSMEdit_other},
 | 
			
		||||
  U_KCEdit in 'U_KCEdit.pas' {frmKCEdit},
 | 
			
		||||
  U_CKProductBCPKCList_other in 'U_CKProductBCPKCList_other.pas' {frmCKProductBCPKCList_other},
 | 
			
		||||
  U_CKProductBCPOutList_other in 'U_CKProductBCPOutList_other.pas' {frmCKProductBCPOutList_other},
 | 
			
		||||
  U_YHList_other in 'U_YHList_other.pas' {frmYHList_other},
 | 
			
		||||
  U_CKProductBCPKCListSel_Other in 'U_CKProductBCPKCListSel_Other.pas' {frmCKProductBCPKCListSel_Other},
 | 
			
		||||
  U_KCRLLTZ_other in 'U_KCRLLTZ_other.pas' {frmKCRLLTZ_other},
 | 
			
		||||
  U_KCRLLTZ in 'U_KCRLLTZ.pas' {frmKCRLLTZ},
 | 
			
		||||
  U_ModulePromptList in 'U_ModulePromptList.pas' {frmModulePromptList},
 | 
			
		||||
  U_SysLogHelp in '..\..\..\ThreeFun\Form\U_SysLogHelp.pas' {frmSysLogHelp},
 | 
			
		||||
  U_ProductOrderNewList_ZD in 'U_ProductOrderNewList_ZD.pas' {frmProductOrderNewList_ZD};
 | 
			
		||||
 | 
			
		||||
{$R *.res}
 | 
			
		||||
 | 
			
		||||
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;
 | 
			
		||||
begin
 | 
			
		||||
  DLLProc := @DLLEnterPoint;
 | 
			
		||||
  DllEnterPoint(DLL_PROCESS_ATTACH);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure DLLUnloadProc(Reason: Integer); register;
 | 
			
		||||
begin
 | 
			
		||||
 { if (Reason = DLL_PROCESS_DETACH) or (Reason=DLL_THREAD_DETACH) then
 | 
			
		||||
     Application:=NewDllApp;    }
 | 
			
		||||
end;
 | 
			
		||||
exports
 | 
			
		||||
   GetDllForm;
 | 
			
		||||
begin
 | 
			
		||||
   try
 | 
			
		||||
     NewDllApp:=Application;
 | 
			
		||||
     DLLProc := @DLLUnloadProc;
 | 
			
		||||
   except
 | 
			
		||||
 | 
			
		||||
   end;
 | 
			
		||||
end.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								桂华管理系统/桂华管理系统/TradeManage.res
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								桂华管理系统/桂华管理系统/TradeManage.res
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										202
									
								
								桂华管理系统/桂华管理系统/U.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										202
									
								
								桂华管理系统/桂华管理系统/U.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,202 @@
 | 
			
		|||
object Form1: TForm1
 | 
			
		||||
  Left = 204
 | 
			
		||||
  Top = 180
 | 
			
		||||
  Width = 870
 | 
			
		||||
  Height = 500
 | 
			
		||||
  Caption = 'Form1'
 | 
			
		||||
  Color = clBtnFace
 | 
			
		||||
  Font.Charset = DEFAULT_CHARSET
 | 
			
		||||
  Font.Color = clWindowText
 | 
			
		||||
  Font.Height = -11
 | 
			
		||||
  Font.Name = 'MS Sans Serif'
 | 
			
		||||
  Font.Style = []
 | 
			
		||||
  OldCreateOrder = False
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 13
 | 
			
		||||
  object ToolBar1: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 862
 | 
			
		||||
    Height = 30
 | 
			
		||||
    ButtonHeight = 30
 | 
			
		||||
    ButtonWidth = 59
 | 
			
		||||
    Caption = 'ToolBar1'
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    EdgeInner = esNone
 | 
			
		||||
    EdgeOuter = esNone
 | 
			
		||||
    Flat = True
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clWindowText
 | 
			
		||||
    Font.Height = -12
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = []
 | 
			
		||||
    Images = DataLink_RCInspection.ThreeImgList
 | 
			
		||||
    List = True
 | 
			
		||||
    ParentColor = False
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    ShowCaptions = True
 | 
			
		||||
    TabOrder = 0
 | 
			
		||||
    object ToolButton2: TToolButton
 | 
			
		||||
      Left = 0
 | 
			
		||||
      Top = 0
 | 
			
		||||
      Caption = #20445#23384
 | 
			
		||||
      ImageIndex = 58
 | 
			
		||||
    end
 | 
			
		||||
    object TBClose: TToolButton
 | 
			
		||||
      Left = 59
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      ImageIndex = 55
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 30
 | 
			
		||||
    Width = 862
 | 
			
		||||
    Height = 41
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 25
 | 
			
		||||
      Top = 16
 | 
			
		||||
      Width = 52
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #24067#21305#26465#30721
 | 
			
		||||
      Font.Charset = GB2312_CHARSET
 | 
			
		||||
      Font.Color = clRed
 | 
			
		||||
      Font.Height = -12
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object APID: TEdit
 | 
			
		||||
      Left = 80
 | 
			
		||||
      Top = 10
 | 
			
		||||
      Width = 138
 | 
			
		||||
      Height = 24
 | 
			
		||||
      Font.Charset = GB2312_CHARSET
 | 
			
		||||
      Font.Color = clWindowText
 | 
			
		||||
      Font.Height = -16
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = []
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
      TabOrder = 0
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid2: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 71
 | 
			
		||||
    Width = 862
 | 
			
		||||
    Height = 392
 | 
			
		||||
    Align = alClient
 | 
			
		||||
    TabOrder = 2
 | 
			
		||||
    object Tv2: TcxGridDBTableView
 | 
			
		||||
      NavigatorButtons.ConfirmDelete = False
 | 
			
		||||
      DataController.DataSource = DataSource1
 | 
			
		||||
      DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
 | 
			
		||||
      DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
      DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v2Column1
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = Tv2CDQty
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsSelection.CellSelect = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      Styles.Header = DataLink_RCInspection.TextSHuangSe
 | 
			
		||||
      object tv2CDType: TcxGridDBColumn
 | 
			
		||||
        Caption = #30133#28857#21517#31216
 | 
			
		||||
        DataBinding.FieldName = 'CDName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Options.Sorting = False
 | 
			
		||||
        Styles.Content = DataLink_RCInspection.Default
 | 
			
		||||
        Width = 144
 | 
			
		||||
      end
 | 
			
		||||
      object tv2CDWZ: TcxGridDBColumn
 | 
			
		||||
        Caption = #20301#32622#36215
 | 
			
		||||
        DataBinding.FieldName = 'CDBeg'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        HeaderGlyphAlignmentHorz = taCenter
 | 
			
		||||
        Options.Sorting = False
 | 
			
		||||
        Styles.Content = DataLink_RCInspection.Default
 | 
			
		||||
        Width = 96
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column2: TcxGridDBColumn
 | 
			
		||||
        Caption = #20301#32622#27490
 | 
			
		||||
        DataBinding.FieldName = 'CDend'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        HeaderGlyphAlignmentHorz = taCenter
 | 
			
		||||
        Styles.Content = DataLink_RCInspection.Default
 | 
			
		||||
        Width = 93
 | 
			
		||||
      end
 | 
			
		||||
      object Tv2CDQty: TcxGridDBColumn
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'CDQty'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Sorting = False
 | 
			
		||||
        Styles.Content = DataLink_RCInspection.Default
 | 
			
		||||
        Width = 93
 | 
			
		||||
      end
 | 
			
		||||
      object Tv2CDReason: TcxGridDBColumn
 | 
			
		||||
        Caption = #21407#22240
 | 
			
		||||
        DataBinding.FieldName = 'CDReason'
 | 
			
		||||
        Visible = False
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Sorting = False
 | 
			
		||||
        Width = 131
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column1: TcxGridDBColumn
 | 
			
		||||
        DataBinding.FieldName = 'CDQty'
 | 
			
		||||
        Visible = False
 | 
			
		||||
        Width = 55
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGridLevel1: TcxGridLevel
 | 
			
		||||
      GridView = Tv2
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ADOTmp: TADOQuery
 | 
			
		||||
    Connection = DataLink_RCInspection.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 336
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryMain: TADOQuery
 | 
			
		||||
    Connection = DataLink_RCInspection.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 312
 | 
			
		||||
    Top = 200
 | 
			
		||||
  end
 | 
			
		||||
  object ADOCmd: TADOQuery
 | 
			
		||||
    Connection = DataLink_RCInspection.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 288
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
  object DataSource1: TDataSource
 | 
			
		||||
    DataSet = Order_MJ
 | 
			
		||||
    Left = 528
 | 
			
		||||
    Top = 200
 | 
			
		||||
  end
 | 
			
		||||
  object Order_MJ: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 344
 | 
			
		||||
    Top = 200
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										48
									
								
								桂华管理系统/桂华管理系统/U.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								桂华管理系统/桂华管理系统/U.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,48 @@
 | 
			
		|||
unit U;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
 | 
			
		||||
  cxDataStorage, cxEdit, DB, cxDBData, cxTextEdit, DBClient, ADODB,
 | 
			
		||||
  cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
 | 
			
		||||
  cxClasses, cxControls, cxGridCustomView, cxGrid, StdCtrls, ExtCtrls,
 | 
			
		||||
  ComCtrls, ToolWin;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TForm1 = class(TForm)
 | 
			
		||||
    ToolBar1: TToolBar;
 | 
			
		||||
    ToolButton2: TToolButton;
 | 
			
		||||
    TBClose: TToolButton;
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    APID: TEdit;
 | 
			
		||||
    cxGrid2: TcxGrid;
 | 
			
		||||
    Tv2: TcxGridDBTableView;
 | 
			
		||||
    tv2CDType: TcxGridDBColumn;
 | 
			
		||||
    tv2CDWZ: TcxGridDBColumn;
 | 
			
		||||
    v2Column2: TcxGridDBColumn;
 | 
			
		||||
    Tv2CDQty: TcxGridDBColumn;
 | 
			
		||||
    Tv2CDReason: TcxGridDBColumn;
 | 
			
		||||
    v2Column1: TcxGridDBColumn;
 | 
			
		||||
    cxGridLevel1: TcxGridLevel;
 | 
			
		||||
    ADOTmp: TADOQuery;
 | 
			
		||||
    ADOQueryMain: TADOQuery;
 | 
			
		||||
    ADOCmd: TADOQuery;
 | 
			
		||||
    DataSource1: TDataSource;
 | 
			
		||||
    Order_MJ: TClientDataSet;
 | 
			
		||||
  private
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
  public
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  Form1: TForm1;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										201
									
								
								桂华管理系统/桂华管理系统/U_BanCpCkSaoM.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										201
									
								
								桂华管理系统/桂华管理系统/U_BanCpCkSaoM.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,201 @@
 | 
			
		|||
object frmBanCpCkSaoM: TfrmBanCpCkSaoM
 | 
			
		||||
  Left = 241
 | 
			
		||||
  Top = 177
 | 
			
		||||
  Width = 870
 | 
			
		||||
  Height = 500
 | 
			
		||||
  Caption = #21322#25104#21697#20986#24211#25195#25551
 | 
			
		||||
  Color = clBtnFace
 | 
			
		||||
  Font.Charset = ANSI_CHARSET
 | 
			
		||||
  Font.Color = clWindowText
 | 
			
		||||
  Font.Height = -16
 | 
			
		||||
  Font.Name = #23435#20307
 | 
			
		||||
  Font.Style = [fsBold]
 | 
			
		||||
  OldCreateOrder = False
 | 
			
		||||
  OnClose = FormClose
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 16
 | 
			
		||||
  object cxGrid2: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 81
 | 
			
		||||
    Width = 862
 | 
			
		||||
    Height = 382
 | 
			
		||||
    Align = alClient
 | 
			
		||||
    TabOrder = 0
 | 
			
		||||
    object Tv1: TcxGridDBTableView
 | 
			
		||||
      OnDblClick = Tv1DblClick
 | 
			
		||||
      NavigatorButtons.ConfirmDelete = False
 | 
			
		||||
      DataController.DataSource = DataSource1
 | 
			
		||||
      DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
      DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v2Column5
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v2Column6
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsSelection.CellSelect = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      Styles.Header = DataLink_TradeManage.Default
 | 
			
		||||
      object v1Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #35746#21333#21495
 | 
			
		||||
        DataBinding.FieldName = 'orderNo'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 97
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #20013#25991#21517#31216
 | 
			
		||||
        DataBinding.FieldName = 'MPRTCodeName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 101
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column3: TcxGridDBColumn
 | 
			
		||||
        Caption = #39068#33394
 | 
			
		||||
        DataBinding.FieldName = 'PRTColor'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 78
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column3: TcxGridDBColumn
 | 
			
		||||
        Caption = #32568#21495
 | 
			
		||||
        DataBinding.FieldName = 'GangNo'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 58
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column5: TcxGridDBColumn
 | 
			
		||||
        Caption = #26465#30721
 | 
			
		||||
        DataBinding.FieldName = 'MJID'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 112
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column2: TcxGridDBColumn
 | 
			
		||||
        Caption = #20986#24211#26102#38388
 | 
			
		||||
        DataBinding.FieldName = 'CRTime'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 88
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column5: TcxGridDBColumn
 | 
			
		||||
        Caption = #20986#24211#20844#26020#25968
 | 
			
		||||
        DataBinding.FieldName = 'KGQty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 89
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column6: TcxGridDBColumn
 | 
			
		||||
        Caption = #20986#24211#38271#24230
 | 
			
		||||
        DataBinding.FieldName = 'Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 99
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column6: TcxGridDBColumn
 | 
			
		||||
        Caption = #38271#24230#21333#20301
 | 
			
		||||
        DataBinding.FieldName = 'QtyUnit'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 60
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGrid2Level1: TcxGridLevel
 | 
			
		||||
      GridView = Tv1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 862
 | 
			
		||||
    Height = 81
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 56
 | 
			
		||||
      Top = 40
 | 
			
		||||
      Width = 68
 | 
			
		||||
      Height = 16
 | 
			
		||||
      Caption = #25195#25551#20837#21475
 | 
			
		||||
    end
 | 
			
		||||
    object XJID: TEdit
 | 
			
		||||
      Left = 124
 | 
			
		||||
      Top = 37
 | 
			
		||||
      Width = 167
 | 
			
		||||
      Height = 24
 | 
			
		||||
      TabOrder = 0
 | 
			
		||||
      OnKeyPress = XJIDKeyPress
 | 
			
		||||
    end
 | 
			
		||||
    object Button1: TButton
 | 
			
		||||
      Left = 309
 | 
			
		||||
      Top = 38
 | 
			
		||||
      Width = 75
 | 
			
		||||
      Height = 23
 | 
			
		||||
      Caption = #20986#24211
 | 
			
		||||
      TabOrder = 1
 | 
			
		||||
      OnClick = Button1Click
 | 
			
		||||
    end
 | 
			
		||||
    object Button2: TButton
 | 
			
		||||
      Left = 413
 | 
			
		||||
      Top = 38
 | 
			
		||||
      Width = 75
 | 
			
		||||
      Height = 23
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnClick = Button2Click
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu1: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid2
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 728
 | 
			
		||||
    Top = 136
 | 
			
		||||
  end
 | 
			
		||||
  object CDS_Main: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 760
 | 
			
		||||
    Top = 136
 | 
			
		||||
  end
 | 
			
		||||
  object DataSource1: TDataSource
 | 
			
		||||
    DataSet = CDS_Main
 | 
			
		||||
    Left = 792
 | 
			
		||||
    Top = 136
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryTemp: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 944
 | 
			
		||||
    Top = 32
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryCmd: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 968
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryMain: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 984
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										253
									
								
								桂华管理系统/桂华管理系统/U_BanCpCkSaoM.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										253
									
								
								桂华管理系统/桂华管理系统/U_BanCpCkSaoM.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,253 @@
 | 
			
		|||
unit U_BanCpCkSaoM;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
 | 
			
		||||
  cxDataStorage, cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
 | 
			
		||||
  cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel,
 | 
			
		||||
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
 | 
			
		||||
  cxControls, cxGridCustomView, cxGrid;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmBanCpCkSaoM = class(TForm)
 | 
			
		||||
    cxGrid2: TcxGrid;
 | 
			
		||||
    Tv1: TcxGridDBTableView;
 | 
			
		||||
    v1Column1: TcxGridDBColumn;
 | 
			
		||||
    v2Column1: TcxGridDBColumn;
 | 
			
		||||
    v2Column3: TcxGridDBColumn;
 | 
			
		||||
    v1Column3: TcxGridDBColumn;
 | 
			
		||||
    v1Column2: TcxGridDBColumn;
 | 
			
		||||
    v2Column5: TcxGridDBColumn;
 | 
			
		||||
    v2Column6: TcxGridDBColumn;
 | 
			
		||||
    cxGrid2Level1: TcxGridLevel;
 | 
			
		||||
    cxGridPopupMenu1: TcxGridPopupMenu;
 | 
			
		||||
    CDS_Main: TClientDataSet;
 | 
			
		||||
    DataSource1: TDataSource;
 | 
			
		||||
    ADOQueryTemp: TADOQuery;
 | 
			
		||||
    ADOQueryCmd: TADOQuery;
 | 
			
		||||
    ADOQueryMain: TADOQuery;
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    XJID: TEdit;
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    Button1: TButton;
 | 
			
		||||
    v1Column5: TcxGridDBColumn;
 | 
			
		||||
    Button2: TButton;
 | 
			
		||||
    v1Column6: TcxGridDBColumn;
 | 
			
		||||
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure FormShow(Sender: TObject);
 | 
			
		||||
    procedure XJIDKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
    procedure Button1Click(Sender: TObject);
 | 
			
		||||
    procedure Tv1DblClick(Sender: TObject);
 | 
			
		||||
    procedure Button2Click(Sender: TObject);
 | 
			
		||||
  private
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
  public
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmBanCpCkSaoM: TfrmBanCpCkSaoM;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
uses
 | 
			
		||||
U_DataLink,U_Fun ;
 | 
			
		||||
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpCkSaoM.FormClose(Sender: TObject;
 | 
			
		||||
  var Action: TCloseAction);
 | 
			
		||||
begin
 | 
			
		||||
  Action:=caFree;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpCkSaoM.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmBanCpCkSaoM:=nil;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmBanCpCkSaoM.InitGrid();
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    ADOQueryMain.DisableControls;
 | 
			
		||||
    with ADOQueryMain do
 | 
			
		||||
    begin
 | 
			
		||||
      Filtered:=False;
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,F.KCQty,F.KCKgQty,F.KCQtyUnit,KK.GangNo  ');
 | 
			
		||||
      sql.add('from CK_BanCP_CR A ');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
 | 
			
		||||
      Sql.add(' inner join WFB_MJJY D on A.MJId=D.MJId');
 | 
			
		||||
      sql.Add(' inner join JYOrder_Sub_AnPai KK on D.APID=KK.APID');
 | 
			
		||||
      sql.Add(' inner join CK_BanCP_KC F on A.CRID=F.CRID');
 | 
			
		||||
      sql.add('where 1<>1');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    SCreateCDS20(ADOQueryMain,CDS_Main);
 | 
			
		||||
    SInitCDSData20(ADOQueryMain,CDS_Main);
 | 
			
		||||
  finally
 | 
			
		||||
    ADOQueryMain.EnableControls;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpCkSaoM.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  ReadCxGrid('成品出库',Tv1,'成品仓库');
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpCkSaoM.XJIDKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
begin
 | 
			
		||||
  if Key=#13 then
 | 
			
		||||
  begin
 | 
			
		||||
    with ADOQueryTemp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      SQL.Add('select A.*  ');
 | 
			
		||||
      sql.add('from CK_BanCP_CR A ');
 | 
			
		||||
      sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    if ADOQueryTemp.IsEmpty then
 | 
			
		||||
    begin
 | 
			
		||||
      Application.MessageBox('条码错误!','提示',0);
 | 
			
		||||
      Exit;
 | 
			
		||||
    end;
 | 
			
		||||
    with ADOQueryTemp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,F.KCQty,F.KCKgQty,F.KCQtyUnit,KK.GangNo  ');
 | 
			
		||||
      sql.add('from CK_BanCP_CR A ');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
 | 
			
		||||
      Sql.add(' inner join WFB_MJJY D on A.MJId=D.MJId');
 | 
			
		||||
      sql.Add(' inner join JYOrder_Sub_AnPai KK on D.APID=KK.APID');
 | 
			
		||||
      sql.Add(' inner join CK_BanCP_KC F on A.CRID=F.CRID');
 | 
			
		||||
      sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
 | 
			
		||||
      sql.Add(' and KCQty>0 and A.CRType=''检验入库'' ');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    if ADOQueryTemp.IsEmpty=False  then
 | 
			
		||||
    begin
 | 
			
		||||
      if CDS_Main.Locate('MJID',Trim(ADOQueryTemp.fieldbyname('MJID').AsString),[])=True then
 | 
			
		||||
      begin
 | 
			
		||||
        Application.MessageBox('已经扫描过,不能再次扫描!','提示',0);
 | 
			
		||||
        Exit;
 | 
			
		||||
      end;
 | 
			
		||||
      with CDS_Main do
 | 
			
		||||
      begin
 | 
			
		||||
        Append;
 | 
			
		||||
        FieldByName('OrderNo').Value:=ADOQueryTemp.fieldbyname('OrderNo').Value;
 | 
			
		||||
        FieldByName('MPRTCodeName').Value:=ADOQueryTemp.fieldbyname('MPRTCodeName').Value;
 | 
			
		||||
        FieldByName('PRTColor').Value:=ADOQueryTemp.fieldbyname('PRTColor').Value;
 | 
			
		||||
        FieldByName('GangNo').Value:=ADOQueryTemp.fieldbyname('GangNo').Value;
 | 
			
		||||
        FieldByName('CRID').Value:=ADOQueryTemp.fieldbyname('CRID').Value;
 | 
			
		||||
        FieldByName('CRTime').Value:=SGetServerDateTime(ADOQueryCmd);
 | 
			
		||||
        FieldByName('KGQty').Value:=ADOQueryTemp.fieldbyname('kCKGQty').Value;
 | 
			
		||||
        FieldByName('Qty').Value:=ADOQueryTemp.fieldbyname('KCQty').Value;
 | 
			
		||||
        FieldByName('QtyUnit').Value:=ADOQueryTemp.fieldbyname('KCQtyUnit').Value;
 | 
			
		||||
        FieldByName('MJID').Value:=ADOQueryTemp.fieldbyname('MJID').Value;
 | 
			
		||||
        FieldByName('APID').Value:=ADOQueryTemp.fieldbyname('APID').Value;
 | 
			
		||||
        Post;
 | 
			
		||||
      end;
 | 
			
		||||
    end else
 | 
			
		||||
    begin
 | 
			
		||||
      Application.MessageBox('此卷已经出库,不能再次出库!','提示',0);
 | 
			
		||||
      Exit;
 | 
			
		||||
    end;
 | 
			
		||||
    XJID.Text:='';
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpCkSaoM.Button1Click(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  maxno:string;
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then Exit;
 | 
			
		||||
  XJID.SetFocus;
 | 
			
		||||
  if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
 | 
			
		||||
  try
 | 
			
		||||
    ADOQueryCmd.Connection.BeginTrans;
 | 
			
		||||
    with CDS_Main do
 | 
			
		||||
    begin
 | 
			
		||||
      First;
 | 
			
		||||
      while not Eof do
 | 
			
		||||
      begin
 | 
			
		||||
        if GetLSNo(ADOQueryCmd,maxno,'ZC','CK_BanCp_CR',4,1)=False then
 | 
			
		||||
        begin
 | 
			
		||||
          ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
          Application.MessageBox('取出库最大号失败!','提示',0);
 | 
			
		||||
          Exit;
 | 
			
		||||
        end;
 | 
			
		||||
        with ADOQueryCmd do
 | 
			
		||||
        begin
 | 
			
		||||
          Close;
 | 
			
		||||
          sql.Clear;
 | 
			
		||||
          sql.Add('Update CK_BanCp_CR Set NowOutFlag=1 where MJID='''+Trim(CDS_Main.fieldbyname('MJID').AsString)+'''');
 | 
			
		||||
          SQL.Add(' and CRType=''正常出库'' ');
 | 
			
		||||
          ExecSQL;
 | 
			
		||||
        end;
 | 
			
		||||
        with ADOQueryCmd do
 | 
			
		||||
        begin
 | 
			
		||||
          Close;
 | 
			
		||||
          sql.Clear;
 | 
			
		||||
          sql.Add('select * from CK_BanCp_CR where 1<>1');
 | 
			
		||||
          Open;
 | 
			
		||||
        end;
 | 
			
		||||
        with ADOQueryCmd do
 | 
			
		||||
        begin
 | 
			
		||||
          Append;
 | 
			
		||||
          FieldByName('BCID').Value:=Trim(maxno);
 | 
			
		||||
          FieldByName('CRID').Value:=CDS_Main.fieldbyname('CRID').Value;
 | 
			
		||||
          FieldByName('CRTime').Value:=CDS_Main.fieldbyname('CRTime').Value;
 | 
			
		||||
          FieldByName('KGQty').Value:=CDS_Main.fieldbyname('KGQty').Value;
 | 
			
		||||
          FieldByName('Qty').Value:=CDS_Main.fieldbyname('Qty').Value;
 | 
			
		||||
          FieldByName('QtyUnit').Value:=CDS_Main.fieldbyname('QtyUnit').Value;
 | 
			
		||||
          FieldByName('MJID').Value:=CDS_Main.fieldbyname('MJID').Value;
 | 
			
		||||
          FieldByName('APID').Value:=CDS_Main.fieldbyname('APID').Value;
 | 
			
		||||
          FieldByName('CPType').Value:=CDS_Main.fieldbyname('CPType').Value;
 | 
			
		||||
          FieldByName('FillTime').Value:=SGetServerDateTime(ADOQueryTemp);
 | 
			
		||||
          FieldByName('Filler').Value:=Trim(DName);
 | 
			
		||||
          FieldByName('CRFlag').Value:='出库';
 | 
			
		||||
          FieldByName('CRType').Value:='正常出库';
 | 
			
		||||
          Post;
 | 
			
		||||
        end;
 | 
			
		||||
        with ADOQueryCmd do
 | 
			
		||||
        begin
 | 
			
		||||
          Close;
 | 
			
		||||
          sql.Clear;
 | 
			
		||||
          sql.Add('Update CK_BanCp_KC set KCKgQty=0,KCQty=0 where CRID='+CDS_Main.fieldbyname('CRID').AsString);
 | 
			
		||||
          ExecSQL;
 | 
			
		||||
        end;
 | 
			
		||||
        Next;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
    ADOQueryCmd.Connection.CommitTrans;
 | 
			
		||||
    InitGrid();
 | 
			
		||||
    Application.MessageBox('出库成功!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  except
 | 
			
		||||
    ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
    Application.MessageBox('出库异常!','提示',0);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpCkSaoM.Tv1DblClick(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then Exit;
 | 
			
		||||
  CDS_Main.Delete;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpCkSaoM.Button2Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  Close;
 | 
			
		||||
  WriteCxGrid('成品出库',Tv1,'成品仓库');
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										212
									
								
								桂华管理系统/桂华管理系统/U_BanCpHCSaoM.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										212
									
								
								桂华管理系统/桂华管理系统/U_BanCpHCSaoM.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,212 @@
 | 
			
		|||
object frmBanCpHCSaoM: TfrmBanCpHCSaoM
 | 
			
		||||
  Left = 241
 | 
			
		||||
  Top = 177
 | 
			
		||||
  Width = 905
 | 
			
		||||
  Height = 504
 | 
			
		||||
  Caption = #21322#25104#21697#22238#20179#25195#25551
 | 
			
		||||
  Color = clBtnFace
 | 
			
		||||
  Font.Charset = ANSI_CHARSET
 | 
			
		||||
  Font.Color = clWindowText
 | 
			
		||||
  Font.Height = -16
 | 
			
		||||
  Font.Name = #23435#20307
 | 
			
		||||
  Font.Style = [fsBold]
 | 
			
		||||
  OldCreateOrder = False
 | 
			
		||||
  OnClose = FormClose
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 16
 | 
			
		||||
  object cxGrid2: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 81
 | 
			
		||||
    Width = 897
 | 
			
		||||
    Height = 386
 | 
			
		||||
    Align = alClient
 | 
			
		||||
    TabOrder = 0
 | 
			
		||||
    object Tv1: TcxGridDBTableView
 | 
			
		||||
      NavigatorButtons.ConfirmDelete = False
 | 
			
		||||
      DataController.DataSource = DataSource1
 | 
			
		||||
      DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
      DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v2Column5
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v2Column6
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      Styles.Header = cxStyle1
 | 
			
		||||
      object v1Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #35746#21333#21495
 | 
			
		||||
        DataBinding.FieldName = 'orderNo'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 77
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #20135#21697#20195#21495
 | 
			
		||||
        DataBinding.FieldName = 'MPRTCodeName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 112
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column3: TcxGridDBColumn
 | 
			
		||||
        Caption = #39068#33394
 | 
			
		||||
        DataBinding.FieldName = 'PRTColor'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 77
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column3: TcxGridDBColumn
 | 
			
		||||
        Caption = #38376#24133
 | 
			
		||||
        DataBinding.FieldName = 'MPRTMF'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 58
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column4: TcxGridDBColumn
 | 
			
		||||
        Caption = #20811#37325
 | 
			
		||||
        DataBinding.FieldName = 'MPRTKZ'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 57
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column5: TcxGridDBColumn
 | 
			
		||||
        Caption = #26465#30721
 | 
			
		||||
        DataBinding.FieldName = 'MJID'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 123
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column2: TcxGridDBColumn
 | 
			
		||||
        Caption = #22238#20179#26102#38388
 | 
			
		||||
        DataBinding.FieldName = 'CRTime'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 88
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column5: TcxGridDBColumn
 | 
			
		||||
        Caption = #22238#20179#20844#26020#25968
 | 
			
		||||
        DataBinding.FieldName = 'KGQty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 100
 | 
			
		||||
      end
 | 
			
		||||
      object v2Column6: TcxGridDBColumn
 | 
			
		||||
        Caption = #22238#20179#38271#24230
 | 
			
		||||
        DataBinding.FieldName = 'Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 85
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column6: TcxGridDBColumn
 | 
			
		||||
        Caption = #38271#24230#21333#20301
 | 
			
		||||
        DataBinding.FieldName = 'QtyUnit'
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 74
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGrid2Level1: TcxGridLevel
 | 
			
		||||
      GridView = Tv1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 897
 | 
			
		||||
    Height = 81
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 56
 | 
			
		||||
      Top = 40
 | 
			
		||||
      Width = 68
 | 
			
		||||
      Height = 16
 | 
			
		||||
      Caption = #25195#25551#20837#21475
 | 
			
		||||
    end
 | 
			
		||||
    object XJID: TEdit
 | 
			
		||||
      Left = 124
 | 
			
		||||
      Top = 37
 | 
			
		||||
      Width = 167
 | 
			
		||||
      Height = 24
 | 
			
		||||
      TabOrder = 0
 | 
			
		||||
      OnKeyPress = XJIDKeyPress
 | 
			
		||||
    end
 | 
			
		||||
    object Button1: TButton
 | 
			
		||||
      Left = 309
 | 
			
		||||
      Top = 38
 | 
			
		||||
      Width = 75
 | 
			
		||||
      Height = 23
 | 
			
		||||
      Caption = #22238#20179
 | 
			
		||||
      TabOrder = 1
 | 
			
		||||
      OnClick = Button1Click
 | 
			
		||||
    end
 | 
			
		||||
    object Button2: TButton
 | 
			
		||||
      Left = 421
 | 
			
		||||
      Top = 38
 | 
			
		||||
      Width = 75
 | 
			
		||||
      Height = 23
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
      OnClick = Button2Click
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu1: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid2
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 728
 | 
			
		||||
    Top = 136
 | 
			
		||||
  end
 | 
			
		||||
  object CDS_Main: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 760
 | 
			
		||||
    Top = 136
 | 
			
		||||
  end
 | 
			
		||||
  object DataSource1: TDataSource
 | 
			
		||||
    DataSet = CDS_Main
 | 
			
		||||
    Left = 792
 | 
			
		||||
    Top = 136
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryTemp: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 944
 | 
			
		||||
    Top = 32
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryCmd: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 968
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryMain: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 984
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
  object cxStyleRepository1: TcxStyleRepository
 | 
			
		||||
    object cxStyle1: TcxStyle
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										264
									
								
								桂华管理系统/桂华管理系统/U_BanCpHCSaoM.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										264
									
								
								桂华管理系统/桂华管理系统/U_BanCpHCSaoM.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,264 @@
 | 
			
		|||
unit U_BanCpHCSaoM;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
 | 
			
		||||
  cxDataStorage, cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
 | 
			
		||||
  cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel,
 | 
			
		||||
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
 | 
			
		||||
  cxControls, cxGridCustomView, cxGrid;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmBanCpHCSaoM = class(TForm)
 | 
			
		||||
    cxGrid2: TcxGrid;
 | 
			
		||||
    Tv1: TcxGridDBTableView;
 | 
			
		||||
    v1Column1: TcxGridDBColumn;
 | 
			
		||||
    v2Column1: TcxGridDBColumn;
 | 
			
		||||
    v2Column3: TcxGridDBColumn;
 | 
			
		||||
    v1Column3: TcxGridDBColumn;
 | 
			
		||||
    v1Column4: TcxGridDBColumn;
 | 
			
		||||
    v1Column2: TcxGridDBColumn;
 | 
			
		||||
    v2Column5: TcxGridDBColumn;
 | 
			
		||||
    v2Column6: TcxGridDBColumn;
 | 
			
		||||
    cxGrid2Level1: TcxGridLevel;
 | 
			
		||||
    cxGridPopupMenu1: TcxGridPopupMenu;
 | 
			
		||||
    CDS_Main: TClientDataSet;
 | 
			
		||||
    DataSource1: TDataSource;
 | 
			
		||||
    ADOQueryTemp: TADOQuery;
 | 
			
		||||
    ADOQueryCmd: TADOQuery;
 | 
			
		||||
    ADOQueryMain: TADOQuery;
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    XJID: TEdit;
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    Button1: TButton;
 | 
			
		||||
    v1Column5: TcxGridDBColumn;
 | 
			
		||||
    Button2: TButton;
 | 
			
		||||
    v1Column6: TcxGridDBColumn;
 | 
			
		||||
    cxStyleRepository1: TcxStyleRepository;
 | 
			
		||||
    cxStyle1: TcxStyle;
 | 
			
		||||
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure FormShow(Sender: TObject);
 | 
			
		||||
    procedure XJIDKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
    procedure Button1Click(Sender: TObject);
 | 
			
		||||
    procedure Button2Click(Sender: TObject);
 | 
			
		||||
  private
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
    procedure InitGrid();
 | 
			
		||||
  public
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmBanCpHCSaoM: TfrmBanCpHCSaoM;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
uses
 | 
			
		||||
U_DataLink,U_Fun ;
 | 
			
		||||
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpHCSaoM.FormClose(Sender: TObject;
 | 
			
		||||
  var Action: TCloseAction);
 | 
			
		||||
begin
 | 
			
		||||
  Action:=caFree;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpHCSaoM.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmBanCpHCSaoM:=nil;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmBanCpHCSaoM.InitGrid();
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    ADOQueryMain.DisableControls;
 | 
			
		||||
    with ADOQueryMain do
 | 
			
		||||
    begin
 | 
			
		||||
      Filtered:=False;
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,B.MPRTMF,B.MPRTKZ  ');
 | 
			
		||||
      sql.add('from CK_BanCP_CR A ');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
 | 
			
		||||
      sql.add('where 1<>1');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    SCreateCDS20(ADOQueryMain,CDS_Main);
 | 
			
		||||
    SInitCDSData20(ADOQueryMain,CDS_Main);
 | 
			
		||||
  finally
 | 
			
		||||
    ADOQueryMain.EnableControls;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpHCSaoM.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  ReadCxGrid('成品回仓',Tv1,'成品仓库');
 | 
			
		||||
  InitGrid();
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpHCSaoM.XJIDKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
begin
 | 
			
		||||
  if Key=#13 then
 | 
			
		||||
  begin
 | 
			
		||||
    with ADOQueryTemp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      SQL.Add('select A.*  ');
 | 
			
		||||
      sql.add('from CK_BanCP_CR A ');
 | 
			
		||||
      sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    if ADOQueryTemp.IsEmpty then
 | 
			
		||||
    begin
 | 
			
		||||
      Application.MessageBox('条码错误!','提示',0);
 | 
			
		||||
      Exit;
 | 
			
		||||
    end;
 | 
			
		||||
    with ADOQueryTemp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      SQL.Add('select A.*,B.OrderNo,B.MPRTCodeName,C.PRTColor,B.MPRTMF,B.MPRTKZ,F.KCQty,F.KCKgQty  ');
 | 
			
		||||
      sql.add('from CK_BanCP_CR A ');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Main B on A.MainId=B.MainId');
 | 
			
		||||
      Sql.add(' inner join JYOrder_Sub C on A.SubId=C.SubId');
 | 
			
		||||
      sql.Add(' inner join CK_BanCP_KC F on A.CRID=F.CRID');
 | 
			
		||||
      sql.add('where A.MJID='''+Trim(XJID.Text)+'''');
 | 
			
		||||
      sql.Add(' and KCQty=0 and A.CRType=''检验入库'' ');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    if ADOQueryTemp.IsEmpty=false  then
 | 
			
		||||
    begin
 | 
			
		||||
      if CDS_Main.Locate('MJID',Trim(ADOQueryTemp.fieldbyname('MJID').AsString),[])=True then
 | 
			
		||||
      begin
 | 
			
		||||
        Application.MessageBox('已经扫描过,不能再次扫描!','提示',0);
 | 
			
		||||
        Exit;
 | 
			
		||||
      end;
 | 
			
		||||
      with CDS_Main do
 | 
			
		||||
      begin
 | 
			
		||||
        Append;
 | 
			
		||||
        FieldByName('OrderNo').Value:=ADOQueryTemp.fieldbyname('OrderNo').Value;
 | 
			
		||||
        FieldByName('MPRTCodeName').Value:=ADOQueryTemp.fieldbyname('MPRTCodeName').Value;
 | 
			
		||||
        FieldByName('PRTColor').Value:=ADOQueryTemp.fieldbyname('PRTColor').Value;
 | 
			
		||||
        FieldByName('MPRTMF').Value:=ADOQueryTemp.fieldbyname('MPRTMF').Value;
 | 
			
		||||
        FieldByName('MPRTKZ').Value:=ADOQueryTemp.fieldbyname('MPRTKZ').Value;
 | 
			
		||||
        FieldByName('CRID').Value:=ADOQueryTemp.fieldbyname('CRID').Value;
 | 
			
		||||
        FieldByName('CRTime').Value:=SGetServerDateTime(ADOQueryCmd);
 | 
			
		||||
        FieldByName('KGQty').Value:=ADOQueryTemp.fieldbyname('KGQty').Value;
 | 
			
		||||
        FieldByName('Qty').Value:=ADOQueryTemp.fieldbyname('Qty').Value;
 | 
			
		||||
        FieldByName('QtyUnit').Value:=ADOQueryTemp.fieldbyname('QtyUnit').Value;
 | 
			
		||||
        FieldByName('MainID').Value:=ADOQueryTemp.fieldbyname('MainID').Value;
 | 
			
		||||
        FieldByName('SubID').Value:=ADOQueryTemp.fieldbyname('SubID').Value;
 | 
			
		||||
        FieldByName('APID').Value:=ADOQueryTemp.fieldbyname('APID').Value;
 | 
			
		||||
        FieldByName('CPType').Value:=ADOQueryTemp.fieldbyname('CPType').Value;
 | 
			
		||||
        FieldByName('MJID').Value:=ADOQueryTemp.fieldbyname('MJID').Value;
 | 
			
		||||
        Post;
 | 
			
		||||
      end;
 | 
			
		||||
    end else
 | 
			
		||||
    begin
 | 
			
		||||
      Application.MessageBox('此卷已在仓库中,无需回仓!','提示',0);
 | 
			
		||||
      Exit;
 | 
			
		||||
    end;
 | 
			
		||||
    XJID.Text:='';
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpHCSaoM.Button1Click(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  maxno:string;
 | 
			
		||||
begin
 | 
			
		||||
  if CDS_Main.IsEmpty then Exit;
 | 
			
		||||
  if CDS_Main.Locate('KgQty',0,[]) then
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('回仓公斤数不能为0!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  if CDS_Main.Locate('Qty',0,[]) then
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('回仓长度不能为0!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  if CDS_Main.Locate('KgQty',null,[]) then
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('回仓公斤数不能为空!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  if CDS_Main.Locate('Qty',null,[]) then
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('回仓长度不能为空!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  XJID.SetFocus;
 | 
			
		||||
  if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
 | 
			
		||||
  try
 | 
			
		||||
    ADOQueryCmd.Connection.BeginTrans;
 | 
			
		||||
    with CDS_Main do
 | 
			
		||||
    begin
 | 
			
		||||
      First;
 | 
			
		||||
      while not Eof do
 | 
			
		||||
      begin
 | 
			
		||||
        if GetLSNo(ADOQueryCmd,maxno,'HC','CK_BanCp_CR',4,1)=False then
 | 
			
		||||
        begin
 | 
			
		||||
          ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
          Application.MessageBox('取出库最大号失败!','提示',0);
 | 
			
		||||
          Exit;
 | 
			
		||||
        end;
 | 
			
		||||
        with ADOQueryCmd do
 | 
			
		||||
        begin
 | 
			
		||||
          Close;
 | 
			
		||||
          sql.Clear;
 | 
			
		||||
          sql.Add('select * from CK_BanCp_CR where 1<>1');
 | 
			
		||||
          Open;
 | 
			
		||||
        end;
 | 
			
		||||
        with ADOQueryCmd do
 | 
			
		||||
        begin
 | 
			
		||||
          Append;
 | 
			
		||||
          FieldByName('BCID').Value:=Trim(maxno);
 | 
			
		||||
          FieldByName('CRID').Value:=CDS_Main.fieldbyname('CRID').Value;
 | 
			
		||||
          FieldByName('CRTime').Value:=CDS_Main.fieldbyname('CRTime').Value;
 | 
			
		||||
          FieldByName('KGQty').Value:=CDS_Main.fieldbyname('KGQty').Value;
 | 
			
		||||
          FieldByName('Qty').Value:=CDS_Main.fieldbyname('Qty').Value;
 | 
			
		||||
          FieldByName('QtyUnit').Value:=CDS_Main.fieldbyname('QtyUnit').Value;
 | 
			
		||||
          FieldByName('MainID').Value:=CDS_Main.fieldbyname('MainID').Value;
 | 
			
		||||
          FieldByName('SubID').Value:=CDS_Main.fieldbyname('SubID').Value;
 | 
			
		||||
          FieldByName('APID').Value:=CDS_Main.fieldbyname('APID').Value;
 | 
			
		||||
          FieldByName('MJID').Value:=CDS_Main.fieldbyname('MJID').Value;
 | 
			
		||||
          FieldByName('CPType').Value:=CDS_Main.fieldbyname('CPType').Value;
 | 
			
		||||
          FieldByName('FillTime').Value:=SGetServerDateTime(ADOQueryTemp);
 | 
			
		||||
          FieldByName('Filler').Value:=Trim(DName);
 | 
			
		||||
          FieldByName('CRFlag').Value:='入库';
 | 
			
		||||
          FieldByName('CRType').Value:='回仓';
 | 
			
		||||
          Post;
 | 
			
		||||
        end;
 | 
			
		||||
        with ADOQueryCmd do
 | 
			
		||||
        begin
 | 
			
		||||
          Close;
 | 
			
		||||
          sql.Clear;
 | 
			
		||||
          SQL.Add('Update CK_BanCp_KC set KCKgQty='+cds_main.fieldbyname('KgQty').AsString);
 | 
			
		||||
          SQL.Add(',KCQty='+cds_main.fieldbyname('Qty').AsString);
 | 
			
		||||
          sql.Add(' where CRID='+CDS_Main.fieldbyname('CRID').AsString);
 | 
			
		||||
          ExecSQL;
 | 
			
		||||
        end;
 | 
			
		||||
        Next;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
    ADOQueryCmd.Connection.CommitTrans;
 | 
			
		||||
    InitGrid();
 | 
			
		||||
    Application.MessageBox('回仓成功!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  except
 | 
			
		||||
    ADOQueryCmd.Connection.RollbackTrans;
 | 
			
		||||
    Application.MessageBox('回仓异常!','提示',0);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBanCpHCSaoM.Button2Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  Close;
 | 
			
		||||
  WriteCxGrid('成品回仓',Tv1,'成品仓库');
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										255
									
								
								桂华管理系统/桂华管理系统/U_BangAdd.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										255
									
								
								桂华管理系统/桂华管理系统/U_BangAdd.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,255 @@
 | 
			
		|||
object frmBangAdd: TfrmBangAdd
 | 
			
		||||
  Left = 232
 | 
			
		||||
  Top = 185
 | 
			
		||||
  Width = 703
 | 
			
		||||
  Height = 396
 | 
			
		||||
  Caption = #26816#39564#31216#37325
 | 
			
		||||
  Color = clBtnFace
 | 
			
		||||
  Font.Charset = GB2312_CHARSET
 | 
			
		||||
  Font.Color = clWindowText
 | 
			
		||||
  Font.Height = -12
 | 
			
		||||
  Font.Name = #23435#20307
 | 
			
		||||
  Font.Style = []
 | 
			
		||||
  OldCreateOrder = False
 | 
			
		||||
  OnClose = FormClose
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 12
 | 
			
		||||
  object Label1: TLabel
 | 
			
		||||
    Left = 193
 | 
			
		||||
    Top = 79
 | 
			
		||||
    Width = 52
 | 
			
		||||
    Height = 12
 | 
			
		||||
    Caption = #25195#25551#20837#21475
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clRed
 | 
			
		||||
    Font.Height = -12
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
  end
 | 
			
		||||
  object Label2: TLabel
 | 
			
		||||
    Left = 392
 | 
			
		||||
    Top = 77
 | 
			
		||||
    Width = 9
 | 
			
		||||
    Height = 16
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clRed
 | 
			
		||||
    Font.Height = -16
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    Visible = False
 | 
			
		||||
  end
 | 
			
		||||
  object Label3: TLabel
 | 
			
		||||
    Left = 193
 | 
			
		||||
    Top = 115
 | 
			
		||||
    Width = 54
 | 
			
		||||
    Height = 12
 | 
			
		||||
    Caption = #31216'    '#37325
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clBlue
 | 
			
		||||
    Font.Height = -12
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
  end
 | 
			
		||||
  object Label4: TLabel
 | 
			
		||||
    Left = 387
 | 
			
		||||
    Top = 115
 | 
			
		||||
    Width = 15
 | 
			
		||||
    Height = 14
 | 
			
		||||
    Caption = #30917
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clBlack
 | 
			
		||||
    Font.Height = -14
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
  end
 | 
			
		||||
  object Label5: TLabel
 | 
			
		||||
    Left = 193
 | 
			
		||||
    Top = 147
 | 
			
		||||
    Width = 54
 | 
			
		||||
    Height = 12
 | 
			
		||||
    Caption = #32440'    '#31649
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clBlue
 | 
			
		||||
    Font.Height = -12
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
  end
 | 
			
		||||
  object Label6: TLabel
 | 
			
		||||
    Left = 387
 | 
			
		||||
    Top = 147
 | 
			
		||||
    Width = 15
 | 
			
		||||
    Height = 14
 | 
			
		||||
    Caption = #30917
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clBlack
 | 
			
		||||
    Font.Height = -14
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
  end
 | 
			
		||||
  object Label7: TLabel
 | 
			
		||||
    Left = 193
 | 
			
		||||
    Top = 179
 | 
			
		||||
    Width = 54
 | 
			
		||||
    Height = 12
 | 
			
		||||
    Caption = #33014'    '#24102
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clBlue
 | 
			
		||||
    Font.Height = -12
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
  end
 | 
			
		||||
  object Label8: TLabel
 | 
			
		||||
    Left = 387
 | 
			
		||||
    Top = 179
 | 
			
		||||
    Width = 15
 | 
			
		||||
    Height = 14
 | 
			
		||||
    Caption = #30917
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clBlack
 | 
			
		||||
    Font.Height = -14
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
  end
 | 
			
		||||
  object MJID: TEdit
 | 
			
		||||
    Left = 248
 | 
			
		||||
    Top = 73
 | 
			
		||||
    Width = 138
 | 
			
		||||
    Height = 24
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clWindowText
 | 
			
		||||
    Font.Height = -16
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = []
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    TabOrder = 0
 | 
			
		||||
    OnKeyPress = MJIDKeyPress
 | 
			
		||||
  end
 | 
			
		||||
  object Button1: TButton
 | 
			
		||||
    Left = 193
 | 
			
		||||
    Top = 232
 | 
			
		||||
    Width = 57
 | 
			
		||||
    Height = 25
 | 
			
		||||
    Caption = #30830#23450
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    OnClick = Button1Click
 | 
			
		||||
    OnKeyPress = Button1KeyPress
 | 
			
		||||
  end
 | 
			
		||||
  object Button2: TButton
 | 
			
		||||
    Left = 343
 | 
			
		||||
    Top = 232
 | 
			
		||||
    Width = 60
 | 
			
		||||
    Height = 25
 | 
			
		||||
    Caption = #36864#20986
 | 
			
		||||
    TabOrder = 2
 | 
			
		||||
    OnClick = Button2Click
 | 
			
		||||
  end
 | 
			
		||||
  object Edit1: TEdit
 | 
			
		||||
    Left = 248
 | 
			
		||||
    Top = 109
 | 
			
		||||
    Width = 136
 | 
			
		||||
    Height = 24
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clWindowText
 | 
			
		||||
    Font.Height = -16
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = []
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    TabOrder = 3
 | 
			
		||||
    OnKeyPress = MJIDKeyPress
 | 
			
		||||
  end
 | 
			
		||||
  object CheckBox1: TCheckBox
 | 
			
		||||
    Left = 248
 | 
			
		||||
    Top = 44
 | 
			
		||||
    Width = 97
 | 
			
		||||
    Height = 17
 | 
			
		||||
    Caption = #33258#21160#35835#21462
 | 
			
		||||
    Checked = True
 | 
			
		||||
    State = cbChecked
 | 
			
		||||
    TabOrder = 4
 | 
			
		||||
    OnClick = CheckBox1Click
 | 
			
		||||
  end
 | 
			
		||||
  object Edit2: TEdit
 | 
			
		||||
    Left = 248
 | 
			
		||||
    Top = 141
 | 
			
		||||
    Width = 136
 | 
			
		||||
    Height = 24
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clWindowText
 | 
			
		||||
    Font.Height = -16
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = []
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    TabOrder = 5
 | 
			
		||||
    OnKeyPress = MJIDKeyPress
 | 
			
		||||
  end
 | 
			
		||||
  object Edit3: TEdit
 | 
			
		||||
    Left = 248
 | 
			
		||||
    Top = 173
 | 
			
		||||
    Width = 136
 | 
			
		||||
    Height = 24
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clWindowText
 | 
			
		||||
    Font.Height = -16
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = []
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    TabOrder = 6
 | 
			
		||||
    OnKeyPress = MJIDKeyPress
 | 
			
		||||
  end
 | 
			
		||||
  object ADOCmd: TADOQuery
 | 
			
		||||
    Connection = DataLink_RCInspection.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 608
 | 
			
		||||
    Top = 144
 | 
			
		||||
  end
 | 
			
		||||
  object ADOTmp: TADOQuery
 | 
			
		||||
    Connection = DataLink_RCInspection.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 608
 | 
			
		||||
    Top = 200
 | 
			
		||||
  end
 | 
			
		||||
  object RM2: TRMGridReport
 | 
			
		||||
    ThreadPrepareReport = True
 | 
			
		||||
    InitialZoom = pzDefault
 | 
			
		||||
    PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
 | 
			
		||||
    DefaultCollate = False
 | 
			
		||||
    ShowPrintDialog = False
 | 
			
		||||
    SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
 | 
			
		||||
    PreviewOptions.RulerUnit = rmutScreenPixels
 | 
			
		||||
    PreviewOptions.RulerVisible = False
 | 
			
		||||
    PreviewOptions.DrawBorder = False
 | 
			
		||||
    PreviewOptions.BorderPen.Color = clGray
 | 
			
		||||
    PreviewOptions.BorderPen.Style = psDash
 | 
			
		||||
    Dataset = RMDB_Main
 | 
			
		||||
    CompressLevel = rmzcFastest
 | 
			
		||||
    CompressThread = False
 | 
			
		||||
    LaterBuildEvents = True
 | 
			
		||||
    OnlyOwnerDataSet = False
 | 
			
		||||
    Left = 560
 | 
			
		||||
    Top = 200
 | 
			
		||||
    ReportData = {}
 | 
			
		||||
  end
 | 
			
		||||
  object RMDB_Main: TRMDBDataSet
 | 
			
		||||
    Visible = True
 | 
			
		||||
    DataSet = ADOQueryPrint
 | 
			
		||||
    Left = 536
 | 
			
		||||
    Top = 144
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryPrint: TADOQuery
 | 
			
		||||
    Connection = DataLink_RCInspection.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 512
 | 
			
		||||
    Top = 184
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										308
									
								
								桂华管理系统/桂华管理系统/U_BangAdd.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										308
									
								
								桂华管理系统/桂华管理系统/U_BangAdd.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,308 @@
 | 
			
		|||
unit U_BangAdd;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, StdCtrls, DB, ADODB,OleCtrls, RM_Dataset, RM_System, RM_Common,
 | 
			
		||||
  RM_Class, RM_GridReport;
 | 
			
		||||
  function CommOpen(fhandle:hwnd;sCommName:PAnsiChar;
 | 
			
		||||
                    IntTime:integer;IsMessage:integer):integer;stdcall;external 'ELERS323C.DLL';
 | 
			
		||||
  function CommClose(sCommName:PAnsiChar):integer;stdcall;external 'ELERS323C.DLL';
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmBangAdd = class(TForm)
 | 
			
		||||
    Label1: TLabel;
 | 
			
		||||
    MJID: TEdit;
 | 
			
		||||
    Label2: TLabel;
 | 
			
		||||
    Button1: TButton;
 | 
			
		||||
    Button2: TButton;
 | 
			
		||||
    Edit1: TEdit;
 | 
			
		||||
    ADOCmd: TADOQuery;
 | 
			
		||||
    ADOTmp: TADOQuery;
 | 
			
		||||
    Label3: TLabel;
 | 
			
		||||
    Label4: TLabel;
 | 
			
		||||
    CheckBox1: TCheckBox;
 | 
			
		||||
    RM2: TRMGridReport;
 | 
			
		||||
    RMDB_Main: TRMDBDataSet;
 | 
			
		||||
    ADOQueryPrint: TADOQuery;
 | 
			
		||||
    Label5: TLabel;
 | 
			
		||||
    Label6: TLabel;
 | 
			
		||||
    Edit2: TEdit;
 | 
			
		||||
    Label7: TLabel;
 | 
			
		||||
    Label8: TLabel;
 | 
			
		||||
    Edit3: TEdit;
 | 
			
		||||
    procedure MJIDKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure Button1Click(Sender: TObject);
 | 
			
		||||
    procedure Button2Click(Sender: TObject);
 | 
			
		||||
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
    procedure FormShow(Sender: TObject);
 | 
			
		||||
    procedure CheckBox1Click(Sender: TObject);
 | 
			
		||||
    procedure Button1KeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
  private
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
    procedure On1201(Var Message:Tmessage);Message 1201;
 | 
			
		||||
    procedure PrintData();
 | 
			
		||||
  public
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmBangAdd: TfrmBangAdd;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
procedure TfrmBangAdd.On1201(Var Message:Tmessage);
 | 
			
		||||
var
 | 
			
		||||
  i1,i2:integer;
 | 
			
		||||
  unitname:string;
 | 
			
		||||
  fdata:double;
 | 
			
		||||
begin
 | 
			
		||||
  i1:=message.WParam;
 | 
			
		||||
  i2:=message.LParam;
 | 
			
		||||
 | 
			
		||||
  Edit1.Text:= floattostr(i1 *i2 /100000 );
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.MJIDKeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
begin
 | 
			
		||||
  if Key=#13 then
 | 
			
		||||
  begin
 | 
			
		||||
    with ADOTmp do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Add('select * from WFB_MJJY where MJID='''+Trim(MJID.Text)+'''');
 | 
			
		||||
      Open;
 | 
			
		||||
    end;
 | 
			
		||||
    if ADOTmp.IsEmpty=False then
 | 
			
		||||
    begin
 | 
			
		||||
      Label2.Visible:=True;
 | 
			
		||||
      Label2.Caption:=Trim(ADOTmp.fieldbyname('MJID').AsString);
 | 
			
		||||
    end else
 | 
			
		||||
    begin
 | 
			
		||||
      MJID.Text:='';
 | 
			
		||||
      Label2.Visible:=False;
 | 
			
		||||
      Label2.Caption:='';
 | 
			
		||||
      Application.MessageBox('条码错误!','提示',0);
 | 
			
		||||
      Exit;
 | 
			
		||||
    end;
 | 
			
		||||
    MJID.Text:='';
 | 
			
		||||
    Button1.SetFocus;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmBangAdd:=nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.Button1Click(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  FZG,FJD:string;
 | 
			
		||||
  FFreal,FMJMaoZ:Double;
 | 
			
		||||
begin
 | 
			
		||||
  if Label2.Caption='' then
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('未扫条码!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  if Trim(Edit1.Text)='' then
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('重量不能为空!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  with ADOTmp do
 | 
			
		||||
  begin
 | 
			
		||||
    Close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    SQL.Add('select * from WFB_MJJY where MJID='''+Trim(Label2.Caption)+'''');
 | 
			
		||||
    Open;
 | 
			
		||||
  end;
 | 
			
		||||
  if ADOTmp.FieldByName('MJMaoZ').AsFloat>0 then
 | 
			
		||||
  begin
 | 
			
		||||
    if Application.MessageBox('已称重,确定要重新称重吗?','提示',32+4)<>IDYES then Exit;
 | 
			
		||||
  end;
 | 
			
		||||
  if Trim(Edit2.Text)<>'' then
 | 
			
		||||
  begin
 | 
			
		||||
    if TryStrToFloat(Edit2.Text,FFreal)=False then
 | 
			
		||||
    begin
 | 
			
		||||
      Application.MessageBox('非法数字!','提示',0);
 | 
			
		||||
      Exit;
 | 
			
		||||
    end else
 | 
			
		||||
    begin
 | 
			
		||||
      FZG:=Edit2.Text;
 | 
			
		||||
    end;
 | 
			
		||||
  end else
 | 
			
		||||
  begin
 | 
			
		||||
    FZG:='0';
 | 
			
		||||
  end;
 | 
			
		||||
  if Trim(Edit3.Text)<>'' then
 | 
			
		||||
  begin
 | 
			
		||||
    if TryStrToFloat(Edit3.Text,FFreal)=False then
 | 
			
		||||
    begin
 | 
			
		||||
      Application.MessageBox('非法数字!','提示',0);
 | 
			
		||||
      Exit;
 | 
			
		||||
    end else
 | 
			
		||||
    begin
 | 
			
		||||
      FJD:=Edit3.Text;
 | 
			
		||||
    end;
 | 
			
		||||
  end else
 | 
			
		||||
  begin
 | 
			
		||||
    FJD:='0';
 | 
			
		||||
  end;
 | 
			
		||||
  FMJMaoZ:=StrToFloat(Edit1.Text)-StrToFloat(FZG);
 | 
			
		||||
  try
 | 
			
		||||
    ADOCmd.Connection.BeginTrans;
 | 
			
		||||
    with ADOCmd do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      sql.Clear;
 | 
			
		||||
      sql.Add('Update WFB_MJJY Set MJMaoZ='+Trim(Floattostr(FMJMaoZ)));
 | 
			
		||||
      sql.add(',MJQty1='+Trim(Edit1.Text));
 | 
			
		||||
      sql.add(',MJQty2='+Trim(FZG));
 | 
			
		||||
      sql.add(',MJQty3='+Trim(FJD));
 | 
			
		||||
      SQL.Add(' where MJID='''+Trim(Label2.Caption)+'''');
 | 
			
		||||
      ExecSQL;
 | 
			
		||||
    end;
 | 
			
		||||
    ADOCmd.Connection.CommitTrans;
 | 
			
		||||
    PrintData();
 | 
			
		||||
    Label2.Caption:='';
 | 
			
		||||
    Label2.Visible:=False;
 | 
			
		||||
    MJID.SetFocus;
 | 
			
		||||
    //Application.MessageBox('操作成功!','提示',0);
 | 
			
		||||
  except
 | 
			
		||||
    ADOCmd.Connection.RollbackTrans;
 | 
			
		||||
    Application.MessageBox('操作失败!','提示',0);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
procedure TfrmBangAdd.PrintData();
 | 
			
		||||
var
 | 
			
		||||
   fPrintFile,LabInt,LabName:String;
 | 
			
		||||
begin
 | 
			
		||||
  with ADOTmp do
 | 
			
		||||
  begin
 | 
			
		||||
    Close;
 | 
			
		||||
    SQL.Clear;
 | 
			
		||||
    sql.Add(' select C.SLbInt,C.SLbName from WFB_MJJY A');
 | 
			
		||||
    sql.Add(' inner join JYOrder_Sub_AnPai B on A.APID=B.APID');
 | 
			
		||||
    sql.Add(' inner join JYOrder_Sub C on B.SubId=C.SubId');
 | 
			
		||||
    sql.Add(' where A.MJID='''+Trim(Label2.Caption)+'''');
 | 
			
		||||
    Open;
 | 
			
		||||
  end;
 | 
			
		||||
  if ADOTmp.IsEmpty=False  then
 | 
			
		||||
  begin
 | 
			
		||||
    LabInt:=ADOTmp.fieldbyname('SLbInt').AsString;
 | 
			
		||||
    LabName:=ADOTmp.fieldbyname('SLbName').AsString;
 | 
			
		||||
  end ;
 | 
			
		||||
  if Trim(LabName)='' then 
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox('卷标签未设置!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  end;
 | 
			
		||||
 { try
 | 
			
		||||
    frmLabelPrint:=TfrmLabelPrint.Create(Application);
 | 
			
		||||
    with frmLabelPrint do
 | 
			
		||||
    begin
 | 
			
		||||
      fLabelId:=LabInt;
 | 
			
		||||
      FFCDFlag:=Trim(CDFlag);
 | 
			
		||||
      fKeyNo:=Trim(FXJID);
 | 
			
		||||
      fIsPreviewPrint:=True;
 | 
			
		||||
      frmLabelPrint.Button1.Click;
 | 
			
		||||
     // if ShowModal=1 then
 | 
			
		||||
      //begin
 | 
			
		||||
 | 
			
		||||
     // end;
 | 
			
		||||
    end;
 | 
			
		||||
  finally
 | 
			
		||||
    frmLabelPrint.Free;
 | 
			
		||||
  end;  }
 | 
			
		||||
  with ADOQueryPrint do
 | 
			
		||||
  begin
 | 
			
		||||
    Close;
 | 
			
		||||
    sql.Clear;
 | 
			
		||||
    SQL.Add('select D.OrderNo,C.PRTColor,C.PRTKZ,C.PRTType,D.OrdDefStr2,D.OrdDefStr3,D.OrdDefStr7,B.AOrdDefNote30,A.MJXH,B.GangNo');
 | 
			
		||||
    SQL.Add(',C.PRTMF,C.SOrddefstr3,C.SOrddefstr5,D.DlyDate,D.DLyPlace,A.MJMaoZ,B.AOrdDefNote31,C.SOrddefstr4,');
 | 
			
		||||
    SQL.Add('ColorEngName=(select top 1 Note from KH_Zdy E where E.ZdyName=C.PRTColor and E.Type=''OrdColor''  ),');
 | 
			
		||||
    {SQL.Add('MJBang=Cast((A.MJMaoZ*2.2046) as decimal(18,2)),');
 | 
			
		||||
    SQL.Add('MJMaoZBang=Cast(((A.MJQty1+A.MJQty3)*2.2046) as decimal(18,2)),');
 | 
			
		||||
    SQL.Add('MAQty=Cast((A.MJMaoZ*100*1000/(A.MJSJKZ*(A.MJFK*2.54))*0.9144) as decimal(18,2) ),');
 | 
			
		||||
    SQL.Add('MQty=Cast((A.MJMaoZ*100*1000/(A.MJSJKZ*(A.MJFK*2.54))) as decimal(18,2) ),');
 | 
			
		||||
    SQL.Add('MaoZ=A.MJQty1+A.MJQty3,');
 | 
			
		||||
    SQL.Add('JingZ=A.MJQty1-A.MJQty2'); }
 | 
			
		||||
    SQL.Add('MJBang=A.MJMaoZ,');
 | 
			
		||||
    SQL.Add('MJMaoZBang=A.MJQty1+A.MJQty3,');
 | 
			
		||||
    SQL.Add('MAQty=Cast((A.MJMaoZ*0.4536*100*1000/(A.MJSJKZ*(A.MJFK*2.54))*0.9144) as decimal(18,2) ),');
 | 
			
		||||
    SQL.Add('MQty=Cast((A.MJMaoZ*0.4536*100*1000/(A.MJSJKZ*(A.MJFK*2.54))) as decimal(18,2) ),');
 | 
			
		||||
    SQL.Add('MaoZ=Cast((A.MJQty1+A.MJQty3)*0.4536 as decimal(18,2)),');
 | 
			
		||||
    SQL.Add('JingZ=Cast((A.MJQty1-A.MJQty2)*0.4536 as decimal(18,2))');
 | 
			
		||||
    SQL.Add('from WFB_MJJY A inner join JYOrder_Sub_AnPai B on A.APID=B.APID');
 | 
			
		||||
    SQL.Add('inner join JYOrder_Sub C on B.SubId=C.SubId');
 | 
			
		||||
    SQL.Add('inner join JYOrder_Main D on C.MainId=D.Mainid');
 | 
			
		||||
    SQL.Add('where A.MJID='''+Trim(Label2.Caption)+'''');
 | 
			
		||||
    Open;
 | 
			
		||||
  end;
 | 
			
		||||
  fPrintFile:=ExtractFilePath(Application.ExeName)+'Report\'+Trim(LabName)+'.rmf' ;
 | 
			
		||||
  if FileExists(fPrintFile) then
 | 
			
		||||
  begin
 | 
			
		||||
    RM2.LoadFromFile(fPrintFile);
 | 
			
		||||
    //RM2.ShowReport;
 | 
			
		||||
    Rm2.PrintReport;
 | 
			
		||||
  end else
 | 
			
		||||
  begin
 | 
			
		||||
    Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\'+Trim(LabName)+'.rmf'),'提示',0);
 | 
			
		||||
  end;
 | 
			
		||||
 
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.Button2Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  Close;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
begin
 | 
			
		||||
  Action:=caFree;
 | 
			
		||||
  if CheckBox1.Checked=False then
 | 
			
		||||
    CommClose(pchar('com1'));
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if CommOpen(frmBangAdd.Handle,pchar('com1'),500,1)<1 then
 | 
			
		||||
  begin
 | 
			
		||||
    showmessage('串口打开失败!');
 | 
			
		||||
  end
 | 
			
		||||
  else
 | 
			
		||||
  begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.CheckBox1Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if CheckBox1.Checked=True then
 | 
			
		||||
  begin
 | 
			
		||||
    if CommOpen(frmBangAdd.Handle,pchar('com1'),500,1)<1 then
 | 
			
		||||
    begin
 | 
			
		||||
      showmessage('串口打开失败!');
 | 
			
		||||
    end
 | 
			
		||||
    else
 | 
			
		||||
    begin
 | 
			
		||||
    end;
 | 
			
		||||
  end else
 | 
			
		||||
  begin
 | 
			
		||||
    CommClose(pchar('com1'));
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBangAdd.Button1KeyPress(Sender: TObject; var Key: Char);
 | 
			
		||||
begin
 | 
			
		||||
  if Key=#13 then
 | 
			
		||||
  begin
 | 
			
		||||
    Button1.Click;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										292
									
								
								桂华管理系统/桂华管理系统/U_BefChkHX.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										292
									
								
								桂华管理系统/桂华管理系统/U_BefChkHX.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,292 @@
 | 
			
		|||
object frmBefChkHX: TfrmBefChkHX
 | 
			
		||||
  Left = 215
 | 
			
		||||
  Top = 176
 | 
			
		||||
  Width = 870
 | 
			
		||||
  Height = 534
 | 
			
		||||
  Caption = #26816#21069#22238#20462
 | 
			
		||||
  Color = clBtnFace
 | 
			
		||||
  Font.Charset = GB2312_CHARSET
 | 
			
		||||
  Font.Color = clWindowText
 | 
			
		||||
  Font.Height = -12
 | 
			
		||||
  Font.Name = #23435#20307
 | 
			
		||||
  Font.Style = []
 | 
			
		||||
  OldCreateOrder = False
 | 
			
		||||
  OnClose = FormClose
 | 
			
		||||
  OnDestroy = FormDestroy
 | 
			
		||||
  OnShow = FormShow
 | 
			
		||||
  PixelsPerInch = 96
 | 
			
		||||
  TextHeight = 12
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 32
 | 
			
		||||
    Width = 862
 | 
			
		||||
    Height = 73
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    TabOrder = 0
 | 
			
		||||
    object orderno: TLabel
 | 
			
		||||
      Left = 48
 | 
			
		||||
      Top = 24
 | 
			
		||||
      Width = 89
 | 
			
		||||
      Height = 16
 | 
			
		||||
      Caption = 'orderno'
 | 
			
		||||
      Font.Charset = ANSI_CHARSET
 | 
			
		||||
      Font.Color = clRed
 | 
			
		||||
      Font.Height = -16
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object PRTColor: TLabel
 | 
			
		||||
      Left = 168
 | 
			
		||||
      Top = 24
 | 
			
		||||
      Width = 89
 | 
			
		||||
      Height = 16
 | 
			
		||||
      Caption = 'PRTColor'
 | 
			
		||||
      Font.Charset = ANSI_CHARSET
 | 
			
		||||
      Font.Color = clRed
 | 
			
		||||
      Font.Height = -16
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object FirstName: TLabel
 | 
			
		||||
      Left = 296
 | 
			
		||||
      Top = 24
 | 
			
		||||
      Width = 105
 | 
			
		||||
      Height = 16
 | 
			
		||||
      Caption = 'FirstName'
 | 
			
		||||
      Font.Charset = ANSI_CHARSET
 | 
			
		||||
      Font.Color = clRed
 | 
			
		||||
      Font.Height = -16
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
    object PBFactory: TLabel
 | 
			
		||||
      Left = 464
 | 
			
		||||
      Top = 24
 | 
			
		||||
      Width = 105
 | 
			
		||||
      Height = 16
 | 
			
		||||
      Caption = 'PBFactory'
 | 
			
		||||
      Font.Charset = ANSI_CHARSET
 | 
			
		||||
      Font.Color = clRed
 | 
			
		||||
      Font.Height = -16
 | 
			
		||||
      Font.Name = #23435#20307
 | 
			
		||||
      Font.Style = [fsBold]
 | 
			
		||||
      ParentFont = False
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ToolBar2: TToolBar
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 0
 | 
			
		||||
    Width = 862
 | 
			
		||||
    AutoSize = True
 | 
			
		||||
    ButtonHeight = 30
 | 
			
		||||
    ButtonWidth = 59
 | 
			
		||||
    Caption = 'ToolBar1'
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    Flat = True
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clWindowText
 | 
			
		||||
    Font.Height = -12
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = []
 | 
			
		||||
    Images = DataLink_TradeManage.ThreeImgList
 | 
			
		||||
    List = True
 | 
			
		||||
    ParentColor = False
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    ShowCaptions = True
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object ToolButton2: TToolButton
 | 
			
		||||
      Left = 0
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #22686#34892
 | 
			
		||||
      ImageIndex = 103
 | 
			
		||||
      OnClick = ToolButton2Click
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton3: TToolButton
 | 
			
		||||
      Left = 63
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #21024#34892
 | 
			
		||||
      ImageIndex = 107
 | 
			
		||||
      OnClick = ToolButton3Click
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton4: TToolButton
 | 
			
		||||
      Left = 126
 | 
			
		||||
      Top = 0
 | 
			
		||||
      Caption = #20445#23384
 | 
			
		||||
      ImageIndex = 111
 | 
			
		||||
      OnClick = ToolButton4Click
 | 
			
		||||
    end
 | 
			
		||||
    object ToolButton1: TToolButton
 | 
			
		||||
      Left = 185
 | 
			
		||||
      Top = 0
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      ImageIndex = 55
 | 
			
		||||
      OnClick = ToolButton1Click
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid2: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 105
 | 
			
		||||
    Width = 862
 | 
			
		||||
    Height = 392
 | 
			
		||||
    Align = alClient
 | 
			
		||||
    TabOrder = 2
 | 
			
		||||
    object TV2: TcxGridDBTableView
 | 
			
		||||
      NavigatorButtons.ConfirmDelete = False
 | 
			
		||||
      DataController.DataSource = DataSource1
 | 
			
		||||
      DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
 | 
			
		||||
      DataController.Summary.DefaultGroupSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Format = '0'
 | 
			
		||||
          Position = spFooter
 | 
			
		||||
          Column = V2Column1
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = V2Column1
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = V2Column7
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsBehavior.GoToNextCellOnEnter = True
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      Styles.Inactive = DataLink_TradeManage.SHuangSe
 | 
			
		||||
      Styles.IncSearch = DataLink_TradeManage.SHuangSe
 | 
			
		||||
      Styles.Selection = DataLink_TradeManage.SHuangSe
 | 
			
		||||
      Styles.Header = DataLink_TradeManage.Default
 | 
			
		||||
      object V2Column2: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #22238#20462#26102#38388
 | 
			
		||||
        DataBinding.FieldName = 'HXDate'
 | 
			
		||||
        PropertiesClassName = 'TcxDateEditProperties'
 | 
			
		||||
        Properties.SaveTime = False
 | 
			
		||||
        Properties.ShowTime = False
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 96
 | 
			
		||||
      end
 | 
			
		||||
      object V2Column8: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #26579#21378
 | 
			
		||||
        DataBinding.FieldName = 'HXFactory'
 | 
			
		||||
        PropertiesClassName = 'TcxButtonEditProperties'
 | 
			
		||||
        Properties.Buttons = <
 | 
			
		||||
          item
 | 
			
		||||
            Default = True
 | 
			
		||||
            Kind = bkEllipsis
 | 
			
		||||
          end>
 | 
			
		||||
        Properties.ReadOnly = True
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 84
 | 
			
		||||
      end
 | 
			
		||||
      object V2Column7: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #21305#25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'HXPS'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 50
 | 
			
		||||
      end
 | 
			
		||||
      object V2Column1: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'HXQty'
 | 
			
		||||
        PropertiesClassName = 'TcxTextEditProperties'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Styles.Header = DataLink_TradeManage.FonePurple
 | 
			
		||||
        Width = 69
 | 
			
		||||
      end
 | 
			
		||||
      object V2Column5: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #25968#37327#21333#20301
 | 
			
		||||
        DataBinding.FieldName = 'HXUnit'
 | 
			
		||||
        PropertiesClassName = 'TcxComboBoxProperties'
 | 
			
		||||
        Properties.DropDownListStyle = lsFixedList
 | 
			
		||||
        Properties.Items.Strings = (
 | 
			
		||||
          'M'
 | 
			
		||||
          'Kg')
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 74
 | 
			
		||||
      end
 | 
			
		||||
      object V2Column3: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #25240#31639#31859#31995#25968
 | 
			
		||||
        DataBinding.FieldName = 'ZSXS'
 | 
			
		||||
        Width = 72
 | 
			
		||||
      end
 | 
			
		||||
      object V2Column6: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #22791#27880
 | 
			
		||||
        DataBinding.FieldName = 'HXNote'
 | 
			
		||||
        PropertiesClassName = 'TcxButtonEditProperties'
 | 
			
		||||
        Properties.Buttons = <
 | 
			
		||||
          item
 | 
			
		||||
            Default = True
 | 
			
		||||
            Kind = bkEllipsis
 | 
			
		||||
          end>
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 123
 | 
			
		||||
      end
 | 
			
		||||
      object V2Column4: TcxGridDBColumn
 | 
			
		||||
        Tag = 2
 | 
			
		||||
        Caption = #31867#22411
 | 
			
		||||
        DataBinding.FieldName = 'HXType'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Options.Focusing = False
 | 
			
		||||
        Width = 71
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGridLevel1: TcxGridLevel
 | 
			
		||||
      GridView = TV2
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQuery1: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 352
 | 
			
		||||
    Top = 8
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQuery2: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 512
 | 
			
		||||
    Top = 8
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQuery3: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 440
 | 
			
		||||
    Top = 8
 | 
			
		||||
  end
 | 
			
		||||
  object ClientDataSet1: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 448
 | 
			
		||||
    Top = 216
 | 
			
		||||
  end
 | 
			
		||||
  object DataSource1: TDataSource
 | 
			
		||||
    DataSet = ClientDataSet1
 | 
			
		||||
    Left = 480
 | 
			
		||||
    Top = 224
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu1: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid2
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 312
 | 
			
		||||
    Top = 256
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										189
									
								
								桂华管理系统/桂华管理系统/U_BefChkHX.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										189
									
								
								桂华管理系统/桂华管理系统/U_BefChkHX.pas
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,189 @@
 | 
			
		|||
unit U_BefChkHX;
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
uses
 | 
			
		||||
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 | 
			
		||||
  Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
 | 
			
		||||
  cxDataStorage, cxEdit, DB, cxDBData, cxCalendar, cxButtonEdit,
 | 
			
		||||
  cxTextEdit, StdCtrls, cxGridLevel, cxGridCustomTableView,
 | 
			
		||||
  cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
 | 
			
		||||
  cxGridCustomView, cxGrid, ComCtrls, ToolWin, ExtCtrls, cxDropDownEdit,
 | 
			
		||||
  DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu;
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TfrmBefChkHX = class(TForm)
 | 
			
		||||
    Panel1: TPanel;
 | 
			
		||||
    ToolBar2: TToolBar;
 | 
			
		||||
    ToolButton2: TToolButton;
 | 
			
		||||
    ToolButton3: TToolButton;
 | 
			
		||||
    ToolButton4: TToolButton;
 | 
			
		||||
    cxGrid2: TcxGrid;
 | 
			
		||||
    TV2: TcxGridDBTableView;
 | 
			
		||||
    V2Column2: TcxGridDBColumn;
 | 
			
		||||
    V2Column8: TcxGridDBColumn;
 | 
			
		||||
    V2Column7: TcxGridDBColumn;
 | 
			
		||||
    V2Column1: TcxGridDBColumn;
 | 
			
		||||
    V2Column5: TcxGridDBColumn;
 | 
			
		||||
    V2Column6: TcxGridDBColumn;
 | 
			
		||||
    cxGridLevel1: TcxGridLevel;
 | 
			
		||||
    orderno: TLabel;
 | 
			
		||||
    PRTColor: TLabel;
 | 
			
		||||
    FirstName: TLabel;
 | 
			
		||||
    PBFactory: TLabel;
 | 
			
		||||
    V2Column3: TcxGridDBColumn;
 | 
			
		||||
    ADOQuery1: TADOQuery;
 | 
			
		||||
    ADOQuery2: TADOQuery;
 | 
			
		||||
    ADOQuery3: TADOQuery;
 | 
			
		||||
    ClientDataSet1: TClientDataSet;
 | 
			
		||||
    DataSource1: TDataSource;
 | 
			
		||||
    ToolButton1: TToolButton;
 | 
			
		||||
    cxGridPopupMenu1: TcxGridPopupMenu;
 | 
			
		||||
    V2Column4: TcxGridDBColumn;
 | 
			
		||||
    procedure FormDestroy(Sender: TObject);
 | 
			
		||||
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
			
		||||
    procedure ToolButton2Click(Sender: TObject);
 | 
			
		||||
    procedure ToolButton3Click(Sender: TObject);
 | 
			
		||||
    procedure ToolButton4Click(Sender: TObject);
 | 
			
		||||
    procedure ToolButton1Click(Sender: TObject);
 | 
			
		||||
    procedure FormShow(Sender: TObject);
 | 
			
		||||
  private
 | 
			
		||||
    { Private declarations }
 | 
			
		||||
  public
 | 
			
		||||
    { Public declarations }
 | 
			
		||||
    FLLID:String;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  frmBefChkHX: TfrmBefChkHX;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
uses
 | 
			
		||||
U_DataLink,U_Fun;
 | 
			
		||||
 | 
			
		||||
{$R *.dfm}
 | 
			
		||||
 | 
			
		||||
procedure TfrmBefChkHX.FormDestroy(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  frmBefChkHX:=nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBefChkHX.FormClose(Sender: TObject;
 | 
			
		||||
  var Action: TCloseAction);
 | 
			
		||||
begin
 | 
			
		||||
  Action:=caFree;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBefChkHX.ToolButton2Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  with ClientDataSet1 do
 | 
			
		||||
  begin
 | 
			
		||||
    Append;
 | 
			
		||||
    FieldByName('HXFactory').Value:=Trim(FirstName.Caption);
 | 
			
		||||
    FieldByName('HXDate').Value:=SGetServerDate(ADOQuery2);
 | 
			
		||||
    FieldByName('HXType').Value:='检前回修';
 | 
			
		||||
    Post;
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBefChkHX.ToolButton3Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  if ClientDataSet1.IsEmpty then Exit;
 | 
			
		||||
  if Trim(ClientDataSet1.fieldbyname('HXType').AsString)<>'检前回修' then Exit;
 | 
			
		||||
  if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
 | 
			
		||||
  with ADOQuery3 do
 | 
			
		||||
  begin
 | 
			
		||||
    Close;
 | 
			
		||||
    SQL.Clear;
 | 
			
		||||
    SQL.Add('delete Contract_Cloth_BefChkHX  where HXID='''+Trim(ClientDataSet1.fieldbyname('HXID').AsString)+'''');
 | 
			
		||||
    sql.Add('Update Contract_Cloth_LL Set HXPS=(select sum(HXPS) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
    sql.Add(',HXQty=(select sum(HXQty) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
    sql.Add(',HXMQty=(select sum(HXMQty) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
    sql.Add(',HXUnit=(select Top 1 HXUnit from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
    sql.Add(' where LLID='''+Trim(FLLID)+'''');
 | 
			
		||||
    ExecSQL;
 | 
			
		||||
  end;
 | 
			
		||||
  ClientDataSet1.Delete;
 | 
			
		||||
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBefChkHX.ToolButton4Click(Sender: TObject);
 | 
			
		||||
var
 | 
			
		||||
  maxno:string;
 | 
			
		||||
begin
 | 
			
		||||
  try
 | 
			
		||||
    ADOQuery3.Connection.BeginTrans;
 | 
			
		||||
    with ClientDataSet1 do
 | 
			
		||||
    begin
 | 
			
		||||
      First;
 | 
			
		||||
      while not Eof do
 | 
			
		||||
      begin
 | 
			
		||||
        if Trim(ClientDataSet1.fieldbyname('HXType').AsString)='检前回修' then
 | 
			
		||||
        begin
 | 
			
		||||
          if Trim(ClientDataSet1.fieldbyname('HXID').AsString)='' then
 | 
			
		||||
          begin
 | 
			
		||||
            if GetLSNo(ADOQuery3,maxno,'HX','Contract_Cloth_BefChkHX',2,1)=False then
 | 
			
		||||
            begin
 | 
			
		||||
              ADOQuery3.Connection.RollbackTrans;
 | 
			
		||||
              Application.MessageBox('取回修最大号失败!','提示',0);
 | 
			
		||||
              Exit;
 | 
			
		||||
            end;
 | 
			
		||||
          end else
 | 
			
		||||
          begin
 | 
			
		||||
            maxno:=Trim(ClientDataSet1.fieldbyname('HXID').AsString);
 | 
			
		||||
          end;
 | 
			
		||||
          with ADOQuery3 do
 | 
			
		||||
          begin
 | 
			
		||||
            Close;
 | 
			
		||||
            sql.Clear;
 | 
			
		||||
            sql.Add('select * from Contract_Cloth_BefChkHX where HXID='''+Trim(ClientDataSet1.fieldbyname('HXID').AsString)+'''');
 | 
			
		||||
            Open;
 | 
			
		||||
          end;
 | 
			
		||||
          with ADOQuery3 do
 | 
			
		||||
          begin
 | 
			
		||||
            if Trim(ClientDataSet1.fieldbyname('HXID').AsString)='' then
 | 
			
		||||
              Append
 | 
			
		||||
            else
 | 
			
		||||
              Edit;
 | 
			
		||||
            FieldByName('LLID').Value:=Trim(FLLID);
 | 
			
		||||
            FieldByName('HXID').Value:=Trim(maxno);
 | 
			
		||||
            SSetSaveDataCDSNew(ADOQuery3,TV2,ClientDataSet1,'Contract_Cloth_BefChkHX',2);
 | 
			
		||||
            Post;
 | 
			
		||||
          end;
 | 
			
		||||
        end;
 | 
			
		||||
        Next;
 | 
			
		||||
      end;
 | 
			
		||||
    end;
 | 
			
		||||
    with ADOQuery3 do
 | 
			
		||||
    begin
 | 
			
		||||
      Close;
 | 
			
		||||
      SQL.Clear;
 | 
			
		||||
      SQL.Add('Update Contract_Cloth_BefChkHX Set HXMQty=HXQty*ZSXS where LLID='''+Trim(FLLID)+'''');
 | 
			
		||||
      sql.Add('Update Contract_Cloth_LL Set HXPS=(select sum(HXPS) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
      sql.Add(',HXQty=(select sum(HXQty) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
      sql.Add(',HXMQty=(select sum(HXMQty) from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
      sql.Add(',HXUnit=(select Top 1 HXUnit from Contract_Cloth_BefChkHX A where A.LLID=Contract_Cloth_LL.LLID)');
 | 
			
		||||
      sql.Add(' where LLID='''+Trim(FLLID)+'''');
 | 
			
		||||
      ExecSQL;
 | 
			
		||||
    end;
 | 
			
		||||
    ADOQuery3.Connection.CommitTrans;
 | 
			
		||||
    Application.MessageBox('保存成功!','提示',0);
 | 
			
		||||
    Exit;
 | 
			
		||||
  except
 | 
			
		||||
    ADOQuery3.Connection.RollbackTrans;
 | 
			
		||||
    Application.MessageBox('保存异常!','提示',0);
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBefChkHX.ToolButton1Click(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  Close;
 | 
			
		||||
  WriteCxGrid('检前回修',TV2,'回仓管理');
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TfrmBefChkHX.FormShow(Sender: TObject);
 | 
			
		||||
begin
 | 
			
		||||
  ReadCxGrid('检前回修',TV2,'回仓管理');
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										403
									
								
								桂华管理系统/桂华管理系统/U_CKEJK.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										403
									
								
								桂华管理系统/桂华管理系统/U_CKEJK.dfm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,403 @@
 | 
			
		|||
object frmCKEJK: TfrmCKEJK
 | 
			
		||||
  Left = -27
 | 
			
		||||
  Top = 117
 | 
			
		||||
  Width = 1262
 | 
			
		||||
  Height = 623
 | 
			
		||||
  Caption = #25104#21697#24211#23384#27719#24635#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 = 1246
 | 
			
		||||
    Height = 33
 | 
			
		||||
    ButtonHeight = 30
 | 
			
		||||
    ButtonWidth = 59
 | 
			
		||||
    Caption = 'ToolBar1'
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    Flat = True
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clWindowText
 | 
			
		||||
    Font.Height = -12
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = []
 | 
			
		||||
    Images = DataLink_TradeManage.ThreeImgList
 | 
			
		||||
    List = True
 | 
			
		||||
    ParentColor = False
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    ShowCaptions = True
 | 
			
		||||
    TabOrder = 0
 | 
			
		||||
    object TBRafresh: TToolButton
 | 
			
		||||
      Left = 0
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #21047#26032
 | 
			
		||||
      ImageIndex = 9
 | 
			
		||||
      OnClick = TBRafreshClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBFind: TToolButton
 | 
			
		||||
      Left = 63
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #36807#28388
 | 
			
		||||
      ImageIndex = 59
 | 
			
		||||
      OnClick = TBFindClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBExport: TToolButton
 | 
			
		||||
      Left = 126
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #23548#20986
 | 
			
		||||
      ImageIndex = 75
 | 
			
		||||
      OnClick = TBExportClick
 | 
			
		||||
    end
 | 
			
		||||
    object TBPrint: TToolButton
 | 
			
		||||
      Left = 189
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #25171#21360
 | 
			
		||||
      ImageIndex = 12
 | 
			
		||||
      Visible = False
 | 
			
		||||
    end
 | 
			
		||||
    object TBClose: TToolButton
 | 
			
		||||
      Left = 252
 | 
			
		||||
      Top = 0
 | 
			
		||||
      AutoSize = True
 | 
			
		||||
      Caption = #20851#38381
 | 
			
		||||
      ImageIndex = 55
 | 
			
		||||
      OnClick = TBCloseClick
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object Panel1: TPanel
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 33
 | 
			
		||||
    Width = 1246
 | 
			
		||||
    Height = 40
 | 
			
		||||
    Align = alTop
 | 
			
		||||
    BevelInner = bvRaised
 | 
			
		||||
    BevelOuter = bvLowered
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    TabOrder = 1
 | 
			
		||||
    object Label3: TLabel
 | 
			
		||||
      Left = 307
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20135#21697#21517#31216
 | 
			
		||||
    end
 | 
			
		||||
    object Label4: TLabel
 | 
			
		||||
      Left = 512
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 24
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #39068#33394
 | 
			
		||||
    end
 | 
			
		||||
    object Label1: TLabel
 | 
			
		||||
      Left = 28
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20986#24211#26085#26399
 | 
			
		||||
    end
 | 
			
		||||
    object Label2: TLabel
 | 
			
		||||
      Left = 172
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 6
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = '-'
 | 
			
		||||
    end
 | 
			
		||||
    object Label5: TLabel
 | 
			
		||||
      Left = 32
 | 
			
		||||
      Top = 52
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20219#21153#21333#21495
 | 
			
		||||
    end
 | 
			
		||||
    object Label6: TLabel
 | 
			
		||||
      Left = 36
 | 
			
		||||
      Top = 76
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #26465'    '#30721
 | 
			
		||||
    end
 | 
			
		||||
    object Label8: TLabel
 | 
			
		||||
      Left = 195
 | 
			
		||||
      Top = 92
 | 
			
		||||
      Width = 48
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #20811'    '#37325
 | 
			
		||||
    end
 | 
			
		||||
    object Label9: TLabel
 | 
			
		||||
      Left = 428
 | 
			
		||||
      Top = 92
 | 
			
		||||
      Width = 24
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #38376#24133
 | 
			
		||||
    end
 | 
			
		||||
    object Label7: TLabel
 | 
			
		||||
      Left = 510
 | 
			
		||||
      Top = 68
 | 
			
		||||
      Width = 24
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #31867#22411
 | 
			
		||||
    end
 | 
			
		||||
    object Label10: TLabel
 | 
			
		||||
      Left = 676
 | 
			
		||||
      Top = 12
 | 
			
		||||
      Width = 72
 | 
			
		||||
      Height = 12
 | 
			
		||||
      Caption = #40857#36816#20837#24211#29366#24577
 | 
			
		||||
    end
 | 
			
		||||
    object C_CodeName: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 360
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 0
 | 
			
		||||
      OnChange = C_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object C_Color: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 540
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 1
 | 
			
		||||
      OnChange = C_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object BegDate: TDateTimePicker
 | 
			
		||||
      Left = 81
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 87
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Date = 40768.458268587970000000
 | 
			
		||||
      Time = 40768.458268587970000000
 | 
			
		||||
      TabOrder = 2
 | 
			
		||||
    end
 | 
			
		||||
    object EndDate: TDateTimePicker
 | 
			
		||||
      Left = 181
 | 
			
		||||
      Top = 9
 | 
			
		||||
      Width = 87
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Date = 40768.458268587970000000
 | 
			
		||||
      Time = 40768.458268587970000000
 | 
			
		||||
      TabOrder = 3
 | 
			
		||||
    end
 | 
			
		||||
    object conNO: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 78
 | 
			
		||||
      Top = 45
 | 
			
		||||
      Width = 109
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 4
 | 
			
		||||
      OnChange = C_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object MJID: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 86
 | 
			
		||||
      Top = 73
 | 
			
		||||
      Width = 109
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 5
 | 
			
		||||
      OnChange = C_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object KZ: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 240
 | 
			
		||||
      Top = 89
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 6
 | 
			
		||||
      OnChange = C_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object MF: TEdit
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 452
 | 
			
		||||
      Top = 88
 | 
			
		||||
      Width = 100
 | 
			
		||||
      Height = 20
 | 
			
		||||
      TabOrder = 7
 | 
			
		||||
      OnChange = C_CodeNameChange
 | 
			
		||||
    end
 | 
			
		||||
    object CPType: TComboBox
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 536
 | 
			
		||||
      Top = 64
 | 
			
		||||
      Width = 68
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      TabOrder = 8
 | 
			
		||||
      OnChange = TBFindClick
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        #27491#21697
 | 
			
		||||
        #27425#21697
 | 
			
		||||
        #30041#26679
 | 
			
		||||
        '')
 | 
			
		||||
    end
 | 
			
		||||
    object CKFlag: TComboBox
 | 
			
		||||
      Tag = 2
 | 
			
		||||
      Left = 756
 | 
			
		||||
      Top = 8
 | 
			
		||||
      Width = 101
 | 
			
		||||
      Height = 20
 | 
			
		||||
      Style = csDropDownList
 | 
			
		||||
      ItemHeight = 12
 | 
			
		||||
      TabOrder = 9
 | 
			
		||||
      OnChange = C_CodeNameChange
 | 
			
		||||
      Items.Strings = (
 | 
			
		||||
        ''
 | 
			
		||||
        #26410#20837#24211
 | 
			
		||||
        #24050#20837#24211
 | 
			
		||||
        '')
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object cxGrid2: TcxGrid
 | 
			
		||||
    Left = 0
 | 
			
		||||
    Top = 73
 | 
			
		||||
    Width = 1246
 | 
			
		||||
    Height = 512
 | 
			
		||||
    Align = alClient
 | 
			
		||||
    TabOrder = 2
 | 
			
		||||
    object Tv1: TcxGridDBTableView
 | 
			
		||||
      NavigatorButtons.ConfirmDelete = False
 | 
			
		||||
      DataController.DataSource = DataSource1
 | 
			
		||||
      DataController.Summary.DefaultGroupSummaryItems = <>
 | 
			
		||||
      DataController.Summary.FooterSummaryItems = <
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column4
 | 
			
		||||
        end
 | 
			
		||||
        item
 | 
			
		||||
          Kind = skSum
 | 
			
		||||
          Column = v1Column5
 | 
			
		||||
        end>
 | 
			
		||||
      DataController.Summary.SummaryGroups = <>
 | 
			
		||||
      OptionsCustomize.ColumnFiltering = False
 | 
			
		||||
      OptionsSelection.CellSelect = False
 | 
			
		||||
      OptionsView.Footer = True
 | 
			
		||||
      OptionsView.GroupByBox = False
 | 
			
		||||
      Styles.Inactive = DataLink_TradeManage.SHuangSe
 | 
			
		||||
      Styles.IncSearch = DataLink_TradeManage.SHuangSe
 | 
			
		||||
      Styles.Selection = DataLink_TradeManage.SHuangSe
 | 
			
		||||
      Styles.Header = DataLink_TradeManage.Default
 | 
			
		||||
      object v1Column1: TcxGridDBColumn
 | 
			
		||||
        Caption = #20986#24211#26085#26399
 | 
			
		||||
        DataBinding.FieldName = 'CRTime'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 158
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column2: TcxGridDBColumn
 | 
			
		||||
        Caption = #20135#21697#21517#31216
 | 
			
		||||
        DataBinding.FieldName = 'C_CodeName'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 127
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column3: TcxGridDBColumn
 | 
			
		||||
        Caption = #39068#33394
 | 
			
		||||
        DataBinding.FieldName = 'C_Color'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 114
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column4: TcxGridDBColumn
 | 
			
		||||
        Caption = #26607#26725#20986#24211#25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'Qty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 123
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column5: TcxGridDBColumn
 | 
			
		||||
        Caption = #40857#36816#20837#24211#25968#37327
 | 
			
		||||
        DataBinding.FieldName = 'LYQty'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 100
 | 
			
		||||
      end
 | 
			
		||||
      object v1Column6: TcxGridDBColumn
 | 
			
		||||
        Caption = #40857#36816#20837#24211#29366#24577
 | 
			
		||||
        DataBinding.FieldName = 'CKFlag'
 | 
			
		||||
        HeaderAlignmentHorz = taCenter
 | 
			
		||||
        Width = 129
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    object cxGrid2Level1: TcxGridLevel
 | 
			
		||||
      GridView = Tv1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  object MovePanel2: TMovePanel
 | 
			
		||||
    Left = 408
 | 
			
		||||
    Top = 192
 | 
			
		||||
    Width = 289
 | 
			
		||||
    Height = 49
 | 
			
		||||
    BevelInner = bvLowered
 | 
			
		||||
    Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
 | 
			
		||||
    Color = clSkyBlue
 | 
			
		||||
    Font.Charset = GB2312_CHARSET
 | 
			
		||||
    Font.Color = clRed
 | 
			
		||||
    Font.Height = -14
 | 
			
		||||
    Font.Name = #23435#20307
 | 
			
		||||
    Font.Style = [fsBold]
 | 
			
		||||
    ParentFont = False
 | 
			
		||||
    TabOrder = 3
 | 
			
		||||
    Visible = False
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryCmd: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 968
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryMain: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 984
 | 
			
		||||
    Top = 40
 | 
			
		||||
  end
 | 
			
		||||
  object ADOQueryTemp: TADOQuery
 | 
			
		||||
    Connection = DataLink_TradeManage.ADOLink
 | 
			
		||||
    LockType = ltReadOnly
 | 
			
		||||
    Parameters = <>
 | 
			
		||||
    Left = 944
 | 
			
		||||
    Top = 32
 | 
			
		||||
  end
 | 
			
		||||
  object DataSource1: TDataSource
 | 
			
		||||
    DataSet = CDS_Main
 | 
			
		||||
    Left = 920
 | 
			
		||||
    Top = 152
 | 
			
		||||
  end
 | 
			
		||||
  object cxGridPopupMenu1: TcxGridPopupMenu
 | 
			
		||||
    Grid = cxGrid2
 | 
			
		||||
    PopupMenus = <>
 | 
			
		||||
    Left = 888
 | 
			
		||||
    Top = 144
 | 
			
		||||
  end
 | 
			
		||||
  object CDS_Main: TClientDataSet
 | 
			
		||||
    Aggregates = <>
 | 
			
		||||
    Params = <>
 | 
			
		||||
    Left = 896
 | 
			
		||||
    Top = 128
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										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"c:\program files\borland\delphi7\Projects\Bpl"
 | 
			
		||||
-LN"c:\program files\borland\delphi7\Projects\Bpl"
 | 
			
		||||
-w-UNSAFE_TYPE
 | 
			
		||||
-w-UNSAFE_CODE
 | 
			
		||||
-w-UNSAFE_CAST
 | 
			
		||||
							
								
								
									
										136
									
								
								桂华管理系统/桂华管理系统/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=D:\selfware_83398\selfware\马国钢开发代码\项目代码\self\路展贸易管理\testDll.exe
 | 
			
		||||
Launcher=
 | 
			
		||||
UseLauncher=0
 | 
			
		||||
DebugCWD=
 | 
			
		||||
[Language]
 | 
			
		||||
ActiveLang=
 | 
			
		||||
ProjectLang=
 | 
			
		||||
RootDir=
 | 
			
		||||
[Version Info]
 | 
			
		||||
IncludeVerInfo=0
 | 
			
		||||
AutoIncBuild=0
 | 
			
		||||
MajorVer=1
 | 
			
		||||
MinorVer=0
 | 
			
		||||
Release=0
 | 
			
		||||
Build=0
 | 
			
		||||
Debug=0
 | 
			
		||||
PreRelease=0
 | 
			
		||||
Special=0
 | 
			
		||||
Private=0
 | 
			
		||||
DLL=0
 | 
			
		||||
Locale=2052
 | 
			
		||||
CodePage=936
 | 
			
		||||
[Version Info Keys]
 | 
			
		||||
CompanyName=
 | 
			
		||||
FileDescription=
 | 
			
		||||
FileVersion=1.0.0.0
 | 
			
		||||
InternalName=
 | 
			
		||||
LegalCopyright=
 | 
			
		||||
LegalTrademarks=
 | 
			
		||||
OriginalFilename=
 | 
			
		||||
ProductName=
 | 
			
		||||
ProductVersion=1.0.0.0
 | 
			
		||||
Comments=
 | 
			
		||||
							
								
								
									
										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.
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user