0
This commit is contained in:
commit
dfe0c003b2
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
**/layout
|
||||
**/report
|
||||
**/实施文件
|
||||
**/image
|
||||
**/doc
|
||||
**/wav
|
||||
**/__history
|
||||
**/__recovery
|
||||
*.dll
|
||||
*.exe
|
||||
*.ddp
|
||||
*.dcu
|
||||
*.~pas
|
||||
*.~dfm
|
||||
*.~ddp
|
||||
*.~dpr
|
||||
3
产品报价(ProductQuotation)/Desktop.ini
Normal file
3
产品报价(ProductQuotation)/Desktop.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[.ShellClassInfo]
|
||||
IconFile=C:\Program Files (x86)\360\360WangPan\new_desktop_win7.ico
|
||||
IconIndex=0
|
||||
4
产品报价(ProductQuotation)/File.INI
Normal file
4
产品报价(ProductQuotation)/File.INI
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=99
|
||||
成品DLL文件=CYZZ.dll
|
||||
成品DLL调用号=11
|
||||
7
产品报价(ProductQuotation)/FileHelp.ini
Normal file
7
产品报价(ProductQuotation)/FileHelp.ini
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[FILEPATH]
|
||||
FileClass=YP,AA,BB,HT
|
||||
YP=D:\YP
|
||||
AA=D:\AA
|
||||
BB=D:\BB
|
||||
HT=D:\HT
|
||||
OTHER=D:\OTHER
|
||||
7
产品报价(ProductQuotation)/JCYData.INI
Normal file
7
产品报价(ProductQuotation)/JCYData.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com1
|
||||
波特率=9600
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
7
产品报价(ProductQuotation)/JZCRS323C.INI
Normal file
7
产品报价(ProductQuotation)/JZCRS323C.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com2
|
||||
波特率=1200
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
0
产品报价(ProductQuotation)/JZCRS323CList.txt
Normal file
0
产品报价(ProductQuotation)/JZCRS323CList.txt
Normal file
42
产品报价(ProductQuotation)/ProductQuotation.cfg
Normal file
42
产品报价(ProductQuotation)/ProductQuotation.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
|
||||
134
产品报价(ProductQuotation)/ProductQuotation.dof
Normal file
134
产品报价(ProductQuotation)/ProductQuotation.dof
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
[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:\凌志超开发代码\项目代码\振增\产品报价(ProductQuotation)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[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
|
||||
48
产品报价(ProductQuotation)/ProductQuotation.dpr
Normal file
48
产品报价(ProductQuotation)/ProductQuotation.dpr
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
library ProductQuotation;
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_RTFun in '..\..\..\RTFunAndForm\Fun\U_RTFun.pas',
|
||||
U_ModuleNote in 'U_ModuleNote.pas' {frmModuleNote},
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_ProductQuotation: TDataModule},
|
||||
U_ZDYHelpSel in 'U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||
U_iniParam in 'U_iniParam.pas',
|
||||
U_ZDYHelp in 'U_ZDYHelp.pas' {frmZDYHelp},
|
||||
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_ColumnBandSet in '..\..\..\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
|
||||
U_SelPrintFieldNew in '..\..\..\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
procedure DllEnterPoint(dwReason: DWORD); far; stdcall;
|
||||
begin
|
||||
DLLProc := @DLLEnterPoint;
|
||||
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||
end;
|
||||
|
||||
procedure DLLUnloadProc(Reason: Integer); register;
|
||||
begin
|
||||
if (Reason = DLL_PROCESS_DETACH) or (Reason = DLL_THREAD_DETACH) then
|
||||
Application := NewDllApp;
|
||||
end;
|
||||
|
||||
exports
|
||||
GetDllForm;
|
||||
|
||||
begin
|
||||
try
|
||||
NewDllApp := Application;
|
||||
DLLProc := @DLLUnloadProc;
|
||||
except
|
||||
|
||||
end;
|
||||
end.
|
||||
|
||||
BIN
产品报价(ProductQuotation)/ProductQuotation.res
Normal file
BIN
产品报价(ProductQuotation)/ProductQuotation.res
Normal file
Binary file not shown.
23
产品报价(ProductQuotation)/ProjectGroup1.bpg
Normal file
23
产品报价(ProductQuotation)/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#------------------------------------------------------------------------------
|
||||
VERSION = BWS.01
|
||||
#------------------------------------------------------------------------------
|
||||
!ifndef ROOT
|
||||
ROOT = $(MAKEDIR)\..
|
||||
!endif
|
||||
#------------------------------------------------------------------------------
|
||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||
#------------------------------------------------------------------------------
|
||||
PROJECTS = testDll.exe ProductPrice.dll
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
testDll.exe: testDll.dpr
|
||||
$(DCC)
|
||||
|
||||
ProductPrice.dll: ProductPrice.dpr
|
||||
$(DCC)
|
||||
|
||||
|
||||
3
产品报价(ProductQuotation)/SYSTEMSET.ini
Normal file
3
产品报价(ProductQuotation)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[SERVER]
|
||||
服务器地址=172.168.1.246
|
||||
软件名称=欣戈纺织
|
||||
540
产品报价(ProductQuotation)/U_CPManageFMSel.dfm
Normal file
540
产品报价(ProductQuotation)/U_CPManageFMSel.dfm
Normal file
|
|
@ -0,0 +1,540 @@
|
|||
object frmCPManageFMSel: TfrmCPManageFMSel
|
||||
Left = 277
|
||||
Top = 98
|
||||
Width = 1382
|
||||
Height = 754
|
||||
Align = alClient
|
||||
Caption = #26679#21697#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
|
||||
OnDestroy = FormDestroy
|
||||
OnKeyDown = FormKeyDown
|
||||
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 = DataLink_ProductQuotation.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 31
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 220
|
||||
Top = 93
|
||||
Width = 8
|
||||
Height = 623
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = Panel5
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1366
|
||||
Height = 62
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 16
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #25195#25551#20837#21475
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 364
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20013#25991#21517#31216
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 216
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 732
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 611
|
||||
Top = 15
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #25104' '#20998
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 485
|
||||
Top = 15
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 1088
|
||||
Top = 11
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 1088
|
||||
Top = 31
|
||||
Width = 7
|
||||
Height = 12
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object CYID: TEdit
|
||||
Tag = 3
|
||||
Left = 72
|
||||
Top = 11
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnKeyPress = CYIDKeyPress
|
||||
end
|
||||
object CYName: TEdit
|
||||
Tag = 2
|
||||
Left = 414
|
||||
Top = 11
|
||||
Width = 56
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = CYNameChange
|
||||
end
|
||||
object CYNO: TEdit
|
||||
Tag = 2
|
||||
Left = 265
|
||||
Top = 11
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = CYNoChange
|
||||
OnKeyPress = CYNOKeyPress
|
||||
end
|
||||
object CYKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 758
|
||||
Top = 11
|
||||
Width = 76
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = CYMFChange
|
||||
end
|
||||
object CYCF: TEdit
|
||||
Tag = 2
|
||||
Left = 661
|
||||
Top = 11
|
||||
Width = 56
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnChange = CYNameChange
|
||||
end
|
||||
object CYMF: TEdit
|
||||
Tag = 2
|
||||
Left = 511
|
||||
Top = 11
|
||||
Width = 76
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CYMFChange
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 512
|
||||
Top = 232
|
||||
Width = 185
|
||||
Height = 41
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
object Panel5: TPanel
|
||||
Left = 0
|
||||
Top = 93
|
||||
Width = 220
|
||||
Height = 623
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 216
|
||||
Height = 619
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
BufferedPaint = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'CPParent'
|
||||
DataController.KeyField = 'CPID'
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_ProductQuotation.Red
|
||||
Styles.Selection = DataLink_ProductQuotation.Red
|
||||
Styles.IncSearch = DataLink_ProductQuotation.Red
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 230
|
||||
Top = 104
|
||||
Width = 1073
|
||||
Height = 609
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 4
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 2
|
||||
Top = 412
|
||||
Width = 1069
|
||||
Height = 195
|
||||
Align = alBottom
|
||||
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 1
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 1065
|
||||
Height = 179
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1069
|
||||
Height = 410
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 40
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'CPName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 54
|
||||
end
|
||||
object v1CYNo: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'CYNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'CYName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 96
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #21407#26009#25104#20998
|
||||
DataBinding.FieldName = 'CYSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'CYCF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 89
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'CYMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'CYKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'CYHX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'CYColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 77
|
||||
end
|
||||
object v1Column39: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'CYNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 166
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #38024#22411
|
||||
DataBinding.FieldName = 'ZhenXing'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #20135#37327
|
||||
DataBinding.FieldName = 'CYCL'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTree
|
||||
Left = 91
|
||||
Top = 147
|
||||
end
|
||||
object ADOQueryTree20: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 61
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 989
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 1029
|
||||
Top = 1
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 432
|
||||
Top = 184
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 451
|
||||
Top = 155
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 493
|
||||
Top = 193
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 392
|
||||
Top = 184
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
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 = 392
|
||||
Top = 152
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Main
|
||||
Left = 424
|
||||
Top = 152
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 484
|
||||
Top = 157
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 461
|
||||
Top = 188
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 513
|
||||
Top = 157
|
||||
end
|
||||
object DSCYNO: TDataSource
|
||||
DataSet = CDS_CYNO
|
||||
Left = 771
|
||||
Top = 235
|
||||
end
|
||||
object CDS_CYNO: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 712
|
||||
Top = 264
|
||||
end
|
||||
object ADOQueryTree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 32
|
||||
Top = 200
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 479
|
||||
Top = 256
|
||||
end
|
||||
end
|
||||
473
产品报价(ProductQuotation)/U_CPManageFMSel.pas
Normal file
473
产品报价(ProductQuotation)/U_CPManageFMSel.pas
Normal file
|
|
@ -0,0 +1,473 @@
|
|||
unit U_CPManageFMSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox,jpeg,U_SLT;
|
||||
|
||||
type
|
||||
TfrmCPManageFMSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTree20: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
cxSplitter1: TcxSplitter;
|
||||
Panel1: TPanel;
|
||||
Label2: TLabel;
|
||||
CYID: TEdit;
|
||||
ToolButton2: TToolButton;
|
||||
Label1: TLabel;
|
||||
CYName: TEdit;
|
||||
DataSource2: TDataSource;
|
||||
ADOQueryMain: TADOQuery;
|
||||
CDS_Main: TClientDataSet;
|
||||
ToolButton4: TToolButton;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
Label3: TLabel;
|
||||
CYNO: TEdit;
|
||||
Panel2: TPanel;
|
||||
DSCYNO: TDataSource;
|
||||
CDS_CYNO: TClientDataSet;
|
||||
Label7: TLabel;
|
||||
CYKZ: TEdit;
|
||||
Label8: TLabel;
|
||||
CYCF: TEdit;
|
||||
Label10: TLabel;
|
||||
CYMF: TEdit;
|
||||
ADOQueryTree: TClientDataSet;
|
||||
Panel5: TPanel;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
Panel3: TPanel;
|
||||
GroupBox1: TGroupBox;
|
||||
ScrollBox1: TScrollBox;
|
||||
adoqueryPicture: TADOQuery;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1CYNo: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column39: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure CYIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CYNoChange(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure v1Column19PropertiesChange(Sender: TObject);
|
||||
procedure CYMFChange(Sender: TObject);
|
||||
procedure CYNameChange(Sender: TObject);
|
||||
procedure CYNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
CPID:string;
|
||||
PState:Integer;
|
||||
FCPID,FTopID:String;
|
||||
procedure InitTree();
|
||||
procedure InitGrid();
|
||||
procedure ReadINIFile();
|
||||
procedure InitImage();
|
||||
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
frmCPManageFMSel: TfrmCPManageFMSel;
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_FileUp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCPManageFMSel.InitTree();
|
||||
var
|
||||
i:Integer;
|
||||
begin
|
||||
with ADOQueryTree20 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from CP_Type order by CPlevel,CPOrder,CPName');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTree20,ADOQueryTree);
|
||||
SInitCDSData20(ADOQueryTree20,ADOQueryTree);
|
||||
cxDBTreeList1.Items[0].Expand(false);
|
||||
//cxDBTreeList1.Items[1].Expand(False);
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.InitGrid();
|
||||
begin
|
||||
Panel2.Visible:=True;
|
||||
Panel2.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('exec P_Select_CP_YDang :Code,:PState,:CYType');
|
||||
Parameters.ParamByName('Code').Value:='';
|
||||
Parameters.ParamByName('PState').Value:=0;
|
||||
Parameters.ParamByName('CYType').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel2.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCPManageFMSel:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
i,j:integer;
|
||||
begin
|
||||
j:=length(Mach);
|
||||
if j>0 then
|
||||
begin
|
||||
for i:=0 to j-1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
// writeCxGrid(self.Caption+tv1.Name,tv1);
|
||||
// Application := mainApplication;
|
||||
action:=cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('样品列表SelLJ',Tv1,'样品管理');
|
||||
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
|
||||
winexec('cmd /c rd /s /q D:\Right1209',sw_hide);
|
||||
Close;
|
||||
end;
|
||||
procedure TfrmCPManageFMSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
Panel3.Align:=alclient;
|
||||
InitTree();
|
||||
ReadCxGrid('样品列表SelLJ',Tv1,'样品管理');
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select CYID='''' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_CYNO);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_CYNO);
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('exec P_Select_CP_YDang :Code,:PState,:CYType');
|
||||
Parameters.ParamByName('Code').Value:='';
|
||||
Parameters.ParamByName('PState').Value:=0;
|
||||
Parameters.ParamByName('CYType').Value:='XXXXXXX';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
CDS_CYNO.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
InitGrid();
|
||||
//TJGS();
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
// TJGS();
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.CYIDKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(CYID.Text)='' then Exit;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
Filtered:=False;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Select_CP_YDang :Code,1,'''' ');
|
||||
Parameters.ParamByName('Code').Value:=Trim(CYID.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
CYID.Text:='';
|
||||
ADOQueryTree.Locate('CPID',CPID,[]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.CYNoChange(Sender: TObject);
|
||||
begin
|
||||
//if Length(Trim(TEdit(Sender).Text))<4 then Exit;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
//TJGS();
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.ReadINIFile();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
FileName:string;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||
programIni.Free;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
{ with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').asstring)+'''');
|
||||
Open;
|
||||
end;
|
||||
CPID:=Trim(ADOQueryTemp.fieldbyname('CYType').AsString);
|
||||
ADOQueryTree.Locate('CPID',CPID,[]); }
|
||||
InitImage();
|
||||
end;
|
||||
procedure TfrmCPManageFMSel.InitImage();
|
||||
var
|
||||
i,j:integer;
|
||||
jpg:TJpegImage;
|
||||
myStream: TADOBlobStream;
|
||||
begin
|
||||
|
||||
j:=length(Mach);
|
||||
if j>0 then
|
||||
begin
|
||||
for i:=0 to j-1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
IF CDS_Main.IsEmpty then exit;
|
||||
try
|
||||
with adoqueryPicture do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.TFID,A.WBID,A.FilesOther,B.FileName from TP_File A,XD_File B where A.TFID =B.XFID and A.WBID='+quotedstr(trim(CDS_Main.fieldbyname('CYID').AsString)));
|
||||
open;
|
||||
end;
|
||||
j:=adoqueryPicture.RecordCount;
|
||||
if j<1 then exit;
|
||||
adoqueryPicture.DisableControls;
|
||||
adoqueryPicture.First;
|
||||
SetLength(Mach, j);
|
||||
jpg:=TJpegImage.Create();
|
||||
for i:=0 to j-1 do
|
||||
begin
|
||||
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString)<>'' then
|
||||
begin
|
||||
myStream:=tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')),bmread);
|
||||
jpg.LoadFromStream(myStream);
|
||||
Mach[i] := TfrmSlt.Create(Self);
|
||||
Mach[i].Name:=trim(adoqueryPicture.fieldbyname('TFID').AsString);
|
||||
Mach[i].Parent := ScrollBox1;
|
||||
Mach[I].Left:=0+i*165;
|
||||
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString,adoqueryPicture.fieldbyname('FileName').AsString,jpg);
|
||||
end;
|
||||
adoqueryPicture.Next;
|
||||
end;
|
||||
adoqueryPicture.EnableControls;
|
||||
finally
|
||||
jpg.free;
|
||||
application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
{if Key= then
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定6666要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
if Trim(CDS_Main.fieldbyname('CYID').AsString)<>'' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
CDS_Main.Delete;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.v1Column19PropertiesChange(Sender: TObject);
|
||||
var
|
||||
mvalue:Boolean;
|
||||
begin
|
||||
{ mvalue:=TcxCheckBox(Sender).EditingValue;
|
||||
if mvalue=True then
|
||||
begin
|
||||
with CDS_CYNO do
|
||||
begin
|
||||
if Locate('CYID',Trim(CDS_Main.fieldbyname('CYID').AsString),[])=False then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CYID').Value:=Trim(CDS_Main.fieldbyname('CYID').AsString);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
//with CDS_CYNO do
|
||||
//begin
|
||||
CDS_CYNO.Locate('CYID',Trim(CDS_Main.fieldbyname('CYID').AsString),[]);
|
||||
CDS_CYNO.Delete;
|
||||
//end;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.CYMFChange(Sender: TObject);
|
||||
begin
|
||||
//if Length(Trim(TEdit(Sender).Text))<2 then Exit;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
//TJGS();
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.CYNameChange(Sender: TObject);
|
||||
begin
|
||||
//if Length(Trim(TEdit(Sender).Text))<2 then Exit;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
// TJGS();
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.CYNOKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Trim(CYNO.Text)='' then Exit;
|
||||
if Length(Trim(CYNO.Text))<4 then Exit;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
Filtered:=False;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Select_CP_YDang :Code,2,'''' ');
|
||||
Parameters.ParamByName('Code').Value:='%'+Trim(CYNO.Text)+'%';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
CYID.Text:='';
|
||||
ADOQueryTree.Locate('CPID',CPID,[]);
|
||||
// TJGS();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageFMSel.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
||||
17983
产品报价(ProductQuotation)/U_DataLink.dfm
Normal file
17983
产品报价(ProductQuotation)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
71
产品报价(ProductQuotation)/U_DataLink.pas
Normal file
71
产品报价(ProductQuotation)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
unit U_DataLink;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows,Messages,forms,OleCtnrs,DateUtils;
|
||||
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; //公司
|
||||
PicSvr:string;
|
||||
type
|
||||
TDataLink_ProductQuotation = class(TDataModule)
|
||||
AdoDataLink: TADOQuery;
|
||||
ADOLink: TADOConnection;
|
||||
ThreeImgList: TImageList;
|
||||
ThreeLookAndFeelCol: TcxLookAndFeelController;
|
||||
ThreeColorBase: TcxStyleRepository;
|
||||
SHuangSe: TcxStyle;
|
||||
SkyBlue: TcxStyle;
|
||||
Default: TcxStyle;
|
||||
QHuangSe: TcxStyle;
|
||||
Red: TcxStyle;
|
||||
FontBlue: TcxStyle;
|
||||
TextSHuangSe: TcxStyle;
|
||||
FonePurple: TcxStyle;
|
||||
FoneClMaroon: TcxStyle;
|
||||
FoneRed: TcxStyle;
|
||||
RowColor: TcxStyle;
|
||||
handBlack: TcxStyle;
|
||||
cxBlue: TcxStyle;
|
||||
SHuangSeCu: TcxStyle;
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
TMakebar = procedure(ucData:pchar;nDataLen:integer;nErrLevel:integer;nMask:integer;nBarEdition:integer;szBmpFileName:pchar;nScale:integer);stdcall;
|
||||
TMixtext = procedure( szSrcBmpFileName:PChar;szDstBmpFileName:PChar;sztext:PChar;fontsize,txtheight,hmargin,vmargin,txtcntoneline:integer);stdcall;
|
||||
var
|
||||
DataLink_ProductQuotation: TDataLink_ProductQuotation;
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TDataLink_ProductQuotation.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
DataLink_ProductQuotation:=nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
||||
|
||||
188
产品报价(ProductQuotation)/U_FileUp.dfm
Normal file
188
产品报价(ProductQuotation)/U_FileUp.dfm
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
object frmFileUp: TfrmFileUp
|
||||
Left = 247
|
||||
Top = 162
|
||||
Width = 634
|
||||
Height = 447
|
||||
Caption = #19978#20256#25991#20214
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid7: TcxGrid
|
||||
Left = 0
|
||||
Top = 41
|
||||
Width = 555
|
||||
Height = 367
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV7: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object FileName: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 121
|
||||
end
|
||||
object FileDate: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #19978#20256#26085#26399
|
||||
DataBinding.FieldName = 'FileDate'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 104
|
||||
end
|
||||
end
|
||||
object cxGridLevel6: TcxGridLevel
|
||||
GridView = TV7
|
||||
end
|
||||
end
|
||||
object Panel16: TPanel
|
||||
Left = 190
|
||||
Top = 126
|
||||
Width = 138
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
Caption = #27491#22312#19978#20256#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ToolBar6: TToolBar
|
||||
Left = 555
|
||||
Top = 41
|
||||
Width = 63
|
||||
Height = 367
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object FileUp: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19978#20256
|
||||
ImageIndex = 109
|
||||
Wrap = True
|
||||
OnClick = FileUpClick
|
||||
end
|
||||
object FileDel: TToolButton
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 17
|
||||
Wrap = True
|
||||
OnClick = FileDelClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 618
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 14
|
||||
Width = 68
|
||||
Height = 16
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Image2: TImage
|
||||
Left = 537
|
||||
Top = 17
|
||||
Width = 23
|
||||
Height = 16
|
||||
end
|
||||
object Code: TEdit
|
||||
Left = 78
|
||||
Top = 9
|
||||
Width = 211
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 404
|
||||
Top = 197
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 405
|
||||
Top = 236
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 409
|
||||
Top = 285
|
||||
end
|
||||
object ADOQueryFile: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 144
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryFile
|
||||
Left = 392
|
||||
Top = 168
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 216
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 264
|
||||
end
|
||||
end
|
||||
357
产品报价(ProductQuotation)/U_FileUp.pas
Normal file
357
产品报价(ProductQuotation)/U_FileUp.pas
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
unit U_FileUp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, IdBaseComponent,
|
||||
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB,jpeg,
|
||||
BtnEdit,IniFiles;
|
||||
|
||||
type
|
||||
TfrmFileUp = class(TForm)
|
||||
cxGrid7: TcxGrid;
|
||||
TV7: TcxGridDBTableView;
|
||||
FileName: TcxGridDBColumn;
|
||||
FileDate: TcxGridDBColumn;
|
||||
cxGridLevel6: TcxGridLevel;
|
||||
Panel16: TPanel;
|
||||
ToolBar6: TToolBar;
|
||||
FileUp: TToolButton;
|
||||
FileDel: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Code: TEdit;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
ADOQueryFile: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
Image2: TImage;
|
||||
procedure FileUpClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FileDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
lstPat: TStringList;
|
||||
AJpeg: TJPEGImage;
|
||||
procedure CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
procedure SaveImageOther();
|
||||
procedure ReadINIFile10();
|
||||
{ Private declarations }
|
||||
public
|
||||
CYID:String;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFileUp: TfrmFileUp;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFileUp.ReadINIFile10();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
FileName:string;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||
programIni.Free;
|
||||
end;
|
||||
procedure TfrmFileUp.FileUpClick(Sender: TObject);
|
||||
var
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo:string;
|
||||
AJpeg: TJPEGImage;
|
||||
begin
|
||||
if Trim(Code.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('编号不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
lstPat.Clear;
|
||||
if ODPat.Execute then
|
||||
begin
|
||||
lstPat.AddStrings(ODPat.Files);
|
||||
end;
|
||||
|
||||
if lstPat.Count > 0 then
|
||||
begin
|
||||
try
|
||||
ReadINIFile10();
|
||||
server:=ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Host :=server;//PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Panel16.Visible:=True;
|
||||
Panel16.Refresh;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select Count(*) MM from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add('and filetype=''YP''');
|
||||
Open;
|
||||
j:=fieldbyname('MM').AsInteger;
|
||||
end;
|
||||
Image2.Picture.LoadFromFile(ODPat.FileName);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
CreThumb(AJpeg,Image2,216, 187);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
for i := 0 to lstPat.Count - 1 do
|
||||
begin
|
||||
PatFile := ExtractFileName(lstPat[i]);
|
||||
PatFile:=Copy(PatFile,(Pos('.',PatFile)+1),(Length(PatFile)-Pos('.',PatFile)) ) ;
|
||||
FConNo:=Trim(Code.Text);
|
||||
while Pos('/',FConNo)>0 do
|
||||
begin
|
||||
Delete(FConNo,Pos('/',FConNo),1);
|
||||
end;
|
||||
PatFile:=Trim(FConNo)+'-'+Inttostr(j+i+1)+'.'+PatFile;
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
{if not DirectoryExists('D:\图片\'+Trim(gDef1)) then
|
||||
ForceDirectories('D:\图片\'+Trim(gDef1)); }
|
||||
IdFTP1.Put(lstPat[i], Trim('\YP')+'\'+Trim(PatFile));
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and filename='''+Trim(PatFile)+'''');
|
||||
SQL.Add(' and filetype=''YP''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Panel16.Visible:=False;
|
||||
Application.MessageBox(PChar('文件<'+Trim(PatFile)+'>重复,'+inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if GetLSNo(ADOQueryCmd,MaxNo,'YP','XD_File',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('XFID').Value:=Trim(MaxNo);
|
||||
FieldByName('CYID').Value:=Trim(CYID);
|
||||
FieldByName('CYNO').Value:=Trim(Code.Text);
|
||||
FieldByName('filename').Value:=Trim(PatFile);
|
||||
FieldByName('FileDate').Value:=SGetServerDate(ADOQueryTemp);
|
||||
fieldbyname('FileType').value:=Trim('YP');
|
||||
Post;
|
||||
end;
|
||||
except
|
||||
//ADOQueryCmd.Connection.RollbackTrans;
|
||||
//Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=1 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
SaveImageOther();
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
open;
|
||||
end;
|
||||
Panel16.Visible:=False;
|
||||
if i>0 then
|
||||
Application.MessageBox(PChar(inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
procedure TfrmFileUp.CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
Ratio: Double;
|
||||
ARect: TRect;
|
||||
AHeight, AHeightOffset: Integer;
|
||||
AWidth, AWidthOffset: Integer;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Ratio := AJPeg.Width /AJPeg.Height;
|
||||
if Ratio > 1.333 then
|
||||
begin
|
||||
AHeight := Round(Width / Ratio);
|
||||
AHeightOffset := (Height - AHeight) div 2;
|
||||
AWidth := Width;
|
||||
AWidthOffset := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
AWidth := Round(Height * Ratio);
|
||||
AWidthOffset := (Width - AWidth) div 2;
|
||||
AHeight := Height;
|
||||
AHeightOffset := 0;
|
||||
end;
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||
Bitmap.Canvas.StretchDraw(ARect, AJPeg);
|
||||
Image1.Picture.Assign(BitMap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmFileUp.SaveImageOther();
|
||||
var
|
||||
AJpeg: TJPEGImage;
|
||||
myStream: TADOBlobStream;
|
||||
ImgMaxNo:String;
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo,FTFID:string;
|
||||
begin
|
||||
if Image2.Picture=nil then Exit;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID='''+Trim(CYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
FTFID:=Trim(ADOQueryTemp.fieldbyname('TFID').AsString);
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,ImgMaxNo,'TF','TP_File',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片表最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
ImgMaxNo:=Trim(FTFID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add( ' select * from TP_File where TFID='''+Trim(FTFID)+'''');
|
||||
open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('TFID').Value:=Trim(ImgMaxNo);
|
||||
FieldByName('WBID').Value:=Trim(CYID);
|
||||
//FieldByName('TFIdx').Value:=cxTabControl2.TabIndex;
|
||||
FieldByName('TFType').Value:='样品';
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
//CreThumb(AJpeg,Image1,160, 120);
|
||||
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
AJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
lstPat := TStringList.Create;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FileDelClick(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add(' Delete XD_File where XFID='''+Trim(ADOQueryFile.fieldbyname('XFID').AsString)+'''');
|
||||
SQL.Add(' Delete TP_File where WBID='''+Trim(CYID)+''' and TFType=''样品'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryFile.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=0 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
234
产品报价(ProductQuotation)/U_GetDllForm.pas
Normal file
234
产品报价(ProductQuotation)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
unit U_GetDllForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
||||
|
||||
function ConnData(): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_YpBaoJiaList, U_ZdyAttachmentBJ;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
// 参数说明:App>>调用应用程序; //
|
||||
// FormH>>调用窗口句柄 ; //
|
||||
// FormID>>窗口号; //
|
||||
// Language>>语言种类; //
|
||||
// WinStyle>>窗口类型; //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
var
|
||||
frmYpBaoJiaListLR, frmYpBaoJiaListSH: TfrmYpBaoJiaList;
|
||||
frmZdyAttachmentCB: TfrmZdyAttachmentCB;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd;
|
||||
var
|
||||
i: Integer;
|
||||
bFound: Boolean;
|
||||
mnewHandle: hwnd;
|
||||
mstyle: TFormStyle; // 0:子窗口; 1:普通窗口
|
||||
mstate: TWindowState;
|
||||
mborderstyle: TFormBorderStyle;
|
||||
begin
|
||||
mnewHandle := 0;
|
||||
DName := PChar(GName);
|
||||
DCode := PChar(GCode);
|
||||
DdataBase := DataBase;
|
||||
DTitCaption := Title;
|
||||
DParameters1 := Parameters1;
|
||||
DParameters2 := Parameters2;
|
||||
DParameters3 := Parameters3;
|
||||
DParameters4 := Parameters4;
|
||||
DParameters5 := Parameters5;
|
||||
DParameters6 := Parameters6;
|
||||
DParameters7 := Parameters7;
|
||||
DParameters8 := Parameters8;
|
||||
DParameters9 := Parameters9;
|
||||
DParameters10 := Parameters10;
|
||||
|
||||
MainApplication := App;
|
||||
DCurHandle := FormH;
|
||||
IsDelphiLanguage := Language;
|
||||
|
||||
Application := TApplication(App);
|
||||
DCurHandle := 0;
|
||||
|
||||
|
||||
//赋值链接字符串
|
||||
SetLength(server, 255);
|
||||
SetLength(dtbase, 255);
|
||||
SetLength(user, 255);
|
||||
SetLength(pswd, 255);
|
||||
|
||||
// server := '.';
|
||||
server := '121.40.233.100,7781';
|
||||
dtbase := 'zhenzengdata';
|
||||
user := 'sa';
|
||||
pswd := 'rightsoft@123';
|
||||
// pswd := 'rightsoft';
|
||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
DConString := DataBaseStr;
|
||||
// DName:='周高祥';
|
||||
|
||||
//DParameters1:='高权限'; //高权限
|
||||
//DParameters3:='1';
|
||||
if not ConnData() then
|
||||
begin
|
||||
result := 0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// 定义窗口类型 、状态
|
||||
if WinStyle = 0 then
|
||||
begin
|
||||
mstyle := fsMDIChild;
|
||||
mstate := wsMaximized;
|
||||
mborderstyle := bsSizeable;
|
||||
end
|
||||
else
|
||||
begin
|
||||
mstyle := fsNormal;
|
||||
mstate := wsNormal;
|
||||
mborderstyle := bsSizeable;
|
||||
end;
|
||||
/////////////////////
|
||||
//调用子模块窗口
|
||||
case FormID of
|
||||
111: // 产品报价
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '产品报价' then
|
||||
begin
|
||||
BringWindowToTop(frmYpBaoJiaListLR.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
//if frmBaoGuanListBGZL=nil then
|
||||
begin
|
||||
frmYpBaoJiaListLR := TfrmYpBaoJiaList.Create(application.MainForm);
|
||||
with frmYpBaoJiaListLR do
|
||||
begin
|
||||
Title := '产品报价';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmYpBaoJiaListLR.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmYpBaoJiaListLR.Handle;
|
||||
end;
|
||||
112: // 产品报价审核
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '产品报价审核' then
|
||||
begin
|
||||
BringWindowToTop(frmYpBaoJiaListSH.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmYpBaoJiaListSH := TfrmYpBaoJiaList.Create(application.MainForm);
|
||||
with frmYpBaoJiaListSH do
|
||||
begin
|
||||
CanShu1 := '高权限';
|
||||
Title := '产品报价审核';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmYpBaoJiaListSH.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmYpBaoJiaListSH.Handle;
|
||||
end;
|
||||
211: // 产品销售报价
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '产品报价' then
|
||||
begin
|
||||
BringWindowToTop(frmZdyAttachmentCB.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmZdyAttachmentCB := TfrmZdyAttachmentCB.Create(application.MainForm);
|
||||
with frmZdyAttachmentCB do
|
||||
begin
|
||||
Title := '产品报价';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmZdyAttachmentCB.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmZdyAttachmentCB.Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := mnewHandle;
|
||||
NewDllApp := Application;
|
||||
end;
|
||||
//===========================================================
|
||||
//建立数据库连接池
|
||||
//===========================================================
|
||||
|
||||
function ConnData(): Boolean;
|
||||
begin
|
||||
if not Assigned(DataLink_ProductQuotation) then
|
||||
DataLink_ProductQuotation := TDataLink_ProductQuotation.Create(Application);
|
||||
try
|
||||
with DataLink_ProductQuotation.ADOLink do
|
||||
begin
|
||||
//if not Connected then
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
end;
|
||||
Result := true;
|
||||
except
|
||||
Result := false;
|
||||
application.MessageBox('数据库连接失败!', '错误', mb_Ok + MB_ICONERROR);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
initialization
|
||||
OldDllApp := Application;
|
||||
|
||||
finalization
|
||||
DataLink_ProductQuotation.Free;
|
||||
Application := OldDllApp;
|
||||
|
||||
end.
|
||||
|
||||
313
产品报价(ProductQuotation)/U_LabelAdd.dfm
Normal file
313
产品报价(ProductQuotation)/U_LabelAdd.dfm
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
object frmLabelAdd: TfrmLabelAdd
|
||||
Left = 191
|
||||
Top = 109
|
||||
Width = 997
|
||||
Height = 612
|
||||
BorderIcons = [biMaximize]
|
||||
Caption = #26631#31614#32534#36753
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 28
|
||||
Width = 413
|
||||
Height = 513
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 0
|
||||
object Label2: TLabel
|
||||
Left = 31
|
||||
Top = 21
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26631#31614#25991#20214#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 31
|
||||
Top = 95
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #22791' '#27880#65306
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 31
|
||||
Top = 71
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26631#31614#21517#31216#65306
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 31
|
||||
Top = 47
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26631#31614#31867#22411#65306
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object LabelFileName: TBtnEditA
|
||||
Left = 92
|
||||
Top = 17
|
||||
Width = 260
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
OnBtnClick = LabelFileNameBtnClick
|
||||
end
|
||||
object beizhu: TMemo
|
||||
Left = 92
|
||||
Top = 92
|
||||
Width = 257
|
||||
Height = 149
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 1
|
||||
end
|
||||
object LabelCaption: TEdit
|
||||
Left = 92
|
||||
Top = 67
|
||||
Width = 258
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object LabelType: TFTComboBox
|
||||
Tag = 99
|
||||
Left = 92
|
||||
Top = 43
|
||||
Width = 260
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 3
|
||||
Text = #20013#25991#26631#31614
|
||||
Items.Strings = (
|
||||
#20013#25991#26631#31614
|
||||
#33521#25991#26631#31614
|
||||
#20013#33521#25991#26631#31614)
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 981
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar2'
|
||||
Color = clBtnFace
|
||||
Flat = True
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
Transparent = False
|
||||
object Tsave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26631#31614
|
||||
ImageIndex = 5
|
||||
OnClick = TsaveClick
|
||||
end
|
||||
object Tclose: TToolButton
|
||||
Left = 87
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TcloseClick
|
||||
end
|
||||
end
|
||||
object RMPreview1: TRMPreview
|
||||
Left = 428
|
||||
Top = 32
|
||||
Width = 553
|
||||
Height = 541
|
||||
Align = alRight
|
||||
BevelOuter = bvLowered
|
||||
Caption = #26631#31614#39044#35272
|
||||
TabOrder = 2
|
||||
OnDblClick = RMPreview1DblClick
|
||||
Options.RulerUnit = rmutScreenPixels
|
||||
Options.RulerVisible = False
|
||||
Options.DrawBorder = False
|
||||
Options.BorderPen.Color = clGray
|
||||
Options.BorderPen.Style = psDash
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 512
|
||||
Top = 208
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Filter = 'RMFl(*.rmf)|*.rmf'
|
||||
InitialDir = '.'
|
||||
Left = 200
|
||||
Top = 4
|
||||
end
|
||||
object RMGridReport1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
ShowProgress = False
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
Preview = RMPreview1
|
||||
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 = 336
|
||||
Top = 8
|
||||
ReportData = {}
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 528
|
||||
Top = 184
|
||||
end
|
||||
object RMGridReportDesigner1: TRMGridReportDesigner
|
||||
Left = 376
|
||||
Top = 8
|
||||
end
|
||||
object RMBarCodeObject1: TRMBarCodeObject
|
||||
Left = 280
|
||||
Top = 4
|
||||
end
|
||||
object RMBMPExport1: TRMBMPExport
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
Left = 408
|
||||
Top = 8
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 10
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 440
|
||||
Top = 8
|
||||
end
|
||||
object RMDS_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
AliasName = #26631#31614#25968#25454
|
||||
Left = 498
|
||||
Top = 72
|
||||
end
|
||||
object RMDataDictionary1: TRMDataDictionary
|
||||
FieldFieldNames.TableName = 'TableName'
|
||||
FieldFieldNames.FieldName = 'FieldName'
|
||||
FieldFieldNames.FieldAlias = 'FieldAlias'
|
||||
Left = 562
|
||||
Top = 72
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 480
|
||||
end
|
||||
object RMGridReport2: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
ShowProgress = False
|
||||
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 = RMDS_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 432
|
||||
Top = 368
|
||||
ReportData = {}
|
||||
end
|
||||
object ADOQueryCmdSC: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 296
|
||||
Top = 304
|
||||
object ADOQueryCmdFileContent: TBlobField
|
||||
FieldName = 'Files'
|
||||
end
|
||||
object ADOQueryCmdFtFileName: TStringField
|
||||
FieldName = 'FileName'
|
||||
Size = 40
|
||||
end
|
||||
object ADOQueryCmdFileEditDate: TDateTimeField
|
||||
FieldName = 'FileEditDate'
|
||||
end
|
||||
object ADOQueryCmdFileSize: TFloatField
|
||||
FieldName = 'FileSize'
|
||||
end
|
||||
object ADOQueryCmdFiller: TStringField
|
||||
FieldName = 'Filler'
|
||||
end
|
||||
object ADOQueryCmdLastEditTime: TDateTimeField
|
||||
FieldName = 'LastEditTime'
|
||||
end
|
||||
object ADOQueryCmdLastEditer: TStringField
|
||||
FieldName = 'LastEditer'
|
||||
end
|
||||
object ADOQueryCmdFileCreateDate: TDateTimeField
|
||||
FieldName = 'FileCreateDate'
|
||||
end
|
||||
object ADOQueryCmdchildPath: TStringField
|
||||
FieldName = 'FilePath'
|
||||
end
|
||||
object ADOQueryCmdFileType: TStringField
|
||||
FieldName = 'FileType'
|
||||
end
|
||||
end
|
||||
end
|
||||
455
产品报价(ProductQuotation)/U_LabelAdd.pas
Normal file
455
产品报价(ProductQuotation)/U_LabelAdd.pas
Normal file
|
|
@ -0,0 +1,455 @@
|
|||
unit U_LabelAdd;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, BtnEdit, ExtCtrls, DB, ADODB,
|
||||
RM_System, RM_Common, RM_Class, RM_GridReport, Buttons, FTComboBox,
|
||||
RM_Preview, RM_e_Xls, RM_e_Graphic, RM_e_bmp, RM_BarCode,
|
||||
RM_DsgGridReport, RM_Dataset, cxStyles, cxCustomData, cxGraphics,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGrid;
|
||||
|
||||
type
|
||||
TfrmLabelAdd = class(TForm)
|
||||
Panel1: TPanel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
LabelFileName: TBtnEditA;
|
||||
beizhu: TMemo;
|
||||
ToolBar1: TToolBar;
|
||||
Tsave: TToolButton;
|
||||
Tclose: TToolButton;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
OpenDialog1: TOpenDialog;
|
||||
RMGridReport1: TRMGridReport;
|
||||
Label9: TLabel;
|
||||
LabelCaption: TEdit;
|
||||
Label10: TLabel;
|
||||
LabelType: TFTComboBox;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
RMPreview1: TRMPreview;
|
||||
RMGridReportDesigner1: TRMGridReportDesigner;
|
||||
RMBarCodeObject1: TRMBarCodeObject;
|
||||
RMBMPExport1: TRMBMPExport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDS_Main: TRMDBDataSet;
|
||||
RMDataDictionary1: TRMDataDictionary;
|
||||
ADOQuery1: TADOQuery;
|
||||
RMGridReport2: TRMGridReport;
|
||||
ADOQueryCmdSC: TADOQuery;
|
||||
ADOQueryCmdFileContent: TBlobField;
|
||||
ADOQueryCmdFtFileName: TStringField;
|
||||
ADOQueryCmdFileEditDate: TDateTimeField;
|
||||
ADOQueryCmdFileSize: TFloatField;
|
||||
ADOQueryCmdFiller: TStringField;
|
||||
ADOQueryCmdLastEditTime: TDateTimeField;
|
||||
ADOQueryCmdLastEditer: TStringField;
|
||||
ADOQueryCmdFileCreateDate: TDateTimeField;
|
||||
ADOQueryCmdchildPath: TStringField;
|
||||
ADOQueryCmdFileType: TStringField;
|
||||
procedure TcloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TsaveClick(Sender: TObject);
|
||||
procedure LabelFileNameBtnClick(Sender: TObject);
|
||||
procedure BtOpenClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure RMPreview1DblClick(Sender: TObject);
|
||||
private
|
||||
fIsChg:Boolean;
|
||||
function SaveData():Boolean;
|
||||
function EditData():Boolean;
|
||||
procedure InitWinData();
|
||||
procedure InitVarDictionary();
|
||||
procedure InitDataSetDictionary();
|
||||
function PostFileToData():boolean;
|
||||
procedure GetFileInfo(mFile:string;var mfileSize:integer;var CreationTime:tdatetime;var WriteTime:tdatetime);
|
||||
function CovFileDate(Fd:_FileTime):TDateTime;
|
||||
public
|
||||
fcustomNo:string;
|
||||
fKeyNo:string;
|
||||
fWinStatus:integer;
|
||||
end;
|
||||
|
||||
var
|
||||
frmLabelAdd: TfrmLabelAdd;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmLabelAdd.TcloseClick(Sender: TObject);
|
||||
begin
|
||||
if fIsChg then
|
||||
begin
|
||||
if application.MessageBox('标签设计过,是否要保存?','提示信息',1)=1 then
|
||||
begin
|
||||
Tsave.Click ;
|
||||
end
|
||||
else
|
||||
close;
|
||||
end
|
||||
else
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.FormCreate(Sender: TObject);
|
||||
begin
|
||||
panel1.Align :=alClient;
|
||||
fIsChg:=false;
|
||||
// ClearWinData(panel1);
|
||||
// InitVarDictionary();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.TsaveClick(Sender: TObject);
|
||||
begin
|
||||
if trim(labelCaption.Text)='' then
|
||||
begin
|
||||
application.MessageBox('标签名称不能为空!','提示');
|
||||
labelCaption.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
if trim(LabelFileName.Text)='' then
|
||||
begin
|
||||
application.MessageBox('标签文件不能为空,请选择标签!','提示');
|
||||
LabelFileName.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
PostFileToData();
|
||||
if fWinStatus=0 then
|
||||
begin
|
||||
if SaveData() then
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if EditData() then
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
function TfrmLabelAdd.PostFileToData():boolean;
|
||||
var
|
||||
mFileName,fFileName,fpathFileName:string;
|
||||
Stream : TMemoryStream;
|
||||
mfileSize:integer;
|
||||
mCreationTime:TdateTime;
|
||||
mWriteTime:TdateTime;
|
||||
begin
|
||||
result:=false;
|
||||
fFileName:=Trim(LabelCaption.Text);
|
||||
fpathFileName:=Trim(LabelFileName.Text);
|
||||
try
|
||||
ADOQueryCmdSC.Connection.BeginTrans ;
|
||||
try
|
||||
with ADOQueryCmdSC do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('delete from RT_FileUpdate');
|
||||
sql.Add('where FileName='+quotedStr(trim(fFileName)));
|
||||
execsql;
|
||||
end;
|
||||
with ADOQueryCmdSC do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select * from RT_FileUpdate');
|
||||
sql.Add('where FileName='+quotedStr(trim(fFileName)));
|
||||
Open;
|
||||
//////////////////////////
|
||||
//获取文件信息
|
||||
GetFileInfo(Trim(fpathFileName),mfileSize,mCreationTime,mWriteTime);
|
||||
|
||||
if RecordCount<=0 then
|
||||
begin
|
||||
Append;
|
||||
fieldByName('FileName').AsString := trim(fFileName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
edit;
|
||||
end;
|
||||
|
||||
fieldByName('FileEditDate').Value :=mWriteTime;
|
||||
fieldByName('FileCreateDate').Value :=mCreationTime;
|
||||
fieldByName('FileSize').Value :=mfileSize;
|
||||
fieldByName('Filler').Value :=Dname;
|
||||
fieldByName('LastEditer').Value :=Dname;
|
||||
fieldByName('LastEditTime').Value :=SGetServerDateTime(ADOQueryTmp);
|
||||
if pos('.rmf',fFileName)>0 then
|
||||
begin
|
||||
fieldByName('FilePath').Value :='report';
|
||||
fieldByName('FileType').Value :='公用';
|
||||
end
|
||||
else if pos('.dll',fFileName)>0 then
|
||||
begin
|
||||
fieldByName('FilePath').Value :='';
|
||||
fieldByName('FileType').Value :='一般';
|
||||
end
|
||||
else
|
||||
begin
|
||||
fieldByName('FilePath').Value :='';
|
||||
fieldByName('FileType').Value :='公用';
|
||||
end;
|
||||
//将OLE数据存入数据库
|
||||
ADOQueryCmdFileContent.LoadFromFile(fpathFileName);
|
||||
//ADOQueryCmdFileContent.LoadFromStream(Stream);
|
||||
|
||||
post;
|
||||
end;
|
||||
finally
|
||||
end;
|
||||
result:=true;
|
||||
ADOQueryCmdSC.Connection.CommitTrans ;
|
||||
except
|
||||
ADOQueryCmdSC.Connection.RollbackTrans ;
|
||||
Result:=False;
|
||||
application.MessageBox(pchar('提交文件['+trim(fFileName)+']失败!'),'提示信息',MB_ICONERROR);
|
||||
end;
|
||||
|
||||
end;
|
||||
procedure TfrmLabelAdd.GetFileInfo(mFile:string;var mfileSize:integer;var CreationTime:tdatetime;var WriteTime:tdatetime);
|
||||
var
|
||||
vSearchRec: TSearchRec;
|
||||
begin
|
||||
FindFirst(mFile,faAnyFile,vSearchRec);
|
||||
mfileSize:=vSearchRec.Size;
|
||||
CreationTime:=CovFileDate(vSearchRec.FindData.ftCreationTime);//创建时间
|
||||
//vSearchRec.FindData.ftLastAccessTime//访问时间
|
||||
WriteTime:=CovFileDate(vSearchRec.FindData.ftLastWriteTime);//修改时间
|
||||
FindClose(vSearchRec);
|
||||
end;
|
||||
function TfrmLabelAdd.CovFileDate(Fd:_FileTime):TDateTime;
|
||||
var
|
||||
Tct:_SystemTime;
|
||||
Temp:_FileTime;
|
||||
begin
|
||||
FileTimeToLocalFileTime(Fd,Temp);
|
||||
FileTimeToSystemTime(Temp,Tct);
|
||||
CovFileDate:=SystemTimeToDateTime(Tct);
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelAdd.SaveData():Boolean;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label');
|
||||
sql.Add('where 1<>1');
|
||||
Open;
|
||||
|
||||
Append;
|
||||
fieldByName('filler').value:=DName;
|
||||
fieldByName('filltime').value:=DServerDate;
|
||||
fieldByName('beizhu').value:= trim(beizhu.text);
|
||||
fieldByName('LabelCaption').value:=trim(LabelCaption.text);
|
||||
fieldByName('LabelType').value:=trim(LabelType.text);
|
||||
fieldByName('LabelFileName').value:= trim(LabelFileName.text);
|
||||
//TBlobField(FieldByName('LabelFile')).LoadFromStream(fStream);
|
||||
RMGridReport1.SaveToBlobField(TBlobField(FieldByName('LabelFile')));
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label where LabelCaption='''+Trim(LabelCaption.text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTmp.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('标签名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
result:=true;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelAdd.EditData():Boolean;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label');
|
||||
sql.Add('where labelId='+fkeyNo);
|
||||
Open;
|
||||
Edit;
|
||||
fieldByName('LabelCaption').value:=trim(LabelCaption.text);
|
||||
fieldByName('LabelType').value:=trim(LabelType.text);
|
||||
fieldByName('LabelFileName').value:= trim(LabelFileName.text);
|
||||
RMGridReport1.SaveToBlobField(TBlobField(FieldByName('LabelFile')));
|
||||
fieldByName('Editer').value:=DName;
|
||||
fieldByName('EditTime').value:=DServerDate;
|
||||
fieldByName('beizhu').value:= trim(beizhu.text);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from P_Label where LabelCaption='''+Trim(LabelCaption.text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTmp.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('标签名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
result:=true;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.LabelFileNameBtnClick(Sender: TObject);
|
||||
begin
|
||||
if OpenDialog1.Execute() then
|
||||
begin
|
||||
LabelFileName.Text:=OpenDialog1.FileName;
|
||||
LabelCaption.Text:=Trim(ExtractFileName(OpenDialog1.FileName));
|
||||
RMGridReport1.LoadFromFile(LabelFileName.Text);
|
||||
RMGridReport1.Preview :=RMPreview1;
|
||||
RMGridReport1.ShowReport ;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.BtOpenClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//初始化窗口数据
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelAdd.InitWinData();
|
||||
begin
|
||||
try
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select A.*');
|
||||
// sql.Add('customNoName=isnull((select customName from BC_customer where customNO=A.customNo),A.customNo)');
|
||||
sql.Add('from P_Label A');
|
||||
sql.Add('WHERE LabelId='+fkeyNo);
|
||||
Open;
|
||||
if isEmpty then
|
||||
begin
|
||||
close;
|
||||
exit;
|
||||
end;
|
||||
|
||||
SSetWinData(ADOQueryTmp,panel1);
|
||||
RMGridReport1.LoadFromBlobField(tblobfield(fieldbyname('labelFile')));
|
||||
RMGridReport2.FileName:=trim(fieldByName('labelFileName').AsString);
|
||||
RMGridReport2.LoadFromBlobField(tblobfield(fieldbyname('labelFile')));
|
||||
RMGridReport1.Preview :=RMPreview1;
|
||||
//RMGridReport1.PrepareReport;
|
||||
RMGridReport1.ShowReport ;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.FormShow(Sender: TObject);
|
||||
begin
|
||||
if fWinStatus>0 then
|
||||
InitWinData();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelAdd.RMPreview1DblClick(Sender: TObject);
|
||||
begin
|
||||
//btOpen.Click ;
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelAdd.InitVarDictionary();
|
||||
var
|
||||
i:integer;
|
||||
begin
|
||||
{ try
|
||||
with RMGridReport2 do
|
||||
begin
|
||||
Dictionary.Variables.Clear ;
|
||||
Dictionary.Variables.AddCategory('客户单位信息');
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.Add('exec P_Label_CustPrintData');
|
||||
sql.Add(quotedStr(fCustomNo));
|
||||
Open;
|
||||
for i:=0 to FieldCount-1 do
|
||||
begin
|
||||
|
||||
Dictionary.Variables.Add(trim(fields[i].FieldName)
|
||||
,'');
|
||||
Dictionary.Variables.AsString[trim(fields[i].FieldName)]:=trim(fields[i].AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
|
||||
end; }
|
||||
end;
|
||||
/////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////
|
||||
procedure TfrmLabelAdd.InitDataSetDictionary();
|
||||
begin
|
||||
{ with ADOQuery1 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('exec P_Label_PrintSet');
|
||||
sql.Add(quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
//sql.Add(','+quotedStr(''));
|
||||
OPen;
|
||||
end;
|
||||
with RMGridReport2 do
|
||||
begin
|
||||
Dictionary.FieldAliases.Clear;
|
||||
Dictionary.FieldAliases['RMDS_Main']:= '标签数据';
|
||||
Dictionary.FieldAliases['RMDS_Main."barcode"']:='标签条码';
|
||||
end; }
|
||||
end;
|
||||
|
||||
end.
|
||||
438
产品报价(ProductQuotation)/U_LabelList.dfm
Normal file
438
产品报价(ProductQuotation)/U_LabelList.dfm
Normal file
|
|
@ -0,0 +1,438 @@
|
|||
object frmLabelList: TfrmLabelList
|
||||
Left = 145
|
||||
Top = 10
|
||||
Width = 1057
|
||||
Height = 693
|
||||
BorderIcons = [biMaximize]
|
||||
Caption = #26631#31614#20449#24687
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poOwnerFormCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Panel1: TPanel
|
||||
Left = 12
|
||||
Top = 80
|
||||
Width = 452
|
||||
Height = 561
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 0
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 3
|
||||
Width = 452
|
||||
Height = 558
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 0
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 448
|
||||
Height = 554
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object tv1: TcxGridDBTableView
|
||||
OnDblClick = tv1DblClick
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellClick = tv1CellClick
|
||||
OnFocusedRecordChanged = tv1FocusedRecordChanged
|
||||
DataController.DataSource = DS_Label
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
object tv1labelId: TcxGridDBColumn
|
||||
Caption = #26631#31614'ID'
|
||||
DataBinding.FieldName = 'labelId'
|
||||
Visible = False
|
||||
Width = 53
|
||||
end
|
||||
object tv1labeltype: TcxGridDBColumn
|
||||
Caption = #26631#31614#31867#22411
|
||||
DataBinding.FieldName = 'labeltype'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaCenter
|
||||
Width = 107
|
||||
end
|
||||
object tv1labelCaption: TcxGridDBColumn
|
||||
Caption = #26631#31614#21517#31216
|
||||
DataBinding.FieldName = 'labelCaption'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaCenter
|
||||
Width = 261
|
||||
end
|
||||
object tv1labelFile: TcxGridDBColumn
|
||||
Caption = #25991#20214#21517
|
||||
DataBinding.FieldName = 'labelFile'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderAlignmentVert = vaCenter
|
||||
Width = 167
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 452
|
||||
Height = 3
|
||||
Align = alTop
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
object Label1: TLabel
|
||||
Left = 40
|
||||
Top = 13
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #23458#25143#21517#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 52
|
||||
Top = 35
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #19994#21153#21592#65306
|
||||
Visible = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 40
|
||||
Top = 61
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #30005#35805#21495#30721#65306
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 39
|
||||
Top = 86
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20844#21496#21517#31216#65306
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 14
|
||||
Top = 108
|
||||
Width = 84
|
||||
Height = 12
|
||||
Caption = #20844#21496#33521#25991#21517#31216#65306
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 61
|
||||
Top = 133
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #22320#22336#65306
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 37
|
||||
Top = 157
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #33521#25991#22320#22336#65306
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 61
|
||||
Top = 192
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #22791#27880#65306
|
||||
end
|
||||
object Note: TMemo
|
||||
Left = 120
|
||||
Top = 175
|
||||
Width = 293
|
||||
Height = 63
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
end
|
||||
object EngAddress: TEdit
|
||||
Left = 120
|
||||
Top = 151
|
||||
Width = 294
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object ChnAddress: TEdit
|
||||
Left = 120
|
||||
Top = 127
|
||||
Width = 293
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object engFactory: TEdit
|
||||
Left = 119
|
||||
Top = 104
|
||||
Width = 295
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
end
|
||||
object ChnFactory: TEdit
|
||||
Left = 119
|
||||
Top = 81
|
||||
Width = 294
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
end
|
||||
object TelePhone: TEdit
|
||||
Left = 119
|
||||
Top = 58
|
||||
Width = 294
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
end
|
||||
object ywy: TEdit
|
||||
Tag = 99
|
||||
Left = 119
|
||||
Top = 31
|
||||
Width = 295
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 6
|
||||
Text = 'ywy'
|
||||
Visible = False
|
||||
end
|
||||
object customNo: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 120
|
||||
Top = 7
|
||||
Width = 295
|
||||
Height = 20
|
||||
Enabled = False
|
||||
ReadOnly = True
|
||||
TabOrder = 7
|
||||
OnBtnClick = customNoBtnClick
|
||||
end
|
||||
end
|
||||
end
|
||||
object RMPreview1: TRMPreview
|
||||
Left = 488
|
||||
Top = 85
|
||||
Width = 553
|
||||
Height = 569
|
||||
Align = alRight
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'Insert After'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = False
|
||||
TabOrder = 1
|
||||
OnDblClick = RMPreview1DblClick
|
||||
Options.RulerUnit = rmutScreenPixels
|
||||
Options.RulerVisible = False
|
||||
Options.DrawBorder = False
|
||||
Options.BorderPen.Color = clGray
|
||||
Options.BorderPen.Style = psDash
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1041
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar2'
|
||||
Color = clBtnFace
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
Transparent = False
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TOK: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30830#23450
|
||||
ImageIndex = 10
|
||||
OnClick = TOkClick
|
||||
end
|
||||
object Tadd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#26631#31614
|
||||
ImageIndex = 1
|
||||
OnClick = TaddClick
|
||||
end
|
||||
object Tupd: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913#26631#31614
|
||||
ImageIndex = 11
|
||||
OnClick = TupdClick
|
||||
end
|
||||
object Tdel: TToolButton
|
||||
Left = 300
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#26631#31614
|
||||
ImageIndex = 3
|
||||
OnClick = TdelClick
|
||||
end
|
||||
object Tclose: TToolButton
|
||||
Left = 387
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TcloseClick
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1041
|
||||
Height = 53
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label9: TLabel
|
||||
Left = 36
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26631#31614#31867#22411
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 280
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26631#31614#26631#39064
|
||||
end
|
||||
object LabelCaption: TEdit
|
||||
Left = 332
|
||||
Top = 16
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = LabelTypeChange
|
||||
end
|
||||
object LabelType: TFTComboBox
|
||||
Tag = 99
|
||||
Left = 88
|
||||
Top = 17
|
||||
Width = 100
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 1
|
||||
OnChange = LabelTypeChange
|
||||
Items.Strings = (
|
||||
''
|
||||
#20013#25991#26631#31614
|
||||
#33521#25991#26631#31614
|
||||
#20013#33521#25991#26631#31614)
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 508
|
||||
Top = 208
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Filter = 'RMFl(*.rmf)|*.rmf'
|
||||
InitialDir = '.'
|
||||
Left = 316
|
||||
Top = 148
|
||||
end
|
||||
object RMGridReport1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
ModalPreview = False
|
||||
ShowProgress = False
|
||||
DefaultCollate = False
|
||||
ShowPrintDialog = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
Preview = RMPreview1
|
||||
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 = 436
|
||||
Top = 152
|
||||
ReportData = {}
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 528
|
||||
Top = 184
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 392
|
||||
Top = 228
|
||||
end
|
||||
object DS_Label: TDataSource
|
||||
DataSet = ADOQueryLabel
|
||||
Left = 66
|
||||
Top = 456
|
||||
end
|
||||
object ADOQueryLabel10: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 300
|
||||
Parameters = <>
|
||||
Left = 234
|
||||
Top = 296
|
||||
end
|
||||
object ADOQueryLabel: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 156
|
||||
Top = 267
|
||||
end
|
||||
end
|
||||
591
产品报价(ProductQuotation)/U_LabelList.pas
Normal file
591
产品报价(ProductQuotation)/U_LabelList.pas
Normal file
|
|
@ -0,0 +1,591 @@
|
|||
unit U_LabelList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, StrUtils,Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, BtnEdit, ExtCtrls, DB, ADODB,
|
||||
RM_System, RM_Common, RM_Class, RM_GridReport, Buttons, FTComboBox,
|
||||
RM_Preview, RM_e_Xls, RM_e_Graphic, RM_e_bmp, RM_BarCode,
|
||||
RM_DsgGridReport, RM_Dataset, cxStyles, cxCustomData, cxGraphics,
|
||||
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGrid, DBClient;
|
||||
|
||||
type
|
||||
TfrmLabelList = class(TForm)
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
OpenDialog1: TOpenDialog;
|
||||
RMGridReport1: TRMGridReport;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
RMPreview1: TRMPreview;
|
||||
ADOQuery1: TADOQuery;
|
||||
Panel2: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
tv1: TcxGridDBTableView;
|
||||
tv1labeltype: TcxGridDBColumn;
|
||||
tv1labelCaption: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
tv1labelFile: TcxGridDBColumn;
|
||||
DS_Label: TDataSource;
|
||||
ADOQueryLabel10: TADOQuery;
|
||||
Panel3: TPanel;
|
||||
Note: TMemo;
|
||||
EngAddress: TEdit;
|
||||
ChnAddress: TEdit;
|
||||
engFactory: TEdit;
|
||||
ChnFactory: TEdit;
|
||||
TelePhone: TEdit;
|
||||
ywy: TEdit;
|
||||
customNo: TBtnEditA;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
Label3: TLabel;
|
||||
tv1labelId: TcxGridDBColumn;
|
||||
ToolBar2: TToolBar;
|
||||
Tadd: TToolButton;
|
||||
Tupd: TToolButton;
|
||||
Tdel: TToolButton;
|
||||
TOK: TToolButton;
|
||||
Tclose: TToolButton;
|
||||
Panel4: TPanel;
|
||||
ToolButton1: TToolButton;
|
||||
Label9: TLabel;
|
||||
Label10: TLabel;
|
||||
LabelCaption: TEdit;
|
||||
LabelType: TFTComboBox;
|
||||
ADOQueryLabel: TClientDataSet;
|
||||
procedure TcloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TsaveClick(Sender: TObject);
|
||||
procedure customNoBtnClick(Sender: TObject);
|
||||
procedure BtOpenClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure RMPreview1DblClick(Sender: TObject);
|
||||
procedure TaddClick(Sender: TObject);
|
||||
procedure TupdClick(Sender: TObject);
|
||||
procedure tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure TdelClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TOkClick(Sender: TObject);
|
||||
procedure tv1DblClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure LabelTypeChange(Sender: TObject);
|
||||
procedure tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
isLoad:Boolean;
|
||||
function SaveData():Boolean;
|
||||
function EditData():Boolean;
|
||||
function IsCheckCustOk():Boolean;
|
||||
function DeleteData():Boolean;
|
||||
procedure InitWinData();
|
||||
procedure InitVarDictionary();
|
||||
procedure InitDataSetDictionary();
|
||||
procedure InitGrid();
|
||||
procedure OpenLabel();
|
||||
procedure SetWinStatus();
|
||||
procedure DoFilter();
|
||||
public
|
||||
fSelLabelId,LBName,LBInt,SLBName:String;
|
||||
fKeyNo:string;
|
||||
fchg:Boolean;
|
||||
fIsShowModal:Boolean;
|
||||
fWinStatus:integer;
|
||||
end;
|
||||
|
||||
var
|
||||
frmLabelList: TfrmLabelList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink, U_LabelAdd,U_RTFun;
|
||||
{$R *.dfm}
|
||||
procedure TfrmLabelList.DoFilter();
|
||||
var
|
||||
filterStr:string;
|
||||
begin
|
||||
filterStr:='';
|
||||
|
||||
if trim(LabelType.Text) <>'' then
|
||||
begin
|
||||
filterStr:=' and LabelType like '+quotedStr('%'+trim(LabelType.Text)+'%');
|
||||
end;
|
||||
//名称
|
||||
if trim(LabelCaption.Text)<>'' then
|
||||
begin
|
||||
filterStr:=filterStr+' and LabelCaption like '+quotedStr('%'+trim(LabelCaption.Text)+'%');
|
||||
end;
|
||||
try
|
||||
ADOQueryLabel10.DisableControls ;
|
||||
if trim(filterStr)='' then
|
||||
begin
|
||||
ADOQueryLabel.Filtered:=false;
|
||||
ADOQueryLabel.EnableControls;
|
||||
exit;
|
||||
end;
|
||||
filterStr:=trim(RightBStr(filterStr,length(filterStr)-4));
|
||||
with ADOQueryLabel do
|
||||
begin
|
||||
filtered:=false;
|
||||
filter:=filterStr;
|
||||
filtered:=true;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryLabel10,ADOQueryLabel);
|
||||
SInitCDSData20(ADOQueryLabel10,ADOQueryLabel);
|
||||
finally
|
||||
ADOQueryLabel10.EnableControls;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmLabelList.TcloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
panel1.Align :=alClient;
|
||||
// ClearWinData(panel3);
|
||||
fSelLabelId := '';
|
||||
|
||||
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TsaveClick(Sender: TObject);
|
||||
begin
|
||||
if trim(customNO.Text)='' then
|
||||
begin
|
||||
application.MessageBox('客户名称不能为空,请选择客户!','提示');
|
||||
customNo.SetFocus;
|
||||
exit;
|
||||
end;
|
||||
if application.MessageBox('确定要保存吗?','提示信息',1)=2 then exit;
|
||||
if fWinStatus=0 then
|
||||
begin
|
||||
if not IsCheckCustOk() then exit;
|
||||
if SaveData() then
|
||||
begin
|
||||
fWinStatus:=1;
|
||||
fchg:=true;
|
||||
SetWinStatus();
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if EditData() then
|
||||
begin
|
||||
fchg:=true;
|
||||
application.MessageBox('保存成功!','提示信息',0)
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.SaveData():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JD_Label');
|
||||
sql.Add('where 1<>1');
|
||||
Open;
|
||||
|
||||
Append;
|
||||
fieldByName('customno').value:=trim(customno.txtCode);
|
||||
fieldByName('ChnFactory').value:=trim(ChnFactory.text);
|
||||
fieldByName('engFactory').value:=trim(engFactory.text);
|
||||
fieldByName('TelePhone').value:=trim(TelePhone.text);
|
||||
fieldByName('ChnAddress').value:=trim(ChnAddress.text);
|
||||
fieldByName('EngAddress').value:=trim(EngAddress.text);
|
||||
fieldByName('filler').value:=Dname;
|
||||
fieldByName('filltime').value:=DServerDate;
|
||||
fieldByName('note').value:= trim(Note.text);
|
||||
Post;
|
||||
end;
|
||||
result:=true;
|
||||
except
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//函数功能:保存数据
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.EditData():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JD_Label');
|
||||
sql.Add('where customNo='+fKeyNo);
|
||||
Open;
|
||||
|
||||
Edit;
|
||||
fieldByName('customno').value:=trim(customno.txtCode);
|
||||
fieldByName('ChnFactory').value:=trim(ChnFactory.text);
|
||||
fieldByName('engFactory').value:=trim(engFactory.text);
|
||||
fieldByName('TelePhone').value:=trim(TelePhone.text);
|
||||
fieldByName('ChnAddress').value:=trim(ChnAddress.text);
|
||||
fieldByName('EngAddress').value:=trim(EngAddress.text);
|
||||
fieldByName('note').value:= trim(Note.text);
|
||||
Post;
|
||||
end;
|
||||
result:=true;
|
||||
except
|
||||
Result:=false;
|
||||
application.MessageBox('保存标签模板出错!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.customNoBtnClick(Sender: TObject);
|
||||
begin
|
||||
{ FormGetCust:=TFormGetCust.Create(self);
|
||||
|
||||
if FormGetCust.ShowModal=mrok then
|
||||
begin
|
||||
customNo.TxtCode:=trim(FormGetCust.ADOQuery1.Fieldbyname('customno').AsString);
|
||||
customNo.Text:=trim(FormGetCust.ADOQuery1.Fieldbyname('shortname').AsString);
|
||||
end;
|
||||
FormGetCust.Free; }
|
||||
{ frmCustHelp:=TfrmCustHelp.create(self);
|
||||
with frmCustHelp do
|
||||
begin
|
||||
if showModal=1 then
|
||||
begin
|
||||
customNo.TxtCode:=trim(ADOQueryHelp.Fieldbyname('customno').AsString);
|
||||
customNo.Text:=trim(ADOQueryHelp.Fieldbyname('shortname').AsString);
|
||||
end;
|
||||
free;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.BtOpenClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//初始化窗口数据
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitWinData();
|
||||
begin
|
||||
try
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select A.* ,B.customName as customNoName');
|
||||
sql.Add('from JD_Label A');
|
||||
sql.Add('INNER JOIN BC_customer B ON A.customNO=B.customNo');
|
||||
sql.Add('WHERE B.customNo='''+fkeyNo+'''');
|
||||
Open;
|
||||
if isEmpty then
|
||||
begin
|
||||
close;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// SetWinData(ADOQueryTmp,panel3);
|
||||
{
|
||||
RMGridReport1.LoadFromBlobField(tblobfield(fieldbyname('labelFile')));
|
||||
RMGridReport1.Preview :=RMPreview1;
|
||||
RMGridReport1.PrepareReport;
|
||||
RMGridReport1.ShowReport ;
|
||||
}
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormShow(Sender: TObject);
|
||||
begin
|
||||
if fWinStatus=1 then tok.Visible:=false;
|
||||
InitGrid();
|
||||
if Trim(SLBName)<>'' then
|
||||
begin
|
||||
ADOQueryLabel.Locate('labelCaption',SLBName,[]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.RMPreview1DblClick(Sender: TObject);
|
||||
begin
|
||||
//btOpen.Click ;
|
||||
end;
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitVarDictionary();
|
||||
var
|
||||
TmpList:Tstrings;
|
||||
mm:string;
|
||||
i:integer;
|
||||
begin
|
||||
try
|
||||
TmpList:=TstringList.Create();
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select distinct ItemType from JC_LabelSetItems ');
|
||||
sql.Add('where valid=''Y''');
|
||||
Open;
|
||||
TmpList.Clear ;
|
||||
while not Eof do
|
||||
begin
|
||||
TmpList.Add(trim(fieldByName('ItemType').AsString));
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
TmpList.Free ;
|
||||
end;
|
||||
end;
|
||||
/////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitDataSetDictionary();
|
||||
begin
|
||||
{ with ADOQuery1 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('exec P_Get_LabelPrintData');
|
||||
sql.Add(quotedStr(''));
|
||||
sql.Add(','+quotedStr(''));
|
||||
sql.Add(','+quotedStr(''));
|
||||
OPen;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TaddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmLabelAdd:=TfrmLabelAdd.create(self);
|
||||
with frmLabelAdd do
|
||||
begin
|
||||
if showModal =1 then
|
||||
begin
|
||||
fchg:=true;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelAdd.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TupdClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
try
|
||||
frmLabelAdd:=TfrmLabelAdd.create(self);
|
||||
with frmLabelAdd do
|
||||
begin
|
||||
fKeyNo:=ADOQueryLabel.fieldByName('LabelId').AsString ;
|
||||
fWinstatus:=1;
|
||||
if showModal =1 then
|
||||
begin
|
||||
fchg:=true;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelAdd.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
/////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////
|
||||
procedure TfrmLabelList.InitGrid();
|
||||
begin
|
||||
try
|
||||
isLoad:=false;
|
||||
ADOQueryLabel10.DisableControls ;
|
||||
with ADOQueryLabel10 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select * from P_Label');
|
||||
sql.Add('where valid=''Y''');
|
||||
sql.Add(' order by labelCaption');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryLabel10,ADOQueryLabel);
|
||||
SInitCDSData20(ADOQueryLabel10,ADOQueryLabel);
|
||||
finally
|
||||
ADOQueryLabel10.EnableControls;
|
||||
isLoad:=true;
|
||||
//DoFilter();
|
||||
//OpenLabel();
|
||||
end;
|
||||
end;
|
||||
////////////////////////////////////////////////////////
|
||||
//函数功能:打开标签文件
|
||||
////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.OpenLabel();
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
with RMGridReport1 do
|
||||
begin
|
||||
LoadFromBlobField(tblobfield(ADOQueryLabel.fieldbyname('labelFile')));
|
||||
//Preview :=RMPreview1;
|
||||
ShowReport ;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmLabelList.tv1FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
|
||||
end;
|
||||
//////////////////////////////////////////////////////////
|
||||
//函数功能:检查该客户的标签是否已存在
|
||||
/////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.IsCheckCustOk():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryTmp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear ;
|
||||
sql.Add('select count(customNO)as cnt from P_Label');
|
||||
sql.Add('where customNO='''+trim(customNO.TxtCode)+'''');
|
||||
Open;
|
||||
|
||||
if fieldByName('cnt').AsInteger>0 then
|
||||
begin
|
||||
Result:=false ;
|
||||
application.MessageBox('该客户标签信息已存!','警告信息',0);
|
||||
end
|
||||
else
|
||||
Result:=true;
|
||||
end;
|
||||
except
|
||||
result:=false;
|
||||
application.MessageBox('检查该客户标签信息是否已存在时发生错误!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////////////////
|
||||
function TfrmLabelList.DeleteData():Boolean;
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.Add('delete P_Label');
|
||||
sql.Add('where labelId='+ADOQueryLabel.fieldByName('LabelID').asString);
|
||||
execSql;
|
||||
end;
|
||||
result:=true;
|
||||
except
|
||||
result:=false;
|
||||
application.MessageBox('删除失败!','警告信息',0);
|
||||
end;
|
||||
end;
|
||||
procedure TfrmLabelList.TdelClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
if application.MessageBox('确定要删除此标签吗?','警告信息',1)=2 then exit;
|
||||
if DeleteData() then
|
||||
begin
|
||||
fchg:=true;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
//////////////////////////////////////////////////////////
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
procedure TfrmLabelList.SetWinStatus();
|
||||
begin
|
||||
case fWinStatus of
|
||||
0:
|
||||
begin
|
||||
// ToolBar2.Visible :=false;
|
||||
// tsave.Visible :=true;
|
||||
customNo.Enabled :=true;
|
||||
panel3.Enabled :=true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
// ToolBar2.Visible :=true;
|
||||
// tsave.Visible :=false;
|
||||
customNo.Enabled :=false;
|
||||
panel3.Enabled :=false;
|
||||
TOK.Visible:=false;
|
||||
end;
|
||||
5:
|
||||
begin
|
||||
// ToolBar2.Visible :=false;
|
||||
// tsave.Visible :=false;
|
||||
panel1.Enabled :=false;
|
||||
panel3.Enabled :=false;
|
||||
end;
|
||||
end ;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
{if fIsShowModal then
|
||||
Application:=MainApplication ; }
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmLabelList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.TOkClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryLabel.IsEmpty then exit;
|
||||
LBName:=Trim(ADOQueryLabel.fieldbyname('labelCaption').AsString);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
TOk.Click ;
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.LabelTypeChange(Sender: TObject);
|
||||
begin
|
||||
DoFilter();
|
||||
end;
|
||||
|
||||
procedure TfrmLabelList.tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if isLoad then
|
||||
OpenLabel();
|
||||
end;
|
||||
|
||||
end.
|
||||
181
产品报价(ProductQuotation)/U_ModuleNote.dfm
Normal file
181
产品报价(ProductQuotation)/U_ModuleNote.dfm
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
object frmModuleNote: TfrmModuleNote
|
||||
Left = 326
|
||||
Top = 178
|
||||
Width = 729
|
||||
Height = 528
|
||||
Align = alClient
|
||||
Caption = #25805#20316#35828#26126
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 713
|
||||
Height = 416
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
object V1OrderNo: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'MNDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object V1Name: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #25805#20316#35828#26126
|
||||
DataBinding.FieldName = 'MNNOte'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 513
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 713
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 118
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 177
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 236
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 713
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label2: TLabel
|
||||
Left = -31
|
||||
Top = 13
|
||||
Width = 360
|
||||
Height = 16
|
||||
Caption = ' '#27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#21333#20803#26684#20445#23384#25968#25454#12290
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 280
|
||||
Top = 144
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 208
|
||||
Top = 144
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 168
|
||||
Top = 152
|
||||
end
|
||||
end
|
||||
220
产品报价(ProductQuotation)/U_ModuleNote.pas
Normal file
220
产品报价(ProductQuotation)/U_ModuleNote.pas
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
unit U_ModuleNote;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
cxTimeEdit, cxCalendar;
|
||||
|
||||
type
|
||||
TfrmModuleNote = class(TForm)
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
V1Name: TcxGridDBColumn;
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
TBAdd: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
V1OrderNo: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label2: TLabel;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag:string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmModuleNote: TfrmModuleNote;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmModuleNote.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Module_Note A where A.MNType='''+flag+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmModuleNote.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing:=True;
|
||||
TV1.OptionsSelection.CellSelect:=True;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('MNDate').Value:=Now;
|
||||
Post;
|
||||
end;
|
||||
|
||||
end;
|
||||
procedure TfrmModuleNote.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
if (Trim(ClientDataSet1.FieldByName('MNID').AsString)<>'') then
|
||||
begin
|
||||
if application.MessageBox('确定要删除吗?','提示信息',1)=2 then exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete SY_Module_Note where MNID='''+Trim(ClientDataSet1.fieldbyname('MNID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=2;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'模块说明');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj,fsj1:string;
|
||||
begin
|
||||
InitGrid();
|
||||
ReadCxGrid('自定义'+Trim(flag),TV1,'模块说明');
|
||||
frmModuleNote.Caption:=Trim(flag);
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'模块说明');
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing:=True;
|
||||
TV1.OptionsSelection.CellSelect:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if TV1.OptionsData.Editing=False then
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmModuleNote.V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
maxno,mvalue:string;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
//Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('MNNote').Value:=Trim(mvalue);
|
||||
//Post;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(ClientDataSet1.FieldByName('MNID').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxno,'SY','SY_Module_Note',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('取最大编号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxno:=Trim(ClientDataSet1.fieldbyname('MNID').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from SY_Module_Note ');
|
||||
sql.Add(' where MNID='''+Trim(ClientDataSet1.fieldbyname('MNID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('MNID').AsString)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('FillTime').Value:=Now;
|
||||
end
|
||||
else begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=Now;
|
||||
end;
|
||||
FieldByName('MNDate').Value:=ClientDataSet1.fieldbyname('MNDate').Value;
|
||||
FieldByName('MNID').Value:=Trim(maxno);
|
||||
FieldByName('MNNote').Value:=ClientDataSet1.fieldbyname('MNNote').AsString;
|
||||
FieldByName('MNType').Value:=flag;
|
||||
Post;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('MNID').Value:=Trim(maxno);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
342
产品报价(ProductQuotation)/U_ModulePromptList.dfm
Normal file
342
产品报价(ProductQuotation)/U_ModulePromptList.dfm
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
object frmModulePromptList: TfrmModulePromptList
|
||||
Left = 131
|
||||
Top = 161
|
||||
Width = 1133
|
||||
Height = 547
|
||||
Caption = #25105#30340#31649#23478
|
||||
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 = 1117
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1117
|
||||
Height = 66
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 75
|
||||
Top = 11
|
||||
Width = 84
|
||||
Height = 12
|
||||
Caption = #38144#21806#21512#21516#26410#23457#26680
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 48
|
||||
Top = 8
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'aa:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 242
|
||||
Top = 11
|
||||
Width = 96
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#26410#23457#26680
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 215
|
||||
Top = 8
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'bb:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 457
|
||||
Top = 11
|
||||
Width = 120
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#24037#24207#26410#23450#20041
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 428
|
||||
Top = 8
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'cc:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 75
|
||||
Top = 40
|
||||
Width = 120
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#24037#24207#26410#23433#25490
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 48
|
||||
Top = 37
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'dd:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 241
|
||||
Top = 40
|
||||
Width = 168
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#37319#36141#21152#24037#21512#21516#26410#24405#20837
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 214
|
||||
Top = 37
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'ee:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 456
|
||||
Top = 40
|
||||
Width = 108
|
||||
Height = 12
|
||||
Caption = #29983#20135#25351#31034#21333#29983#20135#36229#26399
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 428
|
||||
Top = 37
|
||||
Width = 27
|
||||
Height = 16
|
||||
Caption = 'ff:'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 627
|
||||
Top = 11
|
||||
Width = 84
|
||||
Height = 12
|
||||
Caption = #26597' '#35810' '#26465' '#20214
|
||||
end
|
||||
object ModuleNote: TEdit
|
||||
Tag = 2
|
||||
Left = 608
|
||||
Top = 36
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = ModuleNoteChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 98
|
||||
Width = 1117
|
||||
Height = 410
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
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
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #24453#22788#29702#20107#39033
|
||||
DataBinding.FieldName = 'ModuleNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Footer = DataLink_DDMD.FoneRed
|
||||
Width = 843
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 1128
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 936
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1000
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1040
|
||||
Top = 8
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 1168
|
||||
Top = 8
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 815
|
||||
Top = 7
|
||||
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 = 475
|
||||
Top = 193
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 400
|
||||
Top = 192
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 440
|
||||
Top = 192
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 877
|
||||
Top = 9
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 506
|
||||
Top = 195
|
||||
end
|
||||
end
|
||||
257
产品报价(ProductQuotation)/U_ModulePromptList.pas
Normal file
257
产品报价(ProductQuotation)/U_ModulePromptList.pas
Normal file
|
|
@ -0,0 +1,257 @@
|
|||
unit U_ModulePromptList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter,
|
||||
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
|
||||
cxTextEdit, cxPC;
|
||||
|
||||
type
|
||||
TfrmModulePromptList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Main: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_PRT: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label10: TLabel;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
ModuleNote: TEdit;
|
||||
Label13: TLabel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxPageControl1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure ModuleNoteChange(Sender: TObject);
|
||||
private
|
||||
FormID,FormType:Integer;
|
||||
canshu1,canshu2:string;
|
||||
formFile,FormPara,Formname,FFormPara:string;
|
||||
FormPara1,FormPara2,FormPara3,FormPara4,FormPara5:string;
|
||||
FormPara6,FormPara7,FormPara8,FormPara9,FormPara10:string;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
procedure InitDllEvt(FromFile:String;FormID:Integer;Para:String;FormType:Integer; Title: String;
|
||||
Def1: String; Def2: String; Def3: String; Def4: String; Def5: String;
|
||||
Def6: String; Def7: String; Def8: String; Def9: String; Def10: string);
|
||||
|
||||
|
||||
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
userID,username,ADOConnString:string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmModulePromptList: TfrmModulePromptList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
type
|
||||
TMyF = function(
|
||||
App: TApplication; //主应用程序 (对Delphi而言)
|
||||
FormH: HWND; //创建窗口的父窗口句柄 (对PB而言)
|
||||
FormID: Integer; //要调用dll中功能窗体的Id号; 如果只有一个功能窗口,FormID默认为0
|
||||
Language: Integer; //0=Delphi; 1=PB
|
||||
WinStyle: Integer; //0=子窗口; 1:普通窗口 (PB中都为普通窗口)
|
||||
UID: PChar; //用户Id
|
||||
UName: PChar; //用户名
|
||||
Para: PChar;
|
||||
Title: PChar;
|
||||
Defstr1: PChar;
|
||||
Defstr2: PChar;
|
||||
Defstr3: PChar;
|
||||
Defstr4: PChar;
|
||||
Defstr5: PChar;
|
||||
Defstr6: PChar;
|
||||
Defstr7: PChar;
|
||||
Defstr8: PChar;
|
||||
Defstr9: PChar;
|
||||
Defstr10: PChar;
|
||||
Datalink: PChar
|
||||
): HWND; stdcall;
|
||||
var
|
||||
TP: FARPROC;
|
||||
Tf: TMyF;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmModulePromptList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmModulePromptList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('工作列表',Tv1,'我的管家');
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add(' exec P_Chk_Tishi :DName,:DCode');
|
||||
Parameters.ParamByName('DName').Value:=Trim(DName);
|
||||
Parameters.ParamByName('DCode').Value:=Trim(DCode);
|
||||
ExecSQL;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.InitForm();
|
||||
begin
|
||||
FFormPara:=Trim(DConString);
|
||||
ReadCxGrid('工作列表',Tv1,'我的管家');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.cxPageControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
procedure TfrmModulePromptList.InitDllEvt(FromFile:String;FormID:Integer;Para:String;FormType:Integer; Title: String;
|
||||
Def1: String; Def2: String; Def3: String; Def4: String; Def5: String;
|
||||
Def6: String; Def7: String; Def8: String; Def9: String; Def10: string);
|
||||
var
|
||||
Th: HMODULE;
|
||||
begin
|
||||
Th := LoadLibrary(PChar(FromFile));
|
||||
if Th > 0 then
|
||||
begin
|
||||
TP := GetProcAddress(Th, 'GetDllForm');
|
||||
if TP <> nil then
|
||||
begin
|
||||
Tf := TMyF(Tp);
|
||||
Tf(Application, 0, FormID, 0, FormType, PChar(DCode), PChar(DName), PChar(Para), PChar(Title),
|
||||
PChar(Def1), PChar(Def2),PChar(Def3),PChar(Def4),PChar(Def5),
|
||||
PChar(Def6),PChar(Def7),PChar(Def8),PChar(Def9),PChar(Def10),
|
||||
pchar(FFormPara));
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('打不开文件' + FromFile + '!'), '错误', MB_ICONERROR);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmModulePromptList.Tv1CellDblClick(
|
||||
Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
{ with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_ModuleSub where ModuleId='''+Trim(Order_Main.fieldbyname('ModuleId').AsString)+'''');
|
||||
sql.Add(' and ModuleSubId='''+Trim(Order_Main.fieldbyname('ModuleSubId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
//FormID,FormType:Integer;
|
||||
// formFile,FormPara,Formname:string;
|
||||
// FormPara1,FormPara2,FormPara3,FormPara4,FormPara5:string;
|
||||
//FormPara6,FormPara7,FormPara8,FormPara9,FormPara10:string;
|
||||
formFile:=Trim(ADOQueryTemp.fieldbyname('FormFile').AsString);
|
||||
FormID:=ADOQueryTemp.fieldbyname('FormID').AsInteger;
|
||||
FormType:=ADOQueryTemp.fieldbyname('FormType').AsInteger;
|
||||
Formname:=Trim(ADOQueryTemp.fieldbyname('Formname').AsString);
|
||||
FormPara:=Trim(ADOQueryTemp.fieldbyname('FormPara').AsString);
|
||||
// ShowMessage(FormPara);
|
||||
FormPara1:=Trim(ADOQueryTemp.fieldbyname('FormPara1').AsString);
|
||||
FormPara2:=Trim(ADOQueryTemp.fieldbyname('FormPara2').AsString);
|
||||
FormPara3:=Trim(ADOQueryTemp.fieldbyname('FormPara3').AsString);
|
||||
FormPara4:=Trim(ADOQueryTemp.fieldbyname('FormPara4').AsString);
|
||||
FormPara5:=Trim(ADOQueryTemp.fieldbyname('FormPara5').AsString);
|
||||
FormPara6:=Trim(ADOQueryTemp.fieldbyname('FormPara6').AsString);
|
||||
FormPara7:=Trim(ADOQueryTemp.fieldbyname('FormPara7').AsString);
|
||||
FormPara8:=Trim(ADOQueryTemp.fieldbyname('FormPara8').AsString);
|
||||
FormPara9:=Trim(ADOQueryTemp.fieldbyname('FormPara9').AsString);
|
||||
FormPara10:=Trim(ADOQueryTemp.fieldbyname('FormPara10').AsString);
|
||||
InitDllEvt(formFile,FormID,FormPara,FormType,Formname,FormPara1,FormPara2,
|
||||
FormPara3,FormPara4,FormPara5,FormPara6,FormPara7,FormPara8,
|
||||
FormPara9,FormPara10); }
|
||||
end;
|
||||
|
||||
procedure TfrmModulePromptList.ModuleNoteChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
end;
|
||||
|
||||
end.
|
||||
36
产品报价(ProductQuotation)/U_SLT.dfm
Normal file
36
产品报价(ProductQuotation)/U_SLT.dfm
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
object frmSLT: TfrmSLT
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 161
|
||||
Height = 138
|
||||
TabOrder = 0
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 121
|
||||
Width = 161
|
||||
Height = 17
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Caption = 'Panel1'
|
||||
Color = clWindow
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object cxImage1: TcxImage
|
||||
Left = 0
|
||||
Top = 0
|
||||
Align = alTop
|
||||
Style.BorderStyle = ebsOffice11
|
||||
StyleHot.TextStyle = []
|
||||
TabOrder = 1
|
||||
OnClick = cxImage1Click
|
||||
OnDblClick = cxImage1DblClick
|
||||
Height = 121
|
||||
Width = 161
|
||||
end
|
||||
end
|
||||
84
产品报价(ProductQuotation)/U_SLT.pas
Normal file
84
产品报价(ProductQuotation)/U_SLT.pas
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
unit U_SLT;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls,jpeg, cxControls, cxContainer, cxEdit, cxImage,IdFTP,ShellAPI;
|
||||
|
||||
type
|
||||
TfrmSLT = class(TFrame)
|
||||
cxImage1: TcxImage;
|
||||
Panel1: TPanel;
|
||||
procedure cxImage1Click(Sender: TObject);
|
||||
procedure cxImage1DblClick(Sender: TObject);
|
||||
private
|
||||
CYID,FileName:string;
|
||||
// procedure Sharpen(SrcBmp:TBitmap);
|
||||
{ Private declarations }
|
||||
public
|
||||
procedure Init(fCYID:string;fFileName:string;fPicture:TJpegImage);
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink;
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure TfrmSLT.Init(fCYID:string;fFileName:string;fPicture:TJpegImage);
|
||||
begin
|
||||
CYID:=trim(fCYID);
|
||||
FileName:=trim(fFileName);
|
||||
Panel1.Caption:=FileName;
|
||||
cxImage1.Picture.Assign(fPicture);
|
||||
end;
|
||||
procedure TfrmSLT.cxImage1Click(Sender: TObject);
|
||||
begin
|
||||
// Fsplcode:=splcode;
|
||||
// FPatFile:=patfile;
|
||||
/// frmSample_List.Fsplcode:=splcode;
|
||||
/// frmSample_List.FPatFile:=patfile;
|
||||
// showmessage(splcode);
|
||||
end;
|
||||
|
||||
procedure TfrmSLT.cxImage1DblClick(Sender: TObject);
|
||||
var
|
||||
IdFTP1: TIdFTP;
|
||||
FPath,FFName:string;
|
||||
FInt:integer;
|
||||
begin
|
||||
try
|
||||
IdFTP1:=TIdFTP.Create(self);
|
||||
IdFTP1.Host :=PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
IdFTP1.Free;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
FPath:='D:\Right1209\';
|
||||
if not DirectoryExists(ExtractFileDir(FPath)) then
|
||||
CreateDir(ExtractFileDir(FPath));
|
||||
FFName:=Trim(FileName);
|
||||
FFName:=FPath+FFName;
|
||||
if FileExists(FFName) then
|
||||
begin
|
||||
FInt:=1;
|
||||
end;
|
||||
if FInt<>1 then
|
||||
IdFTP1.Get('YP\'+FileName,FFName);
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
IdFTP1.Quit;
|
||||
IdFTP1.Free;
|
||||
end;
|
||||
ShellExecute(Handle, 'open',PChar(FFName),'', '', SW_SHOWNORMAL);
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
311
产品报价(ProductQuotation)/U_SYDept.dfm
Normal file
311
产品报价(ProductQuotation)/U_SYDept.dfm
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
object frmSYDept: TfrmSYDept
|
||||
Left = 73
|
||||
Top = 128
|
||||
Width = 1004
|
||||
Height = 509
|
||||
Caption = #32452#32455#32467#26500
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 988
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_DDMD.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#23376#31867
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 150
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 5
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #32452#32455#20998#37197
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 363
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 249
|
||||
Height = 437
|
||||
Align = alLeft
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
BufferedPaint = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'DPParent'
|
||||
DataController.KeyField = 'DPID'
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_DDMD.Red
|
||||
Styles.Selection = DataLink_DDMD.Red
|
||||
Styles.IncSearch = DataLink_DDMD.Red
|
||||
TabOrder = 1
|
||||
OnClick = cxDBTreeList1Click
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'DPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 249
|
||||
Top = 33
|
||||
Width = 315
|
||||
Height = 437
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 41
|
||||
Top = 40
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #19978#32423#32452#32455
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 41
|
||||
Top = 81
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32452#32455#21517#31216
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 41
|
||||
Top = 121
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32452#32455#32534#30721
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 24
|
||||
Top = 16
|
||||
Width = 60
|
||||
Height = 14
|
||||
Caption = #32452#32455#32467#26500
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 41
|
||||
Top = 159
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #39034' '#24207' '#21495
|
||||
end
|
||||
object DPTopName: TEdit
|
||||
Left = 104
|
||||
Top = 37
|
||||
Width = 169
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object DPName: TEdit
|
||||
Left = 104
|
||||
Top = 77
|
||||
Width = 169
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = DPNameKeyPress
|
||||
end
|
||||
object DPNo: TEdit
|
||||
Left = 104
|
||||
Top = 117
|
||||
Width = 169
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object DPOrder: TEdit
|
||||
Left = 104
|
||||
Top = 155
|
||||
Width = 169
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object cxGrid4: TcxGrid
|
||||
Left = 564
|
||||
Top = 33
|
||||
Width = 424
|
||||
Height = 437
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv4: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DSUser
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_DDMD.SHuangSe
|
||||
Styles.IncSearch = DataLink_DDMD.SHuangSe
|
||||
Styles.Selection = DataLink_DDMD.SHuangSe
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21592#24037#32534#21495
|
||||
DataBinding.FieldName = 'UserId'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #30331#24405#21517#31216
|
||||
DataBinding.FieldName = 'UserName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
Width = 87
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #21592#24037#32452#32455
|
||||
DataBinding.FieldName = 'dept'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
Width = 74
|
||||
end
|
||||
object v4Column1: TcxGridDBColumn
|
||||
Caption = #31995#32479#21517#31216
|
||||
DataBinding.FieldName = 'MoneyUserName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
Properties.OnEditValueChanged = v4Column1PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_DDMD.Default
|
||||
Width = 91
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv4
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Tree
|
||||
Left = 147
|
||||
Top = 219
|
||||
end
|
||||
object ADOQueryTree: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 117
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 528
|
||||
Top = 215
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 258
|
||||
end
|
||||
object CDS_Tree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 96
|
||||
Top = 256
|
||||
end
|
||||
object CDS_User: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 680
|
||||
Top = 272
|
||||
end
|
||||
object DSUser: TDataSource
|
||||
DataSet = CDS_User
|
||||
Left = 675
|
||||
Top = 211
|
||||
end
|
||||
end
|
||||
353
产品报价(ProductQuotation)/U_SYDept.pas
Normal file
353
产品报价(ProductQuotation)/U_SYDept.pas
Normal file
|
|
@ -0,0 +1,353 @@
|
|||
unit U_SYDept;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, ExtCtrls, DBClient, cxFilter, cxData, cxDataStorage, cxEdit,
|
||||
cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxGridCustomView, cxGrid, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmSYDept = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTree: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
DPTopName: TEdit;
|
||||
DPName: TEdit;
|
||||
DPNo: TEdit;
|
||||
CDS_Tree: TClientDataSet;
|
||||
cxGrid4: TcxGrid;
|
||||
Tv4: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Label4: TLabel;
|
||||
ToolButton2: TToolButton;
|
||||
CDS_User: TClientDataSet;
|
||||
DSUser: TDataSource;
|
||||
Label5: TLabel;
|
||||
DPOrder: TEdit;
|
||||
v4Column1: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure cxDBTreeList1Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure v4Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
PState:Integer;
|
||||
FCPID,FTopID:String;
|
||||
procedure InitTree();
|
||||
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSYDept: TfrmSYDept;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSYDept.InitTree();
|
||||
var
|
||||
i:Integer;
|
||||
begin
|
||||
try
|
||||
ADOQueryTree.DisableControls;
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_Dept order by DPlevel,DPOrder,DPName');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTree,CDS_Tree);
|
||||
SInitCDSData20(ADOQueryTree,CDS_Tree);
|
||||
//cxDBTreeList1.Items[0].Expand(false);
|
||||
cxDBTreeList1.Items[0].Expand(True);
|
||||
finally
|
||||
ADOQueryTree.EnableControls;
|
||||
end;
|
||||
//cxDBTreeList1.Items[1].Expand(False);
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSYDept:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
PState:=11;
|
||||
DPTopName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
//FTopID:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
FCPID:='';
|
||||
DPName.Text:='';
|
||||
DPNo.Text:='';
|
||||
DPName.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.cxDBTreeList1Click(Sender: TObject);
|
||||
begin
|
||||
PState:=22;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPParent').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
FCPID:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
DPTopName.Text:=Trim(ADOQueryTemp.fieldbyname('DPName').AsString);
|
||||
DPName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
DPNo.Text:=Trim(CDS_Tree.fieldbyname('DPNo').AsString);
|
||||
DPOrder.Text:=Trim(CDS_Tree.fieldbyname('DPOrder').AsString);
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
maxId:String;
|
||||
FInt:Integer;
|
||||
begin
|
||||
if Trim(DPName.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('本级名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
{if Trim(DPNo.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('类别编码不能为空!','提示',0);
|
||||
Exit;
|
||||
end;}
|
||||
if Trim(DPOrder.Text)='' then
|
||||
begin
|
||||
DPOrder.Text:='99';
|
||||
end;
|
||||
if TryStrToInt(Trim(DPOrder.Text),FInt)=False then
|
||||
begin
|
||||
Application.MessageBox('顺序号非法数字!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if PState=11 then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxId,'DP','SY_Dept',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('区最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxId:=Trim(FCPID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from SY_Dept where DPID='''+Trim(FCPID)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if PState=11 then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('DPID').Value:=Trim(maxId);
|
||||
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||
FieldByName('DPParent').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
FieldByName('DPLevel').Value:=CDS_Tree.fieldbyname('DPLevel').AsInteger+1;
|
||||
FieldByName('DPOrder').Value:=StrToInt(Trim(DPOrder.Text));
|
||||
Post;
|
||||
end else
|
||||
if PState=22 then
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('DPID').Value:=Trim(maxId);
|
||||
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||
FieldByName('DPOrder').Value:=StrToInt(Trim(DPOrder.Text));
|
||||
//FieldByName('CPParent').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
//FieldByName('CPOrder').Value:=ADOQueryTree.fieldbyname('CPOrder').AsInteger+1;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryTree.FieldByName('DPLevel').AsInteger=0 then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('已经定义下级组织不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_User where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('该组织已有人员不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
sql.Add('delete SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
DPNo.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Tree.IsEmpty=False then
|
||||
begin
|
||||
if CDS_User.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要进行组织分配吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update SY_User Set DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
sql.Add(' where UserId='''+Trim(CDS_User.fieldbyname('UserId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with CDS_User do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Dept').Value:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Tree.FieldByName('DPLevel').Value=0 then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select A.*,Dept=(select DPName from SY_Dept where DPID=A.DPID) ');
|
||||
SQL.Add(' from SY_User A where UserId not in(''Admin'',''Test'') ');
|
||||
SQL.Add(' and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('exec P_Select_Dept_User :CYType');
|
||||
Parameters.ParamByName('CYType').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDept.v4Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue:string;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
with CDS_User do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('MoneyUserName').Value:=Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update SY_User Set MoneyUserName='''+Trim(mvalue)+'''');
|
||||
sql.Add(' where UserId='''+Trim(CDS_User.fieldbyname('UserId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
296
产品报价(ProductQuotation)/U_SYDeptUserView.dfm
Normal file
296
产品报价(ProductQuotation)/U_SYDeptUserView.dfm
Normal file
|
|
@ -0,0 +1,296 @@
|
|||
object frmSYDeptUserView: TfrmSYDeptUserView
|
||||
Left = 233
|
||||
Top = 146
|
||||
Width = 927
|
||||
Height = 536
|
||||
Caption = #32452#32455#32467#26500#20154#21592#21015#34920
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 911
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_CYZZ.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#23376#31867
|
||||
ImageIndex = 12
|
||||
Visible = False
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 150
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 5
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 13
|
||||
Visible = False
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
Caption = #32452#32455#20998#37197
|
||||
ImageIndex = 22
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 359
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 249
|
||||
Height = 464
|
||||
Align = alLeft
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
BufferedPaint = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'DPParent'
|
||||
DataController.KeyField = 'DPID'
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_CYZZ.Red
|
||||
Styles.Selection = DataLink_CYZZ.Red
|
||||
Styles.IncSearch = DataLink_CYZZ.Red
|
||||
TabOrder = 1
|
||||
OnClick = cxDBTreeList1Click
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'DPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 249
|
||||
Top = 33
|
||||
Width = 315
|
||||
Height = 464
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object Label1: TLabel
|
||||
Left = 66
|
||||
Top = 40
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #19978#32423#32452#32455
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 66
|
||||
Top = 81
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32452#32455#21517#31216
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 66
|
||||
Top = 121
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32452#32455#32534#30721
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 24
|
||||
Top = 16
|
||||
Width = 60
|
||||
Height = 14
|
||||
Caption = #32452#32455#32467#26500
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 66
|
||||
Top = 159
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #39034' '#24207' '#21495
|
||||
end
|
||||
object DPTopName: TEdit
|
||||
Left = 129
|
||||
Top = 37
|
||||
Width = 121
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object DPName: TEdit
|
||||
Left = 129
|
||||
Top = 77
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = DPNameKeyPress
|
||||
end
|
||||
object DPNo: TEdit
|
||||
Left = 129
|
||||
Top = 117
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object DPOrder: TEdit
|
||||
Left = 129
|
||||
Top = 155
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object cxGrid4: TcxGrid
|
||||
Left = 564
|
||||
Top = 33
|
||||
Width = 347
|
||||
Height = 464
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv4: TcxGridDBTableView
|
||||
OnDblClick = Tv4DblClick
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DSUser
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21592#24037#32534#21495
|
||||
DataBinding.FieldName = 'UserId'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21592#24037#21517#31216
|
||||
DataBinding.FieldName = 'UserName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 87
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #21592#24037#32452#32455
|
||||
DataBinding.FieldName = 'dept'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 74
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv4
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Tree
|
||||
Left = 147
|
||||
Top = 219
|
||||
end
|
||||
object ADOQueryTree: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 117
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 111
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 146
|
||||
end
|
||||
object CDS_Tree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 96
|
||||
Top = 256
|
||||
end
|
||||
object CDS_User: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 680
|
||||
Top = 272
|
||||
end
|
||||
object DSUser: TDataSource
|
||||
DataSet = CDS_User
|
||||
Left = 675
|
||||
Top = 211
|
||||
end
|
||||
end
|
||||
336
产品报价(ProductQuotation)/U_SYDeptUserView.pas
Normal file
336
产品报价(ProductQuotation)/U_SYDeptUserView.pas
Normal file
|
|
@ -0,0 +1,336 @@
|
|||
unit U_SYDeptUserView;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, ExtCtrls, DBClient, cxFilter, cxData, cxDataStorage, cxEdit,
|
||||
cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxGridCustomView, cxGrid;
|
||||
|
||||
type
|
||||
TfrmSYDeptUserView = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTree: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
DPTopName: TEdit;
|
||||
DPName: TEdit;
|
||||
DPNo: TEdit;
|
||||
CDS_Tree: TClientDataSet;
|
||||
cxGrid4: TcxGrid;
|
||||
Tv4: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Label4: TLabel;
|
||||
ToolButton2: TToolButton;
|
||||
CDS_User: TClientDataSet;
|
||||
DSUser: TDataSource;
|
||||
Label5: TLabel;
|
||||
DPOrder: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure cxDBTreeList1Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure Tv4DblClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
PState:Integer;
|
||||
FCPID,FTopID:String;
|
||||
procedure InitTree();
|
||||
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSYDeptUserView: TfrmSYDeptUserView;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSYDeptUserView.InitTree();
|
||||
var
|
||||
i:Integer;
|
||||
begin
|
||||
try
|
||||
ADOQueryTree.DisableControls;
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_Dept order by DPlevel,DPOrder,DPName');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTree,CDS_Tree);
|
||||
SInitCDSData20(ADOQueryTree,CDS_Tree);
|
||||
//cxDBTreeList1.Items[0].Expand(false);
|
||||
cxDBTreeList1.Items[0].Expand(True);
|
||||
finally
|
||||
ADOQueryTree.EnableControls;
|
||||
end;
|
||||
//cxDBTreeList1.Items[1].Expand(False);
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSYDeptUserView:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
PState:=11;
|
||||
DPTopName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
//FTopID:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
FCPID:='';
|
||||
DPName.Text:='';
|
||||
DPNo.Text:='';
|
||||
DPName.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.cxDBTreeList1Click(Sender: TObject);
|
||||
begin
|
||||
PState:=22;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPParent').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
FCPID:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
DPTopName.Text:=Trim(ADOQueryTemp.fieldbyname('DPName').AsString);
|
||||
DPName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
DPNo.Text:=Trim(CDS_Tree.fieldbyname('DPNo').AsString);
|
||||
DPOrder.Text:=Trim(CDS_Tree.fieldbyname('DPOrder').AsString);
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
maxId:String;
|
||||
FInt:Integer;
|
||||
begin
|
||||
if Trim(DPName.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('本级名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
{if Trim(DPNo.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('类别编码不能为空!','提示',0);
|
||||
Exit;
|
||||
end;}
|
||||
if Trim(DPOrder.Text)='' then
|
||||
begin
|
||||
DPOrder.Text:='99';
|
||||
end;
|
||||
if TryStrToInt(Trim(DPOrder.Text),FInt)=False then
|
||||
begin
|
||||
Application.MessageBox('顺序号非法数字!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if PState=11 then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxId,'DP','SY_Dept',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('区最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxId:=Trim(FCPID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from SY_Dept where DPID='''+Trim(FCPID)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if PState=11 then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('DPID').Value:=Trim(maxId);
|
||||
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||
FieldByName('DPParent').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
FieldByName('DPLevel').Value:=CDS_Tree.fieldbyname('DPLevel').AsInteger+1;
|
||||
FieldByName('DPOrder').Value:=StrToInt(Trim(DPOrder.Text));
|
||||
Post;
|
||||
end else
|
||||
if PState=22 then
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('DPID').Value:=Trim(maxId);
|
||||
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||
FieldByName('DPOrder').Value:=StrToInt(Trim(DPOrder.Text));
|
||||
//FieldByName('CPParent').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
//FieldByName('CPOrder').Value:=ADOQueryTree.fieldbyname('CPOrder').AsInteger+1;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryTree.FieldByName('DPLevel').AsInteger=0 then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('已经定义下级组织不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_User where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('该组织已有人员不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
sql.Add('delete SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
DPNo.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Tree.IsEmpty=False then
|
||||
begin
|
||||
if CDS_User.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要进行组织分配吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update SY_User Set DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
sql.Add(' where UserId='''+Trim(CDS_User.fieldbyname('UserId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with CDS_User do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Dept').Value:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Tree.FieldByName('DPLevel').Value=0 then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select A.*,Dept=(select DPName from SY_Dept where DPID=A.DPID) ');
|
||||
SQL.Add(' from SY_User A where UserId not in(''Admin'',''Test'') ');
|
||||
SQL.Add(' and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('exec P_Select_Dept_User :CYType');
|
||||
Parameters.ParamByName('CYType').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptUserView.Tv4DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
||||
304
产品报价(ProductQuotation)/U_SYDeptView.dfm
Normal file
304
产品报价(ProductQuotation)/U_SYDeptView.dfm
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
object frmSYDeptView: TfrmSYDeptView
|
||||
Left = 233
|
||||
Top = 146
|
||||
Width = 927
|
||||
Height = 536
|
||||
Caption = #32452#32455#32467#26500#21015#34920
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 911
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_KangChi.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_KangChi.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686#23376#31867
|
||||
ImageIndex = 12
|
||||
Visible = False
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 5
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 13
|
||||
Visible = False
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
Caption = #32452#32455#20998#37197
|
||||
ImageIndex = 22
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 422
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 315
|
||||
Top = 33
|
||||
Width = 596
|
||||
Height = 464
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
BufferedPaint = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'DPParent'
|
||||
DataController.KeyField = 'DPID'
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_KangChi.Red
|
||||
Styles.Selection = DataLink_KangChi.Red
|
||||
Styles.IncSearch = DataLink_KangChi.Red
|
||||
TabOrder = 1
|
||||
OnClick = cxDBTreeList1Click
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'DPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 1
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 315
|
||||
Height = 464
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object Label1: TLabel
|
||||
Left = 66
|
||||
Top = 40
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #19978#32423#32452#32455
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 66
|
||||
Top = 81
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32452#32455#21517#31216
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 66
|
||||
Top = 121
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32452#32455#32534#30721
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 24
|
||||
Top = 16
|
||||
Width = 60
|
||||
Height = 14
|
||||
Caption = #32452#32455#32467#26500
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 66
|
||||
Top = 159
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #39034' '#24207' '#21495
|
||||
end
|
||||
object DPTopName: TEdit
|
||||
Left = 129
|
||||
Top = 37
|
||||
Width = 121
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object DPName: TEdit
|
||||
Left = 129
|
||||
Top = 77
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = DPNameKeyPress
|
||||
end
|
||||
object DPNo: TEdit
|
||||
Left = 129
|
||||
Top = 117
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
end
|
||||
object DPOrder: TEdit
|
||||
Left = 129
|
||||
Top = 155
|
||||
Width = 121
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object cxGrid4: TcxGrid
|
||||
Left = 352
|
||||
Top = 64
|
||||
Width = 359
|
||||
Height = 273
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
object Tv4: TcxGridDBTableView
|
||||
OnDblClick = Tv4DblClick
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DSUser
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_KangChi.SHuangSe
|
||||
Styles.IncSearch = DataLink_KangChi.SHuangSe
|
||||
Styles.Selection = DataLink_KangChi.SHuangSe
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #21592#24037#32534#21495
|
||||
DataBinding.FieldName = 'UserId'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_KangChi.Default
|
||||
Width = 84
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #21592#24037#21517#31216
|
||||
DataBinding.FieldName = 'UserName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_KangChi.Default
|
||||
Width = 87
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #21592#24037#32452#32455
|
||||
DataBinding.FieldName = 'dept'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_KangChi.Default
|
||||
Width = 74
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv4
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Tree
|
||||
Left = 147
|
||||
Top = 219
|
||||
end
|
||||
object ADOQueryTree: TADOQuery
|
||||
Connection = DataLink_KangChi.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 117
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_KangChi.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 111
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_KangChi.ADOLink
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 146
|
||||
end
|
||||
object CDS_Tree: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 96
|
||||
Top = 256
|
||||
end
|
||||
object CDS_User: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 680
|
||||
Top = 272
|
||||
end
|
||||
object DSUser: TDataSource
|
||||
DataSet = CDS_User
|
||||
Left = 675
|
||||
Top = 211
|
||||
end
|
||||
end
|
||||
344
产品报价(ProductQuotation)/U_SYDeptView.pas
Normal file
344
产品报价(ProductQuotation)/U_SYDeptView.pas
Normal file
|
|
@ -0,0 +1,344 @@
|
|||
unit U_SYDeptView;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, ExtCtrls, DBClient, cxFilter, cxData, cxDataStorage, cxEdit,
|
||||
cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxGridCustomView, cxGrid;
|
||||
|
||||
type
|
||||
TfrmSYDeptView = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxDBTreeList1: TcxDBTreeList;
|
||||
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTree: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
DPTopName: TEdit;
|
||||
DPName: TEdit;
|
||||
DPNo: TEdit;
|
||||
CDS_Tree: TClientDataSet;
|
||||
cxGrid4: TcxGrid;
|
||||
Tv4: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Label4: TLabel;
|
||||
ToolButton2: TToolButton;
|
||||
CDS_User: TClientDataSet;
|
||||
DSUser: TDataSource;
|
||||
Label5: TLabel;
|
||||
DPOrder: TEdit;
|
||||
ToolButton3: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure cxDBTreeList1Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure cxDBTreeList1DblClick(Sender: TObject);
|
||||
procedure Tv4DblClick(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
PState:Integer;
|
||||
FCPID,FTopID:String;
|
||||
procedure InitTree();
|
||||
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSYDeptView: TfrmSYDeptView;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSYDeptView.InitTree();
|
||||
var
|
||||
i:Integer;
|
||||
begin
|
||||
try
|
||||
ADOQueryTree.DisableControls;
|
||||
with ADOQueryTree do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from SY_Dept order by DPlevel,DPOrder,DPName');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTree,CDS_Tree);
|
||||
SInitCDSData20(ADOQueryTree,CDS_Tree);
|
||||
//cxDBTreeList1.Items[0].Expand(false);
|
||||
cxDBTreeList1.Items[0].Expand(True);
|
||||
finally
|
||||
ADOQueryTree.EnableControls;
|
||||
end;
|
||||
//cxDBTreeList1.Items[1].Expand(False);
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSYDeptView:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
PState:=11;
|
||||
DPTopName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
//FTopID:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
FCPID:='';
|
||||
DPName.Text:='';
|
||||
DPNo.Text:='';
|
||||
DPName.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.cxDBTreeList1Click(Sender: TObject);
|
||||
begin
|
||||
PState:=22;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPParent').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
FCPID:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
DPTopName.Text:=Trim(ADOQueryTemp.fieldbyname('DPName').AsString);
|
||||
DPName.Text:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
DPNo.Text:=Trim(CDS_Tree.fieldbyname('DPNo').AsString);
|
||||
DPOrder.Text:=Trim(CDS_Tree.fieldbyname('DPOrder').AsString);
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
maxId:String;
|
||||
FInt:Integer;
|
||||
begin
|
||||
if Trim(DPName.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('本级名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
{if Trim(DPNo.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('类别编码不能为空!','提示',0);
|
||||
Exit;
|
||||
end;}
|
||||
if Trim(DPOrder.Text)='' then
|
||||
begin
|
||||
DPOrder.Text:='99';
|
||||
end;
|
||||
if TryStrToInt(Trim(DPOrder.Text),FInt)=False then
|
||||
begin
|
||||
Application.MessageBox('顺序号非法数字!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if PState=11 then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxId,'DP','SY_Dept',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('区最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxId:=Trim(FCPID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from SY_Dept where DPID='''+Trim(FCPID)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if PState=11 then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('DPID').Value:=Trim(maxId);
|
||||
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||
FieldByName('DPParent').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
FieldByName('DPLevel').Value:=CDS_Tree.fieldbyname('DPLevel').AsInteger+1;
|
||||
FieldByName('DPOrder').Value:=StrToInt(Trim(DPOrder.Text));
|
||||
Post;
|
||||
end else
|
||||
if PState=22 then
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('DPID').Value:=Trim(maxId);
|
||||
FieldByName('DPName').Value:=Trim(DPName.Text);
|
||||
FieldByName('DPNo').Value:=Trim(DPNo.Text);
|
||||
FieldByName('DPOrder').Value:=StrToInt(Trim(DPOrder.Text));
|
||||
//FieldByName('CPParent').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
//FieldByName('CPOrder').Value:=ADOQueryTree.fieldbyname('CPOrder').AsInteger+1;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryTree.FieldByName('DPLevel').AsInteger=0 then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('已经定义下级组织不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from SY_User where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('该组织已有人员不能删除!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete SY_Dept where DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
sql.Add('delete SY_Dept where DPParent='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.DPNameKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
DPNo.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Tree.IsEmpty=False then
|
||||
begin
|
||||
if CDS_User.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要进行组织分配吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update SY_User Set DPID='''+Trim(CDS_Tree.fieldbyname('DPID').AsString)+'''');
|
||||
sql.Add(' where UserId='''+Trim(CDS_User.fieldbyname('UserId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with CDS_User do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Dept').Value:=Trim(CDS_Tree.fieldbyname('DPName').AsString);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Tree.FieldByName('DPLevel').Value=0 then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select A.*,Dept=(select DPName from SY_Dept where DPID=A.DPID) ');
|
||||
SQL.Add(' from SY_User A where UserId not in(''Admin'',''Test'') ');
|
||||
SQL.Add(' and Valid=''Y'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||
end else
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('exec P_Select_Dept_User :CYType');
|
||||
Parameters.ParamByName('CYType').Value:=Trim(CDS_Tree.fieldbyname('DPID').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_User);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_User);
|
||||
end;
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.Tv4DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmSYDeptView.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
||||
278
产品报价(ProductQuotation)/U_SxXnKcList.dfm
Normal file
278
产品报价(ProductQuotation)/U_SxXnKcList.dfm
Normal file
|
|
@ -0,0 +1,278 @@
|
|||
object frmSxXnKcList: TfrmSxXnKcList
|
||||
Left = 238
|
||||
Top = 107
|
||||
Width = 1283
|
||||
Height = 573
|
||||
Caption = #32433#32447#34394#29702#35770#23384#37327#26597#35810
|
||||
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 = 1267
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_Statistics.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_Statistics.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1267
|
||||
Height = 50
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 268
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21697#21517
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 22
|
||||
Top = 13
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #26085#26399
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 145
|
||||
Top = 13
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Name: TEdit
|
||||
Tag = 2
|
||||
Left = 300
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 162
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 52
|
||||
Top = 9
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 81
|
||||
Width = 1267
|
||||
Height = 454
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DS_HZ
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_Statistics.SHuangSe
|
||||
Styles.IncSearch = DataLink_Statistics.SHuangSe
|
||||
Styles.Selection = DataLink_Statistics.SHuangSe
|
||||
Styles.Header = DataLink_Statistics.handBlack
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #32433#32447#21517#31216
|
||||
DataBinding.FieldName = 'Name'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v2Column19: TcxGridDBColumn
|
||||
Caption = #24635#20837#24211
|
||||
DataBinding.FieldName = 'RKQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #26412#26399#20986#24211
|
||||
DataBinding.FieldName = 'BQKGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 113
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #26399#22806#20986#24211
|
||||
DataBinding.FieldName = 'QCKGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 91
|
||||
end
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #29702#35770#24211#23384
|
||||
DataBinding.FieldName = 'KCQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 102
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #39044#35745#21487#29992#22825#25968
|
||||
DataBinding.FieldName = 'yjsyts'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #23454#38469#24211#23384
|
||||
DataBinding.FieldName = 'sjkc'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_Statistics.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_Statistics.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_Statistics.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
|
||||
161
产品报价(ProductQuotation)/U_SxXnKcList.pas
Normal file
161
产品报价(ProductQuotation)/U_SxXnKcList.pas
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
unit U_SxXnKcList;
|
||||
|
||||
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;
|
||||
|
||||
type
|
||||
TfrmSxXnKcList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
Label3: TLabel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
Name: TEdit;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column19: TcxGridDBColumn;
|
||||
EndDate: TDateTimePicker;
|
||||
Label4: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
Label1: TLabel;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
canshu1:string;
|
||||
procedure InitGrid();
|
||||
|
||||
public
|
||||
fkhType:string;
|
||||
Fmanage:string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmSxXnKcList: TfrmSxXnKcList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
|
||||
procedure TfrmSxXnKcList.InitGrid();
|
||||
begin
|
||||
try
|
||||
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' exec P_View_LLKC'+quotedstr(trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))));
|
||||
sql.Add(' ,'+quotedstr(trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
CDS_HZ.Last;
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmSxXnKcList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSxXnKcList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSxXnKcList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSxXnKcList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(self.Caption,Tv2,'É´Ïß²Ö¿â');
|
||||
Close;
|
||||
end;
|
||||
procedure TfrmSxXnKcList.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(self.Caption,Tv2,'É´Ïß²Ö¿â');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmSxXnKcList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmSxXnKcList.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 TfrmSxXnKcList.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmSxXnKcList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel(self.Caption,cxgrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmSxXnKcList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1:=Trim(DParameters1);
|
||||
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=EndDate.DateTime;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
557
产品报价(ProductQuotation)/U_UserModuleNameList.dfm
Normal file
557
产品报价(ProductQuotation)/U_UserModuleNameList.dfm
Normal file
|
|
@ -0,0 +1,557 @@
|
|||
object frmUserModuleNameList: TfrmUserModuleNameList
|
||||
Left = 97
|
||||
Top = 61
|
||||
Width = 1201
|
||||
Height = 618
|
||||
Caption = #21592#24037#27169#22359#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 = 1185
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_CYZZ.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 16
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1185
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
end
|
||||
object cxPageControl1: TcxPageControl
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1185
|
||||
Height = 509
|
||||
ActivePage = cxTabSheet1
|
||||
Align = alClient
|
||||
Style = 8
|
||||
TabOrder = 2
|
||||
OnChange = cxPageControl1Change
|
||||
ClientRectBottom = 509
|
||||
ClientRectRight = 1185
|
||||
ClientRectTop = 23
|
||||
object cxTabSheet1: TcxTabSheet
|
||||
Caption = #27169#22359#34920
|
||||
ImageIndex = 0
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 0
|
||||
Top = 37
|
||||
Width = 1185
|
||||
Height = 449
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'DefStr1'
|
||||
end
|
||||
item
|
||||
Format = 'YCLCode'
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #27169#22359#21517#31216
|
||||
DataBinding.FieldName = 'FormName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Content = DataLink_CYZZ.FoneRed
|
||||
Styles.Footer = DataLink_CYZZ.FoneRed
|
||||
Styles.Header = DataLink_CYZZ.FoneRed
|
||||
Width = 256
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #20351#29992#24773#20917
|
||||
DataBinding.FieldName = 'FormNameNote'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_CYZZ.FontBlue
|
||||
Styles.Footer = DataLink_CYZZ.FontBlue
|
||||
Styles.Header = DataLink_CYZZ.FontBlue
|
||||
Width = 917
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1185
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 20
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #27169#22359#21517#31216
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 284
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20351#29992#24773#20917
|
||||
end
|
||||
object FormName: TEdit
|
||||
Tag = 2
|
||||
Left = 70
|
||||
Top = 9
|
||||
Width = 179
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
object FormNameNote: TEdit
|
||||
Tag = 2
|
||||
Left = 334
|
||||
Top = 9
|
||||
Width = 179
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxTabSheet2: TcxTabSheet
|
||||
Caption = #37096#38376#27169#22359#34920
|
||||
ImageIndex = 1
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 37
|
||||
Width = 1185
|
||||
Height = 449
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'DefStr1'
|
||||
end
|
||||
item
|
||||
Format = 'YCLCode'
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'DPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_CYZZ.FontBlue
|
||||
Styles.Footer = DataLink_CYZZ.FontBlue
|
||||
Styles.Header = DataLink_CYZZ.FontBlue
|
||||
Width = 116
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #27169#22359#21517#31216
|
||||
DataBinding.FieldName = 'DFormName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Content = DataLink_CYZZ.FoneRed
|
||||
Styles.Footer = DataLink_CYZZ.FoneRed
|
||||
Styles.Header = DataLink_CYZZ.FoneRed
|
||||
Width = 263
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1185
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 242
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #27169#22359#21517#31216
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 20
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #37096#38376
|
||||
end
|
||||
object DFormName: TEdit
|
||||
Tag = 2
|
||||
Left = 292
|
||||
Top = 9
|
||||
Width = 179
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
object DPName: TEdit
|
||||
Tag = 2
|
||||
Left = 45
|
||||
Top = 9
|
||||
Width = 179
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxTabSheet3: TcxTabSheet
|
||||
Caption = #21592#24037#27169#22359#34920
|
||||
ImageIndex = 2
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 37
|
||||
Width = 1185
|
||||
Height = 449
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'DefStr1'
|
||||
end
|
||||
item
|
||||
Format = 'YCLCode'
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Position = spFooter
|
||||
Column = v1ShortName
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1ShortName
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object v1ShortName: TcxGridDBColumn
|
||||
Caption = #21592#24037#32534#21495
|
||||
DataBinding.FieldName = 'UserId'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 108
|
||||
end
|
||||
object v1UnitName: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #30331#24405#21517#31216
|
||||
DataBinding.FieldName = 'UserName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 90
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #37096#38376
|
||||
DataBinding.FieldName = 'UDPName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_CYZZ.FontBlue
|
||||
Styles.Footer = DataLink_CYZZ.FontBlue
|
||||
Styles.Header = DataLink_CYZZ.FontBlue
|
||||
Width = 106
|
||||
end
|
||||
object v1Quantity: TcxGridDBColumn
|
||||
Caption = #27169#22359#21517#31216
|
||||
DataBinding.FieldName = 'UFormName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taCenter
|
||||
Properties.Alignment.Vert = taVCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Content = DataLink_CYZZ.FoneRed
|
||||
Styles.Footer = DataLink_CYZZ.FoneRed
|
||||
Styles.Header = DataLink_CYZZ.FoneRed
|
||||
Width = 241
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1185
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 20
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #21592#24037#32534#21495
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 212
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #30331#24405#21517#31216
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 412
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #37096#38376
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 585
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #27169#22359#21517#31216
|
||||
end
|
||||
object UserId: TEdit
|
||||
Tag = 2
|
||||
Left = 70
|
||||
Top = 9
|
||||
Width = 127
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
object UserName: TEdit
|
||||
Tag = 2
|
||||
Left = 262
|
||||
Top = 9
|
||||
Width = 127
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
object UDPName: TEdit
|
||||
Tag = 2
|
||||
Left = 437
|
||||
Top = 9
|
||||
Width = 127
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
object UFormName: TEdit
|
||||
Tag = 2
|
||||
Left = 635
|
||||
Top = 9
|
||||
Width = 127
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = UserIdChange
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 680
|
||||
Top = 8
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 432
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 464
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 200
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 600
|
||||
Top = 8
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 636
|
||||
Top = 8
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 448
|
||||
Top = 8
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 476
|
||||
Top = 8
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 504
|
||||
Top = 8
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = ClientDataSet3
|
||||
Left = 296
|
||||
end
|
||||
object ClientDataSet3: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 332
|
||||
end
|
||||
object cxGridPopupMenu3: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 368
|
||||
end
|
||||
end
|
||||
221
产品报价(ProductQuotation)/U_UserModuleNameList.pas
Normal file
221
产品报价(ProductQuotation)/U_UserModuleNameList.pas
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
unit U_UserModuleNameList; //
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, cxCalendar, cxButtonEdit, cxDropDownEdit,
|
||||
DBClient, Menus, cxSplitter, cxTextEdit, RM_Common, RM_Class,
|
||||
RM_GridReport, RM_System, RM_Dataset, RM_e_Xls, dxPSGlbl, dxPSUtl,
|
||||
dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider,
|
||||
dxPSFillPatterns, dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
||||
cxPC;
|
||||
|
||||
type
|
||||
TfrmUserModuleNameList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
TBExport: TToolButton;
|
||||
Panel1: TPanel;
|
||||
CDS_Main: TClientDataSet;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
cxPageControl1: TcxPageControl;
|
||||
cxTabSheet1: TcxTabSheet;
|
||||
cxTabSheet2: TcxTabSheet;
|
||||
cxTabSheet3: TcxTabSheet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1ShortName: TcxGridDBColumn;
|
||||
v1UnitName: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Quantity: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Label1: TLabel;
|
||||
FormName: TEdit;
|
||||
Panel3: TPanel;
|
||||
Label2: TLabel;
|
||||
DFormName: TEdit;
|
||||
Panel4: TPanel;
|
||||
Label3: TLabel;
|
||||
UserId: TEdit;
|
||||
Label4: TLabel;
|
||||
FormNameNote: TEdit;
|
||||
Label5: TLabel;
|
||||
DPName: TEdit;
|
||||
Label6: TLabel;
|
||||
UserName: TEdit;
|
||||
Label7: TLabel;
|
||||
UDPName: TEdit;
|
||||
Label8: TLabel;
|
||||
UFormName: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure UserIdChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxPageControl1Change(Sender: TObject);
|
||||
private
|
||||
canshu1,canshu2:String;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmUserModuleNameList: TfrmUserModuleNameList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmUserModuleNameList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmUserModuleNameList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('员工模块列表',Tv1,'系统管理');
|
||||
WriteCxGrid('部门模块列表',Tv2,'系统管理');
|
||||
WriteCxGrid('模块列表',Tv3,'系统管理');
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.InitGrid();
|
||||
begin
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
if cxPageControl1.ActivePageIndex=0 then
|
||||
begin
|
||||
SQL.Add(' exec P_View_ModuleName ');
|
||||
end else
|
||||
if cxPageControl1.ActivePageIndex=1 then
|
||||
begin
|
||||
SQL.Add(' exec P_View_DeptModuleName ');
|
||||
end else
|
||||
if cxPageControl1.ActivePageIndex=2 then
|
||||
begin
|
||||
SQL.Add(' exec P_View_UserModuleName ');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.InitForm();
|
||||
begin
|
||||
ReadCxGrid('员工模块列表',Tv1,'系统管理');
|
||||
ReadCxGrid('部门模块列表',Tv2,'系统管理');
|
||||
ReadCxGrid('模块列表',Tv3,'系统管理');
|
||||
cxPageControl1.ActivePageIndex:=0;
|
||||
//InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
if cxPageControl1.ActivePageIndex=0 then
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel2,1,2))
|
||||
else if cxPageControl1.ActivePageIndex=1 then
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel3,1,2))
|
||||
else if cxPageControl1.ActivePageIndex=2 then
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel4,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if cxPageControl1.ActivePageIndex=0 then
|
||||
TcxGridToExcel('模块列表',cxGrid3)
|
||||
else if cxPageControl1.ActivePageIndex=1 then
|
||||
TcxGridToExcel('部门模块列表',cxGrid2)
|
||||
else if cxPageControl1.ActivePageIndex=2 then
|
||||
TcxGridToExcel('员工模块列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmUserModuleNameList.UserIdChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
if cxPageControl1.ActivePageIndex=0 then
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel2,1,2))
|
||||
else if cxPageControl1.ActivePageIndex=1 then
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel3,1,2))
|
||||
else if cxPageControl1.ActivePageIndex=2 then
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel4,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmUserModuleNameList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmUserModuleNameList.cxPageControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
end.
|
||||
604
产品报价(ProductQuotation)/U_YpBaoJiaInput.dfm
Normal file
604
产品报价(ProductQuotation)/U_YpBaoJiaInput.dfm
Normal file
|
|
@ -0,0 +1,604 @@
|
|||
object frmYpBaoJiaInput: TfrmYpBaoJiaInput
|
||||
Left = 443
|
||||
Top = 87
|
||||
Width = 800
|
||||
Height = 724
|
||||
Caption = #25253#20215#24405#20837
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
WindowState = wsMaximized
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 784
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBSave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 5
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 784
|
||||
Height = 116
|
||||
Align = alTop
|
||||
BevelInner = bvLowered
|
||||
BevelOuter = bvRaised
|
||||
Ctl3D = True
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
OnClick = ScrollBox1Click
|
||||
object Label1: TLabel
|
||||
Left = 20
|
||||
Top = 16
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #25253#20215#21333#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 584
|
||||
Top = 64
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20132#36135#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 272
|
||||
Top = 16
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #25253#20215#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 584
|
||||
Top = 88
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #23458' '#25143#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 20
|
||||
Top = 40
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #32534' '#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label20: TLabel
|
||||
Left = 272
|
||||
Top = 40
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #21697' '#21517#65306
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 20
|
||||
Top = 64
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #38376' '#24133#65306
|
||||
end
|
||||
object Label23: TLabel
|
||||
Left = 272
|
||||
Top = 64
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20811' '#37325#65306
|
||||
end
|
||||
object Label27: TLabel
|
||||
Left = 584
|
||||
Top = 40
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #22995' '#21517#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label28: TLabel
|
||||
Left = 584
|
||||
Top = 16
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #32852#31995#30005#35805#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 20
|
||||
Top = 88
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #38024' '#22411#65306
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 272
|
||||
Top = 88
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #36135' '#21495#65306
|
||||
end
|
||||
object BjNo: TEdit
|
||||
Left = 76
|
||||
Top = 12
|
||||
Width = 144
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 0
|
||||
Text = #33258#21160#29983#25104
|
||||
end
|
||||
object Jhtime: TDateTimePicker
|
||||
Left = 644
|
||||
Top = 60
|
||||
Width = 144
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
TabOrder = 8
|
||||
Visible = False
|
||||
end
|
||||
object Bjtime: TDateTimePicker
|
||||
Left = 328
|
||||
Top = 12
|
||||
Width = 144
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerName: TcxButtonEdit
|
||||
Left = 644
|
||||
Top = 84
|
||||
Hint = #35746#36135#21333#20301
|
||||
BeepOnEnter = False
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = CustomerNamePropertiesButtonClick
|
||||
TabOrder = 11
|
||||
Visible = False
|
||||
Width = 144
|
||||
end
|
||||
object BjCode: TcxButtonEdit
|
||||
Left = 76
|
||||
Top = 36
|
||||
BeepOnEnter = False
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = cxButtonEdit1PropertiesButtonClick
|
||||
TabOrder = 3
|
||||
Width = 144
|
||||
end
|
||||
object BjName: TEdit
|
||||
Left = 328
|
||||
Top = 36
|
||||
Width = 144
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 4
|
||||
end
|
||||
object BjMF: TEdit
|
||||
Left = 76
|
||||
Top = 60
|
||||
Width = 144
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 6
|
||||
end
|
||||
object BjKZ: TEdit
|
||||
Left = 328
|
||||
Top = 60
|
||||
Width = 144
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 7
|
||||
end
|
||||
object BJer: TcxButtonEdit
|
||||
Left = 644
|
||||
Top = 36
|
||||
BeepOnEnter = False
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = cxButtonEdit3PropertiesButtonClick
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
Width = 144
|
||||
end
|
||||
object BJPhone: TEdit
|
||||
Left = 644
|
||||
Top = 12
|
||||
Width = 144
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object zhenxing: TEdit
|
||||
Left = 76
|
||||
Top = 84
|
||||
Width = 144
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 9
|
||||
end
|
||||
object huohao: TEdit
|
||||
Left = 328
|
||||
Top = 84
|
||||
Width = 144
|
||||
Height = 20
|
||||
TabOrder = 10
|
||||
end
|
||||
end
|
||||
object ScrollBox2: TScrollBox
|
||||
Left = 0
|
||||
Top = 467
|
||||
Width = 784
|
||||
Height = 219
|
||||
Align = alBottom
|
||||
BevelInner = bvLowered
|
||||
BevelOuter = bvRaised
|
||||
Ctl3D = True
|
||||
ParentCtl3D = False
|
||||
TabOrder = 3
|
||||
OnClick = ScrollBox2Click
|
||||
object Label37: TLabel
|
||||
Left = 421
|
||||
Top = 80
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #36816' '#36153#65306
|
||||
end
|
||||
object Label39: TLabel
|
||||
Left = 421
|
||||
Top = 32
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26426' '#21488' '#36153#65306
|
||||
end
|
||||
object Label40: TLabel
|
||||
Left = 409
|
||||
Top = 56
|
||||
Width = 72
|
||||
Height = 12
|
||||
Caption = #30333#22383#21152#24037#36153#65306
|
||||
end
|
||||
object Label51: TLabel
|
||||
Left = 421
|
||||
Top = 104
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #25104#26412#21512#35745#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label52: TLabel
|
||||
Left = 421
|
||||
Top = 128
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #21334' '#20215#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label53: TLabel
|
||||
Left = 421
|
||||
Top = 152
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #21033' '#28070#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label54: TLabel
|
||||
Left = 421
|
||||
Top = 176
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #21033' '#28070' '#28857#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label24: TLabel
|
||||
Left = 421
|
||||
Top = 8
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #20135' '#37327#65306
|
||||
end
|
||||
object YfCost: TEdit
|
||||
Left = 477
|
||||
Top = 77
|
||||
Width = 129
|
||||
Height = 20
|
||||
BiDiMode = bdLeftToRight
|
||||
ParentBiDiMode = False
|
||||
TabOrder = 4
|
||||
OnExit = HclCostExit
|
||||
OnKeyPress = ZzCostKeyPress
|
||||
end
|
||||
object DjBzCost: TEdit
|
||||
Left = 477
|
||||
Top = 29
|
||||
Width = 129
|
||||
Height = 20
|
||||
BiDiMode = bdLeftToRight
|
||||
ParentBiDiMode = False
|
||||
TabOrder = 2
|
||||
OnExit = HclCostExit
|
||||
OnKeyPress = ZzCostKeyPress
|
||||
end
|
||||
object Price: TEdit
|
||||
Left = 477
|
||||
Top = 125
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 6
|
||||
OnExit = HclCostExit
|
||||
OnKeyPress = ZzCostKeyPress
|
||||
end
|
||||
object CbPrice: TEdit
|
||||
Left = 477
|
||||
Top = 101
|
||||
Width = 129
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object Lr: TEdit
|
||||
Left = 477
|
||||
Top = 149
|
||||
Width = 129
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 7
|
||||
end
|
||||
object Lrd: TEdit
|
||||
Left = 477
|
||||
Top = 173
|
||||
Width = 129
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 8
|
||||
end
|
||||
object ZzCost: TEdit
|
||||
Left = 477
|
||||
Top = 53
|
||||
Width = 129
|
||||
Height = 20
|
||||
BiDiMode = bdLeftToRight
|
||||
ParentBiDiMode = False
|
||||
TabOrder = 3
|
||||
OnExit = HclCostExit
|
||||
OnKeyPress = ZzCostKeyPress
|
||||
end
|
||||
object BjNote: TMemo
|
||||
Left = 12
|
||||
Top = 9
|
||||
Width = 385
|
||||
Height = 173
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 1
|
||||
end
|
||||
object Qty: TEdit
|
||||
Left = 477
|
||||
Top = 5
|
||||
Width = 129
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnExit = HclCostExit
|
||||
OnKeyPress = ZzCostKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 145
|
||||
Width = 784
|
||||
Height = 322
|
||||
Align = alClient
|
||||
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 = v1Column1
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #21407#26009
|
||||
DataBinding.FieldName = 'WLName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 301
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #27604#20363'%'
|
||||
DataBinding.FieldName = 'BiLi'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v1Column1PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 55
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #21407#26009#21333#20215
|
||||
DataBinding.FieldName = 'WlPrice'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v1Column1PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #25439#32791
|
||||
DataBinding.FieldName = 'YlShb'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = v1Column1PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 52
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #25104#26412#21333#20215
|
||||
DataBinding.FieldName = 'WlMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 133
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 452
|
||||
Top = 248
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 409
|
||||
Top = 245
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 479
|
||||
Top = 298
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 412
|
||||
Top = 285
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 512
|
||||
Top = 241
|
||||
end
|
||||
end
|
||||
616
产品报价(ProductQuotation)/U_YpBaoJiaInput.pas
Normal file
616
产品报价(ProductQuotation)/U_YpBaoJiaInput.pas
Normal file
|
|
@ -0,0 +1,616 @@
|
|||
unit U_YpBaoJiaInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, cxMemo, cxRichEdit, ComCtrls, cxContainer,
|
||||
cxTextEdit, cxMaskEdit, cxButtonEdit, StdCtrls, ToolWin, DBClient, ADODB,
|
||||
ExtCtrls, BtnEdit, cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmYpBaoJiaInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Sub: TClientDataSet;
|
||||
ADOQuery1: TADOQuery;
|
||||
ScrollBox1: TScrollBox;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label6: TLabel;
|
||||
Label20: TLabel;
|
||||
Label22: TLabel;
|
||||
Label23: TLabel;
|
||||
Label27: TLabel;
|
||||
Label28: TLabel;
|
||||
BjNo: TEdit;
|
||||
Jhtime: TDateTimePicker;
|
||||
Bjtime: TDateTimePicker;
|
||||
CustomerName: TcxButtonEdit;
|
||||
BjCode: TcxButtonEdit;
|
||||
BjName: TEdit;
|
||||
BjMF: TEdit;
|
||||
BjKZ: TEdit;
|
||||
BJer: TcxButtonEdit;
|
||||
BJPhone: TEdit;
|
||||
ScrollBox2: TScrollBox;
|
||||
Label37: TLabel;
|
||||
Label39: TLabel;
|
||||
Label40: TLabel;
|
||||
Label51: TLabel;
|
||||
Label52: TLabel;
|
||||
Label53: TLabel;
|
||||
Label54: TLabel;
|
||||
YfCost: TEdit;
|
||||
DjBzCost: TEdit;
|
||||
Price: TEdit;
|
||||
CbPrice: TEdit;
|
||||
Lr: TEdit;
|
||||
Lrd: TEdit;
|
||||
ZzCost: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
BjNote: TMemo;
|
||||
Label24: TLabel;
|
||||
Qty: TEdit;
|
||||
Label5: TLabel;
|
||||
zhenxing: TEdit;
|
||||
Label7: TLabel;
|
||||
huohao: TEdit;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure cxButtonEdit3PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure cxButtonEdit1PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure ZzCostKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure HclCostExit(Sender: TObject);
|
||||
procedure v1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure CustomerNamePropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure BjZKSExit(Sender: TObject);
|
||||
procedure ScrollBox2Click(Sender: TObject);
|
||||
procedure ScrollBox1Click(Sender: TObject);
|
||||
private
|
||||
FXS:Integer;
|
||||
procedure InitData();
|
||||
procedure InitWlPb();
|
||||
procedure upWlPb();
|
||||
procedure InitYLQty();
|
||||
|
||||
function SaveData():Boolean;
|
||||
function RoundFloat(f:double;i:integer):double;
|
||||
procedure CBHJ();
|
||||
Function Setstring(cString:string):string;
|
||||
{ Private declarations }
|
||||
public
|
||||
PState,PCopyInt:Integer;
|
||||
FMainId,FConNo:String;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmYpBaoJiaInput: TfrmYpBaoJiaInput;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_ZDYHelp,U_Fun,
|
||||
U_CPManageFMSel;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmYpBaoJiaInput.InitYLQty();
|
||||
var
|
||||
MMmkz,MYlShb:double;
|
||||
begin
|
||||
|
||||
|
||||
with Order_Sub do
|
||||
begin
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
with Order_Sub do
|
||||
begin
|
||||
MMmkz:=FieldByName('Mmkz').AsFloat;
|
||||
MYlShb:=FieldByName('YlShb').AsFloat;
|
||||
edit;
|
||||
FieldByName('YLQty').Value:=RoundFloat(MMmkz*StrToFloatDef(Setstring(Qty.Text),0)/1000*(MYlShb+100)/100,2);
|
||||
|
||||
post;
|
||||
end;
|
||||
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
|
||||
end;
|
||||
function TfrmYpBaoJiaInput.Setstring(cString:string):string; {提取数字}
|
||||
var
|
||||
i:integer;
|
||||
str:string;
|
||||
begin
|
||||
str:='';
|
||||
For i:=1 to length(cString) do
|
||||
begin
|
||||
if Pos(cString[i],'0123456789.')<=0 then
|
||||
break
|
||||
else
|
||||
Case cString[i] of
|
||||
'.': str:=Str+'.';
|
||||
|
||||
'0': str:=Str+'0'; '1': str:=Str+'1'; '2': str:=Str+'2';
|
||||
'3': str:=Str+'3'; '4': str:=Str+'4'; '5': str:=Str+'5';
|
||||
'6': str:=Str+'6'; '7': str:=Str+'7';
|
||||
'8': str:=Str+'8'; '9': str:=Str+'9';
|
||||
end;
|
||||
end;
|
||||
Setstring:=str;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmYpBaoJiaInput.upWlPb();
|
||||
var
|
||||
MBiLi,MYlShb,MWlPrice,MWlMoney:Double;
|
||||
begin
|
||||
if Order_Sub.IsEmpty then Exit;
|
||||
|
||||
with Order_Sub do
|
||||
begin
|
||||
DisableControls;
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
MBiLi:= fieldbyname('BiLi').AsFloat;
|
||||
MYlShb:= fieldbyname('YlShb').AsFloat;
|
||||
MWlPrice:= fieldbyname('WlPrice').AsFloat;
|
||||
|
||||
MWlMoney:=RoundFloat(MWlPrice*(MYlShb+100)*MBiLi/10000,2);
|
||||
Edit;
|
||||
fieldbyname('WlMoney').Value:=MWlMoney;
|
||||
Next;
|
||||
end;
|
||||
EnableControls;
|
||||
end;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
procedure TfrmYpBaoJiaInput.InitWlPb();
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select BjMainID='''',BjSubID='''',Mmkz=0.00,WlMoney=0.00, YLQty=0.00,YLbl BiLi,WLID='''', YLName WLName, YlShb=0.00, WlPrice=0.00 ');
|
||||
sql.Add('from CP_YDangSpec A ');
|
||||
sql.Add(' where A.CYID=(select top 1 CYID from CP_YDang where CYNo='+Quotedstr(Trim(BjCode.Text))+')');
|
||||
sql.Add(' and isnull(YLName,'''')<>'''' and isnull(YLbl,0)<>0 ');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOTemp,Order_Sub);
|
||||
SInitCDSData20(ADOTemp,Order_Sub);
|
||||
end;
|
||||
function TfrmYpBaoJiaInput.RoundFloat(f:double;i:integer):double;
|
||||
var
|
||||
s:string;
|
||||
ef:extended;
|
||||
begin
|
||||
s:='#.'+ StringOfChar('0',i);
|
||||
ef:=StrToFloat(FloatToStr(f));//防止浮点运算的误差
|
||||
result:=StrToFloat(FormatFloat(s,ef));
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.CBHJ();
|
||||
var
|
||||
MWlCost,MHclPrice,MZzCost,MHclCost,MDjBzCost
|
||||
,MQty
|
||||
,MKfCost,MBlKfCost,MYfCost,MLxCost,MBlLxCost
|
||||
,MYwCost,MBlYwCost,MSdCost,MBlSdCost
|
||||
,MBlZshCost,MZshCost
|
||||
,MBjZKS,MCbPrice,MPrice,MLr,MLrd:Double;
|
||||
begin
|
||||
if TV1.DataController.Summary.FooterSummaryValues[0]<>NULL then
|
||||
MWlCost:=TV1.DataController.Summary.FooterSummaryValues[0]
|
||||
else
|
||||
MWlCost:=0;
|
||||
//产量
|
||||
MQty:=StrToFloatDef(Qty.Text,0);
|
||||
|
||||
//机台费
|
||||
MDjBzCost:=StrToFloatDef(DjBzCost.Text,0);
|
||||
|
||||
//白坯加工费
|
||||
if MQty>0 then
|
||||
begin
|
||||
MZzCost:=RoundFloat(MDjBzCost/MQty,2);
|
||||
ZzCost.Text:=FloatToStr(MZzCost);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ZzCost.Text:='0';
|
||||
end;
|
||||
//卖价
|
||||
MPrice:=StrToFloatDef(Price.Text,0);
|
||||
//运费
|
||||
MYfCost:=StrToFloatDef(YfCost.Text,0);
|
||||
|
||||
|
||||
//成本
|
||||
MCbPrice:=MWlCost+MZzCost+MYfCost;
|
||||
|
||||
MCbPrice:=RoundFloat(MCbPrice,2);
|
||||
|
||||
CbPrice.Text:=FloatToStr(MCbPrice);
|
||||
|
||||
if MPrice>0 then
|
||||
begin
|
||||
|
||||
MLr:=RoundFloat(MPrice-MCbPrice,2);
|
||||
MLrd:=RoundFloat(MLr/MPrice*100,2);
|
||||
Lr.Text:=FloatToStr(MLr);
|
||||
Lrd.Text:=FloatToStr(MLrd);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.InitData();
|
||||
begin
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*');
|
||||
sql.Add('from BaoJiaSub A');
|
||||
sql.Add('where A.BjMainID='''+FMainId+'''') ;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuery1,Order_Sub);
|
||||
SInitCDSData20(ADOQuery1,Order_Sub);
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*');
|
||||
sql.Add('from BaoJiaMain A');
|
||||
sql.Add('where A.BJMainID='''+FMainId+'''') ;
|
||||
Open;
|
||||
end;
|
||||
SCSHData(ADOQuery1,ScrollBox1,0);
|
||||
SCSHData(ADOQuery1,ScrollBox2,0);
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitData();
|
||||
if PState=0 then
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
if PState=2 then
|
||||
begin
|
||||
ScrollBox1.Enabled:=False;
|
||||
ScrollBox2.Enabled:=False;
|
||||
TBSave.Visible:=False;
|
||||
cxGrid1.Enabled:=False;
|
||||
end;
|
||||
|
||||
if PCopyInt=1 then
|
||||
begin
|
||||
with Order_Sub do
|
||||
begin
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
Edit;
|
||||
fieldbyname('BjSubID').value:='';
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
FMainId:='';
|
||||
PState:=0;
|
||||
bjno.Text:='自动生成';
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmYpBaoJiaInput.SaveData():Boolean;
|
||||
var
|
||||
maxno,maxSubNo:String;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
///保存主表
|
||||
if Trim(FMainId)='' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd,maxno,'BJ','BaoJiaMain',2,1)=False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('生成流水号异常!','提示',0);
|
||||
exit;
|
||||
end;
|
||||
BjNo.Text:=maxno;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno:=Trim(FMainId);
|
||||
end;
|
||||
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select * from BaoJiaMain where BjMainID='''+Trim(maxno)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if ADOCmd.IsEmpty then Append else edit;
|
||||
FieldByName('ZzType').Value:='针织';
|
||||
FieldByName('BjMainID').Value:=Trim(maxno);
|
||||
SSetsaveSql(ADOCmd,'Contract_Main',ScrollBox1,0);
|
||||
SSetsaveSql(ADOCmd,'Contract_Main',ScrollBox2,0);
|
||||
if Trim(FMainId)='' then
|
||||
begin
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('FillTime').Value:=SGetServerDateTime(ADOTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
Post;
|
||||
end;
|
||||
FMainId:=Trim(maxno);
|
||||
///保存子表
|
||||
with Order_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(Order_Sub.fieldbyname('BjSubID').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd,maxSubNo,'BJS','BaoJiaSub',3,1)=False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxSubNo:=Trim(Order_Sub.fieldbyname('BjSubID').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BaoJiaSub where BjMainId='''+Trim(FMainId)+'''');
|
||||
sql.Add(' and BjSubId='''+Trim(maxSubNo)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if ADOCmd.IsEmpty then
|
||||
Append
|
||||
else
|
||||
edit;
|
||||
// SSetSaveDataCDSNew(ADOCmd,Tv1,Order_Sub,'BaoJiaSub',1);
|
||||
FieldByName('WLID').Value:=Order_Sub.FieldByName('WLID').Value;
|
||||
FieldByName('WLName').Value:=Order_Sub.FieldByName('WLName').Value;
|
||||
FieldByName('BiLi').Value:=Order_Sub.FieldByName('BiLi').Value;
|
||||
FieldByName('WlMoney').Value:=Order_Sub.FieldByName('WlMoney').Value;
|
||||
FieldByName('Mmkz').Value:=Order_Sub.FieldByName('Mmkz').Value;
|
||||
FieldByName('WlPrice').Value:=Order_Sub.FieldByName('WlPrice').Value;
|
||||
FieldByName('YlShb').Value:=Order_Sub.FieldByName('YlShb').Value;
|
||||
FieldByName('YLQty').Value:=Order_Sub.FieldByName('YLQty').Value;
|
||||
FieldByName('BjMainId').Value:=Trim(maxno);
|
||||
FieldByName('BjSubId').Value:=Trim(maxSubNo);
|
||||
Post;
|
||||
end;
|
||||
Order_Sub.Edit;
|
||||
Order_Sub.FieldByName('BjSubId').Value:=Trim(maxSubNo);
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=False;
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.TBSaveClick(Sender: TObject);
|
||||
begin
|
||||
lrd.SetFocus;
|
||||
// if Trim(CustomerName.Text)='' then
|
||||
// begin
|
||||
// Application.MessageBox('客户不能为空!','提示',0);
|
||||
// Exit;
|
||||
// end;
|
||||
//
|
||||
// if TV1.DataController.Summary.FooterSummaryValues[1]<>100 then
|
||||
// begin
|
||||
// Application.MessageBox('比例合计必须为100!','提示',0);
|
||||
// Exit;
|
||||
// end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SetWindowLong(Qty.Handle, GWL_STYLE, GetWindowLong(Qty.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
SetWindowLong(ZzCost.Handle, GWL_STYLE, GetWindowLong(ZzCost.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
SetWindowLong(DjBzCost.Handle, GWL_STYLE, GetWindowLong(DjBzCost.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
SetWindowLong(YfCost.Handle, GWL_STYLE, GetWindowLong(YfCost.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
SetWindowLong(CbPrice.Handle, GWL_STYLE, GetWindowLong(CbPrice.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
SetWindowLong(Price.Handle, GWL_STYLE, GetWindowLong(Price.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
SetWindowLong(Lr.Handle, GWL_STYLE, GetWindowLong(Lr.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
SetWindowLong(Lrd.Handle, GWL_STYLE, GetWindowLong(Lrd.Handle, GWL_STYLE) or ES_MULTILINE or ES_RIGHT);
|
||||
|
||||
Bjtime.DateTime:=SGetServerDate(ADOTemp);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.cxButtonEdit3PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:=TcxButtonEdit(Sender).Name;
|
||||
flagname:=TcxButtonEdit(Sender).Hint;
|
||||
V1Name.Caption:='联系人';
|
||||
fnote:=True;
|
||||
V1Note.Caption:='联系电话';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
BJer.Text:=Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
BJPhone.Text:=Trim(ClientDataSet1.fieldbyname('Note').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.cxButtonEdit1PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmCPManageFMSel:=TfrmCPManageFMSel.Create(Application);
|
||||
with frmCPManageFMSel do
|
||||
begin
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
BjCode.Text:=Trim(CDS_Main.fieldbyname('CYNo').AsString);
|
||||
BjName.Text:=Trim(CDS_Main.fieldbyname('CYName').AsString);
|
||||
BjMF.Text:=Trim(CDS_Main.fieldbyname('CYMF').AsString);
|
||||
BjKZ.Text:=Trim(CDS_Main.fieldbyname('CYKZ').AsString);
|
||||
ZhenXing.Text:=Trim(CDS_Main.fieldbyname('ZhenXing').AsString);
|
||||
Qty.Text:=Trim(CDS_Main.fieldbyname('CYCL').AsString);
|
||||
InitWlPb();
|
||||
CBHJ();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCPManageFMSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.ZzCostKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if not (((key>='0') and (key<='9')) or (key='.') or (key=#8)) then
|
||||
begin
|
||||
key:=#0;
|
||||
end
|
||||
else if (pos('.', TEdit(Sender).text)<>0) then
|
||||
begin
|
||||
if key='.' then
|
||||
begin
|
||||
key:=#0;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.HclCostExit(Sender: TObject);
|
||||
begin
|
||||
CBHJ();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.v1Column1PropertiesEditValueChanged(
|
||||
Sender: TObject);
|
||||
var
|
||||
mavlue,FFieldName:string;
|
||||
MBiLi,MYlShb,MWlPrice:Double;
|
||||
begin
|
||||
mavlue:=TcxTextEdit(Sender).EditingText;
|
||||
FFieldName:=Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||
if mavlue='' then mavlue:='0';
|
||||
with Order_Sub do
|
||||
begin
|
||||
edit;
|
||||
FieldByName(FFieldName).Value:=mavlue;
|
||||
post;
|
||||
MBiLi:=FieldByName('BiLi').AsFloat;
|
||||
MWlPrice:=FieldByName('WlPrice').AsFloat;
|
||||
MYlShb:=FieldByName('YlShb').AsFloat;
|
||||
end;
|
||||
|
||||
with Order_Sub do
|
||||
begin
|
||||
edit;
|
||||
FieldByName('WlMoney').Value:=RoundFloat(MWlPrice*(MYlShb+100)*MBiLi/10000,2);
|
||||
post;
|
||||
end;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
CBHJ();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.CustomerNamePropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
// try
|
||||
// frmZdyAttachment:=TfrmZdyAttachment.Create(Application);
|
||||
// with frmZdyAttachment do
|
||||
// begin
|
||||
// if ShowModal=1 then
|
||||
// begin
|
||||
// CustomerName.Text:=Trim(CDS_HZ.fieldbyname('ZDYName').AsString);
|
||||
// CustomerLevel.Text:=Trim(CDS_HZ.fieldbyname('DEFStr6').AsString);
|
||||
// if Trim(CustomerLevel.Text)='A' then
|
||||
// begin
|
||||
// ZzCost.Text:='1.5';
|
||||
// CBHJ();
|
||||
// end;
|
||||
// end;
|
||||
// end;
|
||||
// finally
|
||||
// frmZdyAttachment.Free;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.BjZKSExit(Sender: TObject);
|
||||
begin
|
||||
upWlPb();
|
||||
CBHJ();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.ScrollBox2Click(Sender: TObject);
|
||||
begin
|
||||
lrd.SetFocus;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaInput.ScrollBox1Click(Sender: TObject);
|
||||
begin
|
||||
lrd.SetFocus;
|
||||
end;
|
||||
|
||||
end.
|
||||
480
产品报价(ProductQuotation)/U_YpBaoJiaList.dfm
Normal file
480
产品报价(ProductQuotation)/U_YpBaoJiaList.dfm
Normal file
|
|
@ -0,0 +1,480 @@
|
|||
object frmYpBaoJiaList: TfrmYpBaoJiaList
|
||||
Left = 275
|
||||
Top = 206
|
||||
Width = 1170
|
||||
Height = 507
|
||||
Caption = #26679#21697#25253#20215
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1154
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25253#20215
|
||||
ImageIndex = 1
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 315
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475#25253#20215
|
||||
ImageIndex = 1
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 3
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 465
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = TBPrintClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 528
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
ImageIndex = 31
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 591
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23457#26680
|
||||
ImageIndex = 52
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 678
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 741
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1154
|
||||
Height = 54
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 22
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #30331#35760#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 165
|
||||
Top = 22
|
||||
Width = 6
|
||||
Height = 12
|
||||
Caption = '-'
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 458
|
||||
Top = 22
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #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 = 283
|
||||
Top = 24
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #35746#36135#21333#20301
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 18
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 171
|
||||
Top = 18
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object BjName: TEdit
|
||||
Tag = 2
|
||||
Left = 487
|
||||
Top = 18
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = ConNoMChange
|
||||
end
|
||||
object CustomerName: TEdit
|
||||
Tag = 2
|
||||
Left = 339
|
||||
Top = 18
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = ConNoMChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 104
|
||||
Width = 1154
|
||||
Height = 365
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnDblClick = Tv1DblClick
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1PRTQty
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Inactive = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.IncSearch = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.Selection = DataLink_ProductQuotation.SHuangSe
|
||||
object v1FactoryNo1Name: TcxGridDBColumn
|
||||
Caption = #25253#20215#21333#21495
|
||||
DataBinding.FieldName = 'BjNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 98
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #25253#20215#26102#38388
|
||||
DataBinding.FieldName = 'Bjtime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 86
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'BjCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 110
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'BjName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1PRTSpec: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'BjMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 69
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'BjKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 68
|
||||
end
|
||||
object v1OrderNo: TcxGridDBColumn
|
||||
Caption = #38024#22411
|
||||
DataBinding.FieldName = 'zhenxing'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 127
|
||||
end
|
||||
object v1DeliveryDate: TcxGridDBColumn
|
||||
Caption = #36135#21495
|
||||
DataBinding.FieldName = 'huohao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 82
|
||||
end
|
||||
object v1PRTOrderQty: TcxGridDBColumn
|
||||
Caption = #20135#37327
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 58
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #21334#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 57
|
||||
end
|
||||
object v1PRTQty: TcxGridDBColumn
|
||||
Caption = #25104#26412#20215
|
||||
DataBinding.FieldName = 'CbPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 58
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #21033#28070
|
||||
DataBinding.FieldName = 'Lr'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 55
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #21033#28070#28857
|
||||
DataBinding.FieldName = 'Lrd'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 61
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #21046#21333#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
Width = 71
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 86
|
||||
Width = 1154
|
||||
Height = 18
|
||||
Align = alTop
|
||||
Style = 9
|
||||
TabIndex = 0
|
||||
TabOrder = 2
|
||||
Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#23457#26680
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 19
|
||||
ClientRectRight = 1154
|
||||
ClientRectTop = 19
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 709
|
||||
Top = 268
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 936
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1000
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1040
|
||||
Top = 8
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 815
|
||||
Top = 298
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 745
|
||||
Top = 207
|
||||
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 = 442
|
||||
Top = 191
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBMain: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 400
|
||||
Top = 192
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 416
|
||||
Top = 248
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 347
|
||||
Top = 190
|
||||
end
|
||||
end
|
||||
480
产品报价(ProductQuotation)/U_YpBaoJiaList.pas
Normal file
480
产品报价(ProductQuotation)/U_YpBaoJiaList.pas
Normal file
|
|
@ -0,0 +1,480 @@
|
|||
unit U_YpBaoJiaList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter,
|
||||
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
|
||||
cxTextEdit, cxPC;
|
||||
|
||||
type
|
||||
TfrmYpBaoJiaList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Label5: TLabel;
|
||||
BjName: TEdit;
|
||||
TBExport: TToolButton;
|
||||
Order_Main: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_PRT: TClientDataSet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1OrderNo: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1DeliveryDate: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1FactoryNo1Name: TcxGridDBColumn;
|
||||
v1PRTSpec: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1PRTQty: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
CustomerName: TEdit;
|
||||
Label6: TLabel;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
cxTabControl1: TcxTabControl;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
ToolButton4: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure cxPageControl1Change(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1DblClick(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
private
|
||||
FInt,PFInt:Integer;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
procedure SetStatus();
|
||||
function DelData():Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
CanShu1:string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmYpBaoJiaList: TfrmYpBaoJiaList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp
|
||||
,U_YpBaoJiaInput,U_CPManageFMSel;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmYpBaoJiaList.SetStatus();
|
||||
begin
|
||||
ToolButton1.Visible:=False;
|
||||
ToolButton3.Visible:=False;
|
||||
TBEdit.Visible:=False;
|
||||
TBDel.Visible:=False;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:begin
|
||||
if Trim(CanShu1)='高权限' then
|
||||
begin
|
||||
TBEdit.Visible:=True;
|
||||
TBDel.Visible:=True;
|
||||
ToolButton1.Visible:=True;
|
||||
end
|
||||
else
|
||||
begin
|
||||
TBEdit.Visible:=True;
|
||||
TBDel.Visible:=True;
|
||||
end;
|
||||
end;
|
||||
1:begin
|
||||
ToolButton3.Visible:=True;
|
||||
end;
|
||||
2:begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmYpBaoJiaList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
ReadCxGrid(self.Caption,Tv1,'样品报价管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ');
|
||||
sql.Add('from BaoJiaMain A ');
|
||||
sql.Add('where A.FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
||||
sql.Add('and A.FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''');
|
||||
if Trim(CanShu1)<>'高权限' then
|
||||
begin
|
||||
sql.Add('and A.Filler='+quotedstr(DName));
|
||||
end;
|
||||
case cxTabControl1.TabIndex of
|
||||
0:begin
|
||||
sql.Add('and isnull(A.status,0)=''0'' ');
|
||||
end;
|
||||
1:begin
|
||||
sql.Add('and isnull(A.status,0)=''1'' ');
|
||||
end;
|
||||
2:begin
|
||||
|
||||
end;
|
||||
end;
|
||||
// showmessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.InitForm();
|
||||
begin
|
||||
ReadCxGrid(self.Caption,Tv1,'样品报价管理');
|
||||
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
InitGrid();
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Trim(Order_Main.fieldbyname('filler').AsString)<>Trim(DName) then Exit;
|
||||
try
|
||||
frmYpBaoJiaInput:=TfrmYpBaoJiaInput.Create(Application);
|
||||
with frmYpBaoJiaInput do
|
||||
begin
|
||||
WindowState:=wsnormal;
|
||||
PState:=1;
|
||||
BjCode.Enabled:=false;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('BJMainId').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYpBaoJiaInput.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Trim(Order_Main.fieldbyname('filler').AsString)<>Trim(DName) then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BaoJiaSub where BJMainId='''+Trim(Order_Main.fieldbyname('BJMainId').AsString)+'''');
|
||||
sql.Add('delete BaoJiaMain where BJMainId='''+Trim(Order_Main.fieldbyname('BJMainId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
function TfrmYpBaoJiaList.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete ContractSX_Sub where SubId='''+Trim(Order_Main.fieldbyname('SubId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from ContractSX_Sub where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete ContractSX_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
if Trim(Order_Main.fieldbyname('SubId').AsString)='' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete ContractSX_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel('坯布合同订单列表',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile,FConNoM:string;
|
||||
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\样品报价单.rmf' ;
|
||||
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add('from BaoJiaSub A');
|
||||
sql.Add('inner join BaoJiaMain B on B.BJMainId=A.BJMainId');
|
||||
sql.Add('where B.BJMainId='''+Trim(Order_Main.fieldbyname('BJMainId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+trim(fPrintFile)),'提示',0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmYpBaoJiaInput:=TfrmYpBaoJiaInput.Create(Application);
|
||||
with frmYpBaoJiaInput do
|
||||
begin
|
||||
WindowState:=wsnormal;
|
||||
PState:=0;
|
||||
FMainId:='';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYpBaoJiaInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.cxPageControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
try
|
||||
frmYpBaoJiaInput:=TfrmYpBaoJiaInput.Create(Application);
|
||||
with frmYpBaoJiaInput do
|
||||
begin
|
||||
WindowState:=wsnormal;
|
||||
PState:=2;
|
||||
ToolBar1.Visible:=false;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('BJMainId').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYpBaoJiaInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
IF Order_Main.IsEmpty then exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update BaoJiaMain SET status=''1'' ');
|
||||
sql.Add(' ,Chker='''+Trim(DName)+'''');
|
||||
sql.Add(' ,Chktime=GETDATE()');
|
||||
sql.Add(' where BJMainId ='+quotedstr(trim(Order_Main.fieldbyname('BJMainId').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
InitGrid();
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('操作失败!','提示信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
IF Order_Main.IsEmpty then exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update BaoJiaMain SET status=''0'' ,Chker='''' ,Chktime=null');
|
||||
sql.Add(' where BJMainId ='+quotedstr(trim(Order_Main.fieldbyname('BJMainId').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
InitGrid();
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('操作失败!','提示信息',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmYpBaoJiaList.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Trim(Order_Main.fieldbyname('filler').AsString)<>Trim(DName) then Exit;
|
||||
try
|
||||
frmYpBaoJiaInput:=TfrmYpBaoJiaInput.Create(Application);
|
||||
with frmYpBaoJiaInput do
|
||||
begin
|
||||
WindowState:=wsnormal;
|
||||
PState:=1;
|
||||
PCopyInt:=1;
|
||||
BjCode.Enabled:=false;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('BJMainId').AsString);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmYpBaoJiaInput.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
275
产品报价(ProductQuotation)/U_ZDYHelp.dfm
Normal file
275
产品报价(ProductQuotation)/U_ZDYHelp.dfm
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
object frmZDYHelp: TfrmZDYHelp
|
||||
Left = 466
|
||||
Top = 188
|
||||
Width = 465
|
||||
Height = 528
|
||||
Caption = #39033#30446#32500#25252
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 449
|
||||
Height = 417
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
object V1Code: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'ZDYNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object V1OrderNo: TcxGridDBColumn
|
||||
Caption = #39034#24207#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1OrderNoPropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object V1Name: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21517#31216
|
||||
DataBinding.FieldName = 'ZDYName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 326
|
||||
end
|
||||
object V1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NotePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 109
|
||||
end
|
||||
object V1ZdyFlag: TcxGridDBColumn
|
||||
Caption = #26631#24535
|
||||
DataBinding.FieldName = 'ZdyFlag'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1Column1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object V1HelpType: TcxGridDBColumn
|
||||
Caption = #24110#21161#31867#27604
|
||||
DataBinding.FieldName = 'HelpType'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1HelpTypePropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 55
|
||||
end
|
||||
object V1ZdyStr1: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object V1ZdyStr2: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr2'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object V1ZdyStr3: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr3'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object V1ZdyStr4: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr4'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object V1ZdyStr5: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ZdyStr5'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1ZdyStr1PropertiesEditValueChanged
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 449
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 118
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 177
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBSave: TToolButton
|
||||
Left = 236
|
||||
Top = 0
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 15
|
||||
Visible = False
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 295
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 449
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 18
|
||||
Top = 17
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21517#31216
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 240
|
||||
Top = 11
|
||||
Width = 120
|
||||
Height = 24
|
||||
Caption = #27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#13#10' '#21333#20803#26684#20445#23384#25968#25454#12290
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object ZDYName: TEdit
|
||||
Tag = 2
|
||||
Left = 53
|
||||
Top = 12
|
||||
Width = 169
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = ZDYNameChange
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 280
|
||||
Top = 144
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 208
|
||||
Top = 144
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 168
|
||||
Top = 152
|
||||
end
|
||||
end
|
||||
705
产品报价(ProductQuotation)/U_ZDYHelp.pas
Normal file
705
产品报价(ProductQuotation)/U_ZDYHelp.pas
Normal file
|
|
@ -0,0 +1,705 @@
|
|||
unit U_ZDYHelp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, ToolWin, ComCtrls, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
|
||||
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxTimeEdit;
|
||||
|
||||
type
|
||||
TfrmZDYHelp = class(TForm)
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
V1Code: TcxGridDBColumn;
|
||||
V1Name: TcxGridDBColumn;
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
TBAdd: TToolButton;
|
||||
TBSave: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
V1Note: TcxGridDBColumn;
|
||||
V1OrderNo: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
ZDYName: TEdit;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
V1ZdyFlag: TcxGridDBColumn;
|
||||
V1HelpType: TcxGridDBColumn;
|
||||
V1ZdyStr1: TcxGridDBColumn;
|
||||
V1ZdyStr2: TcxGridDBColumn;
|
||||
V1ZdyStr3: TcxGridDBColumn;
|
||||
V1ZdyStr4: TcxGridDBColumn;
|
||||
V1ZdyStr5: TcxGridDBColumn;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure ZDYNameChange(Sender: TObject);
|
||||
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V1ZdyStr1PropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag, flagname, snote, MainType: string;
|
||||
fnote, forderno, fZdyFlag, ViewFlag: Boolean;
|
||||
PPSTE: integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmZDYHelp: TfrmZDYHelp;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmZDYHelp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
{try
|
||||
cxGrid1.Align:=alClient;
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
{if Application.MessageBox('网络连接失败,是否要再次连接?','提示',32+4)=IDYES then
|
||||
begin
|
||||
try
|
||||
with ADOConnection1 do
|
||||
begin
|
||||
Connected:=false;
|
||||
ConnectionString:=DConString;
|
||||
//ConnectionString:='23242';
|
||||
Connected:=true;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end; }
|
||||
|
||||
{frmRTZDYHelp.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,ZJM=dbo.getPinYin(A.ZdyName) from KH_ZDY A where A.Type=''' + flag + '''');
|
||||
if Trim(MainType) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.MainType=''' + Trim(MainType) + '''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.TBAddClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
TV1.OptionsData.Editing := True;
|
||||
TV1.OptionsSelection.CellSelect := True;
|
||||
for i := 0 to 5 do
|
||||
begin
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Append;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
ZDYName.SetFocus;
|
||||
|
||||
if ClientDataSet1.Locate('ZDYName', null, []) then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if ClientDataSet1.Locate('ZDYName', '', []) then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||
Parameters.ParamByName('ZDYNo').Value := Trim(flag);
|
||||
Parameters.ParamByName('ZDYName').Value := Trim(flagname);
|
||||
Parameters.ParamByName('Type').Value := 'Main';
|
||||
Parameters.ParamByName('MainType').Value := Trim(MainType);
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
ClientDataSet1.DisableControls;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('取最大编号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
|
||||
if Trim(MainType) <> '' then
|
||||
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
|
||||
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
if ADOQueryTemp.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').Value;
|
||||
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value := flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value := 'Y';
|
||||
if Trim(MainType) <> '' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
ClientDataSet1.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.EnableControls;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
TV1.OptionsData.Editing := False;
|
||||
TV1.OptionsSelection.CellSelect := False;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then
|
||||
Exit;
|
||||
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString) <> '') or (Trim(ClientDataSet1.FieldByName('ZDYname').AsString) <> '') then
|
||||
begin
|
||||
if application.MessageBox('确定要删除吗?', '提示信息', 1) = 2 then
|
||||
exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete KH_ZDY where ZDYNo=''' + Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString) + '''');
|
||||
SQL.Add(' and Type=''' + Trim(flag) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 2;
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj, fsj1: string;
|
||||
begin
|
||||
|
||||
InitGrid();
|
||||
fsj := Trim(flag) + '01';
|
||||
fsj1 := Trim(flagname) + '01';
|
||||
|
||||
ReadCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||
frmZDYHelp.Caption := Trim(flagname);
|
||||
V1Note.Visible := fnote;
|
||||
V1ZdyFlag.Visible := fZdyFlag;
|
||||
V1OrderNo.Visible := forderno;
|
||||
if ViewFlag = True then
|
||||
begin
|
||||
TBAdd.Visible := False;
|
||||
TBSave.Visible := False;
|
||||
TBDel.Visible := False;
|
||||
TBEdit.Visible := False;
|
||||
Label2.Visible := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing := True;
|
||||
TV1.OptionsSelection.CellSelect := True;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if TV1.OptionsData.Editing = False then
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.ZDYNameChange(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
if Trim(ZDYName.Text) <> '' then
|
||||
begin
|
||||
fsj := ' zdyname like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or Note like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or ZJM like ''' + '%' + Trim(ZDYName.Text) + '%' + '''';
|
||||
end;
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
// SDofilter(ADOQueryMain,fsj);
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
if Trim(fsj) = '' then
|
||||
begin
|
||||
Filtered := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Filtered := False;
|
||||
Filter := fsj;
|
||||
Filtered := True;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain, ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
maxno, mvalue: string;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
//Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ZdyName').Value := Trim(mvalue);
|
||||
//Post;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||
Parameters.ParamByName('ZDYNo').Value := Trim(flag);
|
||||
Parameters.ParamByName('ZDYName').Value := Trim(flagname);
|
||||
Parameters.ParamByName('Type').Value := 'Main';
|
||||
Parameters.ParamByName('MainType').Value := Trim(MainType);
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
//ClientDataSet1.DisableControls;
|
||||
//with ClientDataSet1 do
|
||||
//begin
|
||||
//First;
|
||||
//while not eof do
|
||||
//begin
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('取最大编号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
|
||||
if Trim(MainType) <> '' then
|
||||
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
|
||||
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
if ADOQueryTemp.RecordCount > 1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value := flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value := 'Y';
|
||||
if Trim(MainType) <> '' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
|
||||
//ClientDataSet1.Post;
|
||||
// Next;
|
||||
//end;
|
||||
//end;
|
||||
// ClientDataSet1.EnableControls;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
//Application.MessageBox('保存成功!','提示',0);
|
||||
//TV1.OptionsData.Editing:=False;
|
||||
//TV1.OptionsSelection.CellSelect:=False;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.V1OrderNoPropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('OrderNo').Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set OrderNo=' + mvalue);
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.V1NotePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Note').Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set Note=''' + Trim(mvalue) + '''');
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.V1Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ZdyFlag').Value := StrToInt(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set ZdyFlag=' + Trim(mvalue));
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.V1HelpTypePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('HelpType').Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set HelpType=''' + Trim(mvalue) + '''');
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelp.V1ZdyStr1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
|
||||
begin
|
||||
Application.MessageBox('名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := TV1.Controller.FocusedColumn.DataBinding.FilterFieldName;
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '';
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('Update KH_Zdy Set ' + FFieldName + '=''' + Trim(mvalue) + '''');
|
||||
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
224
产品报价(ProductQuotation)/U_ZDYHelpSel.dfm
Normal file
224
产品报价(ProductQuotation)/U_ZDYHelpSel.dfm
Normal file
|
|
@ -0,0 +1,224 @@
|
|||
object frmZDYHelpSel: TfrmZDYHelpSel
|
||||
Left = 392
|
||||
Top = 169
|
||||
Width = 574
|
||||
Height = 598
|
||||
Caption = #39033#30446#32500#25252
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 558
|
||||
Height = 486
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.GroupByBox = False
|
||||
object V1Code: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'ZDYNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object V1Column1: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 48
|
||||
end
|
||||
object V1Name: TcxGridDBColumn
|
||||
Tag = 2
|
||||
Caption = #21517#31216
|
||||
DataBinding.FieldName = 'ZDYName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1NamePropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 208
|
||||
end
|
||||
object V1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object V1OrderNo: TcxGridDBColumn
|
||||
Caption = #39034#24207#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 53
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 558
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #30830#23450
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 59
|
||||
Top = 0
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 118
|
||||
Top = 0
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 177
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBSave: TToolButton
|
||||
Left = 236
|
||||
Top = 0
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 15
|
||||
Visible = False
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 295
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 558
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 19
|
||||
Top = 17
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21517#31216
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 240
|
||||
Top = 11
|
||||
Width = 120
|
||||
Height = 24
|
||||
Caption = #27880#65306#28966#28857#31163#24320#24403#21069#32534#36753#13#10' '#21333#20803#26684#20445#23384#25968#25454#12290
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object ZDYName: TEdit
|
||||
Tag = 2
|
||||
Left = 54
|
||||
Top = 12
|
||||
Width = 169
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = ZDYNameChange
|
||||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 280
|
||||
Top = 144
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 200
|
||||
Top = 144
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 352
|
||||
Top = 248
|
||||
end
|
||||
end
|
||||
465
产品报价(ProductQuotation)/U_ZDYHelpSel.pas
Normal file
465
产品报价(ProductQuotation)/U_ZDYHelpSel.pas
Normal file
|
|
@ -0,0 +1,465 @@
|
|||
unit U_ZDYHelpSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ToolWin, ComCtrls,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||
StdCtrls, ExtCtrls, cxCheckBox, cxTextEdit, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu;
|
||||
|
||||
type
|
||||
TfrmZDYHelpSel = class(TForm)
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
V1Code: TcxGridDBColumn;
|
||||
V1Name: TcxGridDBColumn;
|
||||
ToolBar1: TToolBar;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
TBAdd: TToolButton;
|
||||
TBSave: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
V1Note: TcxGridDBColumn;
|
||||
V1OrderNo: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
ZDYName: TEdit;
|
||||
V1Column1: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure ZDYNameChange(Sender: TObject);
|
||||
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
flag,flagname,snote,MainType,ReturnStr,FGStr:string;
|
||||
fnote,forderno:Boolean;
|
||||
PPSTE,JiangeStr:integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmZDYHelpSel: TfrmZDYHelpSel;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmZDYHelpSel.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where Type='''+flag+'''');
|
||||
if Trim(MainType)<>'' then
|
||||
begin
|
||||
sql.Add(' and MainType='''+Trim(MainType)+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.TBAddClick(Sender: TObject);
|
||||
var
|
||||
i:Integer;
|
||||
begin
|
||||
ZDYName.SetFocus;
|
||||
TV1.OptionsData.Editing:=True;
|
||||
TV1.OptionsSelection.CellSelect:=True;
|
||||
for i:=0 to 5 do
|
||||
begin
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Append;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
maxno:string;
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from KH_ZDY where ZdyNo='''+Trim(flag)+'''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
|
||||
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
|
||||
Parameters.ParamByName('Type').Value:='Main';
|
||||
Parameters.ParamByName('MainType').Value:=Trim(MainType);
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp,maxno,'SY','KH_ZDY',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大编号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxno:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('delete KH_ZDY where ZDYNO='''+Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYName').AsString)='' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||
if Trim(MainType)<>'' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||
ClientDataSet1.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
// TV1.OptionsData.Editing:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet1.IsEmpty then Exit;
|
||||
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString)<>'') or
|
||||
(Trim(ClientDataSet1.FieldByName('ZDYname').AsString)<>'') then
|
||||
begin
|
||||
if application.MessageBox('确定要删除吗?','提示信息',1)=2 then exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete KH_ZDY where ZDYNo='''+Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString)+'''');
|
||||
SQL.Add(' and Type='''+Trim(flag)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
ClientDataSet1.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=2;
|
||||
ZDYName.SetFocus;
|
||||
WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj,fsj1:string;
|
||||
begin
|
||||
{if PPSTE=1 then
|
||||
begin
|
||||
Application.Terminate;
|
||||
Exit;
|
||||
end; }
|
||||
InitGrid();
|
||||
fsj:=Trim(flag)+'01';
|
||||
fsj1:=Trim(flagname)+'01';
|
||||
ReadCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
|
||||
{if ClientDataSet1.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into KH_ZDY(ZDYNo,ZDYname,Type,note)');
|
||||
sql.Add('select '''+Trim(fsj)+'''');
|
||||
sql.Add(','''+Trim(fsj1)+'''');
|
||||
SQL.Add(','''+Trim(flag)+'''');
|
||||
sql.Add(','''+Trim(snote)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
InitGrid();
|
||||
end;}
|
||||
//frmZDYHelp.Caption:=Trim(flagname)+'<'+Trim(flag)+'>';
|
||||
frmZDYHelpSel.Caption:=Trim(flagname);
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ReturnStr:='';
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if FieldByName('SSel').AsBoolean=True then
|
||||
begin
|
||||
if JiangeStr<>99 then
|
||||
begin
|
||||
if FGStr<>'' then
|
||||
ReturnStr:=ReturnStr+Trim(fieldbyname('ZDYName').AsString)+FGStr
|
||||
else
|
||||
ReturnStr:=ReturnStr+Trim(fieldbyname('ZDYName').AsString)+';'
|
||||
end
|
||||
else
|
||||
ReturnStr:=ReturnStr+Trim(fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
if JiangeStr<>99 then
|
||||
ReturnStr:=Copy(ReturnStr,1,Length(ReturnStr)-1);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
TV1.OptionsData.Editing:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.TV1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if TV1.OptionsData.Editing=False then
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.ZDYNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZDYHelpSel.V1NamePropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
maxno,mvalue:string;
|
||||
begin
|
||||
mvalue:=TcxTextEdit(Sender).EditingText;
|
||||
if Trim(mvalue)='' then
|
||||
begin
|
||||
//Application.MessageBox('名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ClientDataSet1 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ZdyName').Value:=Trim(mvalue);
|
||||
//Post;
|
||||
end;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from KH_ZDY where ZdyNo='''+Trim(flag)+'''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
|
||||
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
|
||||
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
|
||||
Parameters.ParamByName('Type').Value:='Main';
|
||||
Parameters.ParamByName('MainType').Value:=Trim(MainType);
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
//ClientDataSet1.DisableControls;
|
||||
//with ClientDataSet1 do
|
||||
//begin
|
||||
//First;
|
||||
//while not eof do
|
||||
//begin
|
||||
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTemp,maxno,'SY','KH_ZDY',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('取最大编号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxno:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('select * from KH_Zdy where Type='''+Trim(flag)+'''');
|
||||
if Trim(MainType)<>'' then
|
||||
SQL.Add(' and MainType='''+Trim(MainType)+'''');
|
||||
sql.Add(' and ZdyName='''+Trim(ClientDataSet1.fieldbyname('ZdyName').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
if ADOQueryTemp.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString)='' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!','提示',0);
|
||||
Exit;
|
||||
end else
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString)<>Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
//ClientDataSet1.EnableControls;
|
||||
Application.MessageBox('名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('delete KH_ZDY where ZDYNO='''+Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_ZDY where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
ADOQueryCmd.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||
ADOQueryCmd.FieldByName('ZDYName').Value:=ClientDataSet1.fieldbyname('ZDYName').AsString;
|
||||
ADOQueryCmd.FieldByName('note').Value:=Trim(snote);
|
||||
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
|
||||
ADOQueryCmd.FieldByName('Type').Value:=flag;
|
||||
ADOQueryCmd.FieldByName('valid').Value:='Y';
|
||||
if Trim(MainType)<>'' then
|
||||
ADOQueryCmd.FieldByName('MainType').Value:=Trim(MainType);
|
||||
//ADOQueryCmd.FieldByName('sel').Value:=0;
|
||||
ADOQueryCmd.Post;
|
||||
ClientDataSet1.Edit;
|
||||
ClientDataSet1.FieldByName('ZDYNo').Value:=Trim(maxno);
|
||||
//ClientDataSet1.Post;
|
||||
// Next;
|
||||
//end;
|
||||
//end;
|
||||
// ClientDataSet1.EnableControls;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
//Application.MessageBox('保存成功!','提示',0);
|
||||
//TV1.OptionsData.Editing:=False;
|
||||
//TV1.OptionsSelection.CellSelect:=False;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
218
产品报价(ProductQuotation)/U_ZdyAttInput.dfm
Normal file
218
产品报价(ProductQuotation)/U_ZdyAttInput.dfm
Normal file
|
|
@ -0,0 +1,218 @@
|
|||
object frmZdyAttInput: TfrmZdyAttInput
|
||||
Left = 219
|
||||
Top = 254
|
||||
Width = 920
|
||||
Height = 370
|
||||
Caption = #23458#25143#36164#26009#24405#20837
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 912
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_BaseInfo.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_BaseInfo.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton3: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 14
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 912
|
||||
Height = 302
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.Delete.Visible = False
|
||||
DataController.DataSource = DS_HZ
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_BaseInfo.handBlack
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #23458#25143#21517#31216
|
||||
DataBinding.FieldName = 'ZdyName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 147
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #23458#25143#32534#21495
|
||||
DataBinding.FieldName = 'ZdyCode'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #30005#35805
|
||||
DataBinding.FieldName = 'DEFstr1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 63
|
||||
end
|
||||
object v2Column4: TcxGridDBColumn
|
||||
Caption = #25163#26426
|
||||
DataBinding.FieldName = 'DEFstr2'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #20256#30495
|
||||
DataBinding.FieldName = 'DEFstr3'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'DEFstr5'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #20844#21496#22320#22336
|
||||
DataBinding.FieldName = 'DEFNote1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object v2Column8: TcxGridDBColumn
|
||||
Caption = #21457#36135#22320#22336
|
||||
DataBinding.FieldName = 'DEFNote2'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 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 = 154
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_BaseInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_BaseInfo.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_BaseInfo.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 949
|
||||
Top = 225
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB_Main
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 864
|
||||
Top = 224
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
Left = 928
|
||||
Top = 216
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 224
|
||||
end
|
||||
object DS_HZ: TDataSource
|
||||
DataSet = CDS_HZ
|
||||
Left = 899
|
||||
Top = 235
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 872
|
||||
Top = 224
|
||||
end
|
||||
end
|
||||
236
产品报价(ProductQuotation)/U_ZdyAttInput.pas
Normal file
236
产品报价(ProductQuotation)/U_ZdyAttInput.pas
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
unit U_ZdyAttInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||
cxButtonEdit, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmZdyAttInput = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
ToolButton3: TToolButton;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
v2Column8: TcxGridDBColumn;
|
||||
v2Column9: TcxGridDBColumn;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
function SaveData():Boolean;
|
||||
|
||||
public
|
||||
{ Public declarations }
|
||||
RKFlag,FCYID:String;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmZdyAttInput: TfrmZdyAttInput;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
|
||||
procedure TfrmZdyAttInput.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmZdyAttInput.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
//frmZdyAttInput:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttInput.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
//Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttInput.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('客户资料录入',Tv2,'客户自定义');
|
||||
Close;
|
||||
end;
|
||||
procedure TfrmZdyAttInput.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('客户资料录入',Tv2,'客户自定义');
|
||||
InitGrid();
|
||||
if Trim(FCYID)='' then
|
||||
begin
|
||||
CDS_HZ.Append;
|
||||
CDS_HZ.Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttInput.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
function TfrmZdyAttInput.SaveData():Boolean;
|
||||
var
|
||||
maxId,CRID:String;
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
if Trim(FCYID)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||
begin
|
||||
Result:=False;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxId:=Trim(FCYID);
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from KH_Zdy_Attachment where ATID='''+Trim(FCYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCYID)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
end else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('Edittime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('ATID').Value:=Trim(maxId);
|
||||
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||
RTSetSaveDataCDS(ADOQueryCmd,Tv2,CDS_HZ,'',0);
|
||||
FieldByName('Type').Value:='KHName';
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(FCYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FCYID)='' then
|
||||
begin
|
||||
Append;
|
||||
end else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||
FieldByName('ZdyName').Value:=Trim(CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||
FieldByName('Type').Value:='KHName';
|
||||
FieldByName('MainType').Value:=Trim(CDS_HZ.fieldbyname('DEFstr5').AsString);
|
||||
Post;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_Zdy where ZdyName='''+Trim(CDS_HZ.fieldbyname('ZdyName').AsString)+'''');
|
||||
sql.Add(' and Type=''KHName'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryCmd.RecordCount>1 then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('名称重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with CDS_HZ do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('ATID').Value:=Trim(maxId);
|
||||
Post;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
Result:=True;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttInput.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
if Trim(CDS_HZ.FieldByName('ZdyName').AsString)='' then
|
||||
begin
|
||||
Application.MessageBox('客户名称不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要保存数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
ToolBar1.SetFocus;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
393
产品报价(ProductQuotation)/U_ZdyAttachCP.dfm
Normal file
393
产品报价(ProductQuotation)/U_ZdyAttachCP.dfm
Normal file
|
|
@ -0,0 +1,393 @@
|
|||
object frmZdyAttachCP: TfrmZdyAttachCP
|
||||
Left = 108
|
||||
Top = 101
|
||||
Width = 1075
|
||||
Height = 569
|
||||
Caption = #20135#21697#36164#26009#31649#29702
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1067
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 113
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_PBMDDJ.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_PBMDDJ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25552#21462'Excel'#25968#25454
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 243
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 306
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1067
|
||||
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 = 1067
|
||||
Height = 468
|
||||
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 = DataLink_PBMDDJ.SHuangSe
|
||||
Styles.IncSearch = DataLink_PBMDDJ.SHuangSe
|
||||
Styles.Selection = DataLink_PBMDDJ.SHuangSe
|
||||
Styles.Header = DataLink_PBMDDJ.handBlack
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'ZdyCode'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 80
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'ZdyName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Options.Sorting = False
|
||||
Width = 124
|
||||
end
|
||||
object v2Column11: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'DEFstr5'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 53
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'DEFstr1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 72
|
||||
end
|
||||
object v2Column4: TcxGridDBColumn
|
||||
Caption = #25104#20221
|
||||
DataBinding.FieldName = 'DEFstr2'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 74
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'DEFstr3'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 68
|
||||
end
|
||||
object v2Mrate: TcxGridDBColumn
|
||||
Caption = #35745#21010#32553#29575'(%)'
|
||||
DataBinding.FieldName = 'Mrate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 80
|
||||
end
|
||||
object v2Column13: TcxGridDBColumn
|
||||
Caption = #24037#33402
|
||||
DataBinding.FieldName = 'defNote2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 100
|
||||
end
|
||||
object v2Column8: TcxGridDBColumn
|
||||
Caption = #33457#21495
|
||||
DataBinding.FieldName = 'DEFstr4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 58
|
||||
end
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'DEFstr6'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 61
|
||||
end
|
||||
object v2Column9: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'DEFstr7'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 73
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'DEFstr8'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 61
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 114
|
||||
end
|
||||
object v2Column14: TcxGridDBColumn
|
||||
Caption = #25805#20316#21592
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 60
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #25805#20316#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 80
|
||||
end
|
||||
object v2Column16: TcxGridDBColumn
|
||||
Caption = #20179#20301
|
||||
DataBinding.FieldName = 'DEFstr4'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 70
|
||||
end
|
||||
object v2Column17: TcxGridDBColumn
|
||||
Caption = #20179#20301#25968
|
||||
DataBinding.FieldName = 'DEFstr5'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 70
|
||||
end
|
||||
object v2defflt1: TcxGridDBColumn
|
||||
Caption = #20215#26684#22686#24133
|
||||
DataBinding.FieldName = 'defflt1'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 741
|
||||
Top = 161
|
||||
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 = 843
|
||||
Top = 147
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 840
|
||||
Top = 128
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Left = 936
|
||||
Top = 41
|
||||
end
|
||||
end
|
||||
400
产品报价(ProductQuotation)/U_ZdyAttachCP.pas
Normal file
400
产品报价(ProductQuotation)/U_ZdyAttachCP.pas
Normal file
|
|
@ -0,0 +1,400 @@
|
|||
unit U_ZdyAttachCP;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ComObj,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||
cxButtonEdit, cxTextEdit;
|
||||
|
||||
type
|
||||
|
||||
FdDy=record
|
||||
inc: integer; //客户端套接字句柄
|
||||
FDdys:string[32]; //客户端套接字
|
||||
FdDysName:string[32]; //客户端套接字
|
||||
end;
|
||||
TfrmZdyAttachCP = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
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;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column9: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
ZdyCode: TEdit;
|
||||
Label2: TLabel;
|
||||
DEFstr5: TComboBox;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
v2Column8: TcxGridDBColumn;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
v2Column11: TcxGridDBColumn;
|
||||
v2Column13: TcxGridDBColumn;
|
||||
OpenDialog1: TOpenDialog;
|
||||
ToolButton5: TToolButton;
|
||||
v2Mrate: TcxGridDBColumn;
|
||||
v2Column14: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column16: TcxGridDBColumn;
|
||||
v2Column17: TcxGridDBColumn;
|
||||
v2defflt1: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ZdyNameChange(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
|
||||
public
|
||||
fkhType:string;
|
||||
dFdDy: array[0..20] of FdDy; //客户端连接数组
|
||||
end;
|
||||
|
||||
var
|
||||
frmZdyAttachCP: TfrmZdyAttachCP;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun,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'' ');
|
||||
sql.Add(' and isnull(khType,'''')='+quotedstr(trim(fkhType)));
|
||||
sql.Add(' order by zdyCode ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmZdyAttachCP.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmZdyAttachCP:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('产品资料',Tv2,'客户自定义');
|
||||
Close;
|
||||
end;
|
||||
procedure TfrmZdyAttachCP.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
if CDS_HZ.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
if Trim(CDS_HZ.fieldbyname('ATID').AsString)<>'' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete KH_Zdy_Attachment where ATID='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||
sql.Add('delete KH_Zdy where ZdyNo='''+Trim(CDS_HZ.fieldbyname('ATID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
CDS_HZ.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('产品资料',Tv2,'客户自定义');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain,CDS_HZ);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.ZdyNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmZdyAttachCP.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel(self.Caption,cxgrid2);
|
||||
// SelExportData(Tv2,ADOQueryMain,'产品资料列表');
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
{ try
|
||||
frmZdyAttInputCP:=TfrmZdyAttInputCP.Create(Application);
|
||||
with frmZdyAttInputCP do
|
||||
begin
|
||||
FCYID:=Trim(Self.CDS_HZ.fieldbyname('ATID').AsString);
|
||||
fkhType:=self.fkhType;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZdyAttInputCP.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
{ try
|
||||
frmZdyAttInputCP:=TfrmZdyAttInputCP.Create(Application);
|
||||
with frmZdyAttInputCP do
|
||||
begin
|
||||
FCYID:='';
|
||||
fkhType:=self.fkhType;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZdyAttInputCP.Free;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachCP.ToolButton5Click(Sender: TObject);
|
||||
var
|
||||
excelApp,WorkBook:Variant;
|
||||
i,j,k,ExcelRowCount:integer;
|
||||
maxId:string;
|
||||
begin
|
||||
|
||||
try
|
||||
ExcelApp := CreateOleObject('Excel.Application');
|
||||
openDialog1.Filter:='*.CSV;*.xls';
|
||||
if opendialog1.Execute then
|
||||
begin
|
||||
WorkBook :=ExcelApp.WorkBooks.Open(OpenDialog1.FileName);
|
||||
end
|
||||
else
|
||||
exit;
|
||||
|
||||
ExcelApp.Visible := false;
|
||||
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
|
||||
except
|
||||
application.MessageBox('加载EXCEL错误!','错误信息',MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
|
||||
try
|
||||
k:=0;
|
||||
for i:=1 to 20 do
|
||||
begin
|
||||
if trim(excelapp.Cells[1,i].value)='' then break;
|
||||
if trim(excelapp.Cells[1,i].value)='产品编号' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='ZdyCode';
|
||||
dFdDy[k].FdDysName:='产品编号';
|
||||
end;
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='产品名称' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='ZdyName';
|
||||
dFdDy[k].FdDysName:='产品名称';
|
||||
end;
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='名称' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='defNote1';
|
||||
dFdDy[k].FdDysName:='名称';
|
||||
end;
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='颜色' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr3';
|
||||
dFdDy[k].FdDysName:='名称';
|
||||
end;
|
||||
|
||||
if trim(excelapp.Cells[1,i].value)='工艺' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='defNote2';
|
||||
dFdDy[k].FdDysName:='工艺';
|
||||
end;
|
||||
if trim(excelapp.Cells[1,i].value)='类型' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr5';
|
||||
dFdDy[k].FdDysName:='类型';
|
||||
end;
|
||||
if trim(excelapp.Cells[1,i].value)='规格' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr1';
|
||||
dFdDy[k].FdDysName:='规格';
|
||||
end;
|
||||
if trim(excelapp.Cells[1,i].value)='成份' then
|
||||
begin
|
||||
dFdDy[k].inc:=i;
|
||||
dFdDy[k].FDdys:='DEFstr2';
|
||||
dFdDy[k].FdDysName:='成份';
|
||||
end;
|
||||
k:=k+1;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
try
|
||||
for i := 2 to excelrowcount do
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,maxId,'AT','KH_Zdy_Attachment',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_Zdy_Attachment where 1=2');
|
||||
open;
|
||||
end;
|
||||
ADOQueryCmd.Append;
|
||||
for j:=0 to k-1 do
|
||||
begin
|
||||
ADOQueryCmd.fieldbyname(dFdDy[j].FDdys).Value:=excelapp.Cells[i,dFdDy[j].inc].Value;
|
||||
end;
|
||||
ADOQueryCmd.FieldByName('ATID').Value:=Trim(maxId);
|
||||
ADOQueryCmd.FieldByName('Type').Value:='CP';
|
||||
ADOQueryCmd.FieldByName('Filler').Value:=Trim(DName);
|
||||
ADOQueryCmd.Post;
|
||||
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from KH_Zdy_Attachment where ATID='''+trim(maxId)+''' ');
|
||||
open;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from KH_Zdy where ZdyNo='''+Trim(maxId)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if ADOQueryCmd.IsEmpty then
|
||||
begin
|
||||
Append;
|
||||
end else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('ZdyNo').Value:=Trim(maxId);
|
||||
FieldByName('ZdyName').Value:=Trim(ADOQueryTemp.fieldbyname('ZdyName').AsString);
|
||||
FieldByName('Type').Value:='CP';
|
||||
FieldByName('MainType').Value:=Trim(ADOQueryTemp.fieldbyname('DEFstr5').AsString);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
WorkBook.Close;
|
||||
ExcelApp.Quit;
|
||||
ExcelApp := Unassigned;
|
||||
WorkBook := Unassigned;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
InitGrid();
|
||||
except
|
||||
WorkBook.Close;
|
||||
ExcelApp.Quit;
|
||||
ExcelApp := Unassigned;
|
||||
WorkBook := Unassigned;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end;
|
||||
end;
|
||||
|
||||
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.
|
||||
|
||||
|
||||
337
产品报价(ProductQuotation)/U_ZdyAttachGYS.dfm
Normal file
337
产品报价(ProductQuotation)/U_ZdyAttachGYS.dfm
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
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 = DataLink_PBMDDJ.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_PBMDDJ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 1
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
Visible = False
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 248
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 3
|
||||
Visible = False
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 311
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 374
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
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 = 509
|
||||
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 = DataLink_PBMDDJ.SHuangSe
|
||||
Styles.IncSearch = DataLink_PBMDDJ.SHuangSe
|
||||
Styles.Selection = DataLink_PBMDDJ.SHuangSe
|
||||
Styles.Header = DataLink_PBMDDJ.handBlack
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#32534#21495
|
||||
DataBinding.FieldName = 'ZdyCode'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830#21517#31216
|
||||
DataBinding.FieldName = 'ZdyName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 124
|
||||
end
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #32479#35745#21333#20301#21517#31216
|
||||
DataBinding.FieldName = 'zdyNameTj'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 111
|
||||
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 = DataLink_PBMDDJ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 773
|
||||
Top = 17
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 813
|
||||
Top = 17
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 733
|
||||
Top = 17
|
||||
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 = 768
|
||||
Top = 216
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
Left = 776
|
||||
Top = 184
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 824
|
||||
Top = 184
|
||||
end
|
||||
object DS_HZ: TDataSource
|
||||
DataSet = CDS_HZ
|
||||
Left = 731
|
||||
Top = 179
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 712
|
||||
Top = 184
|
||||
end
|
||||
end
|
||||
214
产品报价(ProductQuotation)/U_ZdyAttachGYS.pas
Normal file
214
产品报价(ProductQuotation)/U_ZdyAttachGYS.pas
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
unit U_ZdyAttachGYS;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||
cxButtonEdit, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmZdyAttachGYS = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ToolButton1: TToolButton;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
Label3: TLabel;
|
||||
ZdyName: TEdit;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
ToolButton3: TToolButton;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
v2Column9: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
ZdyCode: TEdit;
|
||||
ToolButton4: TToolButton;
|
||||
v2Column8: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
DEFstr5: TComboBox;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
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_RTFun,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.
|
||||
|
||||
|
||||
287
产品报价(ProductQuotation)/U_ZdyAttachment.dfm
Normal file
287
产品报价(ProductQuotation)/U_ZdyAttachment.dfm
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
object frmZdyAttachment: TfrmZdyAttachment
|
||||
Left = 249
|
||||
Top = 112
|
||||
Width = 1142
|
||||
Height = 613
|
||||
Caption = #23458#25143#36164#26009#31649#29702
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1126
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ProductQuotation.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1126
|
||||
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 CoName: TEdit
|
||||
Tag = 2
|
||||
Left = 238
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = CoNameChange
|
||||
end
|
||||
object CoCode: TEdit
|
||||
Tag = 2
|
||||
Left = 70
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = CoNameChange
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 70
|
||||
Width = 1126
|
||||
Height = 505
|
||||
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 = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.IncSearch = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.Selection = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.Header = DataLink_ProductQuotation.Default
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #23458#25143#32534#21495
|
||||
DataBinding.FieldName = 'CoCode'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #23458#25143#21517#31216
|
||||
DataBinding.FieldName = 'CoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 127
|
||||
end
|
||||
object v2Column15: TcxGridDBColumn
|
||||
Caption = #23458#25143#31616#31216
|
||||
DataBinding.FieldName = 'CoHRName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object v2Column11: TcxGridDBColumn
|
||||
Caption = #20844#21496#22320#22336
|
||||
DataBinding.FieldName = 'CoAddress'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object v2Column10: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'Salesman'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #30005#35805
|
||||
DataBinding.FieldName = 'Telephone'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object v2Column4: TcxGridDBColumn
|
||||
Caption = #25163#26426
|
||||
DataBinding.FieldName = 'PhoneNumber'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 74
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #20256#30495
|
||||
DataBinding.FieldName = 'Fax'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object v2Column9: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154
|
||||
DataBinding.FieldName = 'Contacts'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 87
|
||||
end
|
||||
object v2Column7: TcxGridDBColumn
|
||||
Caption = #38134#34892#36134#25143
|
||||
DataBinding.FieldName = 'BankNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 91
|
||||
end
|
||||
object v2Column8: TcxGridDBColumn
|
||||
Caption = #24320#25143#34892
|
||||
DataBinding.FieldName = 'BankName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
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 = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.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
|
||||
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
|
||||
146
产品报价(ProductQuotation)/U_ZdyAttachment.pas
Normal file
146
产品报价(ProductQuotation)/U_ZdyAttachment.pas
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
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;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
ToolButton2: TToolButton;
|
||||
ADOQueryMain: TADOQuery;
|
||||
RM1: TRMGridReport;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
Label3: TLabel;
|
||||
CoName: TEdit;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DS_HZ: TDataSource;
|
||||
CDS_HZ: TClientDataSet;
|
||||
Label1: TLabel;
|
||||
CoCode: TEdit;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column15: TcxGridDBColumn;
|
||||
v2Column11: TcxGridDBColumn;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column9: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
v2Column8: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure CoNameChange(Sender: TObject);
|
||||
procedure Tv2DblClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
canshu1: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmZdyAttachment: TfrmZdyAttachment;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmZdyAttachment.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from Company A left join Company_contact B ');
|
||||
sql.Add(' on A.CoID=B.CoID and B.IsDefault=1 where A.CoType=''客户'' and A.Valid=''Y'' ');
|
||||
if trim(canshu1) = '业务员' then
|
||||
sql.Add(' and A.Salesman=' + quotedstr(trim(dname)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryMain, CDS_HZ);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachment.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmZdyAttachment := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachment.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachment.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('客户资料', Tv2, '客户自定义');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachment.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.CoNameChange(Sender: TObject);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachment.Tv2DblClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
507
产品报价(ProductQuotation)/U_ZdyAttachmentBJ.dfm
Normal file
507
产品报价(ProductQuotation)/U_ZdyAttachmentBJ.dfm
Normal file
|
|
@ -0,0 +1,507 @@
|
|||
object frmZdyAttachmentCB: TfrmZdyAttachmentCB
|
||||
Left = 338
|
||||
Top = 148
|
||||
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
|
||||
Position = poScreenCenter
|
||||
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 = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ProductQuotation.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 1
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 3
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 315
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 378
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton5Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 441
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1281
|
||||
Height = 38
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 366
|
||||
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 = 578
|
||||
Top = 13
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23458#25143#21517#31216
|
||||
end
|
||||
object custNo: TEdit
|
||||
Tag = 2
|
||||
Left = 418
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
OnChange = custNoChange
|
||||
end
|
||||
object begdate: TDateTimePicker
|
||||
Left = 80
|
||||
Top = 8
|
||||
Width = 100
|
||||
Height = 20
|
||||
Date = 42391.664898645830000000
|
||||
Time = 42391.664898645830000000
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object enddate: TDateTimePicker
|
||||
Left = 192
|
||||
Top = 8
|
||||
Width = 100
|
||||
Height = 20
|
||||
Date = 42391.664898645830000000
|
||||
Time = 42391.664898645830000000
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
end
|
||||
object custName: TEdit
|
||||
Tag = 2
|
||||
Left = 630
|
||||
Top = 9
|
||||
Width = 89
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = custNoChange
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 69
|
||||
Width = 1281
|
||||
Height = 471
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
NavigatorButtons.Delete.Enabled = False
|
||||
NavigatorButtons.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>
|
||||
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 = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.IncSearch = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.Selection = DataLink_ProductQuotation.SHuangSe
|
||||
Styles.Header = DataLink_ProductQuotation.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 = 'custCountry'
|
||||
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 = #20013#25991#21697#21517
|
||||
DataBinding.FieldName = 'P_CodeName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
object v2Column16: TcxGridDBColumn
|
||||
Caption = #33521#25991#21697#21517
|
||||
DataBinding.FieldName = 'P_CodeNameE'
|
||||
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
|
||||
Width = 70
|
||||
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 v2Column23: TcxGridDBColumn
|
||||
Caption = #29615#28888
|
||||
DataBinding.FieldName = 'BJstr1'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v2Column24: TcxGridDBColumn
|
||||
Caption = #32553#27700#29575
|
||||
DataBinding.FieldName = 'BJstr2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v2Column25: TcxGridDBColumn
|
||||
Caption = #21322#28418#20215#26684
|
||||
DataBinding.FieldName = 'BJstr3'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v2Column26: TcxGridDBColumn
|
||||
Caption = #26579#33394#20215#26684
|
||||
DataBinding.FieldName = 'BJstr4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v2Column27: TcxGridDBColumn
|
||||
Caption = #21360#33457#20215#26684
|
||||
DataBinding.FieldName = 'BJstr5'
|
||||
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 v2Column18: TcxGridDBColumn
|
||||
Caption = #24065#31181
|
||||
DataBinding.FieldName = 'priceUnit'
|
||||
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 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
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 789
|
||||
Top = 9
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
Parameters = <>
|
||||
Left = 829
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.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 = DataLink_ProductQuotation.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 RMllPDFExport1: TRMllPDFExport
|
||||
ShowDialog = False
|
||||
ShowAfterExport = True
|
||||
ShowBackPicture = True
|
||||
Left = 928
|
||||
Top = 164
|
||||
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
|
||||
285
产品报价(ProductQuotation)/U_ZdyAttachmentBJ.pas
Normal file
285
产品报价(ProductQuotation)/U_ZdyAttachmentBJ.pas
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
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;
|
||||
|
||||
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;
|
||||
ToolButton3: TToolButton;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column7: TcxGridDBColumn;
|
||||
v2Column8: TcxGridDBColumn;
|
||||
v2Column9: TcxGridDBColumn;
|
||||
v2Column10: TcxGridDBColumn;
|
||||
ToolButton4: 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;
|
||||
v2Column18: TcxGridDBColumn;
|
||||
v2Column19: TcxGridDBColumn;
|
||||
v2Column14: TcxGridDBColumn;
|
||||
v2Column16: TcxGridDBColumn;
|
||||
v2Column17: TcxGridDBColumn;
|
||||
v2Column21: TcxGridDBColumn;
|
||||
v2Column22: TcxGridDBColumn;
|
||||
v2Column23: TcxGridDBColumn;
|
||||
v2Column24: TcxGridDBColumn;
|
||||
v2Column25: TcxGridDBColumn;
|
||||
v2Column26: TcxGridDBColumn;
|
||||
v2Column27: TcxGridDBColumn;
|
||||
v2Column28: TcxGridDBColumn;
|
||||
v2Column20: 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 ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
private
|
||||
|
||||
{ Private declarations }
|
||||
procedure InitGrid();
|
||||
public
|
||||
fkhType: string;
|
||||
Fmanage: string;
|
||||
canshu1: string;
|
||||
end;
|
||||
|
||||
//var
|
||||
// frmZdyAttachmentCB: TfrmZdyAttachmentCB;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun10, U_Fun, U_ZDYHelp, U_ZdyAttachmentBJ_Edit;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
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)));
|
||||
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, '客户自定义');
|
||||
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.ToolButton4Click(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.ToolButton3Click(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(DParameters1);
|
||||
end;
|
||||
|
||||
procedure TfrmZdyAttachmentCB.ToolButton5Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
Porderno: string;
|
||||
i, j: Integer;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
ExportFtErpFile('报价信息表.rmf', ADOQueryTemp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\报价信息表.rmf';
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*, ');
|
||||
sql.Add('PrtImage=(select Top 1 FilesOther from TP_File X where X.WBID=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;
|
||||
|
||||
end.
|
||||
|
||||
557
产品报价(ProductQuotation)/U_ZdyAttachmentBJ_Edit.dfm
Normal file
557
产品报价(ProductQuotation)/U_ZdyAttachmentBJ_Edit.dfm
Normal file
|
|
@ -0,0 +1,557 @@
|
|||
object frmZdyAttachmentBJ_Edit: TfrmZdyAttachmentBJ_Edit
|
||||
Left = 302
|
||||
Top = 90
|
||||
Width = 1224
|
||||
Height = 570
|
||||
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 = 1208
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ProductQuotation.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object Tsave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 5
|
||||
OnClick = TsaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 1208
|
||||
Height = 503
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1208
|
||||
Height = 193
|
||||
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 = 540
|
||||
Top = 78
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20215#26684#26465#27454
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 541
|
||||
Top = 29
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23458#25143#21517#31216
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 36
|
||||
Top = 54
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #22269' '#23478
|
||||
end
|
||||
object Label39: TLabel
|
||||
Left = 541
|
||||
Top = 54
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20986' '#36816' '#28207
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 289
|
||||
Top = 54
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32852#31995#30005#35805
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 289
|
||||
Top = 78
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26377' '#25928' '#26399
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 36
|
||||
Top = 126
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #22791' '#27880
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 36
|
||||
Top = 102
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #24065' '#31181
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 36
|
||||
Top = 232
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #27719' '#29575
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 36
|
||||
Top = 78
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #30446' '#30340' '#28207
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 289
|
||||
Top = 104
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #27719' '#29575
|
||||
end
|
||||
object custName: TEdit
|
||||
Tag = 2
|
||||
Left = 593
|
||||
Top = 25
|
||||
Width = 140
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
end
|
||||
object FromPlace: TEdit
|
||||
Tag = 2
|
||||
Left = 593
|
||||
Top = 50
|
||||
Width = 140
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object custphone: TEdit
|
||||
Tag = 2
|
||||
Left = 341
|
||||
Top = 50
|
||||
Width = 140
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
end
|
||||
object Note: TMemo
|
||||
Tag = 2
|
||||
Left = 88
|
||||
Top = 124
|
||||
Width = 645
|
||||
Height = 57
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
Lines.Strings = (
|
||||
'Note')
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 3
|
||||
end
|
||||
object priceNote: TComboBox
|
||||
Tag = 2
|
||||
Left = 592
|
||||
Top = 76
|
||||
Width = 140
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 4
|
||||
Items.Strings = (
|
||||
'FOB'
|
||||
'CIF'
|
||||
'CNF'
|
||||
'EXW'
|
||||
''
|
||||
'')
|
||||
end
|
||||
object CRTime: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 88
|
||||
Top = 24
|
||||
Width = 140
|
||||
Height = 20
|
||||
Date = 42680.847243599540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 42680.847243599540000000
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
end
|
||||
object DlyDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 340
|
||||
Top = 76
|
||||
Width = 140
|
||||
Height = 20
|
||||
Date = 42680.847243599540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 42680.847243599540000000
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
end
|
||||
object Priceunit: TComboBox
|
||||
Tag = 2
|
||||
Left = 88
|
||||
Top = 100
|
||||
Width = 140
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 7
|
||||
OnChange = PriceunitChange
|
||||
Items.Strings = (
|
||||
'USD'
|
||||
'RMB'
|
||||
''
|
||||
'')
|
||||
end
|
||||
object custNo: TBtnEditA
|
||||
Tag = 2
|
||||
Left = 340
|
||||
Top = 24
|
||||
Width = 141
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 8
|
||||
OnBtnClick = custNoBtnClick
|
||||
end
|
||||
object huilv: TcxCurrencyEdit
|
||||
Tag = 2
|
||||
Left = 340
|
||||
Top = 100
|
||||
Properties.DisplayFormat = '0.##'
|
||||
Properties.NullString = '1'
|
||||
Properties.OnEditValueChanged = huilvPropertiesEditValueChanged
|
||||
TabOrder = 9
|
||||
Width = 140
|
||||
end
|
||||
object ToPlace: TEdit
|
||||
Tag = 2
|
||||
Left = 88
|
||||
Top = 74
|
||||
Width = 140
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 10
|
||||
end
|
||||
object custCountry: TBtnEditA
|
||||
Tag = 2
|
||||
Left = 88
|
||||
Top = 48
|
||||
Width = 141
|
||||
Height = 20
|
||||
ImeName = #20013#25991'('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 11
|
||||
OnBtnClick = custCountryBtnClick
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 193
|
||||
Width = 1208
|
||||
Height = 310
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Caption = 'Panel2'
|
||||
TabOrder = 1
|
||||
object Panel3: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1208
|
||||
Height = 310
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Caption = 'Panel3'
|
||||
TabOrder = 0
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1208
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_ProductQuotation.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_ProductQuotation.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#21152
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 113
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 31
|
||||
Width = 1208
|
||||
Height = 279
|
||||
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 = DataLink_ProductQuotation.Default
|
||||
object V1Column1: TcxGridDBColumn
|
||||
Caption = #26679#21697#32534#21495
|
||||
DataBinding.FieldName = 'P_Code'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object V1Column2: TcxGridDBColumn
|
||||
Caption = #20013#25991#21697#21517
|
||||
DataBinding.FieldName = 'P_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 100
|
||||
end
|
||||
object V1Column3: TcxGridDBColumn
|
||||
Caption = #33521#25991#21697#21517
|
||||
DataBinding.FieldName = 'P_CodeNameE'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 100
|
||||
end
|
||||
object V1Column9: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'P_Spec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 100
|
||||
end
|
||||
object V1Column10: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'P_CF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object V1Column4: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'P_MF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object V1Column8: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'P_KZ'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = V1Column8PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object V1Column5: TcxGridDBColumn
|
||||
Caption = #29615#28888
|
||||
DataBinding.FieldName = 'BJstr1'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object V1Column6: TcxGridDBColumn
|
||||
Caption = #32553#27700#29575
|
||||
DataBinding.FieldName = 'BJstr2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object V1Column11: TcxGridDBColumn
|
||||
Caption = #21322#28418#20215#26684
|
||||
DataBinding.FieldName = 'BJstr3'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object V1Column12: TcxGridDBColumn
|
||||
Caption = #26579#33394#20215#26684
|
||||
DataBinding.FieldName = 'BJstr4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object V1Column14: TcxGridDBColumn
|
||||
Caption = #21360#33457#20215#26684
|
||||
DataBinding.FieldName = 'BJstr5'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object V1Column13: TcxGridDBColumn
|
||||
Caption = #38144#21806#20215#26684
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object V1Column15: TcxGridDBColumn
|
||||
Caption = #36215#35746#37327
|
||||
DataBinding.FieldName = 'BJstr6'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
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 = DataLink_ProductQuotation.ADOLink
|
||||
EnableBCD = False
|
||||
Parameters = <>
|
||||
Left = 932
|
||||
Top = 87
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.ADOLink
|
||||
EnableBCD = False
|
||||
Parameters = <>
|
||||
Left = 844
|
||||
Top = 95
|
||||
end
|
||||
object ADOQuerymain: TADOQuery
|
||||
Connection = DataLink_ProductQuotation.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
|
||||
503
产品报价(ProductQuotation)/U_ZdyAttachmentBJ_Edit.pas
Normal file
503
产品报价(ProductQuotation)/U_ZdyAttachmentBJ_Edit.pas
Normal file
|
|
@ -0,0 +1,503 @@
|
|||
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;
|
||||
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;
|
||||
V1Column1: TcxGridDBColumn;
|
||||
V1Column2: TcxGridDBColumn;
|
||||
V1Column3: TcxGridDBColumn;
|
||||
V1Column4: TcxGridDBColumn;
|
||||
Label8: TLabel;
|
||||
Priceunit: TComboBox;
|
||||
custNo: TBtnEditA;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label10: TLabel;
|
||||
huilv: TcxCurrencyEdit;
|
||||
V1Column8: TcxGridDBColumn;
|
||||
ToPlace: TEdit;
|
||||
Label11: TLabel;
|
||||
Label13: TLabel;
|
||||
V1Column13: TcxGridDBColumn;
|
||||
custCountry: TBtnEditA;
|
||||
V1Column7: TcxGridDBColumn;
|
||||
V1Column9: TcxGridDBColumn;
|
||||
V1Column5: TcxGridDBColumn;
|
||||
V1Column6: TcxGridDBColumn;
|
||||
V1Column11: TcxGridDBColumn;
|
||||
V1Column12: TcxGridDBColumn;
|
||||
V1Column14: TcxGridDBColumn;
|
||||
V1Column15: TcxGridDBColumn;
|
||||
Note: TMemo;
|
||||
V1Column10: 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);
|
||||
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_CPManageFMSel, U_ZdyAttachment;
|
||||
{$R *.dfm}
|
||||
|
||||
function TfrmZdyAttachmentBJ_Edit.savedata(): Boolean;
|
||||
var
|
||||
Filler: string;
|
||||
FillTime: TdateTime;
|
||||
begin
|
||||
result := false;
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
try
|
||||
if FType = 0 then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTmp, fkeyNo, '', 'KH_CP_BJ', 4, 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 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('price').Value := cds1.fieldbyname('price').AsFloat;
|
||||
ADOQueryCmd.FieldByName('price1').Value := cds1.fieldbyname('price1').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);
|
||||
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(custNo.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
|
||||
frmCPManageFMSel := TfrmCPManageFMSel.create(self);
|
||||
with frmCPManageFMSel 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('Price').Value := 0;
|
||||
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 showmodal = 1 then
|
||||
begin
|
||||
custNo.Text := trim(cds_hz.fieldbyname('COCode').AsString);
|
||||
custName.Text := trim(cds_hz.fieldbyname('COName').AsString);
|
||||
custphone.Text := trim(cds_hz.fieldbyname('Telephone').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;
|
||||
|
||||
end.
|
||||
|
||||
17
产品报价(ProductQuotation)/U_ZdyInput.dfm
Normal file
17
产品报价(ProductQuotation)/U_ZdyInput.dfm
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
object frmZdyInput: TfrmZdyInput
|
||||
Left = 165
|
||||
Top = 188
|
||||
Width = 870
|
||||
Height = 500
|
||||
Caption = #23458#25143#36164#26009#24405#20837
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnDestroy = FormDestroy
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
end
|
||||
30
产品报价(ProductQuotation)/U_ZdyInput.pas
Normal file
30
产品报价(ProductQuotation)/U_ZdyInput.pas
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
unit U_ZdyInput;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs;
|
||||
|
||||
type
|
||||
TfrmZdyInput = class(TForm)
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmZdyInput: TfrmZdyInput;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmZdyInput.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmZdyInput:=nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
65
产品报价(ProductQuotation)/U_iniParam.pas
Normal file
65
产品报价(ProductQuotation)/U_iniParam.pas
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
unit U_iniParam;
|
||||
|
||||
interface
|
||||
uses
|
||||
IniFiles,SysUtils;
|
||||
var
|
||||
Filename:string; //文件名
|
||||
iParam2:integer;
|
||||
bParam1:Boolean;
|
||||
bParam2:Boolean;
|
||||
SCXFlag:String; //生产线 根据此标志获取卷条码前缀 不能包含字母 1,2
|
||||
SCXCount:String; //机台个数
|
||||
PortNoStr:string;//端口号
|
||||
DllName:string;//端口Dll文件
|
||||
Function IsINIFile():Boolean; //判断InI配置文件是否存在
|
||||
procedure ReadINIFile();
|
||||
procedure WriteINIFile();
|
||||
implementation
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//读取ini文件设置参数
|
||||
//参数:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
procedure ReadINIFile();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
SCXFlag:=programIni.ReadString('生产车间配置','卷条码机台标志','1');
|
||||
SCXCount:=programIni.ReadString('生产车间配置','机台个数','1');
|
||||
PortNoStr:=programIni.ReadString('生产车间配置','端口号','com1');
|
||||
DllName:=programIni.ReadString('生产车间配置','端口Dll文件','JZCRS323C.DLL');
|
||||
programIni.Free;
|
||||
end;
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//写设置信息到INI文件
|
||||
//参数
|
||||
//////////////////////////////////////////////////////////////////
|
||||
procedure WriteINIFile();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
programIni.WriteString('生产车间配置','卷条码机台标志',SCXFlag);
|
||||
programIni.WriteString('生产车间配置','机台个数',SCXCount);
|
||||
programIni.WriteString('生产车间配置','端口号',PortNoStr);
|
||||
programIni.WriteString('生产车间配置','端口Dll文件',DllName);
|
||||
programIni.Free;
|
||||
end;
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//判断InI文件是否存在
|
||||
//////////////////////////////////////////////////////////////////
|
||||
Function IsINIFile():Boolean;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'File.INI';
|
||||
if FileExists(FileName) then
|
||||
Result:=true
|
||||
else
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
end.
|
||||
221
产品报价(ProductQuotation)/U_testdll.dfm
Normal file
221
产品报价(ProductQuotation)/U_testdll.dfm
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
object Form1: TForm1
|
||||
Left = 203
|
||||
Top = 121
|
||||
Width = 791
|
||||
Height = 554
|
||||
Caption = 'Form1'
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
FormStyle = fsMDIForm
|
||||
Menu = MainMenu1
|
||||
OldCreateOrder = False
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnResize = FormResize
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 775
|
||||
Height = 25
|
||||
ButtonWidth = 57
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Images = ImageList1
|
||||
TabOrder = 0
|
||||
object Edit1: TEdit
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 81
|
||||
Height = 22
|
||||
TabOrder = 0
|
||||
Text = '1'
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 81
|
||||
Top = 0
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 0
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 138
|
||||
Top = 0
|
||||
Width = 79
|
||||
Height = 22
|
||||
Caption = ' DllName'#65306
|
||||
end
|
||||
object DllName: TEdit
|
||||
Left = 217
|
||||
Top = 0
|
||||
Width = 135
|
||||
Height = 22
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
Left = 232
|
||||
Top = 40
|
||||
object test1: TMenuItem
|
||||
Caption = 'test'
|
||||
OnClick = test1Click
|
||||
end
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 320
|
||||
Top = 56
|
||||
Bitmap = {
|
||||
494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||
0000000000003600000028000000400000001000000001002000000000000010
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000EFEFEF000000
|
||||
0000EFEFEF00EFEFEF000000000000000000EFEFEF0000000000000000000000
|
||||
0000EFEFEF00EFEFEF0000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000EFEFEF0000000000EFEFEF00EFEFEF0000000000EFEFEF00000000008080
|
||||
00008080000000000000C0C0C000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000EFEFEF00EFEFEF000000
|
||||
0000EFEFEF00EFEFEF000000000000000000C0C0C00000000000000000008080
|
||||
00008080000080800000EFEFEF00EFEFEF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000EFEFEF0000000000000000000000000000000000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000EFEFEF0000000000808080008080800080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000008080000000000000808080008080800080808000000000008080
|
||||
0000000000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000EFEFEF00EFEF
|
||||
EF0000000000FFFF000080800000000000008080800080808000000000000000
|
||||
0000000000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000FFFF0000FFFF0000808000000000000080808000000000008080
|
||||
0000000000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000808000008080
|
||||
000080800000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000FFFF0000FFFF
|
||||
0000FFFF0000FFFF000000000000FFFF00000000000080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000FFFF0000FFFF0000FFFF00000000000080808000000000008080
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000808000000000000080808000808080008080800080808000FFFF
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000808080008080800080808000808080000000
|
||||
0000808000008080000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||
2800000040000000100000000100010000000000800000000000000000000000
|
||||
000000000000000000000000FFFFFF00FFFF000000000000D343000000000000
|
||||
F4810000000000009340000000000000F801000000000000F001000000000000
|
||||
F001000000000000C001000000000000C001000000000000C001000000000000
|
||||
C201000000000000C001000000000000F001000000000000F001000000000000
|
||||
FC03000000000000FFFF00000000000000000000000000000000000000000000
|
||||
000000000000}
|
||||
end
|
||||
object ADOConnection1: TADOConnection
|
||||
ConnectionString =
|
||||
'Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ' +
|
||||
'ID=sa;Initial Catalog=rzdata;Data Source=6GMFFMYKYMJDZW7'
|
||||
LoginPrompt = False
|
||||
Provider = 'SQLOLEDB.1'
|
||||
Left = 408
|
||||
Top = 64
|
||||
end
|
||||
end
|
||||
106
产品报价(ProductQuotation)/U_testdll.pas
Normal file
106
产品报价(ProductQuotation)/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('ProductQuotation.dll');
|
||||
if Th > 0 then
|
||||
begin
|
||||
try
|
||||
Tp := GetProcAddress(Th, 'GetDllForm');
|
||||
if Tp <> nil then
|
||||
begin
|
||||
Tf := TMyFunc(Tp);
|
||||
newh:=Tf(Application,0,strToint(edit1.text),0,0,
|
||||
PChar('ygcode'),
|
||||
PChar('ygname'),
|
||||
PChar('datebase'),
|
||||
PChar('title'),
|
||||
PChar(''),
|
||||
PChar(''),
|
||||
'','','','','','','','',''
|
||||
);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage('打印执行错误');
|
||||
end;
|
||||
finally
|
||||
// FreeLibrary();
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage('找不到'+Trim(DllName.Text));
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormResize(Sender: TObject);
|
||||
begin
|
||||
sendmessage(newh,1034,1,0);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
2
产品报价(ProductQuotation)/consvr.ini
Normal file
2
产品报价(ProductQuotation)/consvr.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[SERVER]
|
||||
SERVER=192.168.88.254
|
||||
38
产品报价(ProductQuotation)/testDll.cfg
Normal file
38
产品报价(ProductQuotation)/testDll.cfg
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J-
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T-
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
136
产品报价(ProductQuotation)/testDll.dof
Normal file
136
产品报价(ProductQuotation)/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\坯布码单待检DDMD.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
14
产品报价(ProductQuotation)/testDll.dpr
Normal file
14
产品报价(ProductQuotation)/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
产品报价(ProductQuotation)/testDll.res
Normal file
BIN
产品报价(ProductQuotation)/testDll.res
Normal file
Binary file not shown.
38
产品报价(ProductQuotation)/testDllDJ.cfg
Normal file
38
产品报价(ProductQuotation)/testDllDJ.cfg
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J-
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T-
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
136
产品报价(ProductQuotation)/testDllDJ.dof
Normal file
136
产品报价(ProductQuotation)/testDllDJ.dof
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
[FileVersion]
|
||||
Version=7.0
|
||||
[Compiler]
|
||||
A=8
|
||||
B=0
|
||||
C=1
|
||||
D=1
|
||||
E=0
|
||||
F=0
|
||||
G=1
|
||||
H=1
|
||||
I=1
|
||||
J=0
|
||||
K=0
|
||||
L=1
|
||||
M=0
|
||||
N=1
|
||||
O=1
|
||||
P=1
|
||||
Q=0
|
||||
R=0
|
||||
S=0
|
||||
T=0
|
||||
U=0
|
||||
V=1
|
||||
W=0
|
||||
X=1
|
||||
Y=1
|
||||
Z=1
|
||||
ShowHints=1
|
||||
ShowWarnings=1
|
||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
NamespacePrefix=
|
||||
SymbolDeprecated=1
|
||||
SymbolLibrary=1
|
||||
SymbolPlatform=1
|
||||
UnitLibrary=1
|
||||
UnitPlatform=1
|
||||
UnitDeprecated=1
|
||||
HResultCompat=1
|
||||
HidingMember=1
|
||||
HiddenVirtual=1
|
||||
Garbage=1
|
||||
BoundsError=1
|
||||
ZeroNilCompat=1
|
||||
StringConstTruncated=1
|
||||
ForLoopVarVarPar=1
|
||||
TypedConstVarPar=1
|
||||
AsgToTypedConst=1
|
||||
CaseLabelRange=1
|
||||
ForVariable=1
|
||||
ConstructingAbstract=1
|
||||
ComparisonFalse=1
|
||||
ComparisonTrue=1
|
||||
ComparingSignedUnsigned=1
|
||||
CombiningSignedUnsigned=1
|
||||
UnsupportedConstruct=1
|
||||
FileOpen=1
|
||||
FileOpenUnitSrc=1
|
||||
BadGlobalSymbol=1
|
||||
DuplicateConstructorDestructor=1
|
||||
InvalidDirective=1
|
||||
PackageNoLink=1
|
||||
PackageThreadVar=1
|
||||
ImplicitImport=1
|
||||
HPPEMITIgnored=1
|
||||
NoRetVal=1
|
||||
UseBeforeDef=1
|
||||
ForLoopVarUndef=1
|
||||
UnitNameMismatch=1
|
||||
NoCFGFileFound=1
|
||||
MessageDirective=1
|
||||
ImplicitVariants=1
|
||||
UnicodeToLocale=1
|
||||
LocaleToUnicode=1
|
||||
ImagebaseMultiple=1
|
||||
SuspiciousTypecast=1
|
||||
PrivatePropAccessor=1
|
||||
UnsafeType=0
|
||||
UnsafeCode=0
|
||||
UnsafeCast=0
|
||||
[Linker]
|
||||
MapFile=0
|
||||
OutputObjs=0
|
||||
ConsoleApp=1
|
||||
DebugInfo=0
|
||||
RemoteSymbols=0
|
||||
MinStackSize=16384
|
||||
MaxStackSize=1048576
|
||||
ImageBase=4194304
|
||||
ExeDescription=
|
||||
[Directories]
|
||||
OutputDir=
|
||||
UnitOutputDir=
|
||||
PackageDLLOutputDir=
|
||||
PackageDCPOutputDir=
|
||||
SearchPath=
|
||||
Packages=
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\selfware_83398\selfware\马国钢开发代码\项目代码\self\长阳针织(CYZZ.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
BIN
产品报价(ProductQuotation)/testDllDJ.res
Normal file
BIN
产品报价(ProductQuotation)/testDllDJ.res
Normal file
Binary file not shown.
42
坯布码单待检(PBMDDJ.dll)/CYZZ.cfg
Normal file
42
坯布码单待检(PBMDDJ.dll)/CYZZ.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
坯布码单待检(PBMDDJ.dll)/CYZZ.dof
Normal file
138
坯布码单待检(PBMDDJ.dll)/CYZZ.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:\selfware_83398\selfware\马国钢开发代码\项目代码\self\长阳针织(CYZZ.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||
BIN
坯布码单待检(PBMDDJ.dll)/CYZZ.res
Normal file
BIN
坯布码单待检(PBMDDJ.dll)/CYZZ.res
Normal file
Binary file not shown.
42
坯布码单待检(PBMDDJ.dll)/DDMD.cfg
Normal file
42
坯布码单待检(PBMDDJ.dll)/DDMD.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
坯布码单待检(PBMDDJ.dll)/DDMD.dof
Normal file
138
坯布码单待检(PBMDDJ.dll)/DDMD.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:\selfware_83398\selfware\马国钢开发代码\项目代码\self\订单码单管理(DDMD.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||
BIN
坯布码单待检(PBMDDJ.dll)/DDMD.res
Normal file
BIN
坯布码单待检(PBMDDJ.dll)/DDMD.res
Normal file
Binary file not shown.
3
坯布码单待检(PBMDDJ.dll)/Desktop.ini
Normal file
3
坯布码单待检(PBMDDJ.dll)/Desktop.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[.ShellClassInfo]
|
||||
IconFile=C:\Program Files (x86)\360\360WangPan\new_desktop_win7.ico
|
||||
IconIndex=0
|
||||
4
坯布码单待检(PBMDDJ.dll)/File.INI
Normal file
4
坯布码单待检(PBMDDJ.dll)/File.INI
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=99
|
||||
成品DLL文件=CYZZ.dll
|
||||
成品DLL调用号=11
|
||||
7
坯布码单待检(PBMDDJ.dll)/FileHelp.ini
Normal file
7
坯布码单待检(PBMDDJ.dll)/FileHelp.ini
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[FILEPATH]
|
||||
FileClass=YP,AA,BB,HT
|
||||
YP=D:\YP
|
||||
AA=D:\AA
|
||||
BB=D:\BB
|
||||
HT=D:\HT
|
||||
OTHER=D:\OTHER
|
||||
7
坯布码单待检(PBMDDJ.dll)/JCYData.INI
Normal file
7
坯布码单待检(PBMDDJ.dll)/JCYData.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com1
|
||||
波特率=9600
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
7
坯布码单待检(PBMDDJ.dll)/JZCRS323C.INI
Normal file
7
坯布码单待检(PBMDDJ.dll)/JZCRS323C.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com2
|
||||
波特率=1200
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
0
坯布码单待检(PBMDDJ.dll)/JZCRS323CList.txt
Normal file
0
坯布码单待检(PBMDDJ.dll)/JZCRS323CList.txt
Normal file
BIN
坯布码单待检(PBMDDJ.dll)/PBMDDJ.7z
Normal file
BIN
坯布码单待检(PBMDDJ.dll)/PBMDDJ.7z
Normal file
Binary file not shown.
42
坯布码单待检(PBMDDJ.dll)/PBMDDJ.cfg
Normal file
42
坯布码单待检(PBMDDJ.dll)/PBMDDJ.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
坯布码单待检(PBMDDJ.dll)/PBMDDJ.dof
Normal file
138
坯布码单待检(PBMDDJ.dll)/PBMDDJ.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:\쥡羚낚역랙덜쯤\淃커덜쯤\膽攣\툰꼈쯤데덤쇱(PBMDDJ.dll)\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
|
||||
69
坯布码单待检(PBMDDJ.dll)/PBMDDJ.dpr
Normal file
69
坯布码单待检(PBMDDJ.dll)/PBMDDJ.dpr
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
library PBMDDJ;
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
classes,
|
||||
forms,
|
||||
WinTypes,
|
||||
WinProcs,
|
||||
U_GetDllForm in 'U_GetDllForm.pas',
|
||||
U_RTFun in '..\..\..\RTFunAndForm\Fun\U_RTFun.pas',
|
||||
U_ModuleNote in 'U_ModuleNote.pas' {frmModuleNote},
|
||||
U_DataLink in 'U_DataLink.pas' {DataLink_PBMDDJ: TDataModule},
|
||||
U_GYSList in 'U_GYSList.pas' {frmGYSList},
|
||||
U_ZDYHelpSel in 'U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||
U_iniParam in 'U_iniParam.pas',
|
||||
U_ZDYHelp in 'U_ZDYHelp.pas' {frmZDYHelp},
|
||||
U_GYSSelList in 'U_GYSSelList.pas' {frmGYSSelList},
|
||||
U_CPBRKList in 'U_CPBRKList.pas' {frmCPBRKList},
|
||||
U_CPBCKInPut in 'U_CPBCKInPut.pas' {frmCPBCKInPut},
|
||||
U_ZdyAttachGYS in 'U_ZdyAttachGYS.pas' {frmZdyAttachGYS},
|
||||
U_ProductOrderListHZSel in 'U_ProductOrderListHZSel.pas' {frmProductOrderListHZSel},
|
||||
U_CPBCKOutPut in 'U_CPBCKOutPut.pas' {frmCPBCKOutPut},
|
||||
U_PBCKKCList in 'U_PBCKKCList.pas' {frmPBCKKCList},
|
||||
U_CPBCKOutList in 'U_CPBCKOutList.pas' {frmCPBCKOutList},
|
||||
U_WJGCKKCHZList in 'U_WJGCKKCHZList.pas' {frmWJGCKKCHZList},
|
||||
U_DJBCKKCHZList in 'U_DJBCKKCHZList.pas' {frmDJBCKKCHZList},
|
||||
U_ZdyAttachCP in 'U_ZdyAttachCP.pas' {frmZdyAttachCP},
|
||||
U_ZdyAttachment in 'U_ZdyAttachment.pas' {frmZdyAttachment},
|
||||
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_ColumnBandSet in '..\..\..\ThreeFun\Form\U_ColumnBandSet.pas' {frmColumnBandSet},
|
||||
U_SelPrintFieldNew in '..\..\..\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||
U_Fun10 in '..\..\..\ThreeFun\Fun\U_Fun10.pas',
|
||||
U_CompressionFun in '..\..\..\ThreeFun\Fun\U_CompressionFun.pas';
|
||||
|
||||
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
||||
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
||||
// U_SelPrintField in '..\..\SelfForm\U_SelPrintField.pas' {frmSelPrintField},
|
||||
// U_SelPrintFieldNew in '..\..\SelfForm\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
|
||||
//U_FormPas in '..\CommonPas\formPas\U_FormPas.pas',
|
||||
//U_CxGridSet in '..\CommonPas\cxgridPas\U_CxGridSet.pas';
|
||||
|
||||
//U_RSFormPas in '..\CommonPas\RSCommon\U_RSFormPas.pas';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
procedure DllEnterPoint(dwReason: DWORD);far;stdcall;
|
||||
begin
|
||||
DLLProc := @DLLEnterPoint;
|
||||
DllEnterPoint(DLL_PROCESS_ATTACH);
|
||||
end;
|
||||
|
||||
procedure DLLUnloadProc(Reason: Integer); register;
|
||||
begin
|
||||
// if (Reason = DLL_PROCESS_DETACH) or (Reason=DLL_THREAD_DETACH) then
|
||||
// Application:=NewDllApp;
|
||||
end;
|
||||
exports
|
||||
GetDllForm;
|
||||
begin
|
||||
try
|
||||
NewDllApp:=Application;
|
||||
DLLProc := @DLLUnloadProc;
|
||||
except
|
||||
|
||||
end;
|
||||
end.
|
||||
|
||||
BIN
坯布码单待检(PBMDDJ.dll)/PBMDDJ.res
Normal file
BIN
坯布码单待检(PBMDDJ.dll)/PBMDDJ.res
Normal file
Binary file not shown.
23
坯布码单待检(PBMDDJ.dll)/ProjectGroup1.bpg
Normal file
23
坯布码单待检(PBMDDJ.dll)/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#------------------------------------------------------------------------------
|
||||
VERSION = BWS.01
|
||||
#------------------------------------------------------------------------------
|
||||
!ifndef ROOT
|
||||
ROOT = $(MAKEDIR)\..
|
||||
!endif
|
||||
#------------------------------------------------------------------------------
|
||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||
#------------------------------------------------------------------------------
|
||||
PROJECTS = testDll.exe ProductPrice.dll
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
testDll.exe: testDll.dpr
|
||||
$(DCC)
|
||||
|
||||
ProductPrice.dll: ProductPrice.dpr
|
||||
$(DCC)
|
||||
|
||||
|
||||
3
坯布码单待检(PBMDDJ.dll)/SYSTEMSET.ini
Normal file
3
坯布码单待检(PBMDDJ.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[SERVER]
|
||||
服务器地址=172.168.1.246
|
||||
软件名称=欣戈纺织
|
||||
794
坯布码单待检(PBMDDJ.dll)/U_BGCWEndManage.dfm
Normal file
794
坯布码单待检(PBMDDJ.dll)/U_BGCWEndManage.dfm
Normal file
|
|
@ -0,0 +1,794 @@
|
|||
object frmBGCWEndManage: TfrmBGCWEndManage
|
||||
Left = 17
|
||||
Top = 0
|
||||
Width = 1274
|
||||
Height = 717
|
||||
Caption = #25253#20851#31649#29702'('#36130#21153')'
|
||||
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 = 1258
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
ImageIndex = 22
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
Caption = #23457#26680#25764#38144
|
||||
ImageIndex = 52
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 209
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = TBPrintClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 272
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25805#20316#35828#26126
|
||||
ImageIndex = 41
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 359
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1258
|
||||
Height = 35
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 11
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #26597#35810#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 = 262
|
||||
Top = 11
|
||||
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 BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 7
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 164
|
||||
Top = 7
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object BCOrderNo: TEdit
|
||||
Tag = 2
|
||||
Left = 303
|
||||
Top = 7
|
||||
Width = 130
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = BCOrderNoChange
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 0
|
||||
Top = 390
|
||||
Width = 1258
|
||||
Height = 288
|
||||
Align = alBottom
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object cxGrid12: TcxGrid
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 654
|
||||
Height = 284
|
||||
Align = alLeft
|
||||
TabOrder = 0
|
||||
object Tv12: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource12
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoGroupsAlwaysExpanded, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn10
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v12Column2
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object vJCKMXColumn1: TcxGridDBColumn
|
||||
Caption = #20379#24212#21830
|
||||
DataBinding.FieldName = 'FactoryName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #36153#29992#21517#31216
|
||||
DataBinding.FieldName = 'BFName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'BFQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v12Column1: TcxGridDBColumn
|
||||
Caption = #31859#38271
|
||||
DataBinding.FieldName = 'MLen'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v12Column2: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'BFMQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object v12Column3: TcxGridDBColumn
|
||||
Caption = #25439#32791
|
||||
DataBinding.FieldName = 'PSSHQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 58
|
||||
end
|
||||
object cxGridDBColumn11: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'BFPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 53
|
||||
end
|
||||
object cxGridDBColumn12: TcxGridDBColumn
|
||||
Caption = #35745#20215#21333#20301
|
||||
DataBinding.FieldName = 'BFUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'BFMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 87
|
||||
end
|
||||
object cxGridDBColumn23: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'BFNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 105
|
||||
end
|
||||
end
|
||||
object cxGridLevel6: TcxGridLevel
|
||||
GridView = Tv12
|
||||
end
|
||||
end
|
||||
object cxGrid6: TcxGrid
|
||||
Left = 656
|
||||
Top = 2
|
||||
Width = 600
|
||||
Height = 284
|
||||
Align = alClient
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object Tv19: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource19
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #20013#25991#21697#21517
|
||||
DataBinding.FieldName = 'BGName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 138
|
||||
end
|
||||
object v6Column1: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'NQkgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object Tv19Column1: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'NQMQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 64
|
||||
end
|
||||
object Tv19Column2: TcxGridDBColumn
|
||||
Caption = #35745#20215#21333#20301
|
||||
DataBinding.FieldName = 'NQUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'M'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
object v6Column2: TcxGridDBColumn
|
||||
Caption = #21333#20215'$'
|
||||
DataBinding.FieldName = 'BGPrice'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object v6Column3: TcxGridDBColumn
|
||||
Caption = #37329#39069'$'
|
||||
DataBinding.FieldName = 'BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 39
|
||||
end
|
||||
object v6Column4: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'NQNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv19
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 67
|
||||
Width = 1258
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Style = 8
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#24453#23457#26680
|
||||
#24050#23457#26680
|
||||
#24050#30830#35748
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1258
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 0
|
||||
Top = 88
|
||||
Width = 593
|
||||
Height = 302
|
||||
Align = alClient
|
||||
TabOrder = 4
|
||||
object Tv11: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnFocusedRecordChanged = Tv11FocusedRecordChanged
|
||||
DataController.DataSource = DataSource11
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #35746#21333#35782#21035#21495
|
||||
DataBinding.FieldName = 'BCOrderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 100
|
||||
end
|
||||
object cxGridDBColumn9: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'BGDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object cxGridDBColumn20: TcxGridDBColumn
|
||||
Caption = #36865#23457#26102#38388
|
||||
DataBinding.FieldName = 'SSTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 73
|
||||
end
|
||||
object v11Column1: TcxGridDBColumn
|
||||
Caption = #23457#26680#20154
|
||||
DataBinding.FieldName = 'Chker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 44
|
||||
end
|
||||
object v11Column2: TcxGridDBColumn
|
||||
Caption = #23457#26680#26102#38388
|
||||
DataBinding.FieldName = 'ChkTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v11Column3: TcxGridDBColumn
|
||||
Caption = #29366#24577
|
||||
DataBinding.FieldName = 'ChkStatus'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object v11Column4: TcxGridDBColumn
|
||||
Caption = #30830#35748#20154
|
||||
DataBinding.FieldName = 'OKPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 52
|
||||
end
|
||||
object v11Column5: TcxGridDBColumn
|
||||
Caption = #30830#35748#26102#38388
|
||||
DataBinding.FieldName = 'OKTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object v11Column6: TcxGridDBColumn
|
||||
Caption = #24050#30830#35748
|
||||
DataBinding.FieldName = 'OKFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv11
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 601
|
||||
Top = 88
|
||||
Width = 657
|
||||
Height = 302
|
||||
Align = alRight
|
||||
TabOrder = 5
|
||||
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
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object v1OrderNo: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 98
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #25209#27425
|
||||
DataBinding.FieldName = 'BatchNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #27425#25968
|
||||
DataBinding.FieldName = 'EditCount'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #25253#20851#21333#20301
|
||||
DataBinding.FieldName = 'ComTaiTou'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 94
|
||||
end
|
||||
object v1MPRTSpec: TcxGridDBColumn
|
||||
Caption = #31859#38271
|
||||
DataBinding.FieldName = 'MLenStr'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 61
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #28023#36816#36153'$'
|
||||
DataBinding.FieldName = 'HaiYunFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 57
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #20445#36153'$'
|
||||
DataBinding.FieldName = 'BaoFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 58
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #36816#25269#22269
|
||||
DataBinding.FieldName = 'YunDiG'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 63
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #20986#21475#21475#23736
|
||||
DataBinding.FieldName = 'ChuKouKA'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 63
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #36135#28304#22320
|
||||
DataBinding.FieldName = 'HuoYuanPlace'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #25104#20132#26041#24335
|
||||
DataBinding.FieldName = 'ChengJiaoType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #29702#21333#21592
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #26159#21542#26377#25928
|
||||
DataBinding.FieldName = 'Valid'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #30331#35760#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 51
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #30331#35760#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 64
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 593
|
||||
Top = 88
|
||||
Width = 8
|
||||
Height = 302
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salRight
|
||||
Control = cxGrid1
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 791
|
||||
Top = 4
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 820
|
||||
Top = 7
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 984
|
||||
Top = 2
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 920
|
||||
Top = 65535
|
||||
end
|
||||
object ClientDataSet7: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1165
|
||||
Top = 522
|
||||
end
|
||||
object cxGridPopupMenu7: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 1195
|
||||
Top = 518
|
||||
end
|
||||
object DataSource7: TDataSource
|
||||
DataSet = ClientDataSet7
|
||||
Left = 1224
|
||||
Top = 519
|
||||
end
|
||||
object DataSource11: TDataSource
|
||||
DataSet = ClientDataSet11
|
||||
Left = 562
|
||||
Top = 38
|
||||
end
|
||||
object ClientDataSet11: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 593
|
||||
Top = 37
|
||||
end
|
||||
object DataSource12: TDataSource
|
||||
DataSet = ClientDataSet12
|
||||
Left = 628
|
||||
Top = 39
|
||||
end
|
||||
object ClientDataSet12: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 661
|
||||
Top = 37
|
||||
end
|
||||
object cxGridPopupMenu11: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 792
|
||||
Top = 39
|
||||
end
|
||||
object cxGridPopupMenu12: TcxGridPopupMenu
|
||||
Grid = cxGrid12
|
||||
PopupMenus = <>
|
||||
Left = 830
|
||||
Top = 37
|
||||
end
|
||||
object DataSource19: TDataSource
|
||||
DataSet = ClientDataSet19
|
||||
Left = 693
|
||||
Top = 38
|
||||
end
|
||||
object ClientDataSet19: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 727
|
||||
Top = 37
|
||||
end
|
||||
object cxGridPopupMenu19: TcxGridPopupMenu
|
||||
Grid = cxGrid6
|
||||
PopupMenus = <>
|
||||
Left = 762
|
||||
Top = 38
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 365
|
||||
Top = 240
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDB19
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 424
|
||||
Top = 200
|
||||
ReportData = {}
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = False
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 472
|
||||
Top = 212
|
||||
end
|
||||
object RMDB19: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ClientDataSet19
|
||||
Left = 493
|
||||
Top = 249
|
||||
end
|
||||
object RMDB12: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ClientDataSet12
|
||||
Left = 446
|
||||
Top = 249
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 1065
|
||||
Top = 230
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 1095
|
||||
Top = 226
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ClientDataSet1
|
||||
Left = 1124
|
||||
Top = 227
|
||||
end
|
||||
end
|
||||
467
坯布码单待检(PBMDDJ.dll)/U_BGCWEndManage.pas
Normal file
467
坯布码单待检(PBMDDJ.dll)/U_BGCWEndManage.pas
Normal file
|
|
@ -0,0 +1,467 @@
|
|||
unit U_BGCWEndManage; //22
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ADODB, DB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData,
|
||||
cxCalendar, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxPC,
|
||||
BtnEdit, cxGridBandedTableView, cxGridDBBandedTableView, cxButtonEdit,
|
||||
cxDropDownEdit, cxCheckBox, cxSplitter, RM_Dataset, RM_Common, RM_Class,
|
||||
RM_e_Xls, RM_System, RM_GridReport;
|
||||
|
||||
type
|
||||
TfrmBGCWEndManage = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label3: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
BCOrderNo: TEdit;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
ClientDataSet7: TClientDataSet;
|
||||
cxGridPopupMenu7: TcxGridPopupMenu;
|
||||
DataSource7: TDataSource;
|
||||
DataSource11: TDataSource;
|
||||
ClientDataSet11: TClientDataSet;
|
||||
DataSource12: TDataSource;
|
||||
ClientDataSet12: TClientDataSet;
|
||||
cxGridPopupMenu11: TcxGridPopupMenu;
|
||||
cxGridPopupMenu12: TcxGridPopupMenu;
|
||||
DataSource19: TDataSource;
|
||||
ClientDataSet19: TClientDataSet;
|
||||
cxGridPopupMenu19: TcxGridPopupMenu;
|
||||
Panel6: TPanel;
|
||||
cxTabControl1: TcxTabControl;
|
||||
ToolButton1: TToolButton;
|
||||
cxGrid12: TcxGrid;
|
||||
Tv12: TcxGridDBTableView;
|
||||
vJCKMXColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
v12Column1: TcxGridDBColumn;
|
||||
v12Column2: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
cxGridDBColumn23: TcxGridDBColumn;
|
||||
cxGridLevel6: TcxGridLevel;
|
||||
cxGrid6: TcxGrid;
|
||||
Tv19: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
v6Column1: TcxGridDBColumn;
|
||||
Tv19Column1: TcxGridDBColumn;
|
||||
Tv19Column2: TcxGridDBColumn;
|
||||
v6Column2: TcxGridDBColumn;
|
||||
v6Column3: TcxGridDBColumn;
|
||||
v6Column4: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
v12Column3: TcxGridDBColumn;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv11: TcxGridDBTableView;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
v11Column1: TcxGridDBColumn;
|
||||
v11Column2: TcxGridDBColumn;
|
||||
v11Column3: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
CDS_Print: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDB19: TRMDBDataSet;
|
||||
RMDB12: TRMDBDataSet;
|
||||
v11Column4: TcxGridDBColumn;
|
||||
v11Column5: TcxGridDBColumn;
|
||||
v11Column6: TcxGridDBColumn;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1OrderNo: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1MPRTSpec: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxSplitter1: TcxSplitter;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
DataSource1: TDataSource;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure cxPageControl1Change(Sender: TObject);
|
||||
procedure Tv11FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure BCOrderNoChange(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
canshu1,canshu2:string;
|
||||
procedure InitGrid();
|
||||
procedure InitGridMD();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBGCWEndManage: TfrmBGCWEndManage;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun, U_ZDYHelp, U_ZDYHelpSel,U_ModuleNote,
|
||||
U_BGZLInput,U_BGJCKMXInput,U_BGJCKMXGYSInput;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBGCWEndManage.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBGCWEndManage:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmModuleNote:=TfrmModuleNote.Create(Application);
|
||||
with frmModuleNote do
|
||||
begin
|
||||
flag:='货物进出口报关明细';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmModuleNote.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('Tv1s',Tv11,'报关管理');
|
||||
WriteCxGrid('Tv2s',Tv12,'报关管理');
|
||||
WriteCxGrid('Tv19s',Tv19,'报关管理');
|
||||
WriteCxGrid('Tv111s',Tv1,'报关管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.FormShow(Sender: TObject);
|
||||
begin
|
||||
EndDate.DateTime:=SGetServerDate(ADOQueryTemp);
|
||||
BegDate.Date:=EndDate.DateTime-30;
|
||||
InitGrid();
|
||||
ReadCxGrid('Tv1s',Tv11,'报关管理');
|
||||
ReadCxGrid('Tv2s',Tv12,'报关管理');
|
||||
ReadCxGrid('Tv19s',Tv19,'报关管理');
|
||||
ReadCxGrid('Tv111s',Tv1,'报关管理');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,OrderNo=A.BCOrderNo, ');
|
||||
sql.Add(' LDFiller=(select Top 1 Filler from JYOrder_BG BG where BG.BGID=A.BGID),');
|
||||
sql.Add(' LDFillTime=(select Top 1 FillTime from JYOrder_BG BG where BG.BGID=A.BGID),');
|
||||
sql.Add(' HaiYunFee=(select Top 1 HaiYunFee from JYOrder_BG BG where BG.BGID=A.BGID),');
|
||||
sql.Add(' BaoFee=(select Top 1 BaoFee from JYOrder_BG BG where BG.BGID=A.BGID),');
|
||||
sql.Add(' ChengJiaoType=(select Top 1 ChengJiaoType from JYOrder_BG BG where BG.BGID=A.BGID),');
|
||||
sql.Add(' FValid=(select Top 1 Valid from JYOrder_BG BG where BG.BGID=A.BGID)');
|
||||
sql.Add(' from JYOrder_BG_CK A where 1=1 ');// where Valid=''Y''
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(ChkStatus,'''')=''已送审'' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(ChkStatus,'''')=''审核通过'' ');
|
||||
sql.Add(' and OKFlag=0');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(ChkStatus,'''')=''审核通过'' ');
|
||||
sql.Add(' and OKFlag=1');
|
||||
end;
|
||||
if cxTabControl1.TabIndex<>0 then
|
||||
begin
|
||||
sql.Add(' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet11);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet11);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if cxTabControl1.TabIndex=2 then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_CK where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
sql.Add(' and OKFlag=1');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
Application.MessageBox('已确认不能再次审核!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
frmBGJCKMXInput:=TfrmBGJCKMXInput.Create(Application);
|
||||
with frmBGJCKMXInput do
|
||||
begin
|
||||
FBGID:=Trim(ClientDataSet11.fieldbyname('BGID').AsString);
|
||||
FBCID:=Trim(ClientDataSet11.fieldbyname('BCID').AsString);
|
||||
FOrderNo:='';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBGJCKMXInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.InitGridMD();
|
||||
var
|
||||
fsj:string;
|
||||
begin
|
||||
|
||||
end;
|
||||
procedure TfrmBGCWEndManage.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.cxPageControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.Tv11FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
//if ClientDataSet11.IsEmpty then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_KPFee where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryCmd,ClientDataSet12);
|
||||
SInitCDSData20(ADOQueryCmd,ClientDataSet12);
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_CKName_Qty where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryCmd,ClientDataSet19);
|
||||
SInitCDSData20(ADOQueryCmd,ClientDataSet19);
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG where BGID='''+Trim(ClientDataSet11.fieldbyname('BGID').AsString)+'''');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryCmd,ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryCmd,ClientDataSet1);
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.BCOrderNoChange(Sender: TObject);
|
||||
begin
|
||||
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet11);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet11);
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if cxTabControl1.TabIndex<>1 then Exit;
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_CK where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
sql.Add(' and OKFlag=1');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
Application.MessageBox('已确认不能撤销审核!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BG_CK Set ChkStatus=''已送审'',ChkTime=Null,Chker=Null ');
|
||||
sql.Add(' where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ClientDataSet11.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWEndManage.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
FMoney,FMQty,FKgQty,FBCID,FPrice,FMPrice,FKgPrice,FHZPrice:String;
|
||||
begin
|
||||
FBCID:=Trim(ClientDataSet11.fieldbyname('BCID').AsString);
|
||||
FMoney:=Tv12.DataController.Summary.FooterSummaryTexts[0];
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select isnull(sum(BFQty),0) KgQty from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+'''');
|
||||
sql.Add(' and PSXH=(select Max(PSXH) from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+''')');
|
||||
open;
|
||||
end;
|
||||
FKgQty:=Trim(ADOQueryTemp.fieldbyname('KgQty').AsString);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select isnull(sum(BFMQty),0) MQty from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+'''');
|
||||
sql.Add(' and PSXH=(select Max(PSXH) from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+''')');
|
||||
open;
|
||||
end;
|
||||
FMQty:=Trim(ADOQueryTemp.fieldbyname('MQty').AsString);
|
||||
if StrToFloat(FMQty)>0 then
|
||||
begin
|
||||
FMPrice:=FloatToStr(SSWR(StrToFloat(FMoney)*1.00/StrToFloat(FMQty)))+'/M';
|
||||
end;
|
||||
if StrToFloat(FKgQty)>0 then
|
||||
begin
|
||||
FKgPrice:=FloatToStr(SSWR(StrToFloat(FMoney)*1.00/StrToFloat(FKgQty)))+'/Kg';
|
||||
end;
|
||||
if Trim(FMPrice)='' then
|
||||
begin
|
||||
FHZPrice:=FKgPrice;
|
||||
end else
|
||||
begin
|
||||
FHZPrice:=FMPrice;
|
||||
if Trim(FKgPrice)<>'' then
|
||||
begin
|
||||
FHZPrice:=FHZPrice+#13+FKgPrice;
|
||||
end;
|
||||
end;
|
||||
if Trim(ClientDataSet12.fieldbyname('BFUnit').AsString)='M' then
|
||||
begin
|
||||
if Trim(FMQty)<>'' then
|
||||
begin
|
||||
if StrToFloat(FMQty)>0 then
|
||||
begin
|
||||
FPrice:=FloatToStr(SSWR(StrToFloat(FMoney)*1.00/StrToFloat(FMQty)));
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
if Trim(FKgQty)<>'' then
|
||||
begin
|
||||
if StrToFloat(FKgQty)>0 then
|
||||
begin
|
||||
FPrice:=FloatToStr(SSWR(StrToFloat(FMoney)*1.00/StrToFloat(FKgQty)));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\货物进出口报关明细表.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RMVariables['BCOrderNo']:=ClientDataSet11.fieldbyname('BCOrderNo').Value;
|
||||
RMVariables['BGDate']:=ClientDataSet11.fieldbyname('BGDate').Value;
|
||||
RMVariables['CBMoney']:=Tv12.DataController.Summary.FooterSummaryValues[0];
|
||||
RMVariables['FMQty']:=FMQty;
|
||||
RMVariables['FKgQty']:=FKgQty;
|
||||
RMVariables['FPrice']:=FPrice;
|
||||
RMVariables['FMPrice']:=FMPrice;
|
||||
RMVariables['FKgPrice']:=FKgPrice;
|
||||
RMVariables['FHZPrice']:=FHZPrice;
|
||||
RMVariables['HaiYunFee']:=ClientDataSet1.fieldbyname('HaiYunFee').Value;
|
||||
RMVariables['ComTaiTou']:=ClientDataSet1.fieldbyname('ComTaiTou').Value;
|
||||
RMVariables['BaoFee']:=ClientDataSet1.fieldbyname('BaoFee').Value;
|
||||
RMVariables['YunDiG']:=ClientDataSet1.fieldbyname('YunDiG').Value;
|
||||
RMVariables['ChuKouKA']:=ClientDataSet1.fieldbyname('ChuKouKA').Value;
|
||||
RMVariables['HuoYuanPlace']:=ClientDataSet1.fieldbyname('HuoYuanPlace').Value;
|
||||
RMVariables['ChengJiaoType']:=ClientDataSet1.fieldbyname('ChengJiaoType').Value;
|
||||
RMVariables['LDY']:=ClientDataSet1.fieldbyname('Filler').Value;
|
||||
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\货物进出口报关明细表.rmf'),'提示',0);
|
||||
end;
|
||||
// Panel4.Visible:=True;
|
||||
end;
|
||||
|
||||
end.
|
||||
1240
坯布码单待检(PBMDDJ.dll)/U_BGCWManage.dfm
Normal file
1240
坯布码单待检(PBMDDJ.dll)/U_BGCWManage.dfm
Normal file
File diff suppressed because it is too large
Load Diff
703
坯布码单待检(PBMDDJ.dll)/U_BGCWManage.pas
Normal file
703
坯布码单待检(PBMDDJ.dll)/U_BGCWManage.pas
Normal file
|
|
@ -0,0 +1,703 @@
|
|||
unit U_BGCWManage; //22
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ADODB, DB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData,
|
||||
cxCalendar, cxGridLevel, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxPC,
|
||||
BtnEdit, cxGridBandedTableView, cxGridDBBandedTableView, cxButtonEdit,
|
||||
cxDropDownEdit, cxCheckBox, cxSplitter, cxTextEdit, RM_Common, RM_Class,
|
||||
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport;
|
||||
|
||||
type
|
||||
TfrmBGCWManage = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBView: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label3: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
BCOrderNo: TEdit;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Order_Main: TClientDataSet;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
cxPageControl1: TcxPageControl;
|
||||
cxTabSheet1: TcxTabSheet;
|
||||
cxTabSheet2: TcxTabSheet;
|
||||
ClientDataSet7: TClientDataSet;
|
||||
cxGridPopupMenu7: TcxGridPopupMenu;
|
||||
DataSource7: TDataSource;
|
||||
Panel2: TPanel;
|
||||
Panel7: TPanel;
|
||||
Panel3: TPanel;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
DataSource2: TDataSource;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
Panel4: TPanel;
|
||||
CDS_BGName: TClientDataSet;
|
||||
cxGridPopupMenu5: TcxGridPopupMenu;
|
||||
DSBGName: TDataSource;
|
||||
DataSource11: TDataSource;
|
||||
ClientDataSet11: TClientDataSet;
|
||||
DataSource12: TDataSource;
|
||||
ClientDataSet12: TClientDataSet;
|
||||
DataSource15: TDataSource;
|
||||
ClientDataSet15: TClientDataSet;
|
||||
DataSource16: TDataSource;
|
||||
ClientDataSet16: TClientDataSet;
|
||||
DataSource17: TDataSource;
|
||||
ClientDataSet17: TClientDataSet;
|
||||
DataSource18: TDataSource;
|
||||
ClientDataSet18: TClientDataSet;
|
||||
cxGridPopupMenu11: TcxGridPopupMenu;
|
||||
cxGridPopupMenu12: TcxGridPopupMenu;
|
||||
cxGridPopupMenu15: TcxGridPopupMenu;
|
||||
cxGridPopupMenu16: TcxGridPopupMenu;
|
||||
cxGridPopupMenu17: TcxGridPopupMenu;
|
||||
cxGridPopupMenu18: TcxGridPopupMenu;
|
||||
Panel6: TPanel;
|
||||
cxGrid12: TcxGrid;
|
||||
Tv12: TcxGridDBTableView;
|
||||
vJCKMXColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
cxGridDBColumn23: TcxGridDBColumn;
|
||||
cxGridLevel6: TcxGridLevel;
|
||||
cxGrid19: TcxGrid;
|
||||
Tv19: TcxGridDBTableView;
|
||||
cxGridDBColumn43: TcxGridDBColumn;
|
||||
Tv19Column1: TcxGridDBColumn;
|
||||
Tv19Column2: TcxGridDBColumn;
|
||||
cxGridLevel10: TcxGridLevel;
|
||||
DataSource19: TDataSource;
|
||||
ClientDataSet19: TClientDataSet;
|
||||
cxGridPopupMenu19: TcxGridPopupMenu;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1OrderNo: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1MPRTSpec: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
cxGridDBColumn44: TcxGridDBColumn;
|
||||
cxGridDBColumn45: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGrid5: TcxGrid;
|
||||
TVBGName: TcxGridDBTableView;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
cxGridDBColumn30: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
cxGridDBColumn31: TcxGridDBColumn;
|
||||
cxGridDBColumn32: TcxGridDBColumn;
|
||||
cxGridLevel4: TcxGridLevel;
|
||||
cxTabControl1: TcxTabControl;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv11: TcxGridDBTableView;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
v11Column1: TcxGridDBColumn;
|
||||
v11Column2: TcxGridDBColumn;
|
||||
v11Column3: TcxGridDBColumn;
|
||||
cxGrid4: TcxGrid;
|
||||
TvFee: TcxGridDBTableView;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridDBColumn33: TcxGridDBColumn;
|
||||
TvFeeColumn2: TcxGridDBColumn;
|
||||
TvFeeColumn1: TcxGridDBColumn;
|
||||
TvFeeColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn22: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
DS_Fee: TDataSource;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
CDS_Fee: TClientDataSet;
|
||||
v12Column1: TcxGridDBColumn;
|
||||
v12Column2: TcxGridDBColumn;
|
||||
RM1: TRMGridReport;
|
||||
RMDB12: TRMDBDataSet;
|
||||
RMDB19: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure TBViewClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure cxPageControl2Change(Sender: TObject);
|
||||
procedure cxPageControl1Change(Sender: TObject);
|
||||
procedure TV16CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure BCOrderNoChange(Sender: TObject);
|
||||
procedure Tv11FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
canshu1,canshu2:string;
|
||||
procedure InitGrid();
|
||||
procedure InitGridMD();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBGCWManage: TfrmBGCWManage;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun, U_ZDYHelp, U_ZDYHelpSel,U_ModuleNote,
|
||||
U_BGZLInput,U_BGJCKMXInput,U_BGJCKMXGYSInput;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBGCWManage.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBGCWManage:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmModuleNote:=TfrmModuleNote.Create(Application);
|
||||
with frmModuleNote do
|
||||
begin
|
||||
flag:='货物进出口报关明细';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmModuleNote.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex=0 then
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
end else
|
||||
if cxPageControl1.ActivePageIndex=1 then
|
||||
begin
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
end;
|
||||
try
|
||||
frmBGJCKMXGYSInput:=TfrmBGJCKMXGYSInput.Create(Application);
|
||||
with frmBGJCKMXGYSInput do
|
||||
begin
|
||||
if Self.cxPageControl1.ActivePageIndex=0 then
|
||||
begin
|
||||
FBGID:=Trim(Order_Main.fieldbyname('BGID').AsString);
|
||||
FBCID:='';
|
||||
end else
|
||||
if Self.cxPageControl1.ActivePageIndex=1 then
|
||||
begin
|
||||
FBGID:=Trim(ClientDataSet11.fieldbyname('BGID').AsString);
|
||||
FBCID:='';
|
||||
end;
|
||||
FOrderNo:='';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBGJCKMXGYSInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('Tv1',Tv1,'报关管理');
|
||||
WriteCxGrid('Tv2',Tv2,'报关管理');
|
||||
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.FormShow(Sender: TObject);
|
||||
begin
|
||||
EndDate.DateTime:=SGetServerDate(ADOQueryTemp);
|
||||
BegDate.Date:=EndDate.DateTime-30;
|
||||
cxPageControl1.ActivePageIndex:=0;
|
||||
InitGrid();
|
||||
ReadCxGrid('Tv1',Tv1,'报关管理');
|
||||
ReadCxGrid('Tv2',Tv2,'报关管理');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
if cxPageControl1.ActivePageIndex=0 then
|
||||
begin
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG A');
|
||||
sql.Add(' where isnull(ChkStatus,'''')=''审核通过'' ');
|
||||
sql.Add(' and isnull(Valid,'''')=''Y'' ');
|
||||
// ShowMessage(sql.Text);
|
||||
sql.Add(' and not exists(select * from JYOrder_BG_KPFee B where B.BGID=A.BGID )');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
end else
|
||||
begin
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,OrderNo=A.BCOrderNo from JYOrder_BG_CK A where 1=1');
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(ChkStatus,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(ChkStatus,'''')<>'''' ');
|
||||
end;
|
||||
if cxTabControl1.TabIndex<>0 then
|
||||
begin
|
||||
sql.Add(' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet11);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet11);
|
||||
end;
|
||||
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>1 then Exit;
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
if Trim(canshu1)<>'高权限' then
|
||||
begin
|
||||
if Trim(DName)<>Trim(ClientDataSet11.fieldbyname('Filler').AsString) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
try
|
||||
frmBGJCKMXGYSInput:=TfrmBGJCKMXGYSInput.Create(Application);
|
||||
with frmBGJCKMXGYSInput do
|
||||
begin
|
||||
FBGID:=Trim(ClientDataSet11.fieldbyname('BGID').AsString);
|
||||
FBCID:=Trim(ClientDataSet11.fieldbyname('BCID').AsString);
|
||||
FOrderNo:='';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBGJCKMXGYSInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.Tv1FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
var
|
||||
FMainId:String;
|
||||
begin
|
||||
|
||||
{with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from (');
|
||||
sql.Add('select PSName=Cast(A.PSXH As Varchar(20))+'' ''+Cast(A.PSName As Varchar(20)),B.FactoryNo,PSName10=A.PSName,B.FactoryName,sum(QtyFlag*PS) MDPS,Sum(QtyFlag*Qty) MDQty,B.QtyUnit');
|
||||
sql.Add(' from JYOrder_Process A ');
|
||||
sql.Add(' left join JYOrder_Main_MD B on A.PSID=B.PSID');
|
||||
sql.Add(' inner join JYOrder_Main C on A.Mainid=C.MainId');
|
||||
sql.Add(' where C.OrderNo='''+Trim(Order_Main.fieldbyname('OrderNo').AsString)+'''');
|
||||
sql.Add(' group by A.PSXH,A.PSName,B.FactoryName,B.FactoryNo,B.QtyUnit)AA where MDQty>0 order by PSName');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet7);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet7); }
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.InitGridMD();
|
||||
var
|
||||
fsj:string;
|
||||
begin
|
||||
|
||||
end;
|
||||
procedure TfrmBGCWManage.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BG_CK Set ChkStatus=''已送审'',SSTime=getdate() ');
|
||||
sql.Add(' where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ClientDataSet11.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>1 then Exit;
|
||||
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete JYOrder_BG_CK where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
sql.Add('delete JYOrder_BG_KPFee where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
sql.Add('delete JYOrder_BG_CKName_Qty where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ClientDataSet11.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
if cxTabControl1.TabIndex<>1 then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_CK ');
|
||||
sql.Add(' where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
sql.Add(' and isnull(ChkStatus,'''')<>'''' ');
|
||||
sql.Add(' and isnull(ChkStatus,'''')<>''已送审'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty=False then
|
||||
begin
|
||||
Application.MessageBox('已审核,不能撤销!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate JYOrder_BG_CK Set ChkStatus='''',SSTime=Null ');
|
||||
sql.Add(' where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ClientDataSet11.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TBViewClick(Sender: TObject);
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>1 then Exit;
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
|
||||
try
|
||||
frmBGJCKMXGYSInput:=TfrmBGJCKMXGYSInput.Create(Application);
|
||||
with frmBGJCKMXGYSInput do
|
||||
begin
|
||||
FBGID:=Trim(ClientDataSet11.fieldbyname('BGID').AsString);
|
||||
FBCID:=Trim(ClientDataSet11.fieldbyname('BCID').AsString);
|
||||
FOrderNo:='';
|
||||
TBSave.Visible:=False;
|
||||
ToolBar2.Visible:=False;
|
||||
ToolBar3.Visible:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBGJCKMXGYSInput.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.cxPageControl2Change(Sender: TObject);
|
||||
begin
|
||||
InitGridMD();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.cxPageControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TV16CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>1 then Exit;
|
||||
InitGridMD();
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
var
|
||||
FMainId:String;
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>0 then Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_Qty where BGID='''+Trim(Order_Main.fieldbyname('BGID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_Name where BGID='''+Trim(Order_Main.fieldbyname('BGID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_BGName);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_BGName);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_Main_MD_HZ where BGID='''+Trim(Order_Main.fieldbyname('BGID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_Fee);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_Fee);
|
||||
{ with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_Main where OrderNo='''+Trim(Order_Main.fieldbyname('OrderNo').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
FMainId:=Trim(ADOQueryTemp.fieldbyname('MainId').AsString);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_View_MDQtyFooter :MainId');
|
||||
Parameters.ParamByName('MainId').Value:=Trim(FMainId);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet7);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet7); }
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.BCOrderNoChange(Sender: TObject);
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>1 then Exit;
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,ClientDataSet11);
|
||||
SInitCDSData20(ADOQueryMain,ClientDataSet11);
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.Tv11FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>1 then Exit;
|
||||
//if ClientDataSet11.IsEmpty then Exit;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_KPFee where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryCmd,ClientDataSet12);
|
||||
SInitCDSData20(ADOQueryCmd,ClientDataSet12);
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_BG_CKName_Qty where BCID='''+Trim(ClientDataSet11.fieldbyname('BCID').AsString)+'''');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryCmd,ClientDataSet19);
|
||||
SInitCDSData20(ADOQueryCmd,ClientDataSet19);
|
||||
end;
|
||||
|
||||
procedure TfrmBGCWManage.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
FMoney,FMQty,FKgQty,FBCID,FPrice:String;
|
||||
begin
|
||||
if cxPageControl1.ActivePageIndex<>1 then Exit;
|
||||
if ClientDataSet11.IsEmpty then Exit;
|
||||
FBCID:=Trim(ClientDataSet11.fieldbyname('BCID').AsString);
|
||||
FMoney:=Tv12.DataController.Summary.FooterSummaryTexts[0];
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select isnull(sum(BFQty),0) KgQty from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+'''');
|
||||
sql.Add(' and PSXH=(select Max(PSXH) from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+''')');
|
||||
open;
|
||||
end;
|
||||
FKgQty:=Trim(ADOQueryTemp.fieldbyname('KgQty').AsString);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select isnull(sum(BFMQty),0) MQty from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+'''');
|
||||
sql.Add(' and PSXH=(select Max(PSXH) from JYOrder_BG_KPFee where BCID='''+Trim(FBCID)+''')');
|
||||
open;
|
||||
end;
|
||||
FMQty:=Trim(ADOQueryTemp.fieldbyname('MQty').AsString);
|
||||
if Trim(ClientDataSet12.fieldbyname('BFUnit').AsString)='M' then
|
||||
begin
|
||||
if Trim(FMQty)<>'' then
|
||||
begin
|
||||
if StrToFloat(FMQty)>0 then
|
||||
begin
|
||||
FPrice:=FloatToStr(SSWR(StrToFloat(FMoney)*1.00/StrToFloat(FMQty)));
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
if Trim(FKgQty)<>'' then
|
||||
begin
|
||||
if StrToFloat(FKgQty)>0 then
|
||||
begin
|
||||
FPrice:=FloatToStr(SSWR(StrToFloat(FMoney)*1.00/StrToFloat(FKgQty)));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYorder_BG where BGID='''+Trim(ClientDataSet11.fieldbyname('BGID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\货物进出口报关明细表Fee.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RMVariables['BCOrderNo']:=ClientDataSet11.fieldbyname('BCOrderNo').Value;
|
||||
RMVariables['BGDate']:=ClientDataSet11.fieldbyname('BGDate').Value;
|
||||
RMVariables['CBMoney']:=Tv12.DataController.Summary.FooterSummaryValues[0];
|
||||
RMVariables['FMQty']:=FMQty;
|
||||
RMVariables['FKgQty']:=FKgQty;
|
||||
RMVariables['FPrice']:=FPrice;
|
||||
RMVariables['ComTaiTou']:=ADOQueryTemp.fieldbyname('ComTaiTou').Value;
|
||||
{RMVariables['HaiYunFee']:=ADOQueryTemp.fieldbyname('HaiYunFee').Value;
|
||||
RMVariables['BaoFee']:=ADOQueryTemp.fieldbyname('BaoFee').Value;
|
||||
RMVariables['YunDiG']:=ADOQueryTemp.fieldbyname('YunDiG').Value;
|
||||
RMVariables['ChuKouKA']:=ADOQueryTemp.fieldbyname('ChuKouKA').Value;
|
||||
RMVariables['HuoYuanPlace']:=ADOQueryTemp.fieldbyname('HuoYuanPlace').Value;
|
||||
RMVariables['ChengJiaoType']:=ADOQueryTemp.fieldbyname('ChengJiaoType').Value; }
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\货物进出口报关明细表.rmf'),'提示',0);
|
||||
end;
|
||||
// Panel4.Visible:=True;
|
||||
end;
|
||||
|
||||
end.
|
||||
1060
坯布码单待检(PBMDDJ.dll)/U_BGFeeChkList.dfm
Normal file
1060
坯布码单待检(PBMDDJ.dll)/U_BGFeeChkList.dfm
Normal file
File diff suppressed because it is too large
Load Diff
819
坯布码单待检(PBMDDJ.dll)/U_BGFeeChkList.pas
Normal file
819
坯布码单待检(PBMDDJ.dll)/U_BGFeeChkList.pas
Normal file
|
|
@ -0,0 +1,819 @@
|
|||
unit U_BGFeeChkList;
|
||||
|
||||
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, cxButtonEdit, cxTextEdit, cxDropDownEdit;
|
||||
|
||||
type
|
||||
TfrmBGFeeChkList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
TBExport: TToolButton;
|
||||
V1SFKDate: TcxGridDBColumn;
|
||||
v1ConNo: TcxGridDBColumn;
|
||||
v1PRTColor: TcxGridDBColumn;
|
||||
v1MPRTSpec: TcxGridDBColumn;
|
||||
Order_Main: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1MPRTCodeName: TcxGridDBColumn;
|
||||
v1MPRTMF: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N2: TMenuItem;
|
||||
v1PRTPrice: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Print: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
Label10: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
OrderNoHZ: TEdit;
|
||||
BMNo: TEdit;
|
||||
ChuanGS: TEdit;
|
||||
V1TuiDanChkDate: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
Label2: TLabel;
|
||||
ChuanNo: TEdit;
|
||||
Label3: TLabel;
|
||||
HDName: TEdit;
|
||||
Label5: TLabel;
|
||||
FeeName: TEdit;
|
||||
ComboBox1: TComboBox;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxSplitter2: TcxSplitter;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridDBColumn17: TcxGridDBColumn;
|
||||
cxGridDBColumn18: TcxGridDBColumn;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
DataSource3: TDataSource;
|
||||
ClientDataSet3: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
Panel3: TPanel;
|
||||
Panel4: TPanel;
|
||||
SFKDate: TDateTimePicker;
|
||||
TuiDanChkDate: TDateTimePicker;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
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 FormShow(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 ToolButton1Click(Sender: TObject);
|
||||
procedure OrderNoHZChange(Sender: TObject);
|
||||
procedure BMNoKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure OrderNoHZKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
private
|
||||
DQdate:TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData():Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt,FCloth:Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBGFeeChkList: TfrmBGFeeChkList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_BGFeeInPut,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBGFeeChkList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmBGFeeChkList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align:=alClient;
|
||||
//BegDate.DateTime:=SGetServerDateTime(ADOQueryTemp)-7;
|
||||
//EndDate.DateTime:=SGetServerDateTime(ADOQueryTemp);
|
||||
DQdate:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('报关费用列表1',Tv1,'报关费用');
|
||||
WriteCxGrid('报关费用列表2',Tv2,'报关费用');
|
||||
WriteCxGrid('报关费用列表3',Tv3,'报关费用');
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(',OrderNoHZ=dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'')');
|
||||
sql.Add(' from BGFee_Main A ');
|
||||
sql.Add(' inner join BGFee_HuoDai B on A.BMID=B.BMID');
|
||||
sql.Add(' where 1=1');
|
||||
sql.Add(' and isnull(B.SFKDate,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(',OrderNoHZ=dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'')');
|
||||
sql.Add(' from BGFee_Main A ');
|
||||
sql.Add(' inner join BGFee_HuoDai B on A.BMID=B.BMID');
|
||||
sql.Add(' where 1=1');
|
||||
sql.Add(' and isnull(B.SFKDate,'''')<>'''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(',OrderNoHZ=dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'')');
|
||||
sql.Add(' from BGFee_Main A ');
|
||||
sql.Add(' left join BGFee_HuoDai B on A.BMID=B.BMID');
|
||||
sql.Add(' where 1=1');
|
||||
sql.Add(' and isnull(TuiDanChkDate,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=3 then
|
||||
begin
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(',OrderNoHZ=dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'')');
|
||||
sql.Add(' from BGFee_Main A ');
|
||||
sql.Add(' left join BGFee_HuoDai B on A.BMID=B.BMID');
|
||||
sql.Add(' where 1=1');
|
||||
sql.Add(' and isnull(TuiDanChkDate,'''')<>''''');
|
||||
end else
|
||||
begin
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(',OrderNoHZ=dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'')');
|
||||
sql.Add(' from BGFee_Main A ');
|
||||
sql.Add(' left join BGFee_HuoDai B on A.BMID=B.BMID');
|
||||
sql.Add(' where 1=1');
|
||||
end;
|
||||
|
||||
if (cxTabControl1.TabIndex=1) or (cxTabControl1.TabIndex=3) or (cxTabControl1.TabIndex=4) then
|
||||
begin
|
||||
if Trim(ComboBox1.Text)='按登记日期' then
|
||||
begin
|
||||
SQL.Add('and A.FillTIme>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.FillTIme<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按装箱日期' then
|
||||
begin
|
||||
SQL.Add('and A.ZhuangXiangDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.ZhuangXiangDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按船期' then
|
||||
begin
|
||||
SQL.Add('and A.ChuanDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.ChuanDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按预录单日期' then
|
||||
begin
|
||||
SQL.Add('and A.YuLuDanDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.YuLuDanDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按提单日期' then
|
||||
begin
|
||||
SQL.Add('and A.TiDanDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.TiDanDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按预退单日期' then
|
||||
begin
|
||||
SQL.Add('and A.YuTuiDanDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.YuTuiDanDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按交退单核日期' then
|
||||
begin
|
||||
SQL.Add('and A.JiaoTuiDanDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.JiaoTuiDanDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按退单(核)日期' then
|
||||
begin
|
||||
SQL.Add('and A.TuiDanChkDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and A.TuiDanChkDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end else
|
||||
if Trim(ComboBox1.Text)='按付款日期' then
|
||||
begin
|
||||
SQL.Add('and B.SFKDate>='''+FormatDateTime('yyyy-MM-dd',BegDate.DateTime)+'''');
|
||||
SQL.Add('and B.SFKDate<'''+FormatDateTime('yyyy-MM-dd',enddate.DateTime+1)+'''');
|
||||
end;
|
||||
end;
|
||||
SQL.Add(' and isnull(A.SChkTime,'''')<>'''' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmBGFeeChkList.InitForm();
|
||||
begin
|
||||
ReadCxGrid('报关费用列表1',Tv1,'报关费用');
|
||||
ReadCxGrid('报关费用列表2',Tv2,'报关费用');
|
||||
ReadCxGrid('报关费用列表3',Tv3,'报关费用');
|
||||
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
SFKDate.DateTime:=EndDate.DateTime;
|
||||
TuiDanChkDate.DateTime:=EndDate.DateTime;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.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 TfrmBGFeeChkList.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BGFee_Main where BMId='''+Trim(Order_Main.fieldbyname('BMId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BGFee_Sub where BMId='''+Trim(Order_Main.fieldbyname('BMId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
//if ADOQueryMain.IsEmpty then Exit;
|
||||
//SelExportData(Tv1,ADOQueryMain,'生产指示单列表');
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
TcxGridToExcel('订单合同',cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
EngMoney:string;
|
||||
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.*,ConMoney=B.PRTOrderQty*B.PRTPrice,COL=''COL:'' ');
|
||||
sql.Add(' from JYOrderCon_Main A inner join JYOrderCon_Sub B on A.MainId=B.MainId ');
|
||||
sql.Add(' where A.MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint,CDS_Print);
|
||||
SInitCDSData20(ADOQueryPrint,CDS_Print);
|
||||
//
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select TolConMoney=Sum(PRTOrderQty*PRTPrice)');
|
||||
sql.Add(' from JYOrderCon_Main A inner join JYOrderCon_Sub B on A.MainId=B.MainId ');
|
||||
sql.Add(' where A.MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
EngMoney:=num2cengnum(ADOQueryTemp.fieldbyname('TolConMoney').AsString);
|
||||
EngMoney:=UpperCase(EngMoney);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RMVariables['EngMoney']:=EngMoney;
|
||||
//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 TfrmBGFeeChkList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.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 TfrmBGFeeChkList.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 TfrmBGFeeChkList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
try
|
||||
frmBGFeeInPut:=TfrmBGFeeInPut.Create(Application);
|
||||
with frmBGFeeInPut do
|
||||
begin
|
||||
PState:=1;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('BMId').AsString);
|
||||
ToolBar2.Visible:=False;
|
||||
TBSave.Visible:=False;
|
||||
ScrollBox1.Enabled:=False;
|
||||
Tv1.OptionsSelection.CellSelect:=False;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBGFeeInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.OrderNoHZChange(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 TfrmBGFeeChkList.BMNoKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Length(BMNo.Text)<3 then Exit;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(',OrderNoHZ=dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'')');
|
||||
sql.Add(' from BGFee_Main A ');
|
||||
sql.Add(' left join BGFee_HuoDai B on A.BMID=B.BMID');
|
||||
SQL.Add('where 1=1');
|
||||
{if Trim(DParameters1)<>'高权限' then
|
||||
begin
|
||||
sql.Add(' and A.Filler in(select UserName from SY_User where DPID in');
|
||||
sql.Add(' (select DPID from SY_User where UserName='''+Trim(DName)+'''))');
|
||||
end; }
|
||||
sql.Add(' and BMNO like '''+'%'+Trim(BMNO.Text)+'%'+'''');
|
||||
SQL.Add(' and isnull(A.SChkTime,'''')<>'''' ');
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(B.SFKDate,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(B.SFKDate,'''')<>'''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(TuiDanChkDate,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=3 then
|
||||
begin
|
||||
sql.Add(' and isnull(TuiDanChkDate,'''')<>''''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.Tv1FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_Sub where BMID='''+Trim(Order_Main.fieldbyname('BMID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_HuoDai where BMID='''+Trim(Order_Main.fieldbyname('BMID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet3);
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.OrderNoHZKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key=#13 then
|
||||
begin
|
||||
if Length(OrderNoHZ.Text)<3 then Exit;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(',OrderNoHZ=dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'')');
|
||||
sql.Add(' from BGFee_Main A ');
|
||||
sql.Add(' left join BGFee_HuoDai B on A.BMID=B.BMID');
|
||||
SQL.Add('where 1=1');
|
||||
{if Trim(DParameters1)<>'高权限' then
|
||||
begin
|
||||
sql.Add(' and A.Filler in(select UserName from SY_User where DPID in');
|
||||
sql.Add(' (select DPID from SY_User where UserName='''+Trim(DName)+'''))');
|
||||
end; }
|
||||
sql.Add(' and dbo.F_Get_Order_SubStr(A.BMID,''BGOrderNo'') like '''+'%'+Trim(OrderNoHZ.Text)+'%'+'''');
|
||||
SQL.Add(' and isnull(A.SChkTime,'''')<>'''' ');
|
||||
if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
sql.Add(' and isnull(B.SFKDate,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=1 then
|
||||
begin
|
||||
sql.Add(' and isnull(B.SFKDate,'''')<>'''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=2 then
|
||||
begin
|
||||
sql.Add(' and isnull(TuiDanChkDate,'''')='''' ');
|
||||
end else
|
||||
if cxTabControl1.TabIndex=3 then
|
||||
begin
|
||||
sql.Add(' and isnull(TuiDanChkDate,'''')<>''''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then exit;
|
||||
if cxTabControl1.TabIndex<>0 then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_HuoDai where BHID='''+Trim(Order_Main.fieldbyname('BHID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SFKDate').Value:=Trim(FormatDateTime('yyyy-MM-dd',SFKDate.Date));
|
||||
Post;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('更新付款日期异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then exit;
|
||||
if cxTabControl1.TabIndex<>1 then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_HuoDai where BHID='''+Trim(Order_Main.fieldbyname('BHID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SFKDate').Value:=NUll;
|
||||
Post;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('撤销付款日期异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then exit;
|
||||
if cxTabControl1.TabIndex<>2 then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_Main where BMID='''+Trim(Order_Main.fieldbyname('BMID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('TuiDanChkDate').Value:=Trim(FormatDateTime('yyyy-MM-dd',TuiDanChkDate.Date));
|
||||
Post;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('更新付款日期异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeChkList.Button2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then exit;
|
||||
if cxTabControl1.TabIndex<>3 then Exit;
|
||||
if Order_Main.Locate('SSel',True,[])=False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要执行此操作吗?','提示',32+4)<>IDYES then Exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
Order_Main.DisableControls;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while Locate('SSel',True,[]) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_Main where BMID='''+Trim(Order_Main.fieldbyname('BMID').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('TuiDanChkDate').Value:=NUll;
|
||||
Post;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
Order_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('更新付款日期异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
900
坯布码单待检(PBMDDJ.dll)/U_BGFeeInPut.dfm
Normal file
900
坯布码单待检(PBMDDJ.dll)/U_BGFeeInPut.dfm
Normal file
|
|
@ -0,0 +1,900 @@
|
|||
object frmBGFeeInPut: TfrmBGFeeInPut
|
||||
Left = 138
|
||||
Top = 45
|
||||
Width = 1222
|
||||
Height = 656
|
||||
Align = alClient
|
||||
Caption = #25253#20851#35013#31665#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
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1214
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBSave: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384
|
||||
ImageIndex = 5
|
||||
OnClick = TBSaveClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object ScrollBox11: TScrollBox
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 1214
|
||||
Height = 268
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clBtnFace
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 537
|
||||
Height = 266
|
||||
Align = alLeft
|
||||
TabOrder = 0
|
||||
object Label7: TLabel
|
||||
Left = 17
|
||||
Top = 240
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #25552' '#21333' '#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 288
|
||||
Top = 98
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #25552' '#21333#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 17
|
||||
Top = 212
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25552#21333#36816#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 288
|
||||
Top = 70
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #39044' '#24405' '#21333#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 17
|
||||
Top = 13
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20986#21475#21475#23736#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 17
|
||||
Top = 70
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #30446' '#30340' '#28207#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 288
|
||||
Top = 13
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #35013#31665#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 288
|
||||
Top = 41
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #33337' '#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 17
|
||||
Top = 183
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #33337' '#20844' '#21496#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 17
|
||||
Top = 155
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #33337#21517#33322#27425#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 17
|
||||
Top = 98
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #31665' '#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 288
|
||||
Top = 180
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #22791' '#27880#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label16: TLabel
|
||||
Left = 17
|
||||
Top = 41
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #36816' '#25269' '#22269#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label17: TLabel
|
||||
Left = 17
|
||||
Top = 126
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25104#20132#26041#24335#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 287
|
||||
Top = 126
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #39044' '#36864' '#21333#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label19: TLabel
|
||||
Left = 288
|
||||
Top = 155
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20132#36864#21333#26680#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object TiDanDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 425
|
||||
Top = 94
|
||||
Width = 99
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
ShowCheckbox = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object TiDanNo: TEdit
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 237
|
||||
Width = 180
|
||||
Height = 18
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 1
|
||||
end
|
||||
object BMNo: TEdit
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 209
|
||||
Width = 180
|
||||
Height = 18
|
||||
CharCase = ecUpperCase
|
||||
TabOrder = 2
|
||||
end
|
||||
object YuLuDanDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 348
|
||||
Top = 66
|
||||
Width = 176
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
ShowCheckbox = True
|
||||
TabOrder = 3
|
||||
end
|
||||
object FromPlace: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 9
|
||||
Width = 180
|
||||
Height = 20
|
||||
Hint = 'FromPlace/'#20986#21475#21475#23736
|
||||
TabOrder = 4
|
||||
OnBtnUpClick = FromPlaceBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object ToPlace: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 66
|
||||
Width = 180
|
||||
Height = 20
|
||||
Hint = 'ToPlace/'#30446#30340#28207
|
||||
TabOrder = 5
|
||||
OnBtnUpClick = FromPlaceBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object ZhuangXiangDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 348
|
||||
Top = 9
|
||||
Width = 176
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
ShowCheckbox = True
|
||||
TabOrder = 6
|
||||
end
|
||||
object ChuanDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 348
|
||||
Top = 37
|
||||
Width = 176
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
ShowCheckbox = True
|
||||
TabOrder = 7
|
||||
end
|
||||
object ChuanGS: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 179
|
||||
Width = 180
|
||||
Height = 20
|
||||
Hint = 'ChuanGS/'#33337#20844#21496
|
||||
TabOrder = 8
|
||||
OnBtnUpClick = FromPlaceBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object ChuanNo: TEdit
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 152
|
||||
Width = 180
|
||||
Height = 18
|
||||
TabOrder = 9
|
||||
end
|
||||
object XiangType: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 94
|
||||
Width = 180
|
||||
Height = 20
|
||||
Hint = 'XiangType/'#31665#22411
|
||||
TabOrder = 10
|
||||
OnBtnUpClick = FromPlaceBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object YunDiG: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 37
|
||||
Width = 180
|
||||
Height = 20
|
||||
Hint = 'YunDiG/'#36816#25269#22269
|
||||
TabOrder = 11
|
||||
OnBtnUpClick = FromPlaceBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object ChengJiaoType: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 78
|
||||
Top = 122
|
||||
Width = 180
|
||||
Height = 20
|
||||
Hint = 'ChengJiaoType/'#25104#20132#26041#24335
|
||||
TabOrder = 12
|
||||
OnBtnUpClick = FromPlaceBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object YuTuiDanDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 348
|
||||
Top = 122
|
||||
Width = 176
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
ShowCheckbox = True
|
||||
TabOrder = 13
|
||||
end
|
||||
object JiaoTuiDanDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 348
|
||||
Top = 151
|
||||
Width = 176
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.000000000000000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.000000000000000000
|
||||
ShowCheckbox = True
|
||||
TabOrder = 14
|
||||
end
|
||||
object TiDanType: TComboBox
|
||||
Tag = 2
|
||||
Left = 348
|
||||
Top = 94
|
||||
Width = 77
|
||||
Height = 20
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 15
|
||||
Text = #30005#25918
|
||||
Items.Strings = (
|
||||
#30005#25918
|
||||
#23492#27491#26412)
|
||||
end
|
||||
object Note: TRichEdit
|
||||
Tag = 2
|
||||
Left = 287
|
||||
Top = 194
|
||||
Width = 240
|
||||
Height = 62
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 16
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 537
|
||||
Top = 0
|
||||
Width = 675
|
||||
Height = 266
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 1
|
||||
object ToolBar3: TToolBar
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 671
|
||||
Height = 31
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton3: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 2
|
||||
Top = 33
|
||||
Width = 671
|
||||
Height = 231
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn5
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn3
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #26085#26399
|
||||
DataBinding.FieldName = 'BHDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #36135#20195#21517#31216
|
||||
DataBinding.FieldName = 'HDName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = cxGridDBColumn1PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 114
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #36153#29992#21517#31216
|
||||
DataBinding.FieldName = 'FeeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = cxGridDBColumn2PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #36153#29992#37329#39069
|
||||
DataBinding.FieldName = 'FeeMoney'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #32852#31995#20154
|
||||
DataBinding.FieldName = 'HDLXPerson'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 56
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #32852#31995#26041#24335
|
||||
DataBinding.FieldName = 'HDLXFS'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Styles.Header = DataLink_CYZZ.handBlack
|
||||
Width = 60
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #25910#27454#38134#34892
|
||||
DataBinding.FieldName = 'HDBankName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #25910#27454#36134#21495
|
||||
DataBinding.FieldName = 'HDBankNo'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 78
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'HDNote'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 297
|
||||
Width = 1214
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
EdgeInner = esNone
|
||||
EdgeOuter = esNone
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_CYZZ.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 12
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 13
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 326
|
||||
Width = 1214
|
||||
Height = 299
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = v1PRTOrderQty
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = v1PRTPrice
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1PRTOrderQty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_CYZZ.SHuangSe
|
||||
Styles.IncSearch = DataLink_CYZZ.SHuangSe
|
||||
Styles.Selection = DataLink_CYZZ.SHuangSe
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = True
|
||||
Properties.OnButtonClick = v1Column4PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 126
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = 'HS'#32534#30721
|
||||
DataBinding.FieldName = 'HSCode'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 101
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #20013#25991#21697#21517
|
||||
DataBinding.FieldName = 'BGName'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 130
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'BGCF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1PRTPrice: TcxGridDBColumn
|
||||
Caption = #21367#25968
|
||||
DataBinding.FieldName = 'PS'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Styles.Header = DataLink_CYZZ.handBlack
|
||||
Width = 61
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #35013#31665#20928#37325'Kg'
|
||||
DataBinding.FieldName = 'JZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object v1PRTOrderQty: TcxGridDBColumn
|
||||
Caption = #35013#31665#27611#37325'Kg'
|
||||
DataBinding.FieldName = 'MZQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 89
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25253#20851#37329#39069'$'
|
||||
DataBinding.FieldName = 'BGMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #31665#21495
|
||||
DataBinding.FieldName = 'XiangNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #23553#21495
|
||||
DataBinding.FieldName = 'FengNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_CYZZ.Default
|
||||
Width = 63
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #35013#31665#31859#25968
|
||||
DataBinding.FieldName = 'MiQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 61
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #35013#31665#30721#25968
|
||||
DataBinding.FieldName = 'MaQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'SNote'
|
||||
Width = 78
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 342
|
||||
Top = 10
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 308
|
||||
Top = 8
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 203
|
||||
Top = 355
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 174
|
||||
Top = 353
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_CYZZ.ADOLink
|
||||
Parameters = <>
|
||||
Left = 276
|
||||
Top = 6
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 868
|
||||
Top = 132
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 837
|
||||
Top = 130
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 806
|
||||
Top = 130
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 145
|
||||
Top = 355
|
||||
end
|
||||
end
|
||||
565
坯布码单待检(PBMDDJ.dll)/U_BGFeeInPut.pas
Normal file
565
坯布码单待检(PBMDDJ.dll)/U_BGFeeInPut.pas
Normal file
|
|
@ -0,0 +1,565 @@
|
|||
unit U_BGFeeInPut;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGrid, cxMemo, cxRichEdit, ComCtrls, cxContainer,
|
||||
cxTextEdit, cxMaskEdit, cxButtonEdit, StdCtrls, ToolWin, DBClient, ADODB,
|
||||
ExtCtrls, BtnEdit, cxCalendar,StrUtils, cxDropDownEdit,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu;
|
||||
|
||||
type
|
||||
TfrmBGFeeInPut = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ScrollBox11: TScrollBox;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1PRTPrice: TcxGridDBColumn;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Sub: TClientDataSet;
|
||||
ADOQuery1: TADOQuery;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
ScrollBox1: TScrollBox;
|
||||
TiDanDate: TDateTimePicker;
|
||||
Label7: TLabel;
|
||||
TiDanNo: TEdit;
|
||||
Label3: TLabel;
|
||||
Label10: TLabel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label12: TLabel;
|
||||
Label15: TLabel;
|
||||
BMNo: TEdit;
|
||||
YuLuDanDate: TDateTimePicker;
|
||||
FromPlace: TBtnEditC;
|
||||
ToPlace: TBtnEditC;
|
||||
ZhuangXiangDate: TDateTimePicker;
|
||||
ChuanDate: TDateTimePicker;
|
||||
ChuanGS: TBtnEditC;
|
||||
ChuanNo: TEdit;
|
||||
XiangType: TBtnEditC;
|
||||
Label16: TLabel;
|
||||
YunDiG: TBtnEditC;
|
||||
Label17: TLabel;
|
||||
ChengJiaoType: TBtnEditC;
|
||||
Label11: TLabel;
|
||||
YuTuiDanDate: TDateTimePicker;
|
||||
Label19: TLabel;
|
||||
JiaoTuiDanDate: TDateTimePicker;
|
||||
TiDanType: TComboBox;
|
||||
Note: TRichEdit;
|
||||
Panel1: TPanel;
|
||||
ToolBar3: TToolBar;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
DataSource2: TDataSource;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure CustomerNoNameBtnDnClick(Sender: TObject);
|
||||
procedure FromPlaceBtnUpClick(Sender: TObject);
|
||||
procedure v1Column4PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure cxGridDBColumn2PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
private
|
||||
procedure InitData();
|
||||
procedure ZDYHelp(FButn:TcxButtonEdit;LType:string);
|
||||
function SaveData():Boolean;
|
||||
procedure GetBtnCText(Sender: TObject);
|
||||
{ Private declarations }
|
||||
public
|
||||
PState,CopyInt:Integer;
|
||||
FMainId,FFMainId:String;
|
||||
FXS:Integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmBGFeeInPut: TfrmBGFeeInPut;
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_ZDYHelp,U_RTFun,U_BGLDManage;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmBGFeeInPut.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('报关费用录入',Tv1,'报关费用');
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.InitData();
|
||||
begin
|
||||
ZhuangXiangDate.Date:=SGetServerDate(ADOTemp);
|
||||
ChuanDate.Date:=ZhuangXiangDate.Date;
|
||||
YuLuDanDate.Date:=ZhuangXiangDate.Date;
|
||||
TiDanDate.Date:=ZhuangXiangDate.Date;
|
||||
YuTuiDanDate.Date:=ZhuangXiangDate.Date;
|
||||
JiaoTuiDanDate.Date:=ZhuangXiangDate.Date;
|
||||
ZhuangXiangDate.Checked:=False;
|
||||
ChuanDate.Checked:=False;
|
||||
YuLuDanDate.Checked:=False;
|
||||
TiDanDate.Checked:=False;
|
||||
YuTuiDanDate.Checked:=False;
|
||||
JiaoTuiDanDate.Checked:=False;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select * from BGFee_Sub ');
|
||||
if PState=1 then
|
||||
begin
|
||||
sql.Add('where BMId='''+Trim(FMainId)+'''');
|
||||
end;
|
||||
if PState=0 then
|
||||
begin
|
||||
sql.Add(' where 1<>1');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuery1,Order_Sub);
|
||||
SInitCDSData20(ADOQuery1,Order_Sub);
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_Main where BMId='''+Trim(FMainId)+'''');
|
||||
Open;
|
||||
end;
|
||||
SCSHDataNew(ADOQuery1,ScrollBox1,2);
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_HuoDai where BMID='''+Trim(FMainId)+'''');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQuery1,ClientDataSet2);
|
||||
SInitCDSData20(ADOQuery1,ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.ZDYHelp(FButn:TcxButtonEdit;LType:string);
|
||||
var
|
||||
FType,ZDYName,FText:String;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.FormShow(Sender: TObject);
|
||||
begin
|
||||
readCxGrid('报关费用录入',Tv1,'报关费用');
|
||||
InitData();
|
||||
end;
|
||||
|
||||
function TfrmBGFeeInPut.SaveData():Boolean;
|
||||
var
|
||||
maxno,maxsubno,maxsubnoBH:String;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
///保存主表
|
||||
if Trim(FMainId)='' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd,maxno,'BM','BGFee_Main',3,1)=False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取主表最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxno:=Trim(FMainId);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select * from BGFee_Main where BMId='''+Trim(FMainId)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FMainId)='' then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('BMId').Value:=Trim(maxno);
|
||||
RTSetsavedata(ADOCmd,'BGFee_Main',ScrollBox1,2);
|
||||
if Trim(FMainId)='' then
|
||||
begin
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
end else
|
||||
begin
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
// FieldByName('Note').Value:=Trim(Note.Text);
|
||||
Post;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from BGFee_Main where BMNo='''+Trim(BMNo.Text)+'''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.RecordCount>1 then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('提单运号重复!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPdate BGFee_Main Set Filler='''+Trim(DName)+'''');
|
||||
sql.Add(' where BMId='''+Trim(maxno)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
///保存子表
|
||||
|
||||
with Order_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(Order_Sub.fieldbyname('BSId').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd,maxsubno,'BS','BGFee_Sub',4,1)=False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxsubno:=Trim(Order_Sub.fieldbyname('BSId').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BGFee_Sub where BMID='''+Trim(maxno)+'''');
|
||||
sql.Add(' and BSId='''+Trim(maxsubno)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(Order_Sub.fieldbyname('BSId').AsString)='' then
|
||||
Append
|
||||
else
|
||||
Edit;
|
||||
FieldByName('BMID').Value:=Trim(maxno);
|
||||
FieldByName('BSId').Value:=Trim(maxsubno);
|
||||
RTSetSaveDataCDS(ADOCmd,Tv1,Order_Sub,'BGFee_Sub',0);
|
||||
Post;
|
||||
end;
|
||||
Order_Sub.Edit;
|
||||
Order_Sub.FieldByName('BSId').Value:=Trim(maxsubno);
|
||||
//Order_Sub.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
//保存费用子表
|
||||
with ClientDataSet2 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(ClientDataSet2.fieldbyname('BHId').AsString)='' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd,maxsubnoBH,'BH','BGFee_HuoDai',4,1)=False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
maxsubnoBH:=Trim(ClientDataSet2.fieldbyname('BHId').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from BGFee_HuoDai where BHID='''+Trim(maxsubnoBH)+'''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(ClientDataSet2.fieldbyname('BHID').AsString)='' then
|
||||
Append
|
||||
else
|
||||
Edit;
|
||||
FieldByName('BMID').Value:=Trim(maxno);
|
||||
FieldByName('BHID').Value:=Trim(maxsubnoBH);
|
||||
RTSetSaveDataCDS(ADOCmd,Tv2,ClientDataSet2,'BGFee_HuoDai',0);
|
||||
Post;
|
||||
end;
|
||||
ClientDataSet2.Edit;
|
||||
ClientDataSet2.FieldByName('BHID').Value:=Trim(maxsubnoBH);
|
||||
//Order_Sub.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
FMainId:=Trim(maxno);
|
||||
Result:=True;
|
||||
except
|
||||
Result:=False;
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmBGFeeInPut.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
FReal:Double;
|
||||
begin
|
||||
ToolBar1.SetFocus;
|
||||
if Trim(BMNo.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('提单运号不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if Order_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if ClientDataSet2.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('费用明细不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
CopyAddRow(Tv1,Order_Sub);
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Sub.IsEmpty then Exit;
|
||||
if Trim(Order_Sub.fieldbyname('BSId').AsString)<>'' then
|
||||
begin
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete BGFee_Sub where BSId='''+Trim(Order_Sub.fieldbyname('BSId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.CustomerNoNameBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
TBtnEditC(Sender).Text:='';
|
||||
TBtnEditC(Sender).TxtCode:='';
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.FromPlaceBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
GetBtnCText(Sender);
|
||||
end;
|
||||
procedure TfrmBGFeeInPut.GetBtnCText(Sender: TObject);
|
||||
var
|
||||
fsj:string;
|
||||
FWZ:Integer;
|
||||
begin
|
||||
fsj:=Trim(TBtnEditC(Sender).Hint);
|
||||
FWZ:=Pos('/',fsj);
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:=Copy(fsj,1,FWZ-1);
|
||||
flagname:=Copy(fsj,FWZ+1,Length(fsj)-fwz);
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
TBtnEditC(Sender).Text:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.v1Column4PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmBGLDManage:=TfrmBGLDManage.Create(Application);
|
||||
with frmBGLDManage do
|
||||
begin
|
||||
FSel:='99';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self.Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('OrderNo').Value:=Trim(frmBGLDManage.Order_Main.fieldbyname('OrderNo').AsString);
|
||||
FieldByName('BGName').Value:=Trim(frmBGLDManage.CDS_19.fieldbyname('BGName').AsString);
|
||||
FieldByName('HSCode').Value:=Trim(frmBGLDManage.CDS_BGName.fieldbyname('HSCode').AsString);
|
||||
FieldByName('PS').Value:=frmBGLDManage.CDS_BGName.fieldbyname('CangKuPS').Value;
|
||||
FieldByName('JZQty').Value:=frmBGLDManage.CDS_19.fieldbyname('NQkgQty').Value;
|
||||
FieldByName('MiQty').Value:=frmBGLDManage.CDS_19.fieldbyname('NQMQty').Value;
|
||||
FieldByName('BGMoney').Value:=frmBGLDManage.CDS_19.fieldbyname('BGMoney').Value;
|
||||
//Post;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmBGLDManage.Free;
|
||||
end;
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from JYOrder_Main where OrderNo='''+Trim(Order_Sub.fieldbyname('OrderNo').AsString)+'''');
|
||||
Open;
|
||||
end;
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('BGCF').Value:=Trim(ADOTemp.fieldbyname('MPRTCF').AsString);
|
||||
//Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
with ClientDataSet2 do
|
||||
begin
|
||||
Append;
|
||||
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.cxGridDBColumn1PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='HDName';
|
||||
flagname:='货代';
|
||||
V1ZdyStr1.Visible:=True;
|
||||
V1ZdyStr2.Visible:=True;
|
||||
V1ZdyStr3.Visible:=True;
|
||||
V1ZdyStr4.Visible:=True;
|
||||
V1ZdyStr1.Caption:='联系人';
|
||||
V1ZdyStr2.Caption:='联系方式';
|
||||
V1ZdyStr3.Caption:='收款银行';
|
||||
V1ZdyStr4.Caption:='收款账号';
|
||||
frmZDYHelp.Align:=alClient;
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self .ClientDataSet2 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('HDName').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
FieldByName('HDLXPerson').Value:=Trim(ClientDataSet1.fieldbyname('ZdyStr1').AsString);
|
||||
FieldByName('HDLXFS').Value:=Trim(ClientDataSet1.fieldbyname('ZdyStr2').AsString);
|
||||
FieldByName('HDBankName').Value:=Trim(ClientDataSet1.fieldbyname('ZdyStr3').AsString);
|
||||
FieldByName('HDBankNo').Value:=Trim(ClientDataSet1.fieldbyname('ZdyStr4').AsString);
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmBGFeeInPut.cxGridDBColumn2PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='HDFeeName';
|
||||
flagname:='费用名称';
|
||||
if ShowModal=1 then
|
||||
begin
|
||||
with Self .ClientDataSet2 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('FeeName').Value:=Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user