0
This commit is contained in:
commit
1d94a89439
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
**/layout
|
||||
**/report
|
||||
**/实施文件
|
||||
**/image
|
||||
**/doc
|
||||
**/wav
|
||||
*.dll
|
||||
*.ddp
|
||||
*.dcu
|
||||
*.~pas
|
||||
*.~dfm
|
||||
*.~ddp
|
||||
3
发货申请(ShipmentRequest.dll)/Desktop.ini
Normal file
3
发货申请(ShipmentRequest.dll)/Desktop.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[.ShellClassInfo]
|
||||
IconFile=C:\Program Files (x86)\360\360WangPan\new_desktop_win7.ico
|
||||
IconIndex=0
|
||||
2
发货申请(ShipmentRequest.dll)/FieldExportSet/发货申请列表.INI
Normal file
2
发货申请(ShipmentRequest.dll)/FieldExportSet/发货申请列表.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/申请单号/计划单号/出库类型/客户/收货单位/申请日期/申请数量/申请人/审核人/审核日期/发货匹数/发货重量/发货长度/总金额/备注/发货日期/订单状态/交货确认日期/业务员/业务组别/随货/指定物流
|
||||
2
发货申请(ShipmentRequest.dll)/FieldExportSet/财务码单.INI
Normal file
2
发货申请(ShipmentRequest.dll)/FieldExportSet/财务码单.INI
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[导出设置]
|
||||
导出字段=Begin/申请日期/产品编号/缸号/颜色/发货匹数/发货长度/发货重量/单价/包缸费/金额/客户/单位/送货单号/业务员/制单人/备注
|
||||
4
发货申请(ShipmentRequest.dll)/File.INI
Normal file
4
发货申请(ShipmentRequest.dll)/File.INI
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[生产车间配置]
|
||||
卷条码机台标志=99
|
||||
成品DLL文件=CYZZ.dll
|
||||
成品DLL调用号=11
|
||||
7
发货申请(ShipmentRequest.dll)/FileHelp.ini
Normal file
7
发货申请(ShipmentRequest.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
发货申请(ShipmentRequest.dll)/JCYData.INI
Normal file
7
发货申请(ShipmentRequest.dll)/JCYData.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com1
|
||||
波特率=9600
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
7
发货申请(ShipmentRequest.dll)/JZCRS323C.INI
Normal file
7
发货申请(ShipmentRequest.dll)/JZCRS323C.INI
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[系统配置]
|
||||
串口号=com2
|
||||
波特率=1200
|
||||
校验位=0
|
||||
数据位=8
|
||||
停止位=0
|
||||
频率=100
|
||||
0
发货申请(ShipmentRequest.dll)/JZCRS323CList.txt
Normal file
0
发货申请(ShipmentRequest.dll)/JZCRS323CList.txt
Normal file
20
发货申请(ShipmentRequest.dll)/ProjectGroup1.bpg
Normal file
20
发货申请(ShipmentRequest.dll)/ProjectGroup1.bpg
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#------------------------------------------------------------------------------
|
||||
VERSION = BWS.01
|
||||
#------------------------------------------------------------------------------
|
||||
!ifndef ROOT
|
||||
ROOT = $(MAKEDIR)\..
|
||||
!endif
|
||||
#------------------------------------------------------------------------------
|
||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||
#------------------------------------------------------------------------------
|
||||
PROJECTS = testDll.exe
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
testDll.exe: testDll.dpr
|
||||
$(DCC)
|
||||
|
||||
|
||||
23
发货申请(ShipmentRequest.dll)/ProjectGroup1.~bpg
Normal file
23
发货申请(ShipmentRequest.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
发货申请(ShipmentRequest.dll)/SYSTEMSET.ini
Normal file
3
发货申请(ShipmentRequest.dll)/SYSTEMSET.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[SERVER]
|
||||
服务器地址=172.168.1.246
|
||||
软件名称=欣戈纺织
|
||||
42
发货申请(ShipmentRequest.dll)/ShipmentRequest.cfg
Normal file
42
发货申请(ShipmentRequest.dll)/ShipmentRequest.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
发货申请(ShipmentRequest.dll)/ShipmentRequest.dof
Normal file
138
发货申请(ShipmentRequest.dll)/ShipmentRequest.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:\Dp7Repo\项目代码\宇尚\发货申请(ShipmentRequest.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
|
||||
48
发货申请(ShipmentRequest.dll)/ShipmentRequest.dpr
Normal file
48
发货申请(ShipmentRequest.dll)/ShipmentRequest.dpr
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
library ShipmentRequest;
|
||||
|
||||
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_ShipmentRequest: 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
发货申请(ShipmentRequest.dll)/ShipmentRequest.res
Normal file
BIN
发货申请(ShipmentRequest.dll)/ShipmentRequest.res
Normal file
Binary file not shown.
48
发货申请(ShipmentRequest.dll)/ShipmentRequest.~dpr
Normal file
48
发货申请(ShipmentRequest.dll)/ShipmentRequest.~dpr
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
library ShipmentRequest;
|
||||
|
||||
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_ShipmentRequest: 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
发货申请(ShipmentRequest.dll)/Statistics.res
Normal file
BIN
发货申请(ShipmentRequest.dll)/Statistics.res
Normal file
Binary file not shown.
760
发货申请(ShipmentRequest.dll)/U_AllFHSQListSel.dfm
Normal file
760
发货申请(ShipmentRequest.dll)/U_AllFHSQListSel.dfm
Normal file
|
|
@ -0,0 +1,760 @@
|
|||
object frmAllFHSQListSel: TfrmAllFHSQListSel
|
||||
Left = 163
|
||||
Top = 34
|
||||
Width = 1556
|
||||
Height = 819
|
||||
Caption = #21457#36135#30003#35831#36873#25321
|
||||
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 = 1540
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton2: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 31
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 58
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1540
|
||||
Height = 43
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #30003#35831#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 263
|
||||
Top = 15
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #23458#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 430
|
||||
Top = 99
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 394
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #35745#21010#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 303
|
||||
Top = 99
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 303
|
||||
Top = 123
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 160
|
||||
Top = 15
|
||||
Width = 6
|
||||
Height = 12
|
||||
Caption = '-'
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 534
|
||||
Top = 16
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 670
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #30003#35831#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 = 12
|
||||
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
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 293
|
||||
Top = 13
|
||||
Width = 78
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 483
|
||||
Top = 95
|
||||
Width = 76
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object HZSCConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 446
|
||||
Top = 13
|
||||
Width = 77
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 95
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTMF: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 119
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object HZCODE: TEdit
|
||||
Tag = 2
|
||||
Left = 589
|
||||
Top = 12
|
||||
Width = 76
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object fsid: TEdit
|
||||
Tag = 2
|
||||
Left = 722
|
||||
Top = 13
|
||||
Width = 77
|
||||
Height = 20
|
||||
TabOrder = 8
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 75
|
||||
Width = 1540
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Enabled = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 1
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectRight = 0
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 772
|
||||
Width = 1540
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 96
|
||||
Width = 1540
|
||||
Height = 426
|
||||
Align = alClient
|
||||
TabOrder = 4
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
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 = skSum
|
||||
end
|
||||
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 = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #30003#35831#21333#21495
|
||||
DataBinding.FieldName = 'FSID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 108
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #29616#36135#21333#21495
|
||||
DataBinding.FieldName = 'XHOrderno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 117
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'HZSCConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 105
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 124
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #25910#36135#21333#20301
|
||||
DataBinding.FieldName = 'SHDanWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 124
|
||||
end
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #30003#35831#26085#26399
|
||||
DataBinding.FieldName = 'SQDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #30003#35831#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #23457#26680#20154
|
||||
DataBinding.FieldName = 'Chker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #23457#26680#26085#26399
|
||||
DataBinding.FieldName = 'ChkTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
Width = 70
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #21457#36135#26085#26399
|
||||
DataBinding.FieldName = 'fhDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 140
|
||||
end
|
||||
object cv1Column12: TcxGridDBColumn
|
||||
Caption = #35746#21333#29366#24577
|
||||
DataBinding.FieldName = 'status2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object cv1Column14: TcxGridDBColumn
|
||||
Caption = #20132#36135#30830#35748#26085#26399
|
||||
DataBinding.FieldName = 'dlydate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 119
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'SQTYPE'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 522
|
||||
Width = 1540
|
||||
Height = 250
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cv2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cv2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column2
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object cv2Column10: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column7: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'gangno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column5: TcxGridDBColumn
|
||||
Caption = #30003#35831#21305#25968
|
||||
DataBinding.FieldName = 'sqps'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column6: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #21457#36135#25968#37327
|
||||
DataBinding.FieldName = 'FHQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Caption = #21253#32568#36153
|
||||
DataBinding.FieldName = 'BGFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column4: TcxGridDBColumn
|
||||
Caption = #20179#20301
|
||||
DataBinding.FieldName = 'cangwei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 1000
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 640
|
||||
Top = 176
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 704
|
||||
Top = 176
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 968
|
||||
Top = 184
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 936
|
||||
Top = 184
|
||||
end
|
||||
object ADOQuerySub: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 740
|
||||
Top = 176
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 464
|
||||
Top = 504
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 496
|
||||
Top = 504
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 528
|
||||
Top = 504
|
||||
end
|
||||
end
|
||||
291
发货申请(ShipmentRequest.dll)/U_AllFHSQListSel.pas
Normal file
291
发货申请(ShipmentRequest.dll)/U_AllFHSQListSel.pas
Normal file
|
|
@ -0,0 +1,291 @@
|
|||
unit U_AllFHSQListSel;
|
||||
|
||||
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,
|
||||
RM_E_llPDF, cxDropDownEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
dxBarBuiltInMenu, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmAllFHSQListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Main: TClientDataSet;
|
||||
ToolButton1: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label12: TLabel;
|
||||
Label13: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CustomerNoName: TEdit;
|
||||
MPRTCodeName: TEdit;
|
||||
HZSCConNo: TEdit;
|
||||
MPRTKZ: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
cxTabControl1: TcxTabControl;
|
||||
cxSplitter1: TcxSplitter;
|
||||
ADOQuerySub: TADOQuery;
|
||||
DataSource2: TDataSource;
|
||||
Label2: TLabel;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
cv1Column12: TcxGridDBColumn;
|
||||
cv1Column14: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cv2Column10: TcxGridDBColumn;
|
||||
cv2Column4: TcxGridDBColumn;
|
||||
cv2Column7: TcxGridDBColumn;
|
||||
cv2Column5: TcxGridDBColumn;
|
||||
cv2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
Tv2Column4: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
HZCODE: TEdit;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
fsid: TEdit;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSubGrid();
|
||||
procedure InitForm();
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt: Integer;
|
||||
canshu1: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmAllFHSQListSel: TfrmAllFHSQListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmAllFHSQListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmAllFHSQListSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('发货申请选择ZY', Tv1, '发货申请管理');
|
||||
WriteCxGrid('发货申请选择ZY', Tv2, '发货申请管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,NoteZ=A.Note,dfpshz=(SQPSHZ-isnull(FHPSHZ,0)) ');
|
||||
Sql.Add(' ,HZCODE=CAST((select distinct(SPrtCode) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
Sql.Add(' ,HZSCConNo=CAST((select distinct(SCConNo) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where chkstatus=''审核通过'' ');
|
||||
SQL.Add('AND (SQTYPE=''订单'' or crtype in(''回修出库'',''加工完成'',''加工出库'') )');
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
begin
|
||||
sql.Add(' and SQDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.Add(' and SQDate<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
||||
end;
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.InitForm();
|
||||
begin
|
||||
ReadCxGrid('发货申请选择ZY', Tv1, '发货申请管理');
|
||||
ReadCxGrid('发货申请选择ZY', Tv2, '发货申请管理');
|
||||
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 7;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.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 TfrmAllFHSQListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
TBFind.Click;
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.InitSubGrid();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
sql.Add('select * from FHSQ_Sub A where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''')
|
||||
else
|
||||
sql.Add('select * from FHSQ_Sub A where 1=2');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
begin
|
||||
sql.Add('select A.* from FHSQ_Sub A ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.* from FHSQ_Sub A ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where 1=2');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmAllFHSQListSel.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1076
发货申请(ShipmentRequest.dll)/U_CKProductBCPKCListSel.dfm
Normal file
1076
发货申请(ShipmentRequest.dll)/U_CKProductBCPKCListSel.dfm
Normal file
File diff suppressed because it is too large
Load Diff
387
发货申请(ShipmentRequest.dll)/U_CKProductBCPKCListSel.pas
Normal file
387
发货申请(ShipmentRequest.dll)/U_CKProductBCPKCListSel.pas
Normal file
|
|
@ -0,0 +1,387 @@
|
|||
unit U_CKProductBCPKCListSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||
cxDropDownEdit, MovePanel, cxCheckBox, Menus, cxCalendar, RM_Common, RM_Class,
|
||||
RM_GridReport, RM_System, RM_Dataset, BtnEdit, Math, Clipbrd, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, cxPC;
|
||||
|
||||
type
|
||||
TfrmCKProductBCPKCListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
CDS_Main: TClientDataSet;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
cxGrid2: TcxGrid;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
MovePanel2: TMovePanel;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
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;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
RM2: TRMGridReport;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
CDS_HZ: TClientDataSet;
|
||||
CDS_PRT: TClientDataSet;
|
||||
RM3: TRMGridReport;
|
||||
RMDBHZ: TRMDBDataSet;
|
||||
RMDBPRT: TRMDBDataSet;
|
||||
Panel6: TPanel;
|
||||
Label31: TLabel;
|
||||
LBCPAP: TLabel;
|
||||
BTLP: TButton;
|
||||
BTNP: TButton;
|
||||
TCBNOR: TComboBox;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label3: TLabel;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label7: TLabel;
|
||||
Label4: TLabel;
|
||||
Label10: TLabel;
|
||||
Label15: TLabel;
|
||||
MPRTCode: TEdit;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
orderNo: TEdit;
|
||||
MJID: TEdit;
|
||||
YWY: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
CPType: TComboBox;
|
||||
RKplace: TEdit;
|
||||
PRTColor: TEdit;
|
||||
GANGHAO: TEdit;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
Label11: TLabel;
|
||||
ConNo: TEdit;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
Label14: TLabel;
|
||||
CustomerNoName: TEdit;
|
||||
ToolButton1: TToolButton;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Label12: TLabel;
|
||||
ISSD: TComboBox;
|
||||
cxTabControl1: TcxTabControl;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Label13: TLabel;
|
||||
FSID: TEdit;
|
||||
Panel2: TPanel;
|
||||
Label18: TLabel;
|
||||
Label24: TLabel;
|
||||
Label25: TLabel;
|
||||
Label26: TLabel;
|
||||
Edit_RollNum_X: TEdit;
|
||||
Edit_Qty_M_X: TEdit;
|
||||
edit_Qty_Y_X: TEdit;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure BTNPClick(Sender: TObject);
|
||||
procedure BTLPClick(Sender: TObject);
|
||||
procedure TCBNORChange(Sender: TObject);
|
||||
procedure MPRTCodeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CPTypeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure orderNoChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure v1Column12PropertiesChange(Sender: TObject);
|
||||
private
|
||||
FLeft, FTop: Integer;
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
procedure InitGrid();
|
||||
procedure JsNum();
|
||||
|
||||
|
||||
|
||||
{ Private declarations }
|
||||
public
|
||||
issel: integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCKProductBCPKCListSel: TfrmCKProductBCPKCListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmCKProductBCPKCListSel.JsNum();
|
||||
var
|
||||
fMJID: string;
|
||||
fps: integer;
|
||||
fQty, fQty1: double;
|
||||
begin
|
||||
fMJID := CDS_Main.fieldbyName('MJID').AsString;
|
||||
fps := 0;
|
||||
fQty := 0;
|
||||
fQty1 := 0;
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
with CDS_Main do
|
||||
begin
|
||||
DisableControls;
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
if FieldByName('ssel').AsBoolean then
|
||||
begin
|
||||
fps := fps + 1;
|
||||
fQty := fQty + FieldByName('qty').AsFloat;
|
||||
fQty1 := fQty1 + FieldByName('KGqty').AsFloat;
|
||||
// fMoney:=fMoney+FieldByName('money').AsFloat;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
First;
|
||||
EnableControls;
|
||||
end;
|
||||
Edit_RollNum_X.Text := inttostr(fps);
|
||||
Edit_Qty_M_X.Text := floattostr(fQty);
|
||||
Edit_Qty_Y_X.Text := floattostr(fQty1);
|
||||
CDS_Main.Locate('MJID', fMJID, []);
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCKProductBCPKCListSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.FormCreate(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
BegDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
|
||||
// fsj := 'select name=distinct mjtype from wfb_mjjy order by mjtype ';
|
||||
// SInitComBoxBySql(ADOQueryCmd, CPType, False, fsj);
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.InitGrid();
|
||||
var
|
||||
fwhere, Pwhere: string;
|
||||
begin
|
||||
MovePanel2.Left := (self.Width - MovePanel2.Width) div 2;
|
||||
MovePanel2.Visible := True;
|
||||
MovePanel2.Refresh;
|
||||
if SGetFilters(Panel1, 1, 2) <> '' then
|
||||
Pwhere := ' and ' + SGetFilters(Panel1, 1, 2);
|
||||
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
begin
|
||||
Pwhere := Pwhere + ' and cptype<>''次布'' and cptype<>''次品'' and cptype<>''二级品''';
|
||||
end;
|
||||
if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
Pwhere := Pwhere + ' and cptype in(''次布'',''次品'',''二级品'') ';
|
||||
end;
|
||||
|
||||
if trim(Pwhere) <> '' then
|
||||
fwhere := ' where 1=1 ' + trim(Pwhere);
|
||||
// ShowMessage(fwhere);
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Page_FinishClothKC ');
|
||||
sql.Add('@pageIndex=' + inttostr(CurrentPage));
|
||||
sql.Add(',@pageSize=' + inttostr(RecordsNumber));
|
||||
sql.Add(',@criteria= ' + quotedstr(fwhere));
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
LBCPAP.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_Main.FieldByName('TotalCount').AsInteger / RecordsNumber));
|
||||
MovePanel2.Visible := false;
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
MovePanel2.Visible := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.Caption), Tv1, '成品仓库00');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
RecordsNumber := 500;
|
||||
ReadCxGrid(trim(self.Caption), Tv1, '成品仓库00');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
FLeft := X;
|
||||
FTop := Y;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
Clipboard.SetTextBuf(PChar(Trim(CDS_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, False);
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.BTNPClick(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage < CDS_Main.FieldByName('TotalCount').AsInteger / RecordsNumber then
|
||||
CurrentPage := CurrentPage + 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.BTLPClick(Sender: TObject);
|
||||
begin
|
||||
if CurrentPage > 1 then
|
||||
CurrentPage := CurrentPage - 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.TCBNORChange(Sender: TObject);
|
||||
begin
|
||||
RecordsNumber := StrToInt(TCBNOR.Text);
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.MPRTCodeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.CPTypeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.orderNoChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPKCListSel.v1Column12PropertiesChange(Sender: TObject);
|
||||
begin
|
||||
JsNum();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
708
发货申请(ShipmentRequest.dll)/U_CPKCTMXLIST.dfm
Normal file
708
发货申请(ShipmentRequest.dll)/U_CPKCTMXLIST.dfm
Normal file
|
|
@ -0,0 +1,708 @@
|
|||
object frmCPKCTMXLISTSEL: TfrmCPKCTMXLISTSEL
|
||||
Left = 85
|
||||
Top = 88
|
||||
Width = 1467
|
||||
Height = 725
|
||||
Caption = #25104#21697#24211#23384#36873#25321
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1451
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30830#35748
|
||||
ImageIndex = 31
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1451
|
||||
Height = 56
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 36
|
||||
Top = 21
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 1133
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
Visible = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 1165
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
Visible = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 36
|
||||
Top = 72
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26465' '#30721
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 200
|
||||
Top = 21
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #39068#33394
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 340
|
||||
Top = 21
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #32568#21495
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 472
|
||||
Top = 21
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #24211#20301
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 604
|
||||
Top = 21
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20986#24211#31867#22411
|
||||
end
|
||||
object c_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 86
|
||||
Top = 17
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnKeyPress = c_CodeKeyPress
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 1178
|
||||
Top = 9
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 1178
|
||||
Top = 33
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object MJID: TEdit
|
||||
Tag = 2
|
||||
Left = 82
|
||||
Top = 68
|
||||
Width = 109
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = c_CodeChange
|
||||
end
|
||||
object C_COLOR: TEdit
|
||||
Tag = 2
|
||||
Left = 228
|
||||
Top = 17
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnKeyPress = C_COLORKeyPress
|
||||
end
|
||||
object C_GANGNO: TEdit
|
||||
Tag = 2
|
||||
Left = 368
|
||||
Top = 17
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnKeyPress = C_GANGNOKeyPress
|
||||
end
|
||||
object C_KUWEI: TEdit
|
||||
Tag = 2
|
||||
Left = 500
|
||||
Top = 17
|
||||
Width = 100
|
||||
Height = 20
|
||||
TabOrder = 6
|
||||
OnKeyPress = C_KUWEIKeyPress
|
||||
end
|
||||
object crtype: TComboBox
|
||||
Tag = 3
|
||||
Left = 653
|
||||
Top = 16
|
||||
Width = 104
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 7
|
||||
OnChange = crtypeChange
|
||||
Items.Strings = (
|
||||
#27491#21697
|
||||
#27425#21697
|
||||
''
|
||||
'')
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 114
|
||||
Width = 1451
|
||||
Height = 290
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
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 = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #19994#21153#32452#21035
|
||||
DataBinding.FieldName = 'C_SALESCLASS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'C_YWY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'c_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'DJ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #39068#33394' '
|
||||
DataBinding.FieldName = 'C_COLOR'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'C_GANGNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'C_KUWEI'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #24211#23384#21305#25968
|
||||
DataBinding.FieldName = 'pS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Focusing = False
|
||||
Width = 80
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #24211#23384#37325#37327
|
||||
DataBinding.FieldName = 'KGQTY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 80
|
||||
end
|
||||
object v2Column6: TcxGridDBColumn
|
||||
Caption = #24211#23384#31859#25968
|
||||
DataBinding.FieldName = 'QTY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 80
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object MovePanel2: TMovePanel
|
||||
Left = 408
|
||||
Top = 192
|
||||
Width = 289
|
||||
Height = 49
|
||||
BevelInner = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 412
|
||||
Width = 1451
|
||||
Height = 274
|
||||
Align = alBottom
|
||||
Caption = 'Panel2'
|
||||
TabOrder = 4
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 1449
|
||||
Height = 272
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 0
|
||||
object TV2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn7
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn8
|
||||
end
|
||||
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 = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object TV2Column8: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSEL'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object TV2Column9: TcxGridDBColumn
|
||||
Caption = #38145#23450#29366#24577
|
||||
DataBinding.FieldName = 'isSD'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object TV2Column10: TcxGridDBColumn
|
||||
Caption = #38145#23450#26102#38388
|
||||
DataBinding.FieldName = 'sddate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object TV2Column11: TcxGridDBColumn
|
||||
Caption = #38145#23450#20154
|
||||
DataBinding.FieldName = 'sdr'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object TV2Column1: TcxGridDBColumn
|
||||
Caption = #21305#21495
|
||||
DataBinding.FieldName = 'MJXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'C_KUWEI'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object TV2Column5: TcxGridDBColumn
|
||||
Caption = #26465#30721#21495
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object cxGridDBColumn7: TcxGridDBColumn
|
||||
Caption = #37325#37327
|
||||
DataBinding.FieldName = 'KCKGQTY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn8: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'KCQTY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 80
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'C_DJ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object TV2Column2: TcxGridDBColumn
|
||||
Caption = #26816#39564#26085#26399
|
||||
DataBinding.FieldName = 'FILLTIME'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 90
|
||||
end
|
||||
object TV2Column3: TcxGridDBColumn
|
||||
Caption = #36136#26816#21592
|
||||
DataBinding.FieldName = 'FILLER'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object TV2Column4: TcxGridDBColumn
|
||||
Caption = #26426#21488#21495
|
||||
DataBinding.FieldName = 'JTTYPE'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object TV2Column6: TcxGridDBColumn
|
||||
Caption = #27425#21697#22791#27880
|
||||
DataBinding.FieldName = 'jynote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 87
|
||||
end
|
||||
object TV2Column7: TcxGridDBColumn
|
||||
Caption = #21098#26495#25968
|
||||
DataBinding.FieldName = 'JBS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = TV2
|
||||
end
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 89
|
||||
Width = 1451
|
||||
Height = 25
|
||||
Align = alTop
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 1
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#27491#21697
|
||||
#27425#21697
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 25
|
||||
ClientRectLeft = 2
|
||||
ClientRectRight = 1449
|
||||
ClientRectTop = 25
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 404
|
||||
Width = 1451
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1040
|
||||
Top = 36
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 944
|
||||
Top = 32
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 144
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 824
|
||||
Top = 448
|
||||
end
|
||||
object cds_color: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 932
|
||||
Top = 508
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = cds_color
|
||||
Left = 872
|
||||
Top = 468
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
PixelsPerInch = 96
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #40657#20307
|
||||
Font.Style = []
|
||||
end
|
||||
end
|
||||
object CDS_MX: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 792
|
||||
Top = 492
|
||||
end
|
||||
object DataSource3: TDataSource
|
||||
DataSet = CDS_MX
|
||||
Left = 864
|
||||
Top = 516
|
||||
end
|
||||
object cxStyleRepository2: TcxStyleRepository
|
||||
PixelsPerInch = 96
|
||||
object cxStyle2: TcxStyle
|
||||
AssignedValues = [svColor, svFont]
|
||||
Color = 4707838
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = #40657#20307
|
||||
Font.Style = []
|
||||
end
|
||||
end
|
||||
object cxStyleRepository3: TcxStyleRepository
|
||||
PixelsPerInch = 96
|
||||
object cxStyle3: TcxStyle
|
||||
AssignedValues = [svColor, svFont]
|
||||
Color = clSkyBlue
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 616
|
||||
Top = 504
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
end
|
||||
457
发货申请(ShipmentRequest.dll)/U_CPKCTMXLIST.pas
Normal file
457
发货申请(ShipmentRequest.dll)/U_CPKCTMXLIST.pas
Normal file
|
|
@ -0,0 +1,457 @@
|
|||
unit U_CPKCTMXLIST;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||
cxDropDownEdit, MovePanel, cxButtonEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, dxBarBuiltInMenu, cxPC, cxCheckBox, cxSplitter, Menus;
|
||||
|
||||
type
|
||||
TfrmCPKCTMXLISTSEL = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label3: TLabel;
|
||||
c_Code: TEdit;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
cxGrid2: TcxGrid;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
MJID: TEdit;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
MovePanel2: TMovePanel;
|
||||
cds_color: TClientDataSet;
|
||||
DataSource2: TDataSource;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
CDS_MX: TClientDataSet;
|
||||
DataSource3: TDataSource;
|
||||
cxStyleRepository2: TcxStyleRepository;
|
||||
cxStyle2: TcxStyle;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
TV2Column1: TcxGridDBColumn;
|
||||
TV2Column2: TcxGridDBColumn;
|
||||
TV2Column3: TcxGridDBColumn;
|
||||
TV2Column4: TcxGridDBColumn;
|
||||
TV2Column5: TcxGridDBColumn;
|
||||
TV2Column6: TcxGridDBColumn;
|
||||
TV2Column7: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
C_COLOR: TEdit;
|
||||
Label7: TLabel;
|
||||
C_GANGNO: TEdit;
|
||||
Label8: TLabel;
|
||||
C_KUWEI: TEdit;
|
||||
cxTabControl1: TcxTabControl;
|
||||
TV2Column8: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
cxStyleRepository3: TcxStyleRepository;
|
||||
cxStyle3: TcxStyle;
|
||||
crtype: TComboBox;
|
||||
cxSplitter1: TcxSplitter;
|
||||
TV2Column9: TcxGridDBColumn;
|
||||
TV2Column10: TcxGridDBColumn;
|
||||
TV2Column11: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ToolButton1: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure c_CodeChange(Sender: TObject);
|
||||
procedure v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure PRTColorChange(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure tv2FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure C_COLORKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure C_GANGNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure C_KUWEIKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure c_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure crtypeChange(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure Initsub();
|
||||
procedure Initsubb();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmCPKCTMXLISTSEL: TfrmCPKCTMXLISTSEL;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCPKCTMXLISTsel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.FormCreate(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
BegDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
fsj := 'select distinct name=crtype from CK_BanCP_CR where crflag=''出库'' order by crtype ';
|
||||
SInitComBoxBySql(ADOQueryCmd, crtype, False, fsj);
|
||||
|
||||
CRType.ItemIndex := CRType.Items.IndexOf('销售出库');
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.InitGrid();
|
||||
var
|
||||
fwhere, Pwhere: string;
|
||||
begin
|
||||
Pwhere := SGetFilters(Panel1, 1, 2);
|
||||
|
||||
if SGetFilters(Panel1, 1, 2) <> '' then
|
||||
Pwhere := ' and ' + SGetFilters(Panel1, 1, 2);
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('EXEC P_View_cpkcMX2 ');
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
begin
|
||||
SQL.Add('@DJ=''正品''');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
SQL.Add('@DJ=''次品''');
|
||||
end
|
||||
else
|
||||
begin
|
||||
SQL.Add('@DJ=''''');
|
||||
end;
|
||||
if CRTYPE.Text <> '' then
|
||||
begin
|
||||
SQL.Add(',@CKTYPE=' + QuotedStr(Trim(CRTYPE.Text)));
|
||||
end
|
||||
else
|
||||
begin
|
||||
SQL.Add(',@CKTYPE=''''');
|
||||
end;
|
||||
|
||||
if Pwhere <> '' then
|
||||
begin
|
||||
SQL.Add(',@mssql=' + QuotedStr(Pwhere));
|
||||
end;
|
||||
|
||||
// ShowMessage(sql.Text);
|
||||
// SQL.Add('select sum(KCKGQTY)KGQTY,SUM(KCQTY) QTY,COUNT(MJID)pS,C_CODE,C_COLOR,C_GANGNO,C_KUWEI,C_SALESCLASS,C_YWY, ');
|
||||
// SQL.Add('(CASE WHEN C_DJ=''次品'' or c_dj=''次布'' then ''次品'' else ''正品'' end)dj');
|
||||
// sql.Add('FROM CK_BanCP_KC WHERE KCVALID=''Y'' ');
|
||||
// SQL.ADD('group by C_SALESCLASS,C_YWY,C_CODE,C_COLOR,C_GANGNO,C_KUWEI ,(CASE WHEN C_DJ=''次品'' or c_dj=''次布'' then ''次品'' else ''正品'' end)');
|
||||
// if cxTabControl1.TabIndex = 0 then
|
||||
// begin
|
||||
// SQL.Add('and C_DJ<>''次品'' and c_dj<>''次布''');
|
||||
// end
|
||||
// else if cxTabControl1.TabIndex = 1 then
|
||||
// begin
|
||||
// SQL.Add('and C_DJ in (''次品'',''次布'')');
|
||||
// end;
|
||||
// showmessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.InitSUB();
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.DisableControls;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
SQL.Add('SELECT B.FILLER,A.KCKGQTY,A.KCQTY,A.C_DJ,A.MJID,B.JTTYPE,B.FILLTIME,A.C_KUWEI,B.MJXH,b.jynote,b.jbs,A.C_ORDERNO,B.MAINID ,B.SUBID ');
|
||||
SQL.Add(',isSD=(CASE WHEN ((SELECT COUNT (MJID ) FROM FHSQ_Sub g inner join FHSQ_Main f on f.fsid=g.fsid where g.mjid=A.mjid');
|
||||
SQL.Add('and f.sqtype<>''调样'' AND F.Status<>''已取消'' )>=(select Cycle from CK_BanCP_KC k where k.mjid=A.mjid)) OR ((SELECT COUNT(MJID) FROM CK_SXPB_CR_mx K inner join CK_SXPB_CR J ON K.FSID=J.SPID WHERE K.MJID=A.MJID AND ISNULL(K.YCJ,'''')<>''1''');
|
||||
SQL.Add('AND CRType=''客户检验'')>0) then ''已锁定'' else ''未锁定'' end)');
|
||||
SQL.Add(',sdr=(select top 1 f.filler from FHSQ_Main f inner join FHSQ_Sub g on f.fsid=g.fsid where g.mjid=A.mjid and f.sqtype<>''调样'' AND F.Status<>''已取消'' order by F.filltime desc)');
|
||||
SQL.Add(',sddate=(select top 1 f.FillTime from FHSQ_Main f inner join FHSQ_Sub g on f.fsid=g.fsid where g.mjid=A.mjid and f.sqtype<>''调样'' AND F.Status<>''已取消'' order by F.filltime desc )');
|
||||
SQL.Add(' ,SCSPRICE=(SELECT SCSPRICE FROM SalesContract_Sub E WHERE E.SUBID=(SELECT CONSUBID FROM JYORDER_SUB H WHERE H.SUBID=B.SUBID ))');
|
||||
SQL.Add(' FROM CK_BanCP_KC A INNER JOIN WFB_MJJY B ON A.MJID=B.MJID');
|
||||
SQL.Add(' WHERE 1=1 '); //KCVALID=''Y''
|
||||
SQL.Add('AND ISNULL(C_CODE,'''')=' + QuotedStr(Trim(CDS_Main.fieldbyname('C_CODE').AsString)));
|
||||
SQL.Add('AND ISNULL(C_COLOR,'''')=' + QuotedStr(Trim(CDS_Main.fieldbyname('C_COLOR').AsString)));
|
||||
SQL.Add('AND ISNULL(C_GANGNO,'''')=' + QuotedStr(Trim(CDS_Main.fieldbyname('C_GANGNO').AsString)));
|
||||
SQL.Add('AND ISNULL(C_SALESCLASS,'''')=' + QuotedStr(Trim(CDS_Main.fieldbyname('C_SALESCLASS').AsString)));
|
||||
SQL.Add('AND ISNULL(C_YWY,'''')=' + QuotedStr(Trim(CDS_Main.fieldbyname('C_YWY').AsString)));
|
||||
SQL.Add('AND ISNULL(C_KUWEI,'''')=' + QuotedStr(Trim(CDS_Main.fieldbyname('C_KUWEI').AsString)));
|
||||
SQL.Add('AND (CASE WHEN C_DJ=''次品'' or c_dj=''次布'' then ''次品'' else ''正品'' end)=' + QuotedStr(Trim(CDS_Main.fieldbyname('DJ').AsString)));
|
||||
SQL.Add('and KCVALID=''Y''');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryCmd, cds_color);
|
||||
SInitCDSData20(ADOQueryCmd, cds_color);
|
||||
finally
|
||||
ADOQueryCmd.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.InitSUBb();
|
||||
begin
|
||||
try
|
||||
ADOQueryTemp.DisableControls;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select ISNULL(C_CODE,'''')C_CODE,ISNULL(C_COLOR,'''')C_COLOR,ISNULL(C_GANGNO,'''')C_GANGNO,C_DJ');
|
||||
sql.Add(',sum(ISNULL(KCKGQty,0))ZPKCKGQty,sum(ISNULL(KCQty,0))ZPKCQty,count(mjid)ZPps');
|
||||
SQL.Add(' from CK_BanCP_KC A where kcvalid=''Y''');
|
||||
SQL.Add(' and a.Cycle=(select max(e.Cycle) from CK_BanCP_CR e where e.mjid=a.mjid)');
|
||||
SQL.Add('AND C_CODE=' + QuotedStr(Trim(cds_color.fieldbyname('C_CODE').AsString)));
|
||||
SQL.Add('AND C_COLOR=' + QuotedStr(Trim(cds_color.fieldbyname('C_COLOR').AsString)));
|
||||
SQL.Add('group by C_CODE,C_COLOR,C_GANGNO,C_DJ');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, cds_mx);
|
||||
SInitCDSData20(ADOQueryTemp, cds_mx);
|
||||
finally
|
||||
ADOQueryTemp.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
//BegDate.SetFocus;
|
||||
MovePanel2.Visible := True;
|
||||
MovePanel2.Refresh;
|
||||
InitGrid();
|
||||
MovePanel2.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
WriteCxGrid(trim(self.Caption), Tv1, '成品仓库');
|
||||
// WriteCxGrid(trim(self.Caption), Tv2, '成品仓库');
|
||||
// WriteCxGrid(trim(self.Caption), Tv3, '成品仓库');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(trim(self.Caption), Tv1, '成品仓库');
|
||||
// ReadCxGrid(trim(self.Caption), Tv2, '成品仓库');
|
||||
// ReadCxGrid(trim(self.Caption), Tv3, '成品仓库');
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
exit;
|
||||
TcxGridToExcel('库存汇总列表', cxGrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.c_CodeChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'SOrdDefStr10';
|
||||
flagname := '库存存放地点';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SOrdDefStr10').Value := Trim(ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update JYOrder_Sub Set SOrdDefStr10=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
|
||||
sql.Add(' where SubId=''' + Trim(Self.CDS_Main.fieldbyname('SubId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.PRTColorChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
if CDS_Main.IsEmpty = True then
|
||||
Exit;
|
||||
Initsub();
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.tv2FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
// if CDS_COLOR.IsEmpty = True then
|
||||
// Exit;
|
||||
// initsubb();
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.C_COLORKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.C_GANGNOKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.C_KUWEIKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.c_CodeKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.crtypeChange(Sender: TObject);
|
||||
begin
|
||||
initgrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(cds_color, True);
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(cds_color, False);
|
||||
end;
|
||||
|
||||
procedure TfrmCPKCTMXLISTSEL.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_color.IsEmpty then
|
||||
exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
527
发货申请(ShipmentRequest.dll)/U_CPManageFMSel.dfm
Normal file
527
发货申请(ShipmentRequest.dll)/U_CPManageFMSel.dfm
Normal file
|
|
@ -0,0 +1,527 @@
|
|||
object frmCPManageFMSel: TfrmCPManageFMSel
|
||||
Left = 128
|
||||
Top = 81
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_ShipmentRequest.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_ShipmentRequest.Red
|
||||
Styles.Selection = DataLink_ShipmentRequest.Red
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.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
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTree
|
||||
Left = 91
|
||||
Top = 147
|
||||
end
|
||||
object ADOQueryTree20: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 61
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 989
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.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_ShipmentRequest.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_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 479
|
||||
Top = 256
|
||||
end
|
||||
end
|
||||
471
发货申请(ShipmentRequest.dll)/U_CPManageFMSel.pas
Normal file
471
发货申请(ShipmentRequest.dll)/U_CPManageFMSel.pas
Normal file
|
|
@ -0,0 +1,471 @@
|
|||
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;
|
||||
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.
|
||||
530
发货申请(ShipmentRequest.dll)/U_CPManageSel.dfm
Normal file
530
发货申请(ShipmentRequest.dll)/U_CPManageSel.dfm
Normal file
|
|
@ -0,0 +1,530 @@
|
|||
object frmCPManageSel: TfrmCPManageSel
|
||||
Left = 128
|
||||
Top = 81
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
Flat = True
|
||||
Images = DataLink_ShipmentRequest.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 = 622
|
||||
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 = 622
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object cxDBTreeList1: TcxDBTreeList
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 216
|
||||
Height = 618
|
||||
Align = alClient
|
||||
Bands = <
|
||||
item
|
||||
end>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.ParentField = 'CPParent'
|
||||
DataController.KeyField = 'CPID'
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OptionsBehavior.ExpandOnDblClick = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.CellAutoHeight = True
|
||||
OptionsView.Headers = False
|
||||
RootValue = -1
|
||||
Styles.Inactive = DataLink_ShipmentRequest.Red
|
||||
Styles.Selection = DataLink_ShipmentRequest.Red
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.Red
|
||||
TabOrder = 0
|
||||
OnDblClick = cxDBTreeList1DblClick
|
||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||
DataBinding.FieldName = 'CPName'
|
||||
Width = 210
|
||||
Position.ColIndex = 0
|
||||
Position.RowIndex = 0
|
||||
Position.BandIndex = 0
|
||||
Summary.FooterSummaryItems = <>
|
||||
Summary.GroupFooterSummaryItems = <>
|
||||
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
|
||||
OnDblClick = Tv1DblClick
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
Navigator.Buttons.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
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryTree
|
||||
Left = 91
|
||||
Top = 147
|
||||
end
|
||||
object ADOQueryTree20: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 61
|
||||
Top = 145
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 989
|
||||
Top = 1
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.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_ShipmentRequest.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_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 479
|
||||
Top = 256
|
||||
end
|
||||
end
|
||||
472
发货申请(ShipmentRequest.dll)/U_CPManageSel.pas
Normal file
472
发货申请(ShipmentRequest.dll)/U_CPManageSel.pas
Normal file
|
|
@ -0,0 +1,472 @@
|
|||
unit U_CPManageSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin,
|
||||
StdCtrls, cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
||||
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox,jpeg,U_SLT,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmCPManageSel = 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;
|
||||
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
|
||||
frmCPManageSel: TfrmCPManageSel;
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_FileUp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCPManageSel.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 TfrmCPManageSel.InitGrid();
|
||||
begin
|
||||
Panel2.Visible:=True;
|
||||
Panel2.Refresh;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('exec P_Select_CP_YDang :Code,:PState,:CYType');
|
||||
Parameters.ParamByName('Code').Value:='';
|
||||
Parameters.ParamByName('PState').Value:=0;
|
||||
Parameters.ParamByName('CYType').Value:=Trim(ADOQueryTree.fieldbyname('CPID').AsString);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Panel2.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmCPManageSel:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
i,j:integer;
|
||||
begin
|
||||
j:=length(Mach);
|
||||
if j>0 then
|
||||
begin
|
||||
for i:=0 to j-1 do
|
||||
begin
|
||||
Mach[i].free;
|
||||
end;
|
||||
end;
|
||||
SetLength(Mach, 0);
|
||||
// writeCxGrid(self.Caption+tv1.Name,tv1);
|
||||
// Application := mainApplication;
|
||||
action:=cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.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 TfrmCPManageSel.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 TfrmCPManageSel.cxDBTreeList1DblClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
InitGrid();
|
||||
//TJGS();
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.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 TfrmCPManageSel.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 TfrmCPManageSel.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 TfrmCPManageSel.ToolButton4Click(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.ReadINIFile();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
FileName:string;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||
programIni.Free;
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
{ with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').asstring)+'''');
|
||||
Open;
|
||||
end;
|
||||
CPID:=Trim(ADOQueryTemp.fieldbyname('CYType').AsString);
|
||||
ADOQueryTree.Locate('CPID',CPID,[]); }
|
||||
InitImage();
|
||||
end;
|
||||
procedure TfrmCPManageSel.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 TfrmCPManageSel.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
{if Key= then
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
if Application.MessageBox('确定6666要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
if Trim(CDS_Main.fieldbyname('CYID').AsString)<>'' then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('delete CP_YDang where CYID='''+Trim(CDS_Main.fieldbyname('CYID').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
CDS_Main.Delete;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmCPManageSel.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 TfrmCPManageSel.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 TfrmCPManageSel.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 TfrmCPManageSel.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 TfrmCPManageSel.Tv1DblClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then Exit;
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
||||
657
发货申请(ShipmentRequest.dll)/U_CWOutHZList.dfm
Normal file
657
发货申请(ShipmentRequest.dll)/U_CWOutHZList.dfm
Normal file
|
|
@ -0,0 +1,657 @@
|
|||
object frmCWOutHZList: TfrmCWOutHZList
|
||||
Left = 100
|
||||
Top = 55
|
||||
Width = 1556
|
||||
Height = 736
|
||||
Caption = #36130#21153#30721#21333#23548#20986
|
||||
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 = 1540
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 95
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ShipmentRequest.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 TBExport: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 315
|
||||
Top = 3
|
||||
Width = 172
|
||||
Height = 24
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemHeight = 16
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Text = #20986#24211#30721#21333'1'
|
||||
Visible = False
|
||||
Items.Strings = (
|
||||
#20986#24211#30721#21333'1'
|
||||
#20986#24211#30721#21333'2'
|
||||
#20986#24211#30721#21333'3')
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 487
|
||||
Top = 0
|
||||
Caption = #25171#21360#20986#24211#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1540
|
||||
Height = 60
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 28
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26597#35810#26102#38388
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 64
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 189
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 190
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #19994' '#21153' '#21592
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 357
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23458' '#25143
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 32
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 3
|
||||
end
|
||||
object SPrtCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 246
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = PrtCodeNameChange
|
||||
end
|
||||
object Salesman: TEdit
|
||||
Tag = 2
|
||||
Left = 246
|
||||
Top = 32
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnChange = SalesmanChange
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 409
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = PrtCodeNameChange
|
||||
end
|
||||
end
|
||||
object MovePanel2: TMovePanel
|
||||
Left = 344
|
||||
Top = 192
|
||||
Width = 289
|
||||
Height = 49
|
||||
BevelInner = bvLowered
|
||||
Caption = #27491#22312#25191#34892#25968#25454#25805#20316#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 92
|
||||
Width = 1540
|
||||
Height = 605
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
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 = skSum
|
||||
end
|
||||
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 = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #30003#35831#26085#26399
|
||||
DataBinding.FieldName = 'SQDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 85
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'ganghao'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPS'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 122
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #21457#36135#38271#24230
|
||||
DataBinding.FieldName = 'FHms'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #21457#36135#37325#37327
|
||||
DataBinding.FieldName = 'FHQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'PRICE'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 92
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #21253#32568#36153
|
||||
DataBinding.FieldName = 'BGFEE'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 100
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'money'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 85
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 87
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'unit1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #36865#36135#21333#21495
|
||||
DataBinding.FieldName = 'fsid'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 87
|
||||
end
|
||||
object v1OrdPerson1: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'Salesman'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 74
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #21046#21333#20154
|
||||
DataBinding.FieldName = 'FILLER'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 99
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 16
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 936
|
||||
Top = 16
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1024
|
||||
Top = 16
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 784
|
||||
Top = 248
|
||||
end
|
||||
object CDS_Main1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 568
|
||||
Top = 280
|
||||
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 = 362
|
||||
Top = 218
|
||||
ReportData = {}
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 256
|
||||
Top = 260
|
||||
end
|
||||
object ADOQueryDH: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 703
|
||||
Top = 267
|
||||
end
|
||||
object CDS_Juan: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 272
|
||||
Top = 216
|
||||
end
|
||||
object CDS_JuanPRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 432
|
||||
Top = 288
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_JuanPRT
|
||||
Left = 320
|
||||
Top = 216
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 443
|
||||
Top = 134
|
||||
end
|
||||
object CDS_Label: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 243
|
||||
Top = 142
|
||||
end
|
||||
end
|
||||
857
发货申请(ShipmentRequest.dll)/U_CWOutHZList.pas
Normal file
857
发货申请(ShipmentRequest.dll)/U_CWOutHZList.pas
Normal file
|
|
@ -0,0 +1,857 @@
|
|||
unit U_CWOutHZList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||
cxDropDownEdit, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System,
|
||||
RM_GridReport, cxCheckBox, Menus, MovePanel, BtnEdit, cxCalendar,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmCWOutHZList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main1: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
Label10: TLabel;
|
||||
SPrtCodeName: TEdit;
|
||||
MovePanel2: TMovePanel;
|
||||
Label5: TLabel;
|
||||
Salesman: TEdit;
|
||||
ADOQueryDH: TADOQuery;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
Label14: TLabel;
|
||||
CustomerNoName: TEdit;
|
||||
CDS_Juan: TClientDataSet;
|
||||
CDS_JuanPRT: TClientDataSet;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1OrdPerson1: TcxGridDBColumn;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
ToolButton2: TToolButton;
|
||||
CDS_Main: TClientDataSet;
|
||||
CDS_Label: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure MPRTCodeNameChange(Sender: TObject);
|
||||
|
||||
procedure PrtCodeNameChange(Sender: TObject);
|
||||
|
||||
procedure CheJianChange(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure v1Column4PropertiesChange(Sender: TObject);
|
||||
procedure SalesmanChange(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
private
|
||||
procedure InitGrid();
|
||||
function YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
procedure GetLotData();
|
||||
procedure GetLotDataPT();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
canshu1: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmCWOutHZList: TfrmCWOutHZList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmCWOutHZList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
// frmPBOutHZList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
BegDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp)
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_View_CWMD @Begdate=' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', Begdate.DateTime))));
|
||||
sql.Add(' ,@enddate=' + quotedstr(trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1))));
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Self.Caption + '1', Tv1, '坯布仓库9');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
ReadCxGrid(Self.Caption + '1', Tv1, '坯布仓库9');
|
||||
|
||||
// ShowMessage(Self.Caption);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
exit;
|
||||
SelExportData(Tv1, ADOQueryMain, '财务码单');
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.MPRTCodeNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.GetLotDataPT();
|
||||
var
|
||||
FPCode, FColor, FBaoNo, FHZ, fPrintFile, FPlanNo, PCodeColor, JSKHConNo: string;
|
||||
i, ii, j, z, bb, hh: Integer;
|
||||
XJ: Double;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select defStr0=Cast('''' as varchar(20)), defstr1=Cast(0 as decimal(18,2)),defstr2=Cast(0 as decimal(18,2))');
|
||||
sql.add(',defstr3=Cast(0 as decimal(18,2)),defstr4=Cast(0 as decimal(18,2)),defstr5=Cast(0 as decimal(18,2))');
|
||||
sql.add(',defstr6=Cast(0 as decimal(18,2)),defstr7=Cast(0 as decimal(18,2)),defstr8=Cast(0 as decimal(18,2))');
|
||||
sql.add(',defstr9=Cast(0 as decimal(18,2)),defstr10=Cast(0 as decimal(18,2))');
|
||||
sql.Add(',DefJ1=Cast(0 as int),DefJ2=Cast(0 as int),DefJ3=Cast(0 as int),DefJ4=Cast(0 as int)');
|
||||
sql.Add(',DefJ5=Cast(0 as int),DefJ6=Cast(0 as int),DefJ7=Cast(0 as int),DefJ8=Cast(0 as int)');
|
||||
sql.Add(',DefJ9=Cast(0 as int),DefJ10=Cast(0 as int)');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryPrint, CDS_JuanPRT);
|
||||
if CDS_JuanPRT.IsEmpty = False then
|
||||
begin
|
||||
CDS_JuanPRT.Delete;
|
||||
end;
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
for z := 1 to 10 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('defStr0').Value := IntToStr(z);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.KGQty,JQty=1 ');
|
||||
sql.Add(' from CK_PBCP_CR A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
sql.Add(' and A.CRFlag=''出库'' ');
|
||||
SQL.Add(' and CKOrdNo=''' + Trim(CDS_Main.fieldbyname('CKOrdNo').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
ii := ADOQueryTemp.RecordCount;
|
||||
ii := ii div 100;
|
||||
ii := ii + 1;
|
||||
bb := ii;
|
||||
|
||||
i := 1;
|
||||
j := 1;
|
||||
hh := 0;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if i < 11 then
|
||||
begin
|
||||
CDS_JuanPRT.Locate('defstr0', IntToStr(i + hh * 10), []);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('defstr' + Trim(inttostr(j))).Value := ADOQueryTemp.fieldbyname('KGQty').Value;
|
||||
FieldByName('DefJ' + Trim(inttostr(j))).Value := 1;
|
||||
Post;
|
||||
end;
|
||||
i := i + 1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
j := j + 1;
|
||||
if j < 11 then
|
||||
begin
|
||||
CDS_JuanPRT.Locate('defstr0', IntToStr(1 + hh * 10), []);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('defstr' + Trim(inttostr(j))).Value := ADOQueryTemp.fieldbyname('KGQty').Value;
|
||||
FieldByName('DefJ' + Trim(inttostr(j))).Value := 1;
|
||||
Post;
|
||||
end;
|
||||
i := 2;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if bb = ii then
|
||||
begin
|
||||
hh := 1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
hh := hh + 1;
|
||||
end;
|
||||
if hh < ii then
|
||||
begin
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
for z := 1 + hh * 10 to 10 + hh * 10 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('defStr0').Value := IntToStr(z);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
bb := -1;
|
||||
CDS_JuanPRT.Locate('defstr0', Trim(IntToStr(1 + hh * 10)), []);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('defstr1').Value := ADOQueryTemp.fieldbyname('KGQty').Value;
|
||||
FieldByName('DefJ' + Trim(inttostr(j - (10)))).Value := 1;
|
||||
Post;
|
||||
end;
|
||||
i := 2;
|
||||
j := 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_JuanPRT.DisableControls;
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
CDS_JuanPRT.Edit;
|
||||
if (CDS_JuanPRT.FieldByName('defstr0').AsInteger mod 10) <> 0 then
|
||||
CDS_JuanPRT.FieldByName('defstr0').Value := IntToStr(CDS_JuanPRT.FieldByName('defstr0').AsInteger mod 10)
|
||||
else
|
||||
CDS_JuanPRT.FieldByName('defstr0').Value := '10';
|
||||
CDS_JuanPRT.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_JuanPRT.EnableControls;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.GetLotData();
|
||||
var
|
||||
XHLie, XHHang: Integer;
|
||||
FHZ: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select AA.* ');
|
||||
sql.Add('from(select gangno=B.CarNo,B.MJXH,MJMaoZ=A.KgQty,A.MainId,C.C_Color,C.BatchNoHZ');
|
||||
sql.Add(' ,GQty=(select sum(MJMaoZ) from CK_PBCP_CR CR inner join WFB_MJJY_PB XH on CR.MJID=XH.MJID ');
|
||||
sql.add(' where CR.CKOrdNo=A.CKOrdNo and XH.CarNo=B.CarNo and XH.MainId=B.MainId ) ');
|
||||
sql.Add(' ,GPS=(select count(*) from CK_PBCP_CR CR inner join WFB_MJJY_PB XH on CR.MJID=XH.MJID ');
|
||||
sql.add(' where CR.CKOrdNo=A.CKOrdNo and XH.CarNo=B.CarNo and XH.MainId=B.MainId) ');
|
||||
sql.add(' from CK_PBCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY_PB B on A.MJID=B.MJID ');
|
||||
sql.Add(' inner join Cloth_Sub C on B.SubId=C.SubId');
|
||||
sql.Add(' where A.CKOrdNo=''' + Trim(CDS_Main.fieldbyname('CKOrdNo').AsString) + '''');
|
||||
sql.Add(' )AA order by MainId,Cast(GangNo as int),MJXH');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Juan);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Juan);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select');
|
||||
sql.Add(' PCode=Cast('''' as varchar(20)),ColorNo=Cast('''' as varchar(20)),');
|
||||
sql.Add(' GangNo=Cast('''' as varchar(20)),MainId=Cast('''' as varchar(20)),');
|
||||
sql.Add(' LenQty0=Cast(0.00 as decimal(18,1)),LenQty1=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty2=Cast(0.00 as decimal(18,1)),LenQty3=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty4=Cast(0.00 as decimal(18,1)),LenQty5=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty6=Cast(0.00 as decimal(18,1)),LenQty7=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty8=Cast(0.00 as decimal(18,1)),LenQty9=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty10=Cast(0.00 as decimal(18,1)),LenQty11=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' MJPS0=Cast(0 as int),MJPS1=Cast(0 as int),');
|
||||
sql.Add(' MJPS2=Cast(0 as int),MJPS3=Cast(0 as int),');
|
||||
sql.Add(' MJPS4=Cast(0 as int),MJPS5=Cast(0 as int),');
|
||||
sql.Add(' MJPS6=Cast(0 as int),MJPS7=Cast(0 as int),');
|
||||
sql.Add(' MJPS8=Cast(0 as int),MJPS9=Cast(0 as int),');
|
||||
sql.Add(' MJPS10=Cast(0 as int),MJPS11=Cast(0 as int),');
|
||||
sql.Add(' JuanQty=Cast(0 as int),GPS=Cast(0 as int),GQty=Cast(0 as decimal(18,1)),');
|
||||
sql.Add(' GPrice=Cast(0 as decimal(18,2)),GMoney=Cast(0 as decimal(18,2)),');
|
||||
sql.Add(' PCodeColorNo=cast('''' as varchar(50)),Hang=Cast(0 as int),');
|
||||
sql.Add(' PCodeColorNoG=cast('''' as varchar(50))');
|
||||
sql.Add(' ,BatchNoHZ=cast('''' as varchar(50))');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
if CDS_JuanPRT.IsEmpty = False then
|
||||
begin
|
||||
CDS_JuanPRT.Delete;
|
||||
end;
|
||||
CDS_Juan.DisableControls;
|
||||
with CDS_Juan do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
if CDS_JuanPRT.IsEmpty then
|
||||
begin
|
||||
XHLie := 0;
|
||||
XHHang := 0;
|
||||
CDS_JuanPRT.Append;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('MainId').Value := CDS_Juan.fieldbyname('MainId').Value;
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('MainId').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
CDS_JuanPRT.Post;
|
||||
FHZ := Trim(CDS_Juan.fieldbyname('MainId').AsString) + Trim(CDS_Juan.fieldbyname('gangno').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (Trim(CDS_Juan.fieldbyname('MainId').AsString) + Trim(CDS_Juan.fieldbyname('GangNo').AsString)) <> FHZ then
|
||||
begin
|
||||
XHLie := 0;
|
||||
XHHang := 0;
|
||||
CDS_JuanPRT.Append;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('MainId').Value := CDS_Juan.fieldbyname('MainId').Value;
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('MainId').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
CDS_JuanPRT.Post;
|
||||
FHZ := Trim(CDS_Juan.fieldbyname('MainId').AsString) + Trim(CDS_Juan.fieldbyname('GangNo').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
XHLie := XHLie + 1;
|
||||
if XHLie < 10 then
|
||||
begin
|
||||
CDS_JuanPRT.Locate('Mainid;GangNo;Hang', VarArrayOf([Trim(CDS_Juan.fieldbyname('Mainid').AsString), Trim(CDS_Juan.fieldbyname('GangNo').AsString), XHHang]), [loPartialKey]);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('Mainid').Value := CDS_Juan.fieldbyname('Mainid').Value;
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('Mainid').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
Post;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
XHLie := 0;
|
||||
XHHang := XHHang + 1;
|
||||
CDS_JuanPRT.Append;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('Mainid').Value := CDS_Juan.fieldbyname('Mainid').Value;
|
||||
//CDS_JuanPRT.FieldByName('PCodeColorNo').Value:=' '+Trim(CDS_Juan.fieldbyname('PCode').AsString)+'#'
|
||||
//+Trim(CDS_Juan.fieldbyname('ColorNo').AsString);
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('Mainid').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
CDS_JuanPRT.Post;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_Juan.EnableControls;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function TfrmCWOutHZList.YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
var
|
||||
CRID, YFID, Price, PriceUnit, OrderUnit: string;
|
||||
begin
|
||||
Result := False;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 * from JYOrder_Sub Where Mainid=''' + Trim(Order_Main10.fieldbyname('MainId').AsString) + '''');
|
||||
//sql.Add(' and PRTPrice>0');
|
||||
Open;
|
||||
end;
|
||||
{Price:=ADOQueryTemp.fieldbyname('PRTPrice').AsString;
|
||||
if Trim(Price)='' then
|
||||
begin
|
||||
Price:='0';
|
||||
end; }
|
||||
PriceUnit := Trim(ADOQueryTemp.fieldbyname('PriceUnit').AsString);
|
||||
OrderUnit := Trim(ADOQueryTemp.fieldbyname('OrderUnit').AsString);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from YF_Money_KC where FactoryName=''' + Trim(Order_Main10.fieldbyname('KHName').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
CRID := ADOQueryTemp.fieldbyname('CRID').AsString;
|
||||
end
|
||||
else
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||
sql.Add('select * from YF_Money_CRID ');
|
||||
Open;
|
||||
end;
|
||||
CRID := ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CRID').Value := StrToInt(CRID);
|
||||
FieldByName('FactoryName').Value := Trim(Order_Main10.fieldbyname('KHName').AsString);
|
||||
FieldByName('ZdyStr1').Value := '应收收';
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where FactoryName=''' + Trim(Order_Main10.fieldbyname('KHName').AsString) + '''');
|
||||
sql.Add(' and YFTypeId=''' + Trim(Order_Main10.fieldbyname('Mainid').AsString) + '''');
|
||||
sql.Add(' and Price=''' + Trim(Order_Main10.fieldbyname('PRTPrice').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, YFID, 'CS', 'YF_Money_CR', 3, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取坯布应付最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
{with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('YFID').Value:=Trim(YFID);
|
||||
FieldByName('YFTypeId').Value:=Trim(Order_Main10.fieldbyname('MainId').AsString);
|
||||
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('CRType').Value:='应收款登记';
|
||||
FieldByName('CRFlag').Value:='应收收';
|
||||
FieldByName('QtyFlag').Value:=1;
|
||||
FieldByName('FactoryName').Value:=Trim(Order_Main10.fieldbyname('KHName').AsString);
|
||||
FieldByName('CRTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
FieldByName('YFType').Value:='自动生成';
|
||||
FieldByName('Price').Value:=Price;
|
||||
//FieldByName('HuiLv').Value:=1;
|
||||
FieldByName('BZType').Value:=Trim(PriceUnit);
|
||||
FieldByName('QtyUnit').Value:=Trim(OrderUnit);
|
||||
FieldByName('YFName').Value:='销售金额';
|
||||
FieldByName('MainId').Value:=Trim(Order_Main10.fieldbyname('Mainid').AsString);
|
||||
Post;
|
||||
end; }
|
||||
end
|
||||
else
|
||||
begin
|
||||
YFID := Trim(ADOQueryTemp.fieldbyname('YFID').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(Qty),0) from CK_BanCP_CR A ');
|
||||
sql.Add(' inner join JYOrder_Sub B on A.SubId=B.SubId where');
|
||||
SQL.Add(' A.MainId=YF_Money_CR.YFTypeId and A.CRType=''正常出库'' and CPType=''正品'' ');
|
||||
SQL.Add(' and B.PRTPrice=YF_Money_CR.Price)');
|
||||
sql.Add(',PS=(select isnull(count(*),0) from CK_BanCP_CR A ');
|
||||
sql.Add(' inner join JYOrder_Sub B on A.SubId=B.SubId where');
|
||||
SQL.Add(' A.MainId=YF_Money_CR.YFTypeId and A.CRType=''正常出库'' and CPType=''正品'' ');
|
||||
SQL.Add(' and B.PRTPrice=YF_Money_CR.Price )');
|
||||
sql.Add(' where YFTypeId=''' + Trim(Order_Main10.fieldbyname('Mainid').AsString) + '''');
|
||||
sql.Add(' and Price=' + Order_Main10.fieldbyname('PRTPrice').AsString);
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YF_Money_CR Set Money=Price*Qty,BBMoney=Price*Qty*HuiLv');
|
||||
sql.Add(' where YFID=''' + Trim(YFID) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||
sql.Add(' where CRID=' + CRID);
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where YFId=''' + Trim(YFID) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.FieldByName('Qty').Value = 0 then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from YF_Money_CR where YFID=''' + Trim(YFID) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where CRId=' + CRID);
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from YF_Money_KC where CRId=' + CRID);
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.PrtCodeNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmCWOutHZList.CheJianChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
EXIT;
|
||||
ExportFtErpFile(trim(ComboBox1.Text) + '.rmf', ADOQueryTemp);
|
||||
|
||||
if trim(ComboBox1.Text) = '出库码单1' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMD4 @FSID=' + quotedstr(Trim(CDS_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
if trim(ComboBox1.Text) = '出库码单2' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMD2 @CKOrdNo=' + quotedstr(Trim(CDS_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ComboBox1.Text) + '.rmf';
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('UPDATE FHSQ_Main SET DYCS=ISNULL(DYCS,0)+1 WHERE FSID=' + quotedstr(Trim(CDS_Main.fieldbyname('FSID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
// RMVariables['OrdNo'] := Trim(CDS_Main.fieldbyname('OrdNo').AsString);
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete TBSubID where DName=''' + Trim(DCode) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('SELECT * FROM TBSubID where 1=2 ');
|
||||
open;
|
||||
end;
|
||||
CDS_Main.DisableControls;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_Main.Fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
ADOQueryCmd.append;
|
||||
ADOQueryCmd.fieldbyname('SubId').Value := Trim(CDS_Main.fieldbyname('CKOrdNo').AsString);
|
||||
ADOQueryCmd.fieldbyname('Dname').Value := Trim(DCode);
|
||||
ADOQueryCmd.post;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
|
||||
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select D.ConNo orderno,count(B.MJXH) ps,sum(A.KgQty) mz,C.C_Color,C.BatchNoHZ');
|
||||
// sql.Add(' from CK_PBCP_CR A');
|
||||
// sql.Add(' inner join WFB_MJJY_PB B on A.MJID=B.MJID');
|
||||
// sql.Add(' inner join Cloth_Sub C on B.SubId=C.SubId');
|
||||
// sql.Add(' inner join Cloth_Main D on D.MainId=C.MainId');
|
||||
// SQL.Add(' where A.CKOrdNo='+quotedstr(Trim(CDS_Main.fieldbyname('CKOrdNo').AsString)));
|
||||
// SQL.Add(' group by D.ConNo,C.C_Color,C.BatchNoHZ ');
|
||||
// SQL.Add(' order by D.ConNo,C.C_Color,C.BatchNoHZ');
|
||||
// Open;
|
||||
// end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select MAX(A.FHDate) MJDate,A.SHDanWei,A.CRType,A.TruckId,B.PrtCode,B.PrtCodeName,B.prtspec,C.CustomerNoName');
|
||||
sql.Add(' ,G.ConNo,F.C_Color,F.BatchNoHZ,count(E.MJXH) ps,sum(D.KgQty) mz');
|
||||
sql.Add(' from FHSQ_Main A inner join JYOrderCon_Sub_PB B on A.ConSubId=B.SubId');
|
||||
sql.Add(' inner join JYOrderCon_Main_PB C on B.MainId=C.MainId');
|
||||
sql.Add(' inner join CK_PBCP_CR D on D.CKOrdNo=A.FSId');
|
||||
sql.Add(' inner join WFB_MJJY_PB E on E.MJID=D.MJID');
|
||||
sql.Add(' inner join Cloth_Sub F on F.SubId=E.SubId');
|
||||
sql.Add(' inner join Cloth_Main G on G.MainId=E.MainId');
|
||||
SQL.Add(' where A.FSId in (SELECT distinct SubId FROM TBSubID where Dname=' + quotedstr(Trim(DCode)) + ')');
|
||||
SQL.Add(' group by A.SHDanWei,A.CRType,A.TruckId,B.PrtCode,B.PrtCodeName,B.prtspec,C.CustomerNoName,G.ConNo,F.C_Color,F.BatchNoHZ');
|
||||
SQL.Add(' order by A.SHDanWei,A.CRType,A.TruckId,B.PrtCode,B.PrtCodeName,B.prtspec,C.CustomerNoName,G.ConNo,F.C_Color,F.BatchNoHZ');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\出库码单.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
// RMVariables['ranchang']:=Trim(CDS_Main.fieldbyname('ranchang').AsString);
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.v1Column4PropertiesChange(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxCheckBox(Sender).EditValue;
|
||||
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
CDS_Main.FieldByName('SSel').value := mvalue;
|
||||
post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.SalesmanChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmCWOutHZList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
begin
|
||||
if (AViewInfo.GridRecord.Values[Tv1Column1.Index] <> null) and (AViewInfo.GridRecord.Values[Tv1Column1.Index] <> 0) then
|
||||
begin
|
||||
ACanvas.Brush.Color := $008080FF;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
784
发货申请(ShipmentRequest.dll)/U_ClothSCListSel.dfm
Normal file
784
发货申请(ShipmentRequest.dll)/U_ClothSCListSel.dfm
Normal file
|
|
@ -0,0 +1,784 @@
|
|||
object frmClothSCList: TfrmClothSCList
|
||||
Left = 317
|
||||
Top = 157
|
||||
Width = 1280
|
||||
Height = 581
|
||||
Caption = #36710#38388#29983#20135#35745#21010#21333
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1264
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 119
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_WeavingSchedule.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 1
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object TBView: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475#24037#33402#21333
|
||||
ImageIndex = 38
|
||||
OnClick = TBViewClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 351
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 3
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 414
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22806#21457#24037#33402#21333
|
||||
ImageIndex = 60
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 513
|
||||
Top = 0
|
||||
Width = 173
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label4: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #22806#21457#21333#20301
|
||||
end
|
||||
object WFGYSName: TComboBox
|
||||
Left = 59
|
||||
Top = 5
|
||||
Width = 110
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 686
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #29983#20135#35745#21010#21333#25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = TBPrintClick
|
||||
end
|
||||
object TBCopy: TToolButton
|
||||
Left = 809
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
ImageIndex = 39
|
||||
OnClick = TBCopyClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 872
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 935
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1264
|
||||
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 = 161
|
||||
Top = 22
|
||||
Width = 18
|
||||
Height = 12
|
||||
Caption = '---'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 283
|
||||
Top = 22
|
||||
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 Label5: TLabel
|
||||
Left = 418
|
||||
Top = 22
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 569
|
||||
Top = 22
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 721
|
||||
Top = 22
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #25209#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 = 18
|
||||
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
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 179
|
||||
Top = 18
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 324
|
||||
Top = 18
|
||||
Width = 81
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = ConNoChange
|
||||
OnKeyPress = conPress
|
||||
end
|
||||
object C_CodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 472
|
||||
Top = 18
|
||||
Width = 83
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = ConNoChange
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 623
|
||||
Top = 18
|
||||
Width = 83
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = ConNoChange
|
||||
end
|
||||
object BatchNoHZ: TEdit
|
||||
Tag = 2
|
||||
Left = 749
|
||||
Top = 18
|
||||
Width = 110
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = ConNoChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 86
|
||||
Width = 1264
|
||||
Height = 457
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column14
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column14
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column29
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1PRTOrderQty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column14
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column29
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
object v1OrderNo: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 100
|
||||
end
|
||||
object v1Column31: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 113
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #19979#21333#26085#26399
|
||||
DataBinding.FieldName = 'QDTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 66
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #24320#22987#26102#38388
|
||||
DataBinding.FieldName = 'BegTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 73
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #32467#26463#26102#38388
|
||||
DataBinding.FieldName = 'EndTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 72
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20132#36135#26085#26399
|
||||
DataBinding.FieldName = 'DeliveryDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 95
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 58
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'C_Spec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 88
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'C_Color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 67
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #26085#20135
|
||||
DataBinding.FieldName = 'DayQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 68
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #26426#22411
|
||||
DataBinding.FieldName = 'CarType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 69
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #23433#25490#26426#21488#25968
|
||||
DataBinding.FieldName = 'RTAPJTQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #23433#25490#26426#21488#21495
|
||||
DataBinding.FieldName = 'RTAPJTInfo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #24403#21069#21551#29992#26426#21488#25968
|
||||
DataBinding.FieldName = 'RTQYJTQty'
|
||||
Width = 101
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #24403#21069#21551#29992#26426#21488#21495
|
||||
DataBinding.FieldName = 'RTQYJTInfo'
|
||||
Width = 99
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #24403#21069#20572#29992#26426#21488#25968
|
||||
DataBinding.FieldName = 'RTTYJTQty'
|
||||
Width = 98
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #24403#21069#20572#29992#26426#21488#21495
|
||||
DataBinding.FieldName = 'RTTYJTInfo'
|
||||
Width = 97
|
||||
end
|
||||
object v1PRTMF: TcxGridDBColumn
|
||||
Caption = #38376#24133'(cm)'
|
||||
DataBinding.FieldName = 'MF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 69
|
||||
end
|
||||
object v1Column32: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object v1PRTKZ: TcxGridDBColumn
|
||||
Caption = #20811#37325'(g/'#13217')'
|
||||
DataBinding.FieldName = 'KZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 76
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PiQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 59
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #31354#21152'(KG)'
|
||||
DataBinding.FieldName = 'PiZhong'
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 63
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #21305#37325'(KG)'
|
||||
DataBinding.FieldName = 'PiKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 72
|
||||
end
|
||||
object v1PRTOrderQty: TcxGridDBColumn
|
||||
Caption = #35746#21333#25968#37327'(KG)'
|
||||
DataBinding.FieldName = 'C_Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'ZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 64
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
Caption = #22806#21457#21305#25968
|
||||
DataBinding.FieldName = 'WFJHPSHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #22806#21457#25968#37327
|
||||
DataBinding.FieldName = 'WFJHQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_WeavingSchedule.FonePurple
|
||||
Width = 79
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #25209#21495
|
||||
DataBinding.FieldName = 'BatchNoHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #33258#20135#21305#25968
|
||||
DataBinding.FieldName = 'ZSCPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #33258#20135#25968#37327
|
||||
DataBinding.FieldName = 'ZSCQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #32433#38271
|
||||
DataBinding.FieldName = 'ShaChang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.FonePurple
|
||||
Width = 61
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #21152#24037#36153
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.FonePurple
|
||||
Width = 61
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #21305#37325#28014#21160#177'Kg'
|
||||
DataBinding.FieldName = 'PiKgQtyFD'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.FonePurple
|
||||
Width = 100
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #35745#21010#19978#26426#26426#21488
|
||||
DataBinding.FieldName = 'SJCarNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_WeavingSchedule.FonePurple
|
||||
Width = 84
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'C_Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_WeavingSchedule.Default
|
||||
Width = 68
|
||||
end
|
||||
object v1Column33: TcxGridDBColumn
|
||||
Caption = #35745#21010#36710#38388
|
||||
DataBinding.FieldName = 'JHChejian'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 56
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 688
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_WeavingSchedule.ADOLink
|
||||
Parameters = <>
|
||||
Left = 600
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_WeavingSchedule.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 552
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_WeavingSchedule.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 640
|
||||
Top = 192
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 840
|
||||
Top = 232
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 808
|
||||
Top = 232
|
||||
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
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 448
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 488
|
||||
Top = 200
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 464
|
||||
Top = 280
|
||||
end
|
||||
object RMDBPRT: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 496
|
||||
Top = 280
|
||||
end
|
||||
object RMDBPZ: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PZ
|
||||
Left = 504
|
||||
Top = 320
|
||||
end
|
||||
object CDS_PZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 472
|
||||
Top = 320
|
||||
end
|
||||
object CDS_SJ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 472
|
||||
Top = 352
|
||||
end
|
||||
object RMDBSJ: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_SJ
|
||||
Left = 504
|
||||
Top = 352
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ClientDataSet1
|
||||
Left = 496
|
||||
Top = 400
|
||||
end
|
||||
object ClientDataSet1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 464
|
||||
Top = 400
|
||||
end
|
||||
object CDS_WJG: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 464
|
||||
Top = 440
|
||||
end
|
||||
object RMDBWJG: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_WJG
|
||||
Left = 496
|
||||
Top = 440
|
||||
end
|
||||
end
|
||||
794
发货申请(ShipmentRequest.dll)/U_ClothSCListSel.pas
Normal file
794
发货申请(ShipmentRequest.dll)/U_ClothSCListSel.pas
Normal file
|
|
@ -0,0 +1,794 @@
|
|||
unit U_ClothSCListSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, RM_Common, RM_Class,
|
||||
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmClothSCList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Label3: TLabel;
|
||||
ConNo: TEdit;
|
||||
Label5: TLabel;
|
||||
C_CodeName: TEdit;
|
||||
TBExport: TToolButton;
|
||||
Order_Main: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_PRT: TClientDataSet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1OrderNo: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1PRTMF: TcxGridDBColumn;
|
||||
v1PRTKZ: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
RMDBPRT: TRMDBDataSet;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
TBCopy: TToolButton;
|
||||
TBView: TToolButton;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
RMDBPZ: TRMDBDataSet;
|
||||
CDS_PZ: TClientDataSet;
|
||||
CDS_SJ: TClientDataSet;
|
||||
RMDBSJ: TRMDBDataSet;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
Label10: TLabel;
|
||||
C_Code: TEdit;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
ClientDataSet1: TClientDataSet;
|
||||
Panel2: TPanel;
|
||||
WFGYSName: TComboBox;
|
||||
Label4: TLabel;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
CDS_WJG: TClientDataSet;
|
||||
RMDBWJG: TRMDBDataSet;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
BatchNoHZ: TEdit;
|
||||
v1Column31: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
v1Column32: TcxGridDBColumn;
|
||||
v1Column33: TcxGridDBColumn;
|
||||
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 ConNoChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure conPress(Sender: TObject; var Key: Char);
|
||||
procedure TBViewClick(Sender: TObject);
|
||||
procedure TBCopyClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
private
|
||||
FInt, PFInt: Integer;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData(): Boolean;
|
||||
procedure InitButton();
|
||||
{ Private declarations }
|
||||
public
|
||||
canshu1, FCheJian: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
//var
|
||||
//frmClothSCList: TfrmClothSCList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_ClothSCInPut, U_Fun, U_ZDYHelp, U_SCPerson, U_ClothSCInPutSC;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmClothSCList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.InitButton();
|
||||
begin
|
||||
|
||||
if Trim(canshu1) = '查询' then
|
||||
begin
|
||||
TBAdd.Visible := False;
|
||||
TBCopy.Visible := False;
|
||||
TBEdit.Visible := False;
|
||||
TBDel.Visible := False;
|
||||
end;
|
||||
if (Trim(canshu1) = '一车间生产') or (Trim(canshu1) = '二车间生产') then
|
||||
begin
|
||||
TBAdd.Visible := False;
|
||||
TBCopy.Visible := False;
|
||||
TBEdit.Visible := False;
|
||||
TBDel.Visible := False;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('坯布生产计划单', Tv1, '坯布生产管理');
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.*,CustomerNoName=(select TOP 1 CustomerNoName from JYOrderCon_Main_PB X where X.MainId=A.ConMainId) ');
|
||||
sql.Add(' ,HTSYRName=(select TOP 1 SYRName from JYOrderCon_Main_PB X where X.MainId=A.ConMainId)');
|
||||
sql.Add(' ,ConPayment=(select TOP 1 Payment from JYOrderCon_Main_PB X where X.MainId=A.ConMainId)');
|
||||
sql.Add(' ,ConPRTPrice=(select TOP 1 PRTPrice from JYOrderCon_Sub_PB X where X.SubId=A.ConSubId) ');
|
||||
sql.Add(' ,ConDYMoney=(select TOP 1 DYMoney from JYOrderCon_Sub_PB X where X.SubId=A.ConSubId) ');
|
||||
sql.Add(' ,ZdyNameZ=(select TOP 1 X.ZdyNameZ from KH_Zdy_Attachment X inner join JYOrderCon_Main_PB Y on X.Type=''KHName'' and X.ZdyCode=Y.CustomerNo where Y.MainId=A.ConMainId) ');
|
||||
sql.Add(' from Cloth_Main A inner join CLoth_Sub B on A.Mainid=B.MainId');
|
||||
sql.Add(' where A.FillTIme>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||
sql.Add(' and A.FillTIme<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + '''');
|
||||
if canshu1 = '一车间生产' then
|
||||
begin
|
||||
sql.Add(' and B.JHChejian=''一车间'' ');
|
||||
end;
|
||||
if canshu1 = '二车间生产' then
|
||||
begin
|
||||
sql.Add(' and B.JHChejian=''二车间'' ');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.InitForm();
|
||||
begin
|
||||
InitButton();
|
||||
ReadCxGrid('坯布生产计划单', Tv1, '坯布生产管理');
|
||||
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 7;
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.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 TfrmClothSCList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmClothSCInPut := TfrmClothSCInPut.Create(Application);
|
||||
with frmClothSCInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
FSubId := Trim(Self.Order_Main.fieldbyname('SubId').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
Self.Order_Main.Locate('MainId', frmClothSCInPut.FMainId, []);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothSCInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.*');
|
||||
sql.Add('from JYCon_Sub_AnPai A');
|
||||
sql.Add(' where A.SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||
sql.Add(' and A.MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已产生安排数据不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if DelData() then
|
||||
begin
|
||||
//TBRafresh.Click;
|
||||
//TBFind.Click;
|
||||
Order_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmClothSCList.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete Cloth_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Cloth_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 Cloth_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 Cloth_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete Cloth_PaiZhen where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete Cloth_YCL_PB where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel('坯布生产单', cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
i, j, k: integer;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\坯布生产计划单.rmf';
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select WeiZhi=WeiZhi1,SPZ1=PZ1,SPZ2=PZ2,SPZ3=PZ3,SPZ4=PZ4,SPZ5=PZ5,SPZ6=PZ6,SPZ7=PZ7,SPZ8=PZ8,SPZ9=PZ9,SPZ10=PZ10, ');
|
||||
sql.Add(' SPZ11=PZ11,SPZ12=PZ12,SPZ13=PZ13,SPZ14=PZ14,SPZ15=PZ15,SPZ16=PZ16,SPZ17=PZ17,SPZ18=PZ18,SPZ19=PZ19,SPZ20=PZ20, ');
|
||||
sql.Add(' SPZ21=PZ21,SPZ22=PZ22,SPZ23=PZ23,SPZ24=PZ24,SPZ25=PZ25,SPZ26=PZ26,SPZ27=PZ27,SPZ28=PZ28,SPZ29=PZ29,SPZ30=PZ30, ');
|
||||
sql.Add(' SPZ31=PZ31,SPZ32=PZ32,SPZ33=PZ33,SPZ34=PZ34,SPZ35=PZ35,SPZ36=PZ36 ');
|
||||
sql.Add(' from Cloth_PaiZhen where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
sql.Add(' and RTrim(PZType)=''排针'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_PZ);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_PZ);
|
||||
if CDS_PZ.IsEmpty then
|
||||
begin
|
||||
CDS_PZ.Append;
|
||||
CDS_PZ.Post;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Cloth_PaiZhen where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
sql.Add(' and RTrim(PZType)=''三角'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_SJ);
|
||||
j := 0;
|
||||
k := 1;
|
||||
if ADOQueryTemp.RecordCount < 2 then
|
||||
begin
|
||||
SInitCDSData20(ADOQueryTemp, CDS_SJ);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ADOQueryTemp.First;
|
||||
while not ADOQueryTemp.Eof do
|
||||
begin
|
||||
if j = 2 then
|
||||
begin
|
||||
with CDS_SJ do
|
||||
begin
|
||||
Append;
|
||||
for i := 0 to ADOQueryTemp.FieldCount - 1 do
|
||||
begin
|
||||
if ((fields[i].FieldName <> 'Filltime') and (fields[i].FieldName <> 'Edittime')) then
|
||||
fields[i].value := '__________';
|
||||
end;
|
||||
fieldByName('Sflag').AsString := '1';
|
||||
fieldByName('Sindex').value := k;
|
||||
fieldByName('Ssel').value := false;
|
||||
fieldByName('SDefNote').value := '';
|
||||
inc(k);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
with CDS_SJ do
|
||||
begin
|
||||
Append;
|
||||
for i := 0 to ADOQueryTemp.FieldCount - 1 do
|
||||
begin
|
||||
fields[i].value := ADOQueryTemp.Fields[i].Value;
|
||||
end;
|
||||
fieldByName('Sflag').AsString := '1';
|
||||
fieldByName('Sindex').value := k;
|
||||
fieldByName('Ssel').value := false;
|
||||
fieldByName('SDefNote').value := '';
|
||||
inc(k);
|
||||
Post;
|
||||
end;
|
||||
|
||||
ADOQueryTemp.Next;
|
||||
j := j + 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
if CDS_SJ.IsEmpty then
|
||||
begin
|
||||
CDS_SJ.Append;
|
||||
CDS_SJ.Post;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Select A.* ');
|
||||
sql.Add(',YLQty=Cast(C_Qty*PBQty*0.01*(1+isnull(ZPSH,0)*0.01) as decimal(18,1))');
|
||||
sql.Add(' from Cloth_YCL_PB A');
|
||||
sql.Add(' inner join Cloth_Sub B on A.SubId=B.SubId');
|
||||
sql.Add(' where A.SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||
if CDS_PRT.IsEmpty then
|
||||
begin
|
||||
CDS_PRT.Append;
|
||||
CDS_PRT.Post;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Cloth_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet1);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RMVariables['ZSCPS'] := ClientDataSet1.fieldbyname('ZSCPS').Value;
|
||||
RMVariables['ZSCQty'] := ClientDataSet1.fieldbyname('ZSCQty').Value;
|
||||
RMVariables['WFJHPSHZ'] := ClientDataSet1.fieldbyname('WFJHPSHZ').Value;
|
||||
RMVariables['WFJHQtyHZ'] := ClientDataSet1.fieldbyname('WFJHQtyHZ').Value;
|
||||
RMVariables['C_Code'] := Order_Main.fieldbyname('C_Code').Value;
|
||||
RMVariables['ConNo'] := Order_Main.fieldbyname('ConNo').Value;
|
||||
RMVariables['C_CodeName'] := Order_Main.fieldbyname('C_CodeName').Value;
|
||||
RMVariables['DayQty'] := Order_Main.fieldbyname('DayQty').Value;
|
||||
RMVariables['CarType'] := Order_Main.fieldbyname('CarType').Value;
|
||||
RMVariables['ChouZhen'] := Order_Main.fieldbyname('ChouZhen').Value;
|
||||
RMVariables['KZQty'] := Order_Main.fieldbyname('KZQty').Value;
|
||||
RMVariables['MFQty'] := Order_Main.fieldbyname('MFQty').Value;
|
||||
RMVariables['KZ'] := Order_Main.fieldbyname('KZ').Value;
|
||||
RMVariables['MF'] := Order_Main.fieldbyname('MF').Value;
|
||||
RMVariables['PiKgQty'] := Order_Main.fieldbyname('PiKgQty').Value;
|
||||
RMVariables['ZhuanQty'] := Order_Main.fieldbyname('ZhuanQty').Value;
|
||||
RMVariables['PiQty'] := Order_Main.fieldbyname('PiQty').Value;
|
||||
RMVariables['C_Qty'] := Order_Main.fieldbyname('C_Qty').Value;
|
||||
RMVariables['QDTime'] := Order_Main.fieldbyname('QDTime').Value;
|
||||
RMVariables['JHChejian'] := Order_Main.fieldbyname('JHChejian').Value;
|
||||
RMVariables['DeliveryDate'] := Order_Main.fieldbyname('DeliveryDate').Value;
|
||||
RMVariables['ShaChang1'] := Order_Main.fieldbyname('ShaChang').Value;
|
||||
// showmessage(Order_Main.fieldbyname('ShaChang').asstring);
|
||||
RMVariables['SJCarNO'] := Order_Main.fieldbyname('SJCarNO').Value;
|
||||
RMVariables['C_Spec'] := Order_Main.fieldbyname('C_Spec').Value;
|
||||
RMVariables['C_Color'] := Order_Main.fieldbyname('C_Color').Value;
|
||||
RMVariables['C_Note'] := Order_Main.fieldbyname('C_Note').Value;
|
||||
RMVariables['SJCarNO'] := Order_Main.fieldbyname('SJCarNO').Value;
|
||||
RMVariables['ChouZhen'] := Order_Main.fieldbyname('ChouZhen').Value;
|
||||
RMVariables['PiKgQtyFD'] := Order_Main.fieldbyname('PiKgQtyFD').Value;
|
||||
RMVariables['BatchNoHZ'] := Order_Main.fieldbyname('BatchNoHZ').Value;
|
||||
RMVariables['ConPayment'] := Order_Main.fieldbyname('ConPayment').Value;
|
||||
RMVariables['ConPRTPrice'] := Order_Main.fieldbyname('ConPRTPrice').Value;
|
||||
RMVariables['ConDYMoney'] := Order_Main.fieldbyname('ConDYMoney').Value;
|
||||
RMVariables['ZdyNameZ'] := Order_Main.fieldbyname('ZdyNameZ').Value;
|
||||
RMVariables['Zdr'] := Order_Main.fieldbyname('Filler').Value;
|
||||
RMVariables['WzPrice'] := Order_Main.fieldbyname('WzPrice').Value;
|
||||
RMVariables['BZNote'] := Order_Main.fieldbyname('BZNote').Value;
|
||||
RMVariables['ZZYQ'] := Order_Main.fieldbyname('ZZYQ').Value;
|
||||
RMVariables['ZZSH'] := Order_Main.fieldbyname('ZZSH').Value;
|
||||
RMVariables['MFZZS'] := Order_Main.fieldbyname('MFZZS').Value;
|
||||
RMVariables['ALBL'] := Order_Main.fieldbyname('ALBL').Value;
|
||||
RMVariables['gongyi'] := Order_Main.fieldbyname('gongyi').Value;
|
||||
RMVariables['ZongJieNote'] := Order_Main.fieldbyname('ZongJieNote').Value;
|
||||
RMVariables['ZhenCun'] := Order_Main.fieldbyname('ZhenCun').Value;
|
||||
RMVariables['Filler'] := Order_Main.fieldbyname('Filler').Value;
|
||||
RMVariables['JHChejian'] := Order_Main.fieldbyname('JHChejian').Value;
|
||||
RMVariables['HTSYRName'] := Order_Main.fieldbyname('HTSYRName').Value;
|
||||
RMVariables['YWY'] := Order_Main.fieldbyname('YWY').Value;
|
||||
RMVariables['KJTS'] := Order_Main.fieldbyname('KJTS').Value;
|
||||
RMVariables['PBMF'] := Order_Main.fieldbyname('PBMF').Value;
|
||||
RMVariables['PBKZ'] := Order_Main.fieldbyname('PBKZ').Value;
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\坯布生产计划单.rmf'), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
try
|
||||
frmClothSCInPut := TfrmClothSCInPut.Create(Application);
|
||||
with frmClothSCInPut do
|
||||
begin
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
FSubId := '';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothSCInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.ConNoChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.conPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
if Length(Trim(ConNo.Text)) < 4 then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
//sql.Add('exec Cloth_QryList :MainId,:WSql');
|
||||
// Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+''''
|
||||
// +' and ConType=''生产'' ';
|
||||
sql.Add('select * from Cloth_Main A inner join CLoth_Sub B on A.Mainid=B.MainId');
|
||||
sql.Add(' where A.ConNo like ''' + '%' + Trim(ConNo.Text) + '%' + '''');
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBViewClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmClothSCInPut := TfrmClothSCInPut.Create(Application);
|
||||
with frmClothSCInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
FSubId := Trim(Self.Order_Main.fieldbyname('SubId').AsString);
|
||||
FConNo := Trim(Self.Order_Main.fieldbyname('ConNo').AsString);
|
||||
TBSave.Visible := False;
|
||||
ToolBar3.Visible := False;
|
||||
ScrollBox1.Enabled := False;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothSCInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.TBCopyClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmClothSCInPut := TfrmClothSCInPut.Create(Application);
|
||||
with frmClothSCInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FCopyInt := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
FConNo := Trim(Self.Order_Main.fieldbyname('ConNo').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmClothSCInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if Trim(WFGYSName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('外发单位不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\外发工艺单.rmf';
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select SPZ1=PZ1,SPZ2=PZ2,SPZ3=PZ3,SPZ4=PZ4,SPZ5=PZ5,SPZ6=PZ6,SPZ7=PZ7,SPZ8=PZ8,SPZ9=PZ9,SPZ10=PZ10, ');
|
||||
sql.Add(' SPZ11=PZ11,SPZ12=PZ12,SPZ13=PZ13,SPZ14=PZ14,SPZ15=PZ15,SPZ16=PZ16,SPZ17=PZ17,SPZ18=PZ18,SPZ19=PZ19,SPZ20=PZ20, ');
|
||||
sql.Add(' SPZ21=PZ21,SPZ22=PZ22,SPZ23=PZ23,SPZ24=PZ24,SPZ25=PZ25,SPZ26=PZ26,SPZ27=PZ27,SPZ28=PZ28,SPZ29=PZ29,SPZ30=PZ30, ');
|
||||
sql.Add(' SPZ31=PZ31,SPZ32=PZ32,SPZ33=PZ33,SPZ34=PZ34,SPZ35=PZ35,SPZ36=PZ36 ');
|
||||
sql.Add(' from Cloth_PaiZhen where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
sql.Add(' and RTrim(PZType)=''排针'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_PZ);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_PZ);
|
||||
if CDS_PZ.IsEmpty then
|
||||
begin
|
||||
CDS_PZ.Append;
|
||||
CDS_PZ.Post;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Cloth_PaiZhen where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
sql.Add(' and RTrim(PZType)=''三角'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_SJ);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_SJ);
|
||||
if CDS_SJ.IsEmpty then
|
||||
begin
|
||||
CDS_SJ.Append;
|
||||
CDS_SJ.Post;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Select A.* ');
|
||||
sql.Add(',YLQty=Cast(C_Qty*PBQty*0.01*(1+isnull(ZPSH,0)*0.01) as decimal(18,1))');
|
||||
sql.Add(' from Cloth_YCL_PB A');
|
||||
sql.Add(' inner join Cloth_Sub B on A.SubId=B.SubId');
|
||||
sql.Add(' where A.SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||
if CDS_PRT.IsEmpty then
|
||||
begin
|
||||
CDS_PRT.Append;
|
||||
CDS_PRT.Post;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Cloth_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet1);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet1);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Cloth_WJG where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
sql.Add(' and WFGYSName=''' + Trim(WFGYSName.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_WJG);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_WJG);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RMVariables['WFGYSName'] := CDS_WJG.fieldbyname('WFGYSName').Value;
|
||||
RMVariables['WFJHPS'] := CDS_WJG.fieldbyname('WFJHPS').Value;
|
||||
RMVariables['WFJHQty'] := CDS_WJG.fieldbyname('WFJHQty').Value;
|
||||
RMVariables['JGPrice'] := CDS_WJG.fieldbyname('JGPrice').Value;
|
||||
RMVariables['JHJiaoQi'] := CDS_WJG.fieldbyname('JHJiaoQi').Value;
|
||||
RMVariables['C_Code'] := Order_Main.fieldbyname('C_Code').Value;
|
||||
RMVariables['ConNo'] := Order_Main.fieldbyname('ConNo').Value;
|
||||
RMVariables['C_CodeName'] := Order_Main.fieldbyname('C_CodeName').Value;
|
||||
RMVariables['DayQty'] := Order_Main.fieldbyname('DayQty').Value;
|
||||
RMVariables['CarType'] := Order_Main.fieldbyname('CarType').Value;
|
||||
RMVariables['ChouZhen'] := Order_Main.fieldbyname('ChouZhen').Value;
|
||||
RMVariables['KZQty'] := Order_Main.fieldbyname('KZQty').Value;
|
||||
RMVariables['MFQty'] := Order_Main.fieldbyname('MFQty').Value;
|
||||
RMVariables['KZ'] := Order_Main.fieldbyname('KZ').Value;
|
||||
RMVariables['MF'] := Order_Main.fieldbyname('MF').Value;
|
||||
RMVariables['PiKgQty'] := Order_Main.fieldbyname('PiKgQty').Value;
|
||||
RMVariables['ZhuanQty'] := Order_Main.fieldbyname('ZhuanQty').Value;
|
||||
RMVariables['PiQty'] := Order_Main.fieldbyname('PiQty').Value;
|
||||
RMVariables['C_Qty'] := Order_Main.fieldbyname('C_Qty').Value;
|
||||
RMVariables['QDTime'] := Order_Main.fieldbyname('QDTime').Value;
|
||||
RMVariables['C_Note'] := Order_Main.fieldbyname('C_Note').Value;
|
||||
RMVariables['DeliveryDate'] := Order_Main.fieldbyname('DeliveryDate').Value;
|
||||
RMVariables['ShaChang1'] := Order_Main.fieldbyname('ShaChang').Value;
|
||||
RMVariables['SJCarNO'] := Order_Main.fieldbyname('SJCarNO').Value;
|
||||
RMVariables['C_Spec'] := Order_Main.fieldbyname('C_Spec').Value;
|
||||
RMVariables['C_Color'] := Order_Main.fieldbyname('C_Color').Value;
|
||||
RMVariables['SJCarNO'] := Order_Main.fieldbyname('SJCarNO').Value;
|
||||
RMVariables['ChouZhen'] := Order_Main.fieldbyname('ChouZhen').Value;
|
||||
RMVariables['PiKgQtyFD'] := Order_Main.fieldbyname('PiKgQtyFD').Value;
|
||||
RMVariables['Price'] := Order_Main.fieldbyname('Price').Value;
|
||||
RMVariables['MFZZS'] := Order_Main.fieldbyname('MFZZS').Value;
|
||||
RMVariables['ALBL'] := Order_Main.fieldbyname('ALBL').Value;
|
||||
RMVariables['gongyi'] := Order_Main.fieldbyname('gongyi').Value;
|
||||
RMVariables['ZongJieNote'] := Order_Main.fieldbyname('ZongJieNote').Value;
|
||||
RMVariables['ZhenCun'] := Order_Main.fieldbyname('ZhenCun').Value;
|
||||
RMVariables['BZNote'] := Order_Main.fieldbyname('BZNote').Value;
|
||||
RMVariables['ZZYQ'] := Order_Main.fieldbyname('ZZYQ').Value;
|
||||
RMVariables['Zdr'] := Order_Main.fieldbyname('Filler').Value;
|
||||
RMVariables['JHChejian'] := Order_Main.fieldbyname('JHChejian').Value;
|
||||
RMVariables['HTSYRName'] := Order_Main.fieldbyname('HTSYRName').Value;
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\外发工艺单.rmf'), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCList.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
if Order_Main.IsEmpty = False then
|
||||
fsj := 'select Name=WFGYSName,Code=WFGYSNo from Cloth_WJG where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + ''''
|
||||
else
|
||||
fsj := 'select Name=WFGYSName,Code=WFGYSNo from Cloth_WJG where 1=2';
|
||||
WFGYSName.Items.Clear;
|
||||
SInitComBoxBySql(ADOQueryTemp, WFGYSName, True, fsj);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
517
发货申请(ShipmentRequest.dll)/U_ClothSCYWYListSel.dfm
Normal file
517
发货申请(ShipmentRequest.dll)/U_ClothSCYWYListSel.dfm
Normal file
|
|
@ -0,0 +1,517 @@
|
|||
object frmClothSCYWYListSel: TfrmClothSCYWYListSel
|
||||
Left = 333
|
||||
Top = 165
|
||||
Width = 1280
|
||||
Height = 581
|
||||
Caption = #36710#38388#29983#20135#35745#21010#21333
|
||||
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 = 1264
|
||||
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_ShipmentRequest.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 TBExport: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30830#35748
|
||||
ImageIndex = 10
|
||||
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 = 32
|
||||
Width = 1264
|
||||
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 = 161
|
||||
Top = 22
|
||||
Width = 18
|
||||
Height = 12
|
||||
Caption = '---'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 283
|
||||
Top = 22
|
||||
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 Label5: TLabel
|
||||
Left = 418
|
||||
Top = 22
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 569
|
||||
Top = 22
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 721
|
||||
Top = 22
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #25209#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 = 18
|
||||
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
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 179
|
||||
Top = 18
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 324
|
||||
Top = 18
|
||||
Width = 81
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = ConNoChange
|
||||
OnKeyPress = conPress
|
||||
end
|
||||
object C_CodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 472
|
||||
Top = 18
|
||||
Width = 83
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = ConNoChange
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 623
|
||||
Top = 18
|
||||
Width = 83
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = ConNoChange
|
||||
end
|
||||
object BatchNoHZ: TEdit
|
||||
Tag = 2
|
||||
Left = 749
|
||||
Top = 18
|
||||
Width = 110
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = ConNoChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 86
|
||||
Width = 1264
|
||||
Height = 457
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1PRTOrderQty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1OrderNo: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 100
|
||||
end
|
||||
object v1Column31: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 113
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #19979#21333#26085#26399
|
||||
DataBinding.FieldName = 'QDTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 66
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #20132#36135#26085#26399
|
||||
DataBinding.FieldName = 'DeliveryDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 95
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 74
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'C_Spec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 88
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #26426#22411
|
||||
DataBinding.FieldName = 'CarType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 69
|
||||
end
|
||||
object v1PRTMF: TcxGridDBColumn
|
||||
Caption = #38376#24133'(cm)'
|
||||
DataBinding.FieldName = 'MF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 69
|
||||
end
|
||||
object v1Column32: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object v1PRTKZ: TcxGridDBColumn
|
||||
Caption = #20811#37325'(g/'#13217')'
|
||||
DataBinding.FieldName = 'KZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 76
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PiQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 59
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #21305#37325'(KG)'
|
||||
DataBinding.FieldName = 'PiKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 72
|
||||
end
|
||||
object v1PRTOrderQty: TcxGridDBColumn
|
||||
Caption = #35746#21333#25968#37327'(KG)'
|
||||
DataBinding.FieldName = 'C_Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 92
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'ZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 64
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #32433#38271
|
||||
DataBinding.FieldName = 'ShaChang'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.FonePurple
|
||||
Width = 61
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #21305#37325#28014#21160#177'Kg'
|
||||
DataBinding.FieldName = 'PiKgQtyFD'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.FonePurple
|
||||
Width = 100
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'C_Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 68
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 688
|
||||
Top = 196
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 600
|
||||
Top = 200
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 548
|
||||
Top = 196
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 640
|
||||
Top = 200
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 840
|
||||
Top = 232
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 808
|
||||
Top = 232
|
||||
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 = RMDBPRT
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 448
|
||||
Top = 208
|
||||
ReportData = {}
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 488
|
||||
Top = 200
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 464
|
||||
Top = 280
|
||||
end
|
||||
object RMDBPRT: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 496
|
||||
Top = 280
|
||||
end
|
||||
end
|
||||
282
发货申请(ShipmentRequest.dll)/U_ClothSCYWYListSel.pas
Normal file
282
发货申请(ShipmentRequest.dll)/U_ClothSCYWYListSel.pas
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
unit U_ClothSCYWYListSel;
|
||||
|
||||
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
|
||||
TfrmClothSCYWYListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Label3: TLabel;
|
||||
ConNo: TEdit;
|
||||
Label5: TLabel;
|
||||
C_CodeName: TEdit;
|
||||
TBExport: TToolButton;
|
||||
Order_Main: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
CDS_PRT: TClientDataSet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1OrderNo: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1PRTMF: TcxGridDBColumn;
|
||||
v1PRTKZ: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
RMDBPRT: TRMDBDataSet;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
Label10: TLabel;
|
||||
C_Code: TEdit;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
BatchNoHZ: TEdit;
|
||||
v1Column31: TcxGridDBColumn;
|
||||
v1Column32: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure conPress(Sender: TObject; var Key: Char);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
FInt, PFInt: Integer;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData(): Boolean;
|
||||
procedure InitButton();
|
||||
{ Private declarations }
|
||||
public
|
||||
canshu1, FCheJian: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmClothSCYWYListSel: TfrmClothSCYWYListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmClothSCYWYListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.InitButton();
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid(Self.Caption, Tv1, '坯布生产管理');
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,B.* ');
|
||||
sql.Add(' from Cloth_Main A inner join CLoth_Sub B on A.Mainid=B.MainId');
|
||||
sql.Add(' where A.FillTIme>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||
sql.Add(' and A.FillTIme<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + '''');
|
||||
// sql.Add(' and Filler=' + QuotedStr(Trim(DName)));
|
||||
sql.Add('and isnull(A.status,''0'')=''2''');
|
||||
sql.Add(' order by A.FillTIme desc');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.InitForm();
|
||||
begin
|
||||
InitButton();
|
||||
ReadCxGrid(Self.Caption, Tv1, '坯布生产管理');
|
||||
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 7;
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.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 TfrmClothSCYWYListSel.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete Cloth_Sub where SubId=''' + Trim(Order_Main.fieldbyname('SubId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Cloth_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 Cloth_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 Cloth_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete Cloth_PaiZhen where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete Cloth_YCL_PB where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.ConNoChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.conPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
if Length(Trim(ConNo.Text)) < 4 then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
//sql.Add('exec Cloth_QryList :MainId,:WSql');
|
||||
// Parameters.ParamByName('WSql').Value:=' and OM.conNo like '''+'%'+Trim(ConNoM.Text)+'%'+''''
|
||||
// +' and ConType=''生产'' ';
|
||||
sql.Add('select * from Cloth_Main A inner join CLoth_Sub B on A.Mainid=B.MainId');
|
||||
sql.Add(' where A.ConNo like ''' + '%' + Trim(ConNo.Text) + '%' + '''');
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitButton();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothSCYWYListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmClothSCYWYListSel := nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
872
发货申请(ShipmentRequest.dll)/U_ContractListNXSel.dfm
Normal file
872
发货申请(ShipmentRequest.dll)/U_ContractListNXSel.dfm
Normal file
|
|
@ -0,0 +1,872 @@
|
|||
object frmContractListNXSel: TfrmContractListNXSel
|
||||
Left = 223
|
||||
Top = 171
|
||||
Width = 1308
|
||||
Height = 727
|
||||
Align = alClient
|
||||
Caption = #38144#21806#21512#21516
|
||||
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 = 1292
|
||||
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_ShipmentRequest.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
|
||||
Visible = False
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 75
|
||||
Width = 1292
|
||||
Height = 356
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCustomDrawCell = Tv1CustomDrawCell
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
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 = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
OptionsView.Indicator = True
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v1ConNo: TcxGridDBColumn
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 67
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = 'PO#'
|
||||
DataBinding.FieldName = 'KHConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'PrtCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'PrtCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'XSType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 87
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #20379#26041
|
||||
DataBinding.FieldName = 'SYRName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 89
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #38656#26041
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 87
|
||||
end
|
||||
object v1OrdPerson1: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'ConPerson1'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 78
|
||||
end
|
||||
object v1DeliveryDate: TcxGridDBColumn
|
||||
Caption = #20132#36135#26085#26399
|
||||
DataBinding.FieldName = 'DlyDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 71
|
||||
end
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #21046#21333#26085#26399
|
||||
DataBinding.FieldName = 'OrdDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1PRTOrderQty: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'ConQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 67
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'ConQtyUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 64
|
||||
end
|
||||
object v1MPRTCF: TcxGridDBColumn
|
||||
Caption = #28322#30701#35013
|
||||
DataBinding.FieldName = 'QtyNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 88
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'status'
|
||||
Visible = False
|
||||
Hidden = True
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #24050#20570#35745#21010#21333
|
||||
DataBinding.FieldName = 'JHDFlag'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'ForOrderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1292
|
||||
Height = 43
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #21046#21333#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 263
|
||||
Top = 15
|
||||
Width = 40
|
||||
Height = 12
|
||||
Caption = #38656' '#26041
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 399
|
||||
Top = 15
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #19994#21153#21592
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 430
|
||||
Top = 99
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 526
|
||||
Top = 15
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 303
|
||||
Top = 99
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 303
|
||||
Top = 123
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 160
|
||||
Top = 16
|
||||
Width = 6
|
||||
Height = 12
|
||||
Caption = '-'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 655
|
||||
Top = 15
|
||||
Width = 21
|
||||
Height = 12
|
||||
Caption = 'PO#'
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 770
|
||||
Top = 15
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 890
|
||||
Top = 17
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 11
|
||||
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
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 168
|
||||
Top = 11
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 311
|
||||
Top = 11
|
||||
Width = 78
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object ConPerson1: TEdit
|
||||
Tag = 2
|
||||
Left = 440
|
||||
Top = 11
|
||||
Width = 76
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 483
|
||||
Top = 95
|
||||
Width = 76
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 9
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 567
|
||||
Top = 11
|
||||
Width = 77
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 95
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 8
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTMF: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 119
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 10
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object KHConNO: TEdit
|
||||
Tag = 2
|
||||
Left = 677
|
||||
Top = 11
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object XSType: TComboBox
|
||||
Tag = 1
|
||||
Left = 800
|
||||
Top = 12
|
||||
Width = 80
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 6
|
||||
OnChange = CustomerNoNameChange
|
||||
Items.Strings = (
|
||||
#32463#38144
|
||||
#21152#24037
|
||||
#25171#26679
|
||||
'')
|
||||
end
|
||||
object PrtCode: TEdit
|
||||
Tag = 2
|
||||
Left = 951
|
||||
Top = 13
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 7
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 431
|
||||
Width = 1292
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 439
|
||||
Width = 1292
|
||||
Height = 250
|
||||
Align = alBottom
|
||||
TabOrder = 4
|
||||
object Tv2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = Tv2CellDblClick
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn5
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
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_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1XHNo: TcxGridDBColumn
|
||||
Caption = #24207#21495
|
||||
DataBinding.FieldName = 'XHNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 35
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'PrtCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 87
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'PrtCodeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 107
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'prtspec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 90
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #38376#24133'CM'
|
||||
DataBinding.FieldName = 'prtmf'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 59
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #20811#37325'g/'#13217
|
||||
DataBinding.FieldName = 'prtkz'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 64
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'PRTOrderQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 60
|
||||
end
|
||||
object v1OrderUnit: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'OrderUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
'M'
|
||||
'Y'
|
||||
'KG')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 62
|
||||
end
|
||||
object cxGridDBColumn10: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'SOrdDefNote1'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 113
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 1016
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 704
|
||||
Top = 176
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 728
|
||||
Top = 176
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 776
|
||||
Top = 176
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 984
|
||||
Top = 184
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 960
|
||||
Top = 184
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Print
|
||||
Left = 280
|
||||
Top = 136
|
||||
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 = 376
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 752
|
||||
Top = 176
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 312
|
||||
Top = 136
|
||||
end
|
||||
object ADOQuerySub: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 804
|
||||
Top = 176
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 464
|
||||
Top = 608
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 512
|
||||
Top = 600
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 560
|
||||
Top = 600
|
||||
end
|
||||
object CDS_Note: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 344
|
||||
Top = 136
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 248
|
||||
Top = 136
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet2: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_Note
|
||||
Left = 216
|
||||
Top = 136
|
||||
end
|
||||
end
|
||||
343
发货申请(ShipmentRequest.dll)/U_ContractListNXSel.pas
Normal file
343
发货申请(ShipmentRequest.dll)/U_ContractListNXSel.pas
Normal file
|
|
@ -0,0 +1,343 @@
|
|||
unit U_ContractListNXSel;
|
||||
|
||||
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, RM_E_llPDF, cxDropDownEdit, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmContractListNXSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1DeliveryDate: TcxGridDBColumn;
|
||||
v1OrdPerson1: TcxGridDBColumn;
|
||||
v1ConNo: TcxGridDBColumn;
|
||||
v1MPRTCF: TcxGridDBColumn;
|
||||
Order_Main: TClientDataSet;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1PRTOrderQty: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Print: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label12: TLabel;
|
||||
Label13: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CustomerNoName: TEdit;
|
||||
ConPerson1: TEdit;
|
||||
MPRTCodeName: TEdit;
|
||||
ConNo: TEdit;
|
||||
MPRTKZ: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
cxSplitter1: TcxSplitter;
|
||||
ADOQuerySub: TADOQuery;
|
||||
DataSource2: TDataSource;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
KHConNO: TEdit;
|
||||
Label3: TLabel;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
v1XHNo: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
v1OrderUnit: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
CDS_Note: TClientDataSet;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
RM1: TRMGridReport;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
XSType: TComboBox;
|
||||
RMDBDataSet2: TRMDBDataSet;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
PrtCode: TEdit;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
DQdate:TDateTime;
|
||||
fuserName,canshu1,canshu2:string;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData():Boolean;
|
||||
procedure SetStatus();
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt,FCloth:Integer;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmContractListNXSel: TfrmContractListNXSel;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmContractListNXSel.SetStatus();
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmContractListNXSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmContractListNXSel:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
canshu1:=Trim(DParameters1);
|
||||
canshu2:=Trim(DParameters2);
|
||||
cxgrid1.Align:=alClient;
|
||||
DQdate:=SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('内销合同',Tv1,'生产指示单管理');
|
||||
WriteCxGrid('内销合同11',Tv2,'生产指示单管理');
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(',Case when isnull((select count(*) from TP_File where WBID=A.MainID and TFType=''合同'' ),0)>0 ');
|
||||
sql.Add('then Cast(1 as bit) else Cast(0 as bit) end as FJFlag');
|
||||
sql.Add(',PrtCode=cast((select distinct '' ''+ PrtCode from JYOrderCon_Sub_PB JCS where JCS.MainId=A.MainId for xml path('''')) as varchar(120))');
|
||||
sql.Add(',PrtCodeName=cast((select distinct '' ''+ PrtCodeName from JYOrderCon_Sub_PB JCS where JCS.MainId=A.MainId for xml path('''')) as varchar(120))');
|
||||
sql.Add(',Case when isnull((select count(*) from Cloth_Main where ConMainId=A.MainID ),0)>0 ');
|
||||
sql.Add('then Cast(1 as bit) else Cast(0 as bit) end as JHDFlag');
|
||||
sql.Add(',ZdyNameZ=(select X.ZdyNameZ from KH_Zdy_Attachment X where X.Type=''KHName'' and X.ZdyCode=A.CustomerNo)');
|
||||
sql.Add(' from JYOrderCon_Main_PB A where status=''1'' ');
|
||||
sql.Add(' and A.OrdDate>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.Add(' and A.OrdDate<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.Date+1))+'''');
|
||||
SQL.Add(' order by A.OrdDate desc');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmContractListNXSel.InitForm();
|
||||
begin
|
||||
ReadCxGrid('内销合同',Tv1,'生产指示单管理');
|
||||
ReadCxGrid('内销合同11',Tv2,'生产指示单管理');
|
||||
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime:=EndDate.DateTime-90;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.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 TfrmContractListNXSel.DelData():Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete JYOrderCon_Sub_PB where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete JYOrderCon_Main_PB where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
fuserName:=DCode;
|
||||
InitForm();
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.N1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile:string;
|
||||
Porderno:string;
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\生产指示单10.rmf' ;
|
||||
SDofilter(ADOQueryMain,' OrderNoM='''+Trim(Order_Main.fieldbyname('OrderNoM').AsString)+'''');
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
Porderno:=Trim(Order_Main.fieldbyname('OrderNoM').AsString);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
//RMVariables['begindate']:=begindate.DateTime;
|
||||
//RMVariables['enddate']:=enddate.DateTime;
|
||||
//RMVariables['printtime']:=Now;
|
||||
//RMVariables['printer']:=Trim(gUserName);
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\生产指示单10.rmf'),'提示',0);
|
||||
end;
|
||||
SDofilter(ADOQueryMain,'');
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
Order_Main.Locate('ordernoM',Porderno,[]);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.Tv1CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
begin
|
||||
IF AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('JHDFlag').Index]=True then
|
||||
ACanvas.Brush.Color:=clSkyBlue;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.Tv1MouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty=False then
|
||||
sql.Add('select * from JYOrderCon_Sub_PB A where A.MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''')
|
||||
else
|
||||
sql.Add('select * from JYOrderCon_Sub_PB A where 1=2');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListNXSel.Tv2CellDblClick(
|
||||
Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
||||
607
发货申请(ShipmentRequest.dll)/U_ContractListSel.dfm
Normal file
607
发货申请(ShipmentRequest.dll)/U_ContractListSel.dfm
Normal file
|
|
@ -0,0 +1,607 @@
|
|||
object frmContractListSel: TfrmContractListSel
|
||||
Left = 153
|
||||
Top = 64
|
||||
Width = 1382
|
||||
Height = 754
|
||||
Caption = #21512#21516#36873#25321
|
||||
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 = 1366
|
||||
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_ShipmentRequest.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 ToolButton2: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 10
|
||||
OnClick = ToolButton2Click
|
||||
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 = 32
|
||||
Width = 1366
|
||||
Height = 43
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #21046#21333#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 291
|
||||
Top = 15
|
||||
Width = 40
|
||||
Height = 12
|
||||
Caption = #38656' '#26041
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 454
|
||||
Top = 15
|
||||
Width = 53
|
||||
Height = 12
|
||||
Caption = #19994' '#21153' '#21592
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 430
|
||||
Top = 99
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 623
|
||||
Top = 15
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #21512#21516#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 303
|
||||
Top = 99
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 303
|
||||
Top = 123
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 160
|
||||
Top = 16
|
||||
Width = 6
|
||||
Height = 12
|
||||
Caption = '-'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 774
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #23458#25143#21512#21516#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 11
|
||||
Width = 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
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 168
|
||||
Top = 11
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object BuyName: TEdit
|
||||
Tag = 2
|
||||
Left = 331
|
||||
Top = 11
|
||||
Width = 102
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = BuyNameChange
|
||||
OnKeyPress = ConNoKeyPress
|
||||
end
|
||||
object Salesman: TEdit
|
||||
Tag = 2
|
||||
Left = 507
|
||||
Top = 11
|
||||
Width = 86
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = BuyNameChange
|
||||
OnKeyPress = ConNoKeyPress
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 483
|
||||
Top = 95
|
||||
Width = 76
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 7
|
||||
OnChange = BuyNameChange
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 664
|
||||
Top = 11
|
||||
Width = 81
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = BuyNameChange
|
||||
OnKeyPress = ConNoKeyPress
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 95
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = BuyNameChange
|
||||
end
|
||||
object MPRTMF: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 119
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 8
|
||||
OnChange = BuyNameChange
|
||||
end
|
||||
object BuyConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 843
|
||||
Top = 11
|
||||
Width = 80
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = BuyNameChange
|
||||
OnKeyPress = ConNoKeyPress
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 97
|
||||
Width = 1366
|
||||
Height = 618
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 3
|
||||
object TV1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
Column = cxGridDBColumn4
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cxGridDBColumn4
|
||||
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
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object V1Column2: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'ssel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 50
|
||||
end
|
||||
object V2Column2: TcxGridDBColumn
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object V2Column3: TcxGridDBColumn
|
||||
Caption = #23458#25143#21512#21516#21495
|
||||
DataBinding.FieldName = 'BuyConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 94
|
||||
end
|
||||
object V2Column5: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'BuyName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object V1Column1: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'Salesman'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
end
|
||||
object V2Column4: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'SCSCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 108
|
||||
end
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'SCSName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 126
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'SCSSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'SCSMF'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'SCSKZ'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'SCSColor'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.handBlack
|
||||
Width = 90
|
||||
end
|
||||
object V2Column1: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'SCSKX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'SCSHX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.FonePurple
|
||||
Width = 59
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'SCSQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 67
|
||||
end
|
||||
object v1OrderUnit: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'SCSUnit'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 67
|
||||
end
|
||||
object cxGridDBColumn6: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'SCSNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 113
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 75
|
||||
Width = 1366
|
||||
Height = 22
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#25490#21333
|
||||
#24050#25490#21333
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 22
|
||||
ClientRectRight = 1366
|
||||
ClientRectTop = 19
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 768
|
||||
Top = 168
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 248
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 272
|
||||
Top = 192
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 216
|
||||
Top = 192
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 840
|
||||
Top = 168
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 808
|
||||
Top = 168
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 296
|
||||
Top = 296
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 256
|
||||
Top = 296
|
||||
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 = 336
|
||||
Top = 296
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 560
|
||||
Top = 216
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N2Click
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N1Click
|
||||
end
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 216
|
||||
Top = 296
|
||||
end
|
||||
end
|
||||
398
发货申请(ShipmentRequest.dll)/U_ContractListSel.pas
Normal file
398
发货申请(ShipmentRequest.dll)/U_ContractListSel.pas
Normal file
|
|
@ -0,0 +1,398 @@
|
|||
unit U_ContractListSel;
|
||||
|
||||
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,
|
||||
cxDropDownEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||
dxBarBuiltInMenu;
|
||||
|
||||
type
|
||||
TfrmContractListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Main: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N2: TMenuItem;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label12: TLabel;
|
||||
Label13: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
BuyName: TEdit;
|
||||
Salesman: TEdit;
|
||||
MPRTCodeName: TEdit;
|
||||
ConNo: TEdit;
|
||||
MPRTKZ: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
cxGrid1: TcxGrid;
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
v1OrderUnit: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
Label2: TLabel;
|
||||
BuyConNo: TEdit;
|
||||
Label3: TLabel;
|
||||
V2Column1: TcxGridDBColumn;
|
||||
V2Column4: TcxGridDBColumn;
|
||||
V2Column2: TcxGridDBColumn;
|
||||
V2Column3: TcxGridDBColumn;
|
||||
V2Column5: TcxGridDBColumn;
|
||||
N1: TMenuItem;
|
||||
V1Column1: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
cxTabControl1: TcxTabControl;
|
||||
V1Column2: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBTPClick(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure Tv1StylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle);
|
||||
procedure v1DeliveryDateCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure BuyNameChange(Sender: TObject);
|
||||
procedure ConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
fuserName: string;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData(): Boolean;
|
||||
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt, FCloth: Integer;
|
||||
canshu1, FConNo, FGSTT: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmContractListSel: TfrmContractListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmContractListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmContractListSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
DQdate := SGetServerDate(ADOQueryTemp);
|
||||
canshu1 := trim(DParameters1);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
writeCxGrid(self.Caption + tv1.Name, Tv1, '合同管理');
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ,B.* ');
|
||||
sql.Add(' from SalesContract_Main A inner join SalesContract_Sub B on A.MainId=B.MainId ');
|
||||
SQL.Add('where A.OrdDate>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + '''');
|
||||
SQL.Add('and A.OrdDate<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + '''');
|
||||
SQL.Add(' and isnull(A.status,''0'')=''3'' ');
|
||||
// SQL.Add(' and isnull(A.Salesman,''0'')=' + quotedstr(trim(DName)));
|
||||
sql.Add(' and A.SCMType in (''内销'',''外销'') ');
|
||||
sql.Add('order by OrdDate desc,a.mainid');
|
||||
// if trim(FConNo) <> '' then
|
||||
// SQL.Add(' and A.ConNo=' + quotedstr(trim(FConNo)));
|
||||
// case cxTabControl1.TabIndex of
|
||||
// 0:
|
||||
// begin
|
||||
// SQL.Add('AND NOT EXISTS ( select X.MainId from JYOrder_Main X inner join JYOrder_Sub Y on X.MainId=Y.MainId ');
|
||||
// SQL.Add('where X.ConNo=A.ConNo and X.MPRTCode=B.SCSCode and isnull(Y.PrtColor,'''')=B.SCSColor ) ');
|
||||
// end;
|
||||
// 1:
|
||||
// begin
|
||||
// SQL.Add('AND EXISTS ( select X.MainId from JYOrder_Main X inner join JYOrder_Sub Y on X.MainId=Y.MainId ');
|
||||
// SQL.Add('where X.ConNo=A.ConNo and X.MPRTCode=B.SCSCode and isnull(Y.PrtColor,'''')=B.SCSColor ) ');
|
||||
// end;
|
||||
// end;
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.InitForm();
|
||||
begin
|
||||
readCxGrid(self.Caption + tv1.Name, Tv1, '合同管理');
|
||||
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 90;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.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 TfrmContractListSel.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete JYOrderCon_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete JYOrderCon_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.TBTPClick(Sender: TObject);
|
||||
var
|
||||
FQty, FQty1, FMxQty, FPQty, FMxQtyS, FPQtyS: string;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.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 TfrmContractListSel.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 TfrmContractListSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main, false);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.BuyNameChange(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 TfrmContractListSel.ConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
if Length(Tedit(Sender).Text) < 1 then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select A.*,A.ConNo ConNoM ');
|
||||
SQL.Add(',PRTOrderQty=(select Sum(PRTOrderQty) from JYOrderCon_Sub B where B.MainId=A.MainId)');
|
||||
SQL.Add(',ConMoney=(select Sum(PRTOrderQty*PRTPrice) from JYOrderCon_Sub B where B.MainId=A.MainId)');
|
||||
SQL.Add(',OrderUnit=(select top 1 OrderUnit from JYOrderCon_Sub B where B.MainId=A.MainId)');
|
||||
SQL.Add(',PriceUnit=(select top 1 PriceUnit from JYOrderCon_Sub B where B.MainId=A.MainId)');
|
||||
SQL.Add(',PRTPrice=(select top 1 PRTPrice from JYOrderCon_Sub B where B.MainId=A.MainId)');
|
||||
sql.Add(',ISSC=cast((case when isnull((select count(WBID) from TP_File X where X.WBID=A.maiNID and X.TFType=''合同''),0)>0 then 1 else 0 end) as bit)');
|
||||
sql.Add(' from JYOrderCon_Main A ');
|
||||
SQL.Add('where OrdDate>=''' + '1899-01-01' + '''');
|
||||
SQL.Add('and OrdDate<''' + '2050-01-01' + '''');
|
||||
sql.Add(' and MPRTType=''内销'' ');
|
||||
if Trim(DParameters1) <> '高权限' then
|
||||
begin
|
||||
sql.Add('and A.Filler=''' + Trim(DName) + '''');
|
||||
end;
|
||||
// sql.Add(' and ConNo like '''+'%'+Trim(ConNoM.Text)+'%'+'''');
|
||||
sql.Add(' and ' + Tedit(Sender).Name + ' like ' + quotedstr(trim('%' + trim(Tedit(Sender).Text) + '%')));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
begin
|
||||
if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('status').Index] = '2' then
|
||||
ACanvas.Brush.Color := clLime;
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main, true);
|
||||
end;
|
||||
|
||||
procedure TfrmContractListSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
523
发货申请(ShipmentRequest.dll)/U_DYSQInPut.dfm
Normal file
523
发货申请(ShipmentRequest.dll)/U_DYSQInPut.dfm
Normal file
|
|
@ -0,0 +1,523 @@
|
|||
object frmDYSQInPut: TfrmDYSQInPut
|
||||
Left = 235
|
||||
Top = 76
|
||||
Width = 1268
|
||||
Height = 683
|
||||
Caption = #35843#26679#30003#35831#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 = 1252
|
||||
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_ShipmentRequest.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 ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 1252
|
||||
Height = 95
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clBtnFace
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label14: TLabel
|
||||
Left = 31
|
||||
Top = 13
|
||||
Width = 67
|
||||
Height = 12
|
||||
Caption = #23458' '#25143#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 688
|
||||
Top = 45
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20986#24211#31867#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 31
|
||||
Top = 69
|
||||
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 Label11: TLabel
|
||||
Left = 873
|
||||
Top = 18
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25910#36135#21333#20301#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 456
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #30003#35831#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 257
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #25805#20316#21592#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 900
|
||||
Top = 45
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #38144#21806#31867#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label16: TLabel
|
||||
Left = 36
|
||||
Top = 39
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25968#37327#21333#20301#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label28: TLabel
|
||||
Left = 244
|
||||
Top = 38
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #30721#21333#25260#22836#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 1
|
||||
Left = 750
|
||||
Top = 42
|
||||
Width = 136
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 0
|
||||
Text = #38144#21806#20986#24211
|
||||
Visible = False
|
||||
Items.Strings = (
|
||||
#38144#21806#20986#24211)
|
||||
end
|
||||
object Note: TEdit
|
||||
Tag = 1
|
||||
Left = 96
|
||||
Top = 67
|
||||
Width = 560
|
||||
Height = 18
|
||||
TabOrder = 2
|
||||
end
|
||||
object SHDanWei: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 936
|
||||
Top = 15
|
||||
Width = 138
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
OnBtnUpClick = SHDanWeiBtnUpClick
|
||||
OnBtnDnClick = SHDanWeiBtnDnClick
|
||||
end
|
||||
object CustomerNoName: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 96
|
||||
Top = 10
|
||||
Width = 139
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
OnBtnClick = CustomerNoNameBtnClick
|
||||
end
|
||||
object DLYDATE: TDateTimePicker
|
||||
Tag = 1
|
||||
Left = 520
|
||||
Top = 10
|
||||
Width = 110
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 4
|
||||
end
|
||||
object XSType: TComboBox
|
||||
Tag = 1
|
||||
Left = 964
|
||||
Top = 42
|
||||
Width = 134
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
Items.Strings = (
|
||||
#20869#38144
|
||||
#22806#38144)
|
||||
end
|
||||
object filler: TEdit
|
||||
Tag = 1
|
||||
Left = 306
|
||||
Top = 12
|
||||
Width = 137
|
||||
Height = 18
|
||||
ReadOnly = True
|
||||
TabOrder = 6
|
||||
end
|
||||
object HZUnit: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 97
|
||||
Top = 35
|
||||
Width = 136
|
||||
Height = 20
|
||||
Hint = 'Salesman/'#19994#21153#21592
|
||||
TabOrder = 7
|
||||
Text = 'M'
|
||||
OnBtnUpClick = HZUnitBtnUpClick
|
||||
OnBtnDnClick = HZUnitBtnDnClick
|
||||
end
|
||||
object MDTT: TComboBox
|
||||
Tag = 1
|
||||
Left = 306
|
||||
Top = 35
|
||||
Width = 136
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 8
|
||||
Items.Strings = (
|
||||
#32461#20852#23431#23578
|
||||
#27993#27743#23431#31908)
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 124
|
||||
Width = 1252
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 113
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 153
|
||||
Width = 1252
|
||||
Height = 491
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
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.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'SCConNo'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 144
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'SPrtCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #21367#26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 90
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'gangno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object cv1Column3: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = cv1Column3PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'orderUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#31859
|
||||
#20844#26020)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'PRICE'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = Tv1Column6PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 71
|
||||
end
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'MONEY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'CANGWEI'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 74
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #26159#21542#24320#21305
|
||||
DataBinding.FieldName = 'SFKP'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#21542
|
||||
#26159)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'mxnote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 102
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 520
|
||||
Top = 1
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 1
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 644
|
||||
Top = 268
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 588
|
||||
Top = 268
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 460
|
||||
Top = 1
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 528
|
||||
Top = 268
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 552
|
||||
PixelsPerInch = 96
|
||||
object dazi1: TcxStyle
|
||||
AssignedValues = [svColor]
|
||||
Color = clRed
|
||||
end
|
||||
end
|
||||
end
|
||||
575
发货申请(ShipmentRequest.dll)/U_DYSQInPut.pas
Normal file
575
发货申请(ShipmentRequest.dll)/U_DYSQInPut.pas
Normal file
|
|
@ -0,0 +1,575 @@
|
|||
unit U_DYSQInPut;
|
||||
|
||||
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, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmDYSQInPut = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ScrollBox1: TScrollBox;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Sub: TClientDataSet;
|
||||
ADOQuery1: TADOQuery;
|
||||
Label14: TLabel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
CRType: TComboBox;
|
||||
Note: TEdit;
|
||||
Label12: TLabel;
|
||||
Label11: TLabel;
|
||||
SHDanWei: TBtnEditC;
|
||||
CustomerNoName: TBtnEditA;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
cv1Column3: TcxGridDBColumn;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
dazi1: TcxStyle;
|
||||
lbl2: TLabel;
|
||||
DLYDATE: TDateTimePicker;
|
||||
Label3: TLabel;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
XSType: TComboBox;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
filler: TEdit;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Label16: TLabel;
|
||||
HZUnit: TBtnEditC;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
Label28: TLabel;
|
||||
MDTT: TComboBox;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure SHDanWeiBtnUpClick(Sender: TObject);
|
||||
procedure SHDanWeiBtnDnClick(Sender: TObject);
|
||||
procedure CustomerNoNameBtnClick(Sender: TObject);
|
||||
procedure cv1Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure Tv1Column6PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure HZUnitBtnUpClick(Sender: TObject);
|
||||
procedure HZUnitBtnDnClick(Sender: TObject);
|
||||
private
|
||||
fuserName: string;
|
||||
procedure InitData();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
PState, CopyInt: Integer;
|
||||
FMainId, FFMainId, ChkStr, ConPriceStr: string;
|
||||
FXS: Integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmDYSQInPut: TfrmDYSQInPut;
|
||||
newh: hwnd;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_ZDYHelp, U_RTFun, U_SQKCHZSelList, U_ContractListNXSel,
|
||||
U_CPManageFMSel, U_ZdyAttachment, U_ClothSCYWYListSel, U_ProductOrderListSel,
|
||||
U_CKProductBCPKCListSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDYSQInPut.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('调样发货申请录入', Tv1, '发货管理77');
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.InitData();
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
if PState = 0 then
|
||||
begin
|
||||
DLYDATE.datetime := strtodatetime(Trim(FormatDateTime('yyyy-MM-dd', Now)));
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from FHSQ_Sub A');
|
||||
if PState = 1 then
|
||||
begin
|
||||
sql.Add('where FSId=''' + 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 A.* ');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where FSId=''' + Trim(FMainId) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
SCSHDataNew(ADOQuery1, ScrollBox1, 1);
|
||||
if ADOQuery1.IsEmpty = True then
|
||||
begin
|
||||
filler.Text := Trim(DName);
|
||||
end;
|
||||
if FMainId = '' then
|
||||
begin
|
||||
CustomerNoName.Text := '板房';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
readCxGrid('调样发货申请录入', Tv1, '发货管理77');
|
||||
|
||||
InitData();
|
||||
end;
|
||||
|
||||
function TfrmDYSQInPut.SaveData(): Boolean;
|
||||
var
|
||||
maxno, maxmnno, FSSId: string;
|
||||
fconNO, fmxType: string;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
///保存主表
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'SM', 'FHSQ_Main', 4, 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 FHSQ_Main where FSID=''' + Trim(FMainId) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('SQType').Value := '调样';
|
||||
FieldByName('FSID').Value := Trim(maxno);
|
||||
RTSetsavedata(ADOCmd, 'FHSQ_Main', ScrollBox1, 1);
|
||||
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
// FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('SQDate').Value := SGetServerDate(ADOTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
Post;
|
||||
end;
|
||||
|
||||
FMainId := Trim(maxno);
|
||||
///保存子表
|
||||
Order_Sub.DisableControls;
|
||||
with Order_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'SS', 'FHSQ_Sub', 4, 1) = False then
|
||||
begin
|
||||
Order_Sub.EnableControls;
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(Order_Sub.fieldbyname('SSId').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from FHSQ_Sub ');
|
||||
sql.Add(' where SSId=''' + Trim(maxno) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.IsEmpty then
|
||||
begin
|
||||
FSSId := '';
|
||||
end
|
||||
else
|
||||
begin
|
||||
FSSId := Trim(maxno);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FSSId) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
FieldByName('FSID').Value := Trim(FMainId);
|
||||
FieldByName('SSID').Value := Trim(maxno);
|
||||
RTSetSaveDataCDS(ADOCmd, Tv1, Order_Sub, 'FHSQ_Sub', 0);
|
||||
FieldByName('MJID').Value := Order_Sub.fieldbyname('MJID').Value;
|
||||
FieldByName('MainId').Value := Order_Sub.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := Order_Sub.fieldbyname('SubId').Value;
|
||||
FieldByName('SSConMainId').Value := Order_Sub.fieldbyname('SSConMainId').Value;
|
||||
FieldByName('SSConSubId').Value := Order_Sub.fieldbyname('SSConSubId').Value;
|
||||
Post;
|
||||
end;
|
||||
Order_Sub.Edit;
|
||||
Order_Sub.FieldByName('SSID').Value := Trim(maxno);
|
||||
Next;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('update FHSQ_Main set DBConNo=cast((select '' ''+ SSConNo from FHSQ_Sub X where X.FSId=FHSQ_Main.FSId and X.SSConNo<>FHSQ_Main.ConNo for xml Path('''')) as varchar(100)) ');
|
||||
SQL.Add(', SQPSHZ= (select sum(SQPS) from FHSQ_Sub X where X.FSId=FHSQ_Main.FSId ) ');
|
||||
SQL.Add(', SQqtyHZ= (select sum(SQqty) from FHSQ_Sub X where X.FSId=FHSQ_Main.FSId ) ');
|
||||
SQL.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.EnableControls;
|
||||
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
Freal: Double;
|
||||
begin
|
||||
ToolBar1.SetFocus;
|
||||
|
||||
if Trim(CRType.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('出库类型不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(MDTT.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('码单抬头不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CustomerNoName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('客户不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if (Order_Sub.Locate('SQPS', null, [])) and (Order_Sub.Locate('SQqty', null, [])) = True then
|
||||
begin
|
||||
Application.MessageBox('细码申请匹数和数量不能全为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with Order_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Order_Sub.FieldByName('sqqty').AsFloat < 0 then
|
||||
begin
|
||||
Application.MessageBox('申请数量不能为负数!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
FQtyUnit, FFSubid: string;
|
||||
begin
|
||||
// if Trim(CustomerNoName.Text) = '' then
|
||||
// begin
|
||||
// Application.MessageBox('客户不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
try
|
||||
frmCKProductBCPKCListSel := TfrmCKProductBCPKCListSel.Create(Application);
|
||||
with frmCKProductBCPKCListSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
while CDS_Main.locate('SSel', true, []) do
|
||||
begin
|
||||
if (Self.Order_Sub.Locate('MJID', Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MJID').AsString), []) = False) and ((frmCKProductBCPKCListSel.CDS_Main.fieldbyname('ISSD').AsString <> '已锁定')) then
|
||||
begin
|
||||
with Self.Order_Sub do
|
||||
begin
|
||||
Append;
|
||||
|
||||
FieldByName('SCConNo').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('Orderno').AsString);
|
||||
FieldByName('MainId').Value := frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := frmCKProductBCPKCListSel.CDS_Main.fieldbyname('SubId').Value;
|
||||
FieldByName('PRTColor').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('PRTColor').AsString);
|
||||
FieldByName('SPrtCode').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MPRTCode').AsString);
|
||||
FieldByName('SPrtCodeName').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MPRTCodeName').AsString);
|
||||
FieldByName('PRTHX').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('PRTHX').AsString);
|
||||
FieldByName('MJID').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MJID').AsString);
|
||||
FieldByName('SQQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('Qty').AsString);
|
||||
FieldByName('gangno').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('GANGHAO').AsString);
|
||||
FieldByName('CANGWEI').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('rkPLACE').AsString);
|
||||
|
||||
FieldByName('orderUnit').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('qtyunit').AsString);
|
||||
FieldByName('sfkp').Value := '否';
|
||||
|
||||
FieldByName('orderUnit').Value := Trim(HZUnit.Text);
|
||||
FieldByName('PRICE').Value := 0;
|
||||
FieldByName('money').Value := 0;
|
||||
if (Trim(HZUnit.Text) = 'KG') or (Trim(HZUnit.Text) = '公斤') then
|
||||
begin
|
||||
FieldByName('SQQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('KGQty').AsString);
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('SQQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('QTY').AsString);
|
||||
// if XSType.Text <> '现货' then
|
||||
// begin
|
||||
// FieldByName('money').Value := StrToFloatdef(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('QTY').AsString, 0) * StrToFloatdef(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('SCSPRICE').AsString, 0);
|
||||
// end;
|
||||
|
||||
end;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCKProductBCPKCListSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Sub.IsEmpty then
|
||||
Exit;
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) <> '' then
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
sql.add(' and isnull(FHPS,0)>0');
|
||||
Open;
|
||||
end;
|
||||
if ADOTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update FHSQ_Main Set ');
|
||||
sql.Add('SQPSHZ=(select Sum(SQPS) from FHSQ_Sub A where A.FSID=FHSQ_Main.FSID)');
|
||||
sql.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.SHDanWeiBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'SHDanWei';
|
||||
flagname := '收货单位';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.SHDanWei.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.SHDanWeiBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
SHDanWei.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.CustomerNoNameBtnClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZdyAttachment := TfrmZdyAttachment.Create(Application);
|
||||
with frmZdyAttachment do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.CustomerNoName.Text := Trim(frmZdyAttachment.CDS_HZ.fieldbyname('CoName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZdyAttachment.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.cv1Column3PropertiesEditValueChanged(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 Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||
FieldbyName('Money').Value := format('%.2f', [FieldByName('sqqty').AsFloat * FieldByName('Price').AsFloat + FieldByName('BGFee').AsFloat]);
|
||||
Post;
|
||||
end;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.Tv1Column6PropertiesEditValueChanged(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 Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||
FieldbyName('Money').Value := format('%.2f', [FieldByName('sqqty').AsFloat * FieldByName('Price').AsFloat + FieldByName('BGFee').AsFloat]);
|
||||
Post;
|
||||
end;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.HZUnitBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
if not Order_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细数据已选择,不能修改!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'HZUnit';
|
||||
flagname := '数量单位';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.HZUnit.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQInPut.HZUnitBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
if not Order_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细数据已选择,不能修改!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
HZUnit.Text := '';
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
838
发货申请(ShipmentRequest.dll)/U_DYSQList.dfm
Normal file
838
发货申请(ShipmentRequest.dll)/U_DYSQList.dfm
Normal file
|
|
@ -0,0 +1,838 @@
|
|||
object frmDYSQList: TfrmDYSQList
|
||||
Left = 298
|
||||
Top = 51
|
||||
Width = 1556
|
||||
Height = 766
|
||||
Caption = #35843#26679#30003#35831
|
||||
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 = 1540
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
ImageIndex = 1
|
||||
OnClick = TBAddClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 11
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 58
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 315
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 3
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object tchk: TToolButton
|
||||
Left = 378
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
ImageIndex = 31
|
||||
OnClick = tchkClick
|
||||
end
|
||||
object Tnochk: TToolButton
|
||||
Left = 441
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23457#26680
|
||||
ImageIndex = 52
|
||||
OnClick = TnochkClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 528
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 591
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = TBPrintClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 654
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 96
|
||||
Width = 1540
|
||||
Height = 374
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCustomDrawCell = Tv1CustomDrawCell
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
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 = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #30003#35831#21333#21495
|
||||
DataBinding.FieldName = 'FSID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'HZSCConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 332
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 124
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #25910#36135#21333#20301
|
||||
DataBinding.FieldName = 'SHDanWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 124
|
||||
end
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #30003#35831#26085#26399
|
||||
DataBinding.FieldName = 'SQDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'SQQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #30003#35831#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #23457#26680#20154
|
||||
DataBinding.FieldName = 'Chker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #23457#26680#26085#26399
|
||||
DataBinding.FieldName = 'ChkTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPSHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #21457#36135#25968#37327
|
||||
DataBinding.FieldName = 'FHMSHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #21457#36135#26085#26399
|
||||
DataBinding.FieldName = 'fhDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
end
|
||||
object cv1Column12: TcxGridDBColumn
|
||||
Caption = #35746#21333#29366#24577
|
||||
DataBinding.FieldName = 'status2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object cv1Column14: TcxGridDBColumn
|
||||
Caption = #20132#36135#30830#35748#26085#26399
|
||||
DataBinding.FieldName = 'dlydate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1540
|
||||
Height = 43
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #30003#35831#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 263
|
||||
Top = 15
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #23458#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 430
|
||||
Top = 99
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 387
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #35745#21010#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 303
|
||||
Top = 99
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 303
|
||||
Top = 123
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 160
|
||||
Top = 16
|
||||
Width = 6
|
||||
Height = 12
|
||||
Caption = '-'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 519
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #30003#35831#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 667
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 11
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 168
|
||||
Top = 11
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 293
|
||||
Top = 11
|
||||
Width = 78
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 483
|
||||
Top = 95
|
||||
Width = 76
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object HZSCConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 438
|
||||
Top = 10
|
||||
Width = 76
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 95
|
||||
Width = 56
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTMF: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 119
|
||||
Width = 56
|
||||
Height = 20
|
||||
TabOrder = 6
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object FSID: TEdit
|
||||
Tag = 2
|
||||
Left = 570
|
||||
Top = 10
|
||||
Width = 91
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object HZCODE: TEdit
|
||||
Tag = 2
|
||||
Left = 718
|
||||
Top = 10
|
||||
Width = 91
|
||||
Height = 20
|
||||
TabOrder = 8
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 75
|
||||
Width = 1540
|
||||
Height = 21
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectRight = 0
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 470
|
||||
Width = 1540
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Control = cxGrid2
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 478
|
||||
Width = 1540
|
||||
Height = 249
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v2Column4: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'SPrtCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 78
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'GANGNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object cv2Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object cv2Column12: TcxGridDBColumn
|
||||
Caption = #35746#21333#25968#37327
|
||||
DataBinding.FieldName = 'orderqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
object v2Column2: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'OrderUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 77
|
||||
end
|
||||
object cv2Column6: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 82
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 82
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #21457#36135#25968#37327
|
||||
DataBinding.FieldName = 'FHms'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = #26159#21542#24320#21305
|
||||
DataBinding.FieldName = 'SFKP'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 1000
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 156
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 640
|
||||
Top = 176
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 704
|
||||
Top = 176
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 968
|
||||
Top = 184
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 936
|
||||
Top = 184
|
||||
end
|
||||
object RMDBDataSet1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 244
|
||||
Top = 200
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 1
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 375
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 212
|
||||
Top = 196
|
||||
end
|
||||
object CDS_Print: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 344
|
||||
Top = 184
|
||||
end
|
||||
object ADOQuerySub: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 740
|
||||
Top = 176
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 464
|
||||
Top = 504
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 496
|
||||
Top = 504
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 528
|
||||
Top = 504
|
||||
end
|
||||
object CDS_Note: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 408
|
||||
Top = 184
|
||||
end
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||
DefaultCollate = False
|
||||
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
|
||||
PreviewOptions.RulerUnit = rmutScreenPixels
|
||||
PreviewOptions.RulerVisible = False
|
||||
PreviewOptions.DrawBorder = False
|
||||
PreviewOptions.BorderPen.Color = clGray
|
||||
PreviewOptions.BorderPen.Style = psDash
|
||||
Dataset = RMDBDataSet1
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 280
|
||||
Top = 196
|
||||
ReportData = {}
|
||||
end
|
||||
end
|
||||
650
发货申请(ShipmentRequest.dll)/U_DYSQList.pas
Normal file
650
发货申请(ShipmentRequest.dll)/U_DYSQList.pas
Normal file
|
|
@ -0,0 +1,650 @@
|
|||
unit U_DYSQList;
|
||||
|
||||
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,
|
||||
RM_E_llPDF, cxDropDownEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, dxBarBuiltInMenu;
|
||||
|
||||
type
|
||||
TfrmDYSQList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
TBExport: TToolButton;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
Order_Main: TClientDataSet;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Print: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label12: TLabel;
|
||||
Label13: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CustomerNoName: TEdit;
|
||||
MPRTCodeName: TEdit;
|
||||
HZSCConNo: TEdit;
|
||||
MPRTKZ: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
cxTabControl1: TcxTabControl;
|
||||
tchk: TToolButton;
|
||||
Tnochk: TToolButton;
|
||||
cxSplitter1: TcxSplitter;
|
||||
ADOQuerySub: TADOQuery;
|
||||
DataSource2: TDataSource;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
CDS_Note: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
cv2Column4: TcxGridDBColumn;
|
||||
cv2Column6: TcxGridDBColumn;
|
||||
cv1Column12: TcxGridDBColumn;
|
||||
cv2Column12: TcxGridDBColumn;
|
||||
cv1Column14: TcxGridDBColumn;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
v2Column4: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
FSID: TEdit;
|
||||
Label5: TLabel;
|
||||
HZCODE: TEdit;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure tchkClick(Sender: TObject);
|
||||
procedure TnochkClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSubGrid();
|
||||
procedure InitForm();
|
||||
procedure SetStatus();
|
||||
function DelData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt: Integer;
|
||||
canshu1, canshu2: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
//var
|
||||
//frmContractListNX: TfrmContractListNX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_DYSQInPut, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDYSQList.SetStatus();
|
||||
begin
|
||||
tchk.Visible := False;
|
||||
Tnochk.Visible := False;
|
||||
if canshu1 = '审核' then
|
||||
begin
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
tchk.Visible := true;
|
||||
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
Tnochk.Visible := true;
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else if canshu1 = '高权限' then
|
||||
begin
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
tchk.Visible := true;
|
||||
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
Tnochk.Visible := true;
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
//frmFHSQList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('调样发货主表', Tv1, '发货管理7');
|
||||
WriteCxGrid('调样发货子表', Tv2, '发货管理8');
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,isnull(status,''未完成'')status2 ');
|
||||
Sql.Add(' ,HZCODE=CAST((select distinct(SPrtCode) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
Sql.Add(' ,HZSCConNo= STUFF(( SELECT distinct '','' +convert(VARCHAR, SCConNo) FROM FHSQ_Sub X where A.FSID=X.FSID FOR XML PATH('''')), 1, 1, '''')');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where SQType=''调样'' ');
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
begin
|
||||
sql.Add(' and SQDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.Add(' and SQDate<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
||||
end;
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.Chker,'''')='''' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.Chker,'''')<>'''' ');
|
||||
end;
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
sql.Add(' and isnull(A.Filler,'''')=''' + Trim(DName) + '''');
|
||||
end;
|
||||
if (canshu2 = '内销') or (canshu2 = '外销') then
|
||||
begin
|
||||
sql.Add(' and isnull(A.XSType,'''')=''' + Trim(canshu2) + '''');
|
||||
end;
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.InitForm();
|
||||
begin
|
||||
|
||||
ReadCxGrid('调样发货主表', Tv1, '发货管理7');
|
||||
ReadCxGrid('调样发货子表', Tv2, '发货管理8');
|
||||
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 60;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.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 TfrmDYSQList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
Exit;
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
frmDYSQInPut := TfrmDYSQInPut.Create(Application);
|
||||
with frmDYSQInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('FSID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDYSQInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
Exit;
|
||||
if canshu1 <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select * from CK_BanCP_CR where CRFlag=''出库''');
|
||||
sql.add(' and CKOrdNo=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from yf_money_cr_sub');
|
||||
sql.Add('where yfpzno=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = false then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if DelData() then
|
||||
begin
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmDYSQList.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Sub where FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Main where FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
SelExportData(Tv1, ADOQueryMain, '发货申请列表');
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
Txt, fImagePath: string;
|
||||
Moudle: THandle;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
|
||||
ExportFtErpFile('调样申请单.rmf', ADOQueryTemp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\调样申请单.rmf';
|
||||
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select *,b.ganghao as gangno from fhsq_main A inner join fhsq_sub B ON A.FSID=B.FSID');
|
||||
SQL.Add('WHERE A.FSID=' + quotedstr(Trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
// SQL.Add('EXEC P_Print_XHSQD @FSID=' + quotedstr(Trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
try
|
||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||
Txt := Trim(Order_Main.fieldbyname('FSID').AsString);
|
||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||
if FileExists(fImagePath) then
|
||||
DeleteFile(fImagePath);
|
||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||
except
|
||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
TBFind.Click;
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.TBAddClick(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
try
|
||||
frmDYSQInPut := TfrmDYSQInPut.Create(Application);
|
||||
with frmDYSQInPut do
|
||||
begin
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDYSQInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmDYSQInPut := TfrmDYSQInPut.Create(Application);
|
||||
with frmDYSQInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('FSID').AsString);
|
||||
ToolBar2.Visible := False;
|
||||
TBSave.Visible := False;
|
||||
ScrollBox1.Enabled := False;
|
||||
Tv1.OptionsSelection.CellSelect := False;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmDYSQInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.tchkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET Chker=''' + Trim(DName) + ''',ChkTime=getdate(),ChkStatus=''审核通过'' ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('审核成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.InitSubGrid();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
sql.Add('select A.*,B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''')
|
||||
else
|
||||
sql.Add('select A.*,B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId where 1=2');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.TnochkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 1 then
|
||||
exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能撤销!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET Chker=Null,ChkTime=Null,ChkStatus=Null ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('撤销成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('撤销失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
|
||||
sql.Add(' where 1=2');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmDYSQList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
begin
|
||||
if AViewInfo.GridRecord.Values[cv1Column12.Index] <> '未完成' then
|
||||
ACanvas.font.Color := clred;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
17991
发货申请(ShipmentRequest.dll)/U_DataLink.dfm
Normal file
17991
发货申请(ShipmentRequest.dll)/U_DataLink.dfm
Normal file
File diff suppressed because it is too large
Load Diff
116
发货申请(ShipmentRequest.dll)/U_DataLink.pas
Normal file
116
发货申请(ShipmentRequest.dll)/U_DataLink.pas
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
unit U_DataLink;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, cxClasses, ExtCtrls, SyncObjs,
|
||||
dxSkinsCore, dxSkinsDefaultPainters;
|
||||
|
||||
type
|
||||
TMyThread = class(TThread)
|
||||
protected
|
||||
procedure Execute; override;
|
||||
end;
|
||||
|
||||
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_ShipmentRequest = 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;
|
||||
tmr_link: TTimer;
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
procedure tmr_linkTimer(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_ShipmentRequest: TDataLink_ShipmentRequest;
|
||||
CriticalSection: TCriticalSection; {声明临界}
|
||||
|
||||
implementation
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TMyThread.Execute;
|
||||
begin
|
||||
FreeOnTerminate := True;
|
||||
CriticalSection.Enter;
|
||||
try
|
||||
with DataLink_ShipmentRequest.AdoDataLink do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select getdate()');
|
||||
open;
|
||||
end;
|
||||
except
|
||||
try
|
||||
with DataLink_ShipmentRequest.ADOLink do
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
except
|
||||
|
||||
end;
|
||||
end;
|
||||
CriticalSection.Leave;
|
||||
end;
|
||||
|
||||
procedure TDataLink_ShipmentRequest.DataModuleDestroy(Sender: TObject);
|
||||
begin
|
||||
CriticalSection.Free;
|
||||
DataLink_ShipmentRequest := nil;
|
||||
end;
|
||||
|
||||
procedure TDataLink_ShipmentRequest.tmr_linkTimer(Sender: TObject);
|
||||
begin
|
||||
TMyThread.Create(False);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1403
发货申请(ShipmentRequest.dll)/U_FHSQInPut.dfm
Normal file
1403
发货申请(ShipmentRequest.dll)/U_FHSQInPut.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1509
发货申请(ShipmentRequest.dll)/U_FHSQInPut.pas
Normal file
1509
发货申请(ShipmentRequest.dll)/U_FHSQInPut.pas
Normal file
File diff suppressed because it is too large
Load Diff
676
发货申请(ShipmentRequest.dll)/U_FHSQInPut220313.dfm
Normal file
676
发货申请(ShipmentRequest.dll)/U_FHSQInPut220313.dfm
Normal file
|
|
@ -0,0 +1,676 @@
|
|||
object frmFHSQInPut220313: TfrmFHSQInPut220313
|
||||
Left = 371
|
||||
Top = 205
|
||||
Width = 1252
|
||||
Height = 646
|
||||
Caption = #21457#36135#30003#35831#24405#20837
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 120
|
||||
TextHeight = 15
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1234
|
||||
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_ShipmentRequest.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 ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 1234
|
||||
Height = 220
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clBtnFace
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label10: TLabel
|
||||
Left = 576
|
||||
Top = 16
|
||||
Width = 82
|
||||
Height = 15
|
||||
Caption = #35746' '#21333' '#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 39
|
||||
Top = 16
|
||||
Width = 84
|
||||
Height = 15
|
||||
Caption = #23458' '#25143#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 305
|
||||
Top = 16
|
||||
Width = 80
|
||||
Height = 15
|
||||
Caption = #20986#24211#31867#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 661
|
||||
Top = 240
|
||||
Width = 80
|
||||
Height = 15
|
||||
Caption = #20135#21697#32534#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 41
|
||||
Top = 55
|
||||
Width = 80
|
||||
Height = 15
|
||||
Caption = #20135#21697#21517#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 575
|
||||
Top = 55
|
||||
Width = 84
|
||||
Height = 15
|
||||
Caption = #38376' '#24133#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 850
|
||||
Top = 55
|
||||
Width = 84
|
||||
Height = 15
|
||||
Caption = #20811' '#37325#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 39
|
||||
Top = 178
|
||||
Width = 84
|
||||
Height = 15
|
||||
Caption = #22791' '#27880#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 41
|
||||
Top = 93
|
||||
Width = 80
|
||||
Height = 15
|
||||
Caption = #25910#36135#21333#20301#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label16: TLabel
|
||||
Left = 303
|
||||
Top = 93
|
||||
Width = 84
|
||||
Height = 15
|
||||
Caption = #26579' '#21378#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 303
|
||||
Top = 55
|
||||
Width = 84
|
||||
Height = 15
|
||||
Caption = #35268' '#26684#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 81
|
||||
Top = 240
|
||||
Width = 75
|
||||
Height = 15
|
||||
Caption = #26426' '#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label24: TLabel
|
||||
Left = 353
|
||||
Top = 240
|
||||
Width = 75
|
||||
Height = 15
|
||||
Caption = #24037' '#33402#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 853
|
||||
Top = 16
|
||||
Width = 80
|
||||
Height = 15
|
||||
Caption = #30003#35831#25209#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 10
|
||||
Top = 129
|
||||
Width = 112
|
||||
Height = 15
|
||||
Caption = #20132#36135#30830#35748#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 303
|
||||
Top = 129
|
||||
Width = 84
|
||||
Height = 15
|
||||
Caption = #26588' '#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 578
|
||||
Top = 129
|
||||
Width = 80
|
||||
Height = 15
|
||||
Caption = #38144#21806#31867#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 1
|
||||
Left = 383
|
||||
Top = 11
|
||||
Width = 170
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
ItemIndex = 0
|
||||
TabOrder = 1
|
||||
Text = #38144#21806#20986#24211
|
||||
Items.Strings = (
|
||||
#38144#21806#20986#24211)
|
||||
end
|
||||
object PrtCodeName: TEdit
|
||||
Tag = 1
|
||||
Left = 120
|
||||
Top = 51
|
||||
Width = 170
|
||||
Height = 18
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object prtmf: TEdit
|
||||
Tag = 1
|
||||
Left = 658
|
||||
Top = 51
|
||||
Width = 170
|
||||
Height = 18
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
end
|
||||
object prtkz: TEdit
|
||||
Tag = 1
|
||||
Left = 928
|
||||
Top = 51
|
||||
Width = 170
|
||||
Height = 18
|
||||
ReadOnly = True
|
||||
TabOrder = 4
|
||||
end
|
||||
object ConNo: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 658
|
||||
Top = 11
|
||||
Width = 173
|
||||
Height = 23
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
OnBtnClick = ConNoBtnClick
|
||||
end
|
||||
object Note: TEdit
|
||||
Tag = 1
|
||||
Left = 120
|
||||
Top = 174
|
||||
Width = 980
|
||||
Height = 18
|
||||
TabOrder = 7
|
||||
end
|
||||
object SHDanWei: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 120
|
||||
Top = 88
|
||||
Width = 170
|
||||
Height = 23
|
||||
Hint = 'FYName/'#36153#29992#21517#31216
|
||||
TabOrder = 5
|
||||
OnBtnUpClick = SHDanWeiBtnUpClick
|
||||
OnBtnDnClick = SHDanWeiBtnDnClick
|
||||
end
|
||||
object ranchang: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 383
|
||||
Top = 88
|
||||
Width = 440
|
||||
Height = 23
|
||||
Hint = 'FHTaiTou/'#21457#36135#25260#22836
|
||||
TabOrder = 6
|
||||
OnBtnUpClick = ranchangBtnUpClick
|
||||
end
|
||||
object PrtCode: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 741
|
||||
Top = 235
|
||||
Width = 174
|
||||
Height = 23
|
||||
ReadOnly = True
|
||||
TabOrder = 8
|
||||
Visible = False
|
||||
OnBtnClick = PrtCodeBtnClick
|
||||
end
|
||||
object CustomerNoName: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 120
|
||||
Top = 11
|
||||
Width = 174
|
||||
Height = 23
|
||||
ReadOnly = True
|
||||
TabOrder = 9
|
||||
OnBtnClick = CustomerNoNameBtnClick
|
||||
end
|
||||
object prtspec: TEdit
|
||||
Tag = 1
|
||||
Left = 383
|
||||
Top = 51
|
||||
Width = 170
|
||||
Height = 18
|
||||
ReadOnly = True
|
||||
TabOrder = 10
|
||||
end
|
||||
object CarType: TEdit
|
||||
Tag = 1
|
||||
Left = 153
|
||||
Top = 236
|
||||
Width = 170
|
||||
Height = 18
|
||||
TabOrder = 11
|
||||
Visible = False
|
||||
end
|
||||
object gongyi: TEdit
|
||||
Tag = 1
|
||||
Left = 428
|
||||
Top = 236
|
||||
Width = 170
|
||||
Height = 18
|
||||
TabOrder = 12
|
||||
Visible = False
|
||||
end
|
||||
object BatchNo: TComboBox
|
||||
Tag = 1
|
||||
Left = 928
|
||||
Top = 11
|
||||
Width = 278
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 13
|
||||
Visible = False
|
||||
end
|
||||
object DLYDATE: TDateTimePicker
|
||||
Tag = 1
|
||||
Left = 120
|
||||
Top = 124
|
||||
Width = 113
|
||||
Height = 23
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 14
|
||||
end
|
||||
object GuiXing: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 383
|
||||
Top = 124
|
||||
Width = 170
|
||||
Height = 23
|
||||
Hint = 'GuiXing/'#26588#22411
|
||||
TabOrder = 15
|
||||
OnBtnUpClick = SHDanWeiBtnUpClick
|
||||
OnBtnDnClick = SHDanWeiBtnDnClick
|
||||
end
|
||||
object XSType: TComboBox
|
||||
Tag = 1
|
||||
Left = 658
|
||||
Top = 124
|
||||
Width = 168
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
ItemHeight = 15
|
||||
TabOrder = 16
|
||||
Items.Strings = (
|
||||
#20869#38144
|
||||
#22806#38144)
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 249
|
||||
Width = 1234
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 113
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 278
|
||||
Width = 1234
|
||||
Height = 321
|
||||
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
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
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_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'SCConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 77
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object cv1Column4: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'gangno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 75
|
||||
end
|
||||
object cv1Column6: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'kuanhao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object cv1Column7: TcxGridDBColumn
|
||||
Caption = #35746#21333#21305#25968
|
||||
DataBinding.FieldName = 'orderps'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 83
|
||||
end
|
||||
object cv1Column8: TcxGridDBColumn
|
||||
Caption = #35746#21333#25968#37327
|
||||
DataBinding.FieldName = 'orderqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object cv1Column2: TcxGridDBColumn
|
||||
Caption = #30003#35831#21305#25968
|
||||
DataBinding.FieldName = 'sqps'
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object cv1Column3: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object cv1Column5: TcxGridDBColumn
|
||||
Caption = #28014#21160#33539#22260
|
||||
DataBinding.FieldName = 'fdfw'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 95
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #25152#23646#35746#21333#21495
|
||||
DataBinding.FieldName = 'SSConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 97
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #25152#23646#23458#25143
|
||||
DataBinding.FieldName = 'SSKHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 124
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 368
|
||||
Top = 1
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 312
|
||||
Top = 1
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 644
|
||||
Top = 268
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 588
|
||||
Top = 268
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 260
|
||||
Top = 1
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 528
|
||||
Top = 268
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
object dazi1: TcxStyle
|
||||
AssignedValues = [svColor]
|
||||
Color = clRed
|
||||
end
|
||||
end
|
||||
end
|
||||
631
发货申请(ShipmentRequest.dll)/U_FHSQInPut220313.pas
Normal file
631
发货申请(ShipmentRequest.dll)/U_FHSQInPut220313.pas
Normal file
|
|
@ -0,0 +1,631 @@
|
|||
unit U_FHSQInPut220313;
|
||||
|
||||
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
|
||||
TfrmFHSQInPut220313 = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ScrollBox1: TScrollBox;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Sub: TClientDataSet;
|
||||
ADOQuery1: TADOQuery;
|
||||
Label10: TLabel;
|
||||
Label14: TLabel;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
CRType: TComboBox;
|
||||
Label2: TLabel;
|
||||
Label5: TLabel;
|
||||
Label8: TLabel;
|
||||
PrtCodeName: TEdit;
|
||||
prtmf: TEdit;
|
||||
Label9: TLabel;
|
||||
prtkz: TEdit;
|
||||
ConNo: TBtnEditA;
|
||||
Note: TEdit;
|
||||
Label12: TLabel;
|
||||
Label11: TLabel;
|
||||
SHDanWei: TBtnEditC;
|
||||
Label16: TLabel;
|
||||
ranchang: TBtnEditC;
|
||||
PrtCode: TBtnEditA;
|
||||
CustomerNoName: TBtnEditA;
|
||||
Label6: TLabel;
|
||||
prtspec: TEdit;
|
||||
Label15: TLabel;
|
||||
CarType: TEdit;
|
||||
Label24: TLabel;
|
||||
gongyi: TEdit;
|
||||
Label4: TLabel;
|
||||
BatchNo: TComboBox;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
cv1Column2: TcxGridDBColumn;
|
||||
cv1Column3: TcxGridDBColumn;
|
||||
cv1Column4: TcxGridDBColumn;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
dazi1: TcxStyle;
|
||||
cv1Column5: TcxGridDBColumn;
|
||||
cv1Column6: TcxGridDBColumn;
|
||||
cv1Column7: TcxGridDBColumn;
|
||||
cv1Column8: TcxGridDBColumn;
|
||||
lbl2: TLabel;
|
||||
DLYDATE: TDateTimePicker;
|
||||
Label3: TLabel;
|
||||
GuiXing: TBtnEditC;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
XSType: TComboBox;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ConNoBtnClick(Sender: TObject);
|
||||
procedure SHDanWeiBtnUpClick(Sender: TObject);
|
||||
procedure SHDanWeiBtnDnClick(Sender: TObject);
|
||||
procedure ranchangBtnUpClick(Sender: TObject);
|
||||
procedure ShouKuanKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure PrtCodeBtnClick(Sender: TObject);
|
||||
procedure CustomerNoNameBtnClick(Sender: TObject);
|
||||
private
|
||||
fuserName: string;
|
||||
procedure InitData();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
PState, CopyInt: Integer;
|
||||
FMainId, FFMainId, ChkStr, ConPriceStr: string;
|
||||
FXS: Integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFHSQInPut220313: TfrmFHSQInPut220313;
|
||||
newh: hwnd;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_ZDYHelp, U_RTFun, U_SQKCHZSelList, U_ContractListNXSel,
|
||||
U_CPManageFMSel, U_ZdyAttachment, U_ClothSCYWYListSel, U_ProductOrderListSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFHSQInPut220313.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('发货申请录入', Tv1, '发货管理');
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.InitData();
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
if PState = 0 then
|
||||
begin
|
||||
DLYDATE.datetime := strtodatetime(Trim(FormatDateTime('yyyy-MM-dd', Now)));
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
//sql.Add(',GCCode=(select GCCode from Cloth_Main CM where CM.MainId=A.Mainid)');
|
||||
//sql.Add(',BatchNoHZ=(select BatchNoHZ from Cloth_Sub CS where CS.MainId=A.Mainid)');
|
||||
sql.Add(' from FHSQ_Sub A');
|
||||
if PState = 1 then
|
||||
begin
|
||||
sql.Add('where FSId=''' + 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 A.* ');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where FSId=''' + Trim(FMainId) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
|
||||
// fsj := ' select DISTINCT A.APBatchNo Name from JYCon_Sub_AnPai A inner join Cloth_Main B on A.MainId=B.MainId where isnull(A.APBatchNo,'''')<>'''' and B.Valid=''Y'' and B.ConNo=' + quotedstr(Trim(ADOQuery1.FieldByName('Conno').AsString));
|
||||
// SInitComBoxBySql(ADOTemp, BatchNo, False, fsj);
|
||||
|
||||
SCSHDataNew(ADOQuery1, ScrollBox1, 1);
|
||||
|
||||
BatchNo.Clear;
|
||||
BatchNo.Items.Add(Trim(ADOQuery1.fieldbyname('BatchNo').AsString));
|
||||
BatchNo.ItemIndex := BatchNo.Items.IndexOf(Trim(ADOQuery1.fieldbyname('BatchNo').AsString));
|
||||
// ConNo.TxtCode := ;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
readCxGrid('发货申请录入', Tv1, '发货管理');
|
||||
|
||||
InitData();
|
||||
end;
|
||||
|
||||
function TfrmFHSQInPut220313.SaveData(): Boolean;
|
||||
var
|
||||
maxno, maxmnno, FSSId: string;
|
||||
fconNO, fmxType: string;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
///保存主表
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'SM', 'FHSQ_Main', 4, 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 FHSQ_Main where FSID=''' + Trim(FMainId) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('SQType').Value := '订单';
|
||||
FieldByName('FSID').Value := Trim(maxno);
|
||||
RTSetsavedata(ADOCmd, 'FHSQ_Main', ScrollBox1, 1);
|
||||
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('SQDate').Value := SGetServerDate(ADOTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
Post;
|
||||
end;
|
||||
|
||||
FMainId := Trim(maxno);
|
||||
///保存子表
|
||||
Order_Sub.DisableControls;
|
||||
with Order_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'SS', 'FHSQ_Sub', 4, 1) = False then
|
||||
begin
|
||||
Order_Sub.EnableControls;
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(Order_Sub.fieldbyname('SSId').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from FHSQ_Sub ');
|
||||
sql.Add(' where SSId=''' + Trim(maxno) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.IsEmpty then
|
||||
begin
|
||||
FSSId := '';
|
||||
end
|
||||
else
|
||||
begin
|
||||
FSSId := Trim(maxno);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FSSId) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
FieldByName('FSID').Value := Trim(FMainId);
|
||||
FieldByName('SSID').Value := Trim(maxno);
|
||||
RTSetSaveDataCDS(ADOCmd, Tv1, Order_Sub, 'FHSQ_Sub', 0);
|
||||
FieldByName('MainId').Value := Order_Sub.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := Order_Sub.fieldbyname('SubId').Value;
|
||||
FieldByName('SSConMainId').Value := Order_Sub.fieldbyname('SSConMainId').Value;
|
||||
FieldByName('SSConSubId').Value := Order_Sub.fieldbyname('SSConSubId').Value;
|
||||
Post;
|
||||
end;
|
||||
Order_Sub.Edit;
|
||||
Order_Sub.FieldByName('SSID').Value := Trim(maxno);
|
||||
Next;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('update FHSQ_Main set DBConNo=cast((select '' ''+ SSConNo from FHSQ_Sub X where X.FSId=FHSQ_Main.FSId and X.SSConNo<>FHSQ_Main.ConNo for xml Path('''')) as varchar(100)) ');
|
||||
SQL.Add(', SQPSHZ= (select sum(SQPS) from FHSQ_Sub X where X.FSId=FHSQ_Main.FSId ) ');
|
||||
SQL.Add(', SQqtyHZ= (select sum(SQqty) from FHSQ_Sub X where X.FSId=FHSQ_Main.FSId ) ');
|
||||
SQL.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.EnableControls;
|
||||
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
Freal: Double;
|
||||
begin
|
||||
ToolBar1.SetFocus;
|
||||
|
||||
if Trim(CRType.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('出库类型不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Trim(PrtCodeName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('产品名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
// if (Trim(SQPSHZ.Text) = '') and (Trim(SQqtyHZ.Text) = '') then
|
||||
// begin
|
||||
// Application.MessageBox('申请数量和匹数不能全为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
//
|
||||
// if Order_Sub.IsEmpty then
|
||||
// begin
|
||||
// Application.MessageBox('明细不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
|
||||
// if Order_Sub.Locate('SCConNo', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('白坯单号不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
if (Order_Sub.Locate('SQPS', null, [])) and (Order_Sub.Locate('SQqty', null, [])) = True then
|
||||
begin
|
||||
Application.MessageBox('细码申请匹数和数量不能全为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
// if Order_Sub.Locate('SQPS', 0, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('申请匹数不能为0!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// if Order_Sub.Locate('SQQty', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('申请数量不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
fsj, FConMainId: string;
|
||||
begin
|
||||
|
||||
try
|
||||
frmProductOrderListSel := TfrmProductOrderListSel.Create(Application);
|
||||
with frmProductOrderListSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Order_Main.locate('SSel', true, []);
|
||||
FConMainId := Trim(frmProductOrderListSel.Order_Main.fieldbyname('MainId').AsString);
|
||||
while Order_Main.locate('SSel', true, []) do
|
||||
begin
|
||||
|
||||
if FConMainId <> trim(frmProductOrderListSel.Order_Main.Fieldbyname('MainId').AsString) then
|
||||
begin
|
||||
Application.MessageBox('不能选择多个合同!', '提示', 0);
|
||||
break;
|
||||
end;
|
||||
|
||||
with Self.Order_Sub do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('SCConNo').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('Orderno').AsString);
|
||||
FieldByName('SSKHName').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('CustomerNoName').AsString);
|
||||
FieldByName('SSConNo').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('ConNO').AsString);
|
||||
FieldByName('MainId').Value := frmProductOrderListSel.Order_Main.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := frmProductOrderListSel.Order_Main.fieldbyname('SubId').Value;
|
||||
FieldByName('PRTColor').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('PRTColor').AsString);
|
||||
// Post;
|
||||
end;
|
||||
Order_Main.Edit;
|
||||
Order_Main.fieldbyname('SSel').value := false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmProductOrderListSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Sub.IsEmpty then
|
||||
Exit;
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) <> '' then
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
sql.add(' and isnull(FHPS,0)>0');
|
||||
Open;
|
||||
end;
|
||||
if ADOTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update FHSQ_Main Set ');
|
||||
sql.Add('SQPSHZ=(select Sum(SQPS) from FHSQ_Sub A where A.FSID=FHSQ_Main.FSID)');
|
||||
sql.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.ConNoBtnClick(Sender: TObject);
|
||||
var
|
||||
fsj, FConMainId: string;
|
||||
begin
|
||||
// if Order_Sub.IsEmpty = False then
|
||||
// begin
|
||||
// Application.MessageBox('已有明细数据,不能更改合同!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
try
|
||||
frmProductOrderListSel := TfrmProductOrderListSel.Create(Application);
|
||||
with frmProductOrderListSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Order_Main.locate('SSel', true, []);
|
||||
FConMainId := Trim(frmProductOrderListSel.Order_Main.fieldbyname('MainId').AsString);
|
||||
Self.ConNo.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('ConNo').AsString);
|
||||
Self.CustomerNoName.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('CustomerNoName').AsString);
|
||||
// Self.ranchang.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('FactoryNoName').AsString);
|
||||
Self.SHDanWei.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('CustomerNoName').AsString);
|
||||
Self.PrtCode.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('MPRTCode').AsString);
|
||||
Self.PrtCodeName.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('MPRTCodeName').AsString);
|
||||
Self.prtmf.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('MPRTMF').AsString);
|
||||
Self.prtkz.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('MPRTKZ').AsString);
|
||||
Self.prtspec.Text := Trim(frmProductOrderListSel.Order_Main.fieldbyname('MPRTSpec').AsString);
|
||||
while Order_Main.locate('SSel', true, []) do
|
||||
begin
|
||||
|
||||
if FConMainId <> trim(frmProductOrderListSel.Order_Main.Fieldbyname('MainId').AsString) then
|
||||
begin
|
||||
Application.MessageBox('不能选择多个合同!', '提示', 0);
|
||||
break;
|
||||
end;
|
||||
// if self.Order_Sub.locate('ConSubId', trim(Order_Main.Fieldbyname('SubId').AsString), []) then
|
||||
// begin
|
||||
// Order_Main.Edit;
|
||||
// Order_Main.fieldbyname('SSel').value := false;
|
||||
// continue;
|
||||
// end;
|
||||
with Self.Order_Sub do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('SCConNo').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('Orderno').AsString);
|
||||
FieldByName('SSKHName').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('CustomerNoName').AsString);
|
||||
FieldByName('SSConNo').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('ConNO').AsString);
|
||||
FieldByName('MainId').Value := frmProductOrderListSel.Order_Main.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := frmProductOrderListSel.Order_Main.fieldbyname('SubId').Value;
|
||||
FieldByName('PRTColor').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('PRTColor').AsString);
|
||||
// FieldByName('kuanhao').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('kuanhao').AsString);
|
||||
FieldByName('orderps').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('PRTps').AsString);
|
||||
FieldByName('orderqty').Value := Trim(frmProductOrderListSel.Order_Main.fieldbyname('prtorderqty').AsString);
|
||||
// Post;
|
||||
end;
|
||||
Order_Main.Edit;
|
||||
Order_Main.fieldbyname('SSel').value := false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
// fsj := ' select DISTINCT A.APBatchNo Name from JYCon_Sub_AnPai A inner join Cloth_Main B on A.MainId=B.MainId ';
|
||||
// fsj := fsj + 'where isnull(A.APBatchNo,'''')<>'''' and B.Valid=''Y'' and B.ConNo=' + quotedstr(ConNo.Text);
|
||||
// fsj := fsj + ' order by A.filltime';
|
||||
// SInitComBoxBySql(ADOTemp, BatchNo, False, fsj);
|
||||
frmProductOrderListSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.SHDanWeiBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'SHDanWei';
|
||||
flagname := '收货单位';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.SHDanWei.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.SHDanWeiBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
SHDanWei.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.ranchangBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'ranchang';
|
||||
flagname := '染厂';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.ranchang.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.ShouKuanKeyPress(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 TfrmFHSQInPut220313.PrtCodeBtnClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmCPManageFMSel := TfrmCPManageFMSel.Create(Application);
|
||||
with frmCPManageFMSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
PrtCode.Text := frmCPManageFMSel.CDS_Main.fieldbyname('CYNo').AsString;
|
||||
PrtCodeName.Text := frmCPManageFMSel.CDS_Main.fieldbyname('CYName').AsString;
|
||||
prtmf.Text := frmCPManageFMSel.CDS_Main.fieldbyname('CYMF').AsString;
|
||||
prtkz.Text := frmCPManageFMSel.CDS_Main.fieldbyname('CYKZ').AsString;
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCPManageFMSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPut220313.CustomerNoNameBtnClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'CustomerNoName';
|
||||
flagname := '客户';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.CustomerNoName.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
881
发货申请(ShipmentRequest.dll)/U_FHSQInPutXH.dfm
Normal file
881
发货申请(ShipmentRequest.dll)/U_FHSQInPutXH.dfm
Normal file
|
|
@ -0,0 +1,881 @@
|
|||
object frmFHSQInPutXH: TfrmFHSQInPutXH
|
||||
Left = 278
|
||||
Top = 191
|
||||
Width = 1178
|
||||
Height = 557
|
||||
Caption = #29616#36135#30003#35831#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 = 1162
|
||||
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_ShipmentRequest.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 ScrollBox1: TScrollBox
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 1162
|
||||
Height = 176
|
||||
Align = alTop
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
Color = clBtnFace
|
||||
Ctl3D = False
|
||||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
object Label14: TLabel
|
||||
Left = 17
|
||||
Top = 41
|
||||
Width = 85
|
||||
Height = 12
|
||||
Caption = #23458#25143'/'#20379#24212#21830#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 259
|
||||
Top = 13
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20986#24211#31867#22411#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 = 529
|
||||
Top = 192
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 35
|
||||
Top = 102
|
||||
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 Label11: TLabel
|
||||
Left = 923
|
||||
Top = 69
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25910#36135#21333#20301#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 65
|
||||
Top = 192
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #26426' '#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label24: TLabel
|
||||
Left = 282
|
||||
Top = 192
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #24037' '#33402#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 719
|
||||
Top = 69
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #30003#35831#25209#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 468
|
||||
Top = 13
|
||||
Width = 91
|
||||
Height = 12
|
||||
Caption = #20132#36135#30830#35748#26085#26399#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 37
|
||||
Top = 13
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #29616#36135#21333#21495#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 = 259
|
||||
Top = 41
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #21457#36135#22320#22336#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 = 481
|
||||
Top = 41
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #23458#25143#25910#36135#20154#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 719
|
||||
Top = 41
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #23458#25143#30005#35805#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 = 494
|
||||
Top = 69
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25105#21496#25260#22836#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 = 36
|
||||
Top = 69
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #19994' '#21153' '#21592#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 = 259
|
||||
Top = 69
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #19994#21153#32452#21035#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl1: TLabel
|
||||
Left = 719
|
||||
Top = 13
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #21457#36135#31867#22411#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl3: TLabel
|
||||
Left = 923
|
||||
Top = 13
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #26159#21542#21547#31246#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl4: TLabel
|
||||
Left = 923
|
||||
Top = 41
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #26159#21542#21547#36816#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 910
|
||||
Top = 102
|
||||
Width = 78
|
||||
Height = 12
|
||||
Caption = #26159#21542#19978#38376#36153#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 = 494
|
||||
Top = 102
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #20869' '#22791' '#27880#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 = 32
|
||||
Top = 131
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25968#37327#21333#20301#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 1
|
||||
Left = 321
|
||||
Top = 9
|
||||
Width = 136
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 0
|
||||
Items.Strings = (
|
||||
''
|
||||
#22238#20462#20986#24211
|
||||
#25253#24223#20986#24211
|
||||
#20379#24212#21830#36864#36135
|
||||
#21152#24037#20986#24211
|
||||
#20020#26102#20986#24211
|
||||
#25439#32791#20986#24211
|
||||
#30424#20111#20986#24211)
|
||||
end
|
||||
object Note: TEdit
|
||||
Tag = 1
|
||||
Left = 97
|
||||
Top = 99
|
||||
Width = 360
|
||||
Height = 18
|
||||
TabOrder = 2
|
||||
OnKeyPress = NoteKeyPress
|
||||
end
|
||||
object SHDanWei: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 986
|
||||
Top = 65
|
||||
Width = 121
|
||||
Height = 20
|
||||
Hint = 'FYName/'#36153#29992#21517#31216
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
OnBtnUpClick = SHDanWeiBtnUpClick
|
||||
OnBtnDnClick = SHDanWeiBtnDnClick
|
||||
end
|
||||
object PrtCode: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 593
|
||||
Top = 188
|
||||
Width = 139
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object CustomerNoName: TBtnEditA
|
||||
Tag = 1
|
||||
Left = 97
|
||||
Top = 37
|
||||
Width = 139
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 4
|
||||
OnBtnClick = CustomerNoNameBtnClick
|
||||
end
|
||||
object CarType: TEdit
|
||||
Tag = 1
|
||||
Left = 122
|
||||
Top = 189
|
||||
Width = 136
|
||||
Height = 18
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
object gongyi: TEdit
|
||||
Tag = 1
|
||||
Left = 342
|
||||
Top = 189
|
||||
Width = 136
|
||||
Height = 18
|
||||
TabOrder = 6
|
||||
Visible = False
|
||||
end
|
||||
object BatchNo: TComboBox
|
||||
Tag = 1
|
||||
Left = 782
|
||||
Top = 65
|
||||
Width = 121
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 7
|
||||
Visible = False
|
||||
end
|
||||
object DLYDATE: TDateTimePicker
|
||||
Tag = 1
|
||||
Left = 555
|
||||
Top = 9
|
||||
Width = 136
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 8
|
||||
end
|
||||
object XHOrderno: TEdit
|
||||
Tag = 1
|
||||
Left = 97
|
||||
Top = 10
|
||||
Width = 139
|
||||
Height = 18
|
||||
TabOrder = 9
|
||||
end
|
||||
object FHDZ: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 321
|
||||
Top = 37
|
||||
Width = 136
|
||||
Height = 20
|
||||
Hint = 'FHDZ/'#21457#36135#22320#22336
|
||||
TabOrder = 10
|
||||
OnBtnUpClick = FHDZBtnUpClick
|
||||
OnBtnDnClick = SHDanWeiBtnDnClick
|
||||
end
|
||||
object ShouHuoer: TEdit
|
||||
Tag = 1
|
||||
Left = 555
|
||||
Top = 38
|
||||
Width = 136
|
||||
Height = 18
|
||||
TabOrder = 11
|
||||
end
|
||||
object KHDH: TEdit
|
||||
Tag = 1
|
||||
Left = 782
|
||||
Top = 38
|
||||
Width = 121
|
||||
Height = 18
|
||||
TabOrder = 12
|
||||
end
|
||||
object GSTT: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 555
|
||||
Top = 65
|
||||
Width = 136
|
||||
Height = 20
|
||||
Hint = 'GSTT/'#20844#21496#25260#22836
|
||||
TabOrder = 13
|
||||
OnBtnUpClick = GSTTBtnUpClick
|
||||
OnBtnDnClick = SHDanWeiBtnDnClick
|
||||
end
|
||||
object Salesman: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 97
|
||||
Top = 65
|
||||
Width = 139
|
||||
Height = 20
|
||||
Hint = 'Salesman/'#19994#21153#21592
|
||||
TabOrder = 14
|
||||
OnBtnUpClick = SalesmanBtnUpClick
|
||||
OnBtnDnClick = SalesmanBtnDnClick
|
||||
end
|
||||
object FhType: TComboBox
|
||||
Tag = 1
|
||||
Left = 782
|
||||
Top = 9
|
||||
Width = 121
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 15
|
||||
Items.Strings = (
|
||||
#27454#21040#21457#36135
|
||||
#27424#27454#21457#36135)
|
||||
end
|
||||
object ISHS: TComboBox
|
||||
Tag = 1
|
||||
Left = 986
|
||||
Top = 9
|
||||
Width = 121
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 16
|
||||
Items.Strings = (
|
||||
''
|
||||
#21547#31246
|
||||
#19981#21547#31246)
|
||||
end
|
||||
object ISHY: TComboBox
|
||||
Tag = 1
|
||||
Left = 986
|
||||
Top = 37
|
||||
Width = 121
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 17
|
||||
Items.Strings = (
|
||||
''
|
||||
#26159
|
||||
#21542)
|
||||
end
|
||||
object SFSMF: TComboBox
|
||||
Tag = 1
|
||||
Left = 985
|
||||
Top = 97
|
||||
Width = 136
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 18
|
||||
Items.Strings = (
|
||||
#26159
|
||||
#21542)
|
||||
end
|
||||
object NNOTE: TEdit
|
||||
Tag = 1
|
||||
Left = 554
|
||||
Top = 99
|
||||
Width = 353
|
||||
Height = 18
|
||||
TabOrder = 19
|
||||
end
|
||||
object HZUnit: TBtnEditC
|
||||
Tag = 1
|
||||
Left = 93
|
||||
Top = 127
|
||||
Width = 136
|
||||
Height = 20
|
||||
Hint = 'Salesman/'#19994#21153#21592
|
||||
TabOrder = 20
|
||||
OnBtnUpClick = HZUnitBtnUpClick
|
||||
OnBtnDnClick = HZUnitBtnDnClick
|
||||
end
|
||||
object SALESCLASS: TComboBox
|
||||
Tag = 1
|
||||
Left = 322
|
||||
Top = 65
|
||||
Width = 135
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
TabOrder = 21
|
||||
Items.Strings = (
|
||||
#38144#21806'0'
|
||||
#38144#21806'1'
|
||||
#38144#21806'2'
|
||||
#38144#21806'4'
|
||||
#38144#21806'6'
|
||||
#38144#21806'8')
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 205
|
||||
Width = 1162
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 113
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 234
|
||||
Width = 1162
|
||||
Height = 284
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
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.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'SCConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'SPrtCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 67
|
||||
end
|
||||
object cv1Column6: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'kuanhao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object cv1Column2: TcxGridDBColumn
|
||||
Caption = #30003#35831#21305#25968
|
||||
DataBinding.FieldName = 'sqps'
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 82
|
||||
end
|
||||
object cv1Column3: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = cv1Column3PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 89
|
||||
end
|
||||
object Tv1Column14: TcxGridDBColumn
|
||||
Caption = #21152#31859
|
||||
DataBinding.FieldName = 'ADDM'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = cv1Column3PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'orderUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'Kg'
|
||||
'M'
|
||||
'Y')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = cv1Column3PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #21253#32568#36153
|
||||
DataBinding.FieldName = 'BGFee'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.OnEditValueChanged = cv1Column3PropertiesEditValueChanged
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 67
|
||||
end
|
||||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #20179#20301
|
||||
DataBinding.FieldName = 'cangwei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'GANGhao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'MJXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #26159#21542#24320#22383
|
||||
DataBinding.FieldName = 'SFKP'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
#26159
|
||||
#21542)
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object Tv1Column12: TcxGridDBColumn
|
||||
Caption = #24211#23384#37325#37327
|
||||
DataBinding.FieldName = 'KCKGQTY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object Tv1Column13: TcxGridDBColumn
|
||||
Caption = #24211#23384#38271#24230
|
||||
DataBinding.FieldName = 'KCQTY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 368
|
||||
Top = 1
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 312
|
||||
Top = 1
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 644
|
||||
Top = 268
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 584
|
||||
Top = 300
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 260
|
||||
Top = 1
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 524
|
||||
Top = 300
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
PixelsPerInch = 96
|
||||
object dazi1: TcxStyle
|
||||
AssignedValues = [svColor]
|
||||
Color = clRed
|
||||
end
|
||||
end
|
||||
object ADOQuery2: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 432
|
||||
Top = 109
|
||||
end
|
||||
end
|
||||
861
发货申请(ShipmentRequest.dll)/U_FHSQInPutXH.pas
Normal file
861
发货申请(ShipmentRequest.dll)/U_FHSQInPutXH.pas
Normal file
|
|
@ -0,0 +1,861 @@
|
|||
unit U_FHSQInPutXH;
|
||||
|
||||
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, cxLookAndFeels,
|
||||
cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmFHSQInPutXH = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBSave: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ScrollBox1: TScrollBox;
|
||||
ToolBar2: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ADOTemp: TADOQuery;
|
||||
ADOCmd: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Sub: TClientDataSet;
|
||||
ADOQuery1: TADOQuery;
|
||||
Label14: TLabel;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
Label1: TLabel;
|
||||
CRType: TComboBox;
|
||||
Label2: TLabel;
|
||||
Note: TEdit;
|
||||
Label12: TLabel;
|
||||
Label11: TLabel;
|
||||
SHDanWei: TBtnEditC;
|
||||
PrtCode: TBtnEditA;
|
||||
CustomerNoName: TBtnEditA;
|
||||
Label15: TLabel;
|
||||
CarType: TEdit;
|
||||
Label24: TLabel;
|
||||
gongyi: TEdit;
|
||||
Label4: TLabel;
|
||||
BatchNo: TComboBox;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
cv1Column2: TcxGridDBColumn;
|
||||
cv1Column3: TcxGridDBColumn;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
dazi1: TcxStyle;
|
||||
cv1Column6: TcxGridDBColumn;
|
||||
lbl2: TLabel;
|
||||
DLYDATE: TDateTimePicker;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
XHOrderno: TEdit;
|
||||
Label5: TLabel;
|
||||
FHDZ: TBtnEditC;
|
||||
Label6: TLabel;
|
||||
ShouHuoer: TEdit;
|
||||
Label7: TLabel;
|
||||
KHDH: TEdit;
|
||||
Label10: TLabel;
|
||||
GSTT: TBtnEditC;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
Label9: TLabel;
|
||||
Label8: TLabel;
|
||||
Salesman: TBtnEditC;
|
||||
Tv1Column6: TcxGridDBColumn;
|
||||
Tv1Column7: TcxGridDBColumn;
|
||||
lbl1: TLabel;
|
||||
lbl3: TLabel;
|
||||
FhType: TComboBox;
|
||||
lbl4: TLabel;
|
||||
ISHS: TComboBox;
|
||||
ISHY: TComboBox;
|
||||
Label13: TLabel;
|
||||
SFSMF: TComboBox;
|
||||
Tv1Column8: TcxGridDBColumn;
|
||||
Tv1Column9: TcxGridDBColumn;
|
||||
Tv1Column10: TcxGridDBColumn;
|
||||
Label16: TLabel;
|
||||
NNOTE: TEdit;
|
||||
Label17: TLabel;
|
||||
HZUnit: TBtnEditC;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
ADOQuery2: TADOQuery;
|
||||
Tv1Column12: TcxGridDBColumn;
|
||||
Tv1Column13: TcxGridDBColumn;
|
||||
SALESCLASS: TComboBox;
|
||||
Tv1Column14: TcxGridDBColumn;
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBSaveClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure SHDanWeiBtnUpClick(Sender: TObject);
|
||||
procedure SHDanWeiBtnDnClick(Sender: TObject);
|
||||
procedure ShouKuanKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CustomerNoNameBtnClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure cv1Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure FHDZBtnUpClick(Sender: TObject);
|
||||
procedure SalesmanBtnUpClick(Sender: TObject);
|
||||
procedure SalesmanBtnDnClick(Sender: TObject);
|
||||
procedure GSTTBtnUpClick(Sender: TObject);
|
||||
procedure HZUnitBtnDnClick(Sender: TObject);
|
||||
procedure HZUnitBtnUpClick(Sender: TObject);
|
||||
procedure NoteKeyPress(Sender: TObject; var Key: Char);
|
||||
private
|
||||
fuserName: string;
|
||||
procedure InitData();
|
||||
function SaveData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
PState, CopyInt: Integer;
|
||||
FMainId, FFMainId, ChkStr, ConPriceStr: string;
|
||||
FXS: Integer;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFHSQInPutXH: TfrmFHSQInPutXH;
|
||||
newh: hwnd;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_ZDYHelp, U_RTFun, U_SQKCHZSelList, U_ContractListNXSel,
|
||||
U_CPManageFMSel, U_ZdyAttachment, U_ClothSCYWYListSel, U_ProductOrderListSel,
|
||||
U_CKProductBCPKCListSel, U_ZdyAttachGYS;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFHSQInPutXH.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('现货发货申请录入', Tv1, '发货管理9');
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.InitData();
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
if PState = 0 then
|
||||
begin
|
||||
DLYDATE.datetime := strtodatetime(Trim(FormatDateTime('yyyy-MM-dd', Now)));
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
//sql.Add(',GCCode=(select GCCode from Cloth_Main CM where CM.MainId=A.Mainid)');
|
||||
//sql.Add(',BatchNoHZ=(select BatchNoHZ from Cloth_Sub CS where CS.MainId=A.Mainid)');
|
||||
sql.Add(' from FHSQ_Sub A');
|
||||
if PState = 1 then
|
||||
begin
|
||||
sql.Add('where FSId=''' + 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 A.* ');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where FSId=''' + Trim(FMainId) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
|
||||
// fsj := ' select DISTINCT A.APBatchNo Name from JYCon_Sub_AnPai A inner join Cloth_Main B on A.MainId=B.MainId where isnull(A.APBatchNo,'''')<>'''' and B.Valid=''Y'' and B.ConNo=' + quotedstr(Trim(ADOQuery1.FieldByName('Conno').AsString));
|
||||
// SInitComBoxBySql(ADOTemp, BatchNo, False, fsj);
|
||||
|
||||
SCSHDataNew(ADOQuery1, ScrollBox1, 1);
|
||||
|
||||
BatchNo.Clear;
|
||||
BatchNo.Items.Add(Trim(ADOQuery1.fieldbyname('BatchNo').AsString));
|
||||
BatchNo.ItemIndex := BatchNo.Items.IndexOf(Trim(ADOQuery1.fieldbyname('BatchNo').AsString));
|
||||
// ConNo.TxtCode := ;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
readCxGrid('现货发货申请录入', Tv1, '发货管理9');
|
||||
|
||||
InitData();
|
||||
end;
|
||||
|
||||
function TfrmFHSQInPutXH.SaveData(): Boolean;
|
||||
var
|
||||
maxno, maxmnno, FSSId, MAXDZID: string;
|
||||
fconNO, fmxType: string;
|
||||
begin
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
///保存主表
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'SM', 'FHSQ_Main', 4, 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 FHSQ_Main where FSID=''' + Trim(FMainId) + '''');
|
||||
Open;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
Append;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
end;
|
||||
FieldByName('SQType').Value := '现货';
|
||||
FieldByName('FSID').Value := Trim(maxno);
|
||||
RTSetsavedata(ADOCmd, 'FHSQ_Main', ScrollBox1, 1);
|
||||
FieldByName('Chker').Value := Trim(DName);
|
||||
FieldByName('ChkTime').Value := SGetServerDate(ADOTemp);
|
||||
FieldByName('ChkStatus').Value := '审核通过';
|
||||
|
||||
FieldByName('SQDate').Value := SGetServerDate(ADOTemp);
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
FieldByName('SQDate').Value := SGetServerDate(ADOTemp);
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
Post;
|
||||
end;
|
||||
|
||||
FMainId := Trim(maxno);
|
||||
///保存子表
|
||||
Order_Sub.DisableControls;
|
||||
with Order_Sub do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from wfb_mjjy ');
|
||||
sql.Add(' where mjid=''' + Trim(Order_Sub.fieldbyname('MJID').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOTemp.IsEmpty = True then
|
||||
begin
|
||||
Order_Sub.EnableControls;
|
||||
Application.MessageBox(PChar(trim(Order_Sub.fieldbyName('mjid').AsString) + ' 该条码不存在!'), '提示', 0);
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Exit;
|
||||
end;
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) = '' then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, maxno, 'SS', 'FHSQ_Sub', 4, 1) = False then
|
||||
begin
|
||||
Order_Sub.EnableControls;
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
maxno := Trim(Order_Sub.fieldbyname('SSId').AsString);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from FHSQ_Sub ');
|
||||
sql.Add(' where SSId=''' + Trim(maxno) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOCmd.IsEmpty then
|
||||
begin
|
||||
FSSId := '';
|
||||
end
|
||||
else
|
||||
begin
|
||||
FSSId := Trim(maxno);
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
if Trim(FSSId) = '' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value := Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value := Trim(DName);
|
||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
|
||||
end;
|
||||
FieldByName('FSID').Value := Trim(FMainId);
|
||||
FieldByName('SSID').Value := Trim(maxno);
|
||||
RTSetSaveDataCDS(ADOCmd, Tv1, Order_Sub, 'FHSQ_Sub', 0);
|
||||
FieldByName('MainId').Value := Order_Sub.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := Order_Sub.fieldbyname('SubId').Value;
|
||||
FieldByName('mjid').Value := Order_Sub.fieldbyname('mjid').Value;
|
||||
FieldByName('SSConMainId').Value := Order_Sub.fieldbyname('SSConMainId').Value;
|
||||
FieldByName('SSConSubId').Value := Order_Sub.fieldbyname('SSConSubId').Value;
|
||||
Post;
|
||||
end;
|
||||
Order_Sub.Edit;
|
||||
Order_Sub.FieldByName('SSID').Value := Trim(maxno);
|
||||
Next;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('update FHSQ_Main set DBConNo= ');
|
||||
SQL.Add('cast((select '' ''+ SSConNo from FHSQ_Sub X where X.FSId=FHSQ_Main.FSId and X.SSConNo<>FHSQ_Main.ConNo for xml Path('''')) as varchar(100)) ');
|
||||
SQL.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
if (CRType.Text = '回修出库') or (CRType.Text = '改色出库') or (CRType.Text = '供应商退货') or (CRType.Text = '加工出库') then
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('SELECT * FROM Company_contact WHERE mxADDRESS=' + QuotedStr(Trim(FHDZ.Text)));
|
||||
sql.Add('and telephone=' + quotedStr(Trim(KHDH.Text)));
|
||||
sql.Add('and Contacts=' + quotedStr(Trim(ShouHuoer.Text)));
|
||||
SQL.Add('AND COID=(SELECT COID FROM COMPANY WHERE CONAME=' + QuotedStr(Trim(CustomerNoName.Text)));
|
||||
SQL.Add('AND CoType=''供应商'' and Valid=''Y'' )');
|
||||
OPEN;
|
||||
end;
|
||||
if ADOTemp.IsEmpty = true then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, MAXDZID, 'CCS', 'Company_contact', 4, 1) = False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取地址最大ID失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQuery2 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('SELECT COID FROM COMPANY WHERE CONAME=' + QuotedStr(Trim(CustomerNoName.Text)));
|
||||
sql.Add('AND CoType=''供应商'' and Valid=''Y''');
|
||||
OPEN;
|
||||
end;
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('INSERT INTO Company_contact(ccid,coid,telephone,Contacts,mxaddress)');
|
||||
SQL.Add('values (' + QuotedStr(MAXDZID));
|
||||
SQL.Add(',' + QuotedStr(ADOQuery2.fieldbyname('coid').AsString));
|
||||
SQL.Add(',' + QuotedStr(Trim(KHDH.Text)));
|
||||
SQL.Add(',' + QuotedStr(Trim(ShouHuoer.Text)));
|
||||
|
||||
SQL.Add(',' + QuotedStr(Trim(FHDZ.Text)));
|
||||
sql.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('SELECT * FROM Company_contact WHERE mxADDRESS=' + QuotedStr(Trim(FHDZ.Text)));
|
||||
sql.Add('and telephone=' + quotedStr(Trim(KHDH.Text)));
|
||||
sql.Add('and Contacts=' + quotedStr(Trim(ShouHuoer.Text)));
|
||||
SQL.Add('AND COID=(SELECT COID FROM COMPANY WHERE CONAME=' + QuotedStr(Trim(CustomerNoName.Text)));
|
||||
SQL.Add('AND CoType=''客户'' and Valid=''Y'' )');
|
||||
OPEN;
|
||||
end;
|
||||
if ADOTemp.IsEmpty = true then
|
||||
begin
|
||||
if GetLSNo(ADOCmd, MAXDZID, 'CCS', 'Company_contact', 4, 1) = False then
|
||||
begin
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取地址最大ID失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQuery2 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('SELECT COID FROM COMPANY WHERE CONAME=' + QuotedStr(Trim(CustomerNoName.Text)));
|
||||
sql.Add('AND CoType=''客户'' and Valid=''Y''');
|
||||
OPEN;
|
||||
end;
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
SQL.Add('INSERT INTO Company_contact(ccid,coid,telephone,Contacts,mxaddress)');
|
||||
SQL.Add('values (' + QuotedStr(MAXDZID));
|
||||
SQL.Add(',' + QuotedStr(ADOQuery2.fieldbyname('coid').AsString));
|
||||
SQL.Add(',' + QuotedStr(Trim(KHDH.Text)));
|
||||
SQL.Add(',' + QuotedStr(Trim(ShouHuoer.Text)));
|
||||
|
||||
SQL.Add(',' + QuotedStr(Trim(FHDZ.Text)));
|
||||
sql.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
Order_Sub.EnableControls;
|
||||
|
||||
ADOCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('保存失败!', '提示', 0);
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.TBSaveClick(Sender: TObject);
|
||||
var
|
||||
Freal: Double;
|
||||
begin
|
||||
ToolBar1.SetFocus;
|
||||
|
||||
if Trim(CRType.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('出库类型不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(Salesman.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('业务员不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(SalesClass.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('业务组别不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Order_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
|
||||
// if Order_Sub.Locate('SCConNo', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('白坯单号不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
if (Order_Sub.Locate('SQPS', null, [])) and (Order_Sub.Locate('SQqty', null, [])) = True then
|
||||
begin
|
||||
Application.MessageBox('细码申请匹数和数量不能全为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
// if Order_Sub.Locate('SQPS', 0, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('申请匹数不能为0!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
// if Order_Sub.Locate('SQQty', null, []) = True then
|
||||
// begin
|
||||
// Application.MessageBox('申请数量不能为空!', '提示', 0);
|
||||
// Exit;
|
||||
// end;
|
||||
Note.Text := StringReplace(Trim(Note.Text), chr(9), '', [rfReplaceAll]); //删除Tab
|
||||
Note.Text := StringReplace(Trim(Note.Text), chr(13) + chr(10), '', [rfReplaceAll]); //删除回车
|
||||
Note.Text := StringReplace(Trim(Note.Text), #$D#$A, '', [rfReplaceAll, rfignorecase]);
|
||||
|
||||
Note.Text := StringReplace(Trim(Note.Text), '#$D', ' ', [rfReplaceAll, rfIgnoreCase]);
|
||||
|
||||
Note.Text := StringReplace(Trim(Note.Text), #$A, ' ', [rfReplaceAll, rfIgnoreCase]);
|
||||
if SaveData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
ModalResult := 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Sub.IsEmpty then
|
||||
Exit;
|
||||
if Trim(Order_Sub.fieldbyname('SSId').AsString) <> '' then
|
||||
begin
|
||||
with ADOTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
sql.add(' and isnull(FHPS,0)>0');
|
||||
Open;
|
||||
end;
|
||||
if ADOTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Sub where SSId=''' + Trim(Order_Sub.fieldbyname('SSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update FHSQ_Main Set ');
|
||||
sql.Add('SQPSHZ=(select Sum(SQPS) from FHSQ_Sub A where A.FSID=FHSQ_Main.FSID)');
|
||||
sql.Add('where FSID=''' + Trim(FMainId) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
Order_Sub.Delete;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.SHDanWeiBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'SHDanWei';
|
||||
flagname := '收货单位';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.GSTT.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.SHDanWeiBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
SHDanWei.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.ShouKuanKeyPress(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 TfrmFHSQInPutXH.CustomerNoNameBtnClick(Sender: TObject);
|
||||
begin
|
||||
if (CRType.Text = '回修出库') or (CRType.Text = '改色出库') or (CRType.Text = '供应商退货') or (CRType.Text = '加工出库') then
|
||||
begin
|
||||
try
|
||||
frmZdyAttachGYS := TfrmZdyAttachGYS.Create(Application);
|
||||
with frmZdyAttachGYS do
|
||||
begin
|
||||
// canshu1 := Self.canshu1;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
// self.CustomerNoName.Text := Trim(CDS_HZ.fieldbyname('CoName').AsString);
|
||||
//
|
||||
// self.FHDZ.Text := Trim(CDS_HZ.fieldbyname('COADDRESS').AsString);
|
||||
// self.ShouHuoer.Text := Trim(CDS_HZ.fieldbyname('Contacts').AsString);
|
||||
// self.KHDH.Text := Trim(CDS_HZ.fieldbyname('Telephone').AsString);
|
||||
|
||||
self.Salesman.Text := Trim(CDS_HZ.fieldbyname('Salesman').AsString);
|
||||
self.SalesClass.Text := Trim(CDS_HZ.fieldbyname('SalesClass').AsString);
|
||||
|
||||
Self.CustomerNoName.Text := Trim(CDS_HZ.fieldbyname('CoName').AsString);
|
||||
Self.SHDanWei.Text := Trim(CDS_HZ.fieldbyname('CoName').AsString);
|
||||
self.FHDZ.Text := Trim(CDS_HZ.fieldbyname('MXADDRESS').AsString);
|
||||
self.ShouHuoer.Text := Trim(CDS_HZ.fieldbyname('Contacts').AsString);
|
||||
self.KHDH.Text := Trim(CDS_HZ.fieldbyname('Telephone').AsString);
|
||||
self.note.Text := Trim(CDS_HZ.fieldbyname('note1').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZdyAttachGYS.Free;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
try
|
||||
frmZdyAttachment := TfrmZdyAttachment.Create(Application);
|
||||
with frmZdyAttachment do
|
||||
begin
|
||||
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
self.CustomerNoName.Text := Trim(CDS_HZ.fieldbyname('CoName').AsString);
|
||||
|
||||
self.FHDZ.Text := Trim(CDS_HZ.fieldbyname('MXADDRESS').AsString);
|
||||
self.ShouHuoer.Text := Trim(CDS_HZ.fieldbyname('Contacts').AsString);
|
||||
self.KHDH.Text := Trim(CDS_HZ.fieldbyname('Telephone').AsString);
|
||||
self.ShouHuoer.Text := Trim(CDS_HZ.fieldbyname('Contacts').AsString);
|
||||
self.Salesman.Text := Trim(CDS_HZ.fieldbyname('Salesman').AsString);
|
||||
self.SalesClass.Text := Trim(CDS_HZ.fieldbyname('SalesClass').AsString);
|
||||
self.note.Text := Trim(CDS_HZ.fieldbyname('note1').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZdyAttachment.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Trim(HZUnit.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('数量单位不能为空!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
try
|
||||
frmCKProductBCPKCListSel := TfrmCKProductBCPKCListSel.Create(Application);
|
||||
with frmCKProductBCPKCListSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
while CDS_Main.locate('SSel', true, []) do
|
||||
begin
|
||||
if (Self.Order_Sub.Locate('MJID', Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MJID').AsString), []) = False) and (frmCKProductBCPKCListSel.CDS_Main.fieldbyname('issd').AsString <> '已锁定') then
|
||||
begin
|
||||
with Self.Order_Sub do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('SCConNo').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('Orderno').AsString);
|
||||
FieldByName('MainId').Value := frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MainId').Value;
|
||||
FieldByName('SubId').Value := frmCKProductBCPKCListSel.CDS_Main.fieldbyname('SubId').Value;
|
||||
FieldByName('PRTColor').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('PRTColor').AsString);
|
||||
FieldByName('SPrtCode').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MPRTCode').AsString);
|
||||
FieldByName('SPrtCodeName').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MPRTCode').AsString);
|
||||
FieldByName('PRTHX').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('PRTHX').AsString);
|
||||
FieldByName('GANGHAO').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('GANGHAO').AsString);
|
||||
FieldByName('MJID').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MJID').AsString);
|
||||
FieldByName('SQQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('Qty').AsString);
|
||||
FieldByName('MJXH').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('MJXH').AsString);
|
||||
FieldByName('SQPS').Value := 1;
|
||||
FieldByName('SFKP').Value := '否';
|
||||
FieldByName('cangwei').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('rkplace').AsString);
|
||||
|
||||
FieldByName('orderUnit').Value := Trim(HZUnit.Text);
|
||||
FieldByName('KCQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('Qty').AsString);
|
||||
FieldByName('KCKGQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('KGQty').AsString);
|
||||
// if (Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('ddunit').AsString) = 'KG') or (Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('ddunit').AsString) = '公斤') then
|
||||
if (Trim(HZUnit.Text) = 'KG') or (Trim(HZUnit.Text) = '公斤') then
|
||||
begin
|
||||
FieldByName('SQQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('KGQty').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
FieldByName('SQQty').Value := Trim(frmCKProductBCPKCListSel.CDS_Main.fieldbyname('Qty').AsString);
|
||||
end;
|
||||
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
CDS_Main.Delete;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCKProductBCPKCListSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.cv1Column3PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
FQty, FPrice, FMxMoney, FBGFee, FJM: double;
|
||||
begin
|
||||
mvalue := TcxTextEdit(Sender).EditingText;
|
||||
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
if Trim(mvalue) = '' then
|
||||
begin
|
||||
mvalue := '0';
|
||||
end;
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName(FFieldName).Value := Trim(mvalue);
|
||||
Post;
|
||||
end;
|
||||
with Order_Sub do
|
||||
begin
|
||||
|
||||
FQty := FieldByName('sqqty').AsFloat;
|
||||
FPrice := FieldByName('Price').AsFloat;
|
||||
FBGFee := FieldByName('BGFee').AsFloat;
|
||||
// FJM := FieldByName('ADDM').AsFloat;
|
||||
end;
|
||||
FMxMoney := strtofloat(format('%.2f', [(FQty) * FPrice + FBGFee]));
|
||||
with Order_Sub do
|
||||
begin
|
||||
Edit;
|
||||
FieldbyName('Money').Value := FMxMoney;
|
||||
Post;
|
||||
end;
|
||||
tv1.Controller.EditingController.ShowEdit();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.FHDZBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'FHDZ';
|
||||
flagname := '发货地址';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.FHDZ.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.SalesmanBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'YWY';
|
||||
flagname := '业务员';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.Salesman.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.SalesmanBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
Salesman.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.GSTTBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'GSTT';
|
||||
flagname := '公司抬头';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.GSTT.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.HZUnitBtnDnClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
if not Order_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细数据已选择,不能修改!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
HZUnit.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.HZUnitBtnUpClick(Sender: TObject);
|
||||
begin
|
||||
if not Order_Sub.IsEmpty then
|
||||
begin
|
||||
Application.MessageBox('明细数据已选择,不能修改!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'HZUnit';
|
||||
flagname := '数量单位';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.HZUnit.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQInPutXH.NoteKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
Key := #32;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1467
发货申请(ShipmentRequest.dll)/U_FHSQList.dfm
Normal file
1467
发货申请(ShipmentRequest.dll)/U_FHSQList.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1229
发货申请(ShipmentRequest.dll)/U_FHSQList.pas
Normal file
1229
发货申请(ShipmentRequest.dll)/U_FHSQList.pas
Normal file
File diff suppressed because it is too large
Load Diff
1086
发货申请(ShipmentRequest.dll)/U_FHSQList220313.dfm
Normal file
1086
发货申请(ShipmentRequest.dll)/U_FHSQList220313.dfm
Normal file
File diff suppressed because it is too large
Load Diff
758
发货申请(ShipmentRequest.dll)/U_FHSQList220313.pas
Normal file
758
发货申请(ShipmentRequest.dll)/U_FHSQList220313.pas
Normal file
|
|
@ -0,0 +1,758 @@
|
|||
unit U_FHSQList220313;
|
||||
|
||||
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,
|
||||
RM_E_llPDF, cxDropDownEdit, cxTextEdit;
|
||||
|
||||
type
|
||||
TfrmFHSQList220313 = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
TBExport: TToolButton;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1OrdPerson1: TcxGridDBColumn;
|
||||
Order_Main: TClientDataSet;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Print: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label12: TLabel;
|
||||
Label13: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CustomerNoName: TEdit;
|
||||
ConPerson1: TEdit;
|
||||
MPRTCodeName: TEdit;
|
||||
ConNo: TEdit;
|
||||
MPRTKZ: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
cxTabControl1: TcxTabControl;
|
||||
tchk: TToolButton;
|
||||
Tnochk: TToolButton;
|
||||
cxSplitter1: TcxSplitter;
|
||||
ADOQuerySub: TADOQuery;
|
||||
DataSource2: TDataSource;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
CDS_Note: TClientDataSet;
|
||||
v2Column2: TcxGridDBColumn;
|
||||
RM1: TRMGridReport;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
Label10: TLabel;
|
||||
PrtCode: TEdit;
|
||||
PrtCodeName: TEdit;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
SQBatchNoHZ: TEdit;
|
||||
Label6: TLabel;
|
||||
SQGCCode: TEdit;
|
||||
v1Column22: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
Panel5: TPanel;
|
||||
Label28: TLabel;
|
||||
Button5: TButton;
|
||||
Button6: TButton;
|
||||
DateTimePicker1: TDateTimePicker;
|
||||
Label11: TLabel;
|
||||
lblFSID: TLabel;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cv2Column4: TcxGridDBColumn;
|
||||
cv2Column5: TcxGridDBColumn;
|
||||
cv2Column6: TcxGridDBColumn;
|
||||
cv2Column7: TcxGridDBColumn;
|
||||
cv1Column13: TcxGridDBColumn;
|
||||
cv2Column8: TcxGridDBColumn;
|
||||
btn1: TToolButton;
|
||||
cv1Column12: TcxGridDBColumn;
|
||||
cv2Column9: TcxGridDBColumn;
|
||||
cv2Column10: TcxGridDBColumn;
|
||||
cv2Column11: TcxGridDBColumn;
|
||||
cv2Column12: TcxGridDBColumn;
|
||||
cv1Column14: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure tchkClick(Sender: TObject);
|
||||
procedure TnochkClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Button6Click(Sender: TObject);
|
||||
procedure Button5Click(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSubGrid();
|
||||
procedure InitForm();
|
||||
procedure SetStatus();
|
||||
function DelData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt: Integer;
|
||||
canshu1, canshu2: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
//var
|
||||
//frmContractListNX: TfrmContractListNX;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_FHSQInPut, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFHSQList220313.SetStatus();
|
||||
begin
|
||||
tchk.Visible := False;
|
||||
Tnochk.Visible := False;
|
||||
if canshu1 = '审核' then
|
||||
begin
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
tchk.Visible := true;
|
||||
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
Tnochk.Visible := true;
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else if canshu1 = '高权限' then
|
||||
begin
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
tchk.Visible := true;
|
||||
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
Tnochk.Visible := true;
|
||||
end;
|
||||
2:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
//frmFHSQList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('发货主表', Tv1, '发货管理');
|
||||
WriteCxGrid('发货子表', Tv2, '发货管理');
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,isnull(status,''未完成'')status2 ');
|
||||
Sql.Add(' ,HZSCConNo=CAST((select SCConNo + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where SQType=''订单'' ');
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
begin
|
||||
sql.Add(' and SQDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.Add(' and SQDate<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
||||
end;
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.Chker,'''')='''' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.Chker,'''')<>'''' ');
|
||||
end;
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
sql.Add(' and isnull(A.Filler,'''')=''' + Trim(DName) + '''');
|
||||
end;
|
||||
if (canshu2 = '内销') or (canshu2 = '外销') then
|
||||
begin
|
||||
sql.Add(' and isnull(A.XSType,'''')=''' + Trim(canshu2) + '''');
|
||||
end;
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.InitForm();
|
||||
begin
|
||||
|
||||
ReadCxGrid('发货主表', Tv1, '发货管理');
|
||||
ReadCxGrid('发货子表', Tv2, '发货管理');
|
||||
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime - 60;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.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 TfrmFHSQList220313.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
Exit;
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
frmFHSQInPut := TfrmFHSQInPut.Create(Application);
|
||||
with frmFHSQInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('FSID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
Exit;
|
||||
if canshu1 <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select * from CK_BanCP_CR where CRFlag=''出库''');
|
||||
sql.add(' and CKOrdNo=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if ADOQueryTemp.FieldByName('FHPSHZ').AsInteger > 0 then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if DelData() then
|
||||
begin
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmFHSQList220313.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Sub where FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Main where FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
SelExportData(Tv1, ADOQueryMain, '发货申请列表');
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
Txt, fImagePath: string;
|
||||
Moudle: THandle;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
// if cxTabControl1.TabIndex <> 1 then
|
||||
// Exit;
|
||||
ExportFtErpFile('坯布发货申请单.rmf', ADOQueryTemp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\坯布发货申请单.rmf';
|
||||
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,B.* ');
|
||||
sql.Add(' from FHSQ_Main A left join FHSQ_Sub B on A.FSId=B.FSId ');
|
||||
sql.Add(' where A.FSID=' + quotedstr(Trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
try
|
||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||
Txt := Trim(Order_Main.fieldbyname('FSID').AsString);
|
||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||
if FileExists(fImagePath) then
|
||||
DeleteFile(fImagePath);
|
||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||
except
|
||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
TBFind.Click;
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.TBAddClick(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
try
|
||||
frmFHSQInPut := TfrmFHSQInPut.Create(Application);
|
||||
with frmFHSQInPut do
|
||||
begin
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmFHSQInPut := TfrmFHSQInPut.Create(Application);
|
||||
with frmFHSQInPut do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('FSID').AsString);
|
||||
ToolBar2.Visible := False;
|
||||
TBSave.Visible := False;
|
||||
ScrollBox1.Enabled := False;
|
||||
Tv1.OptionsSelection.CellSelect := False;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPut.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.tchkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET Chker=''' + Trim(DName) + ''',ChkTime=getdate(),ChkStatus=''审核通过'' ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('审核成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.InitSubGrid();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
sql.Add('select A.*,B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''')
|
||||
else
|
||||
sql.Add('select A.*,B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId where 1=2');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.TnochkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 1 then
|
||||
exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能撤销!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET Chker=Null,ChkTime=Null,ChkStatus=Null ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('撤销成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('撤销失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
|
||||
sql.Add(' where 1=2');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
lblFSID.Caption := Order_Main.fieldbyname('FSID').AsString;
|
||||
DateTimePicker1.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
Panel5.Left := (self.Width - Panel5.Width) div 2;
|
||||
Panel5.Visible := true;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.Button6Click(Sender: TObject);
|
||||
begin
|
||||
Panel5.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.Button5Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET fhDate=' + QuotedStr(Trim(FormatDateTime('yyyy-MM-dd', DateTimePicker1.Date))));
|
||||
sql.Add('where FSID=' + quotedstr(trim(lblFSID.Caption)));
|
||||
execsql;
|
||||
end;
|
||||
InitGrid();
|
||||
Order_Main.Locate('FSID', lblFSID.Caption, []);
|
||||
Panel5.Visible := false;
|
||||
application.MessageBox('修改成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('修改失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQList220313.btn1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET status='' 已完成'' ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
// ShowMessage(SQL.Text);
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('操作成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1307
发货申请(ShipmentRequest.dll)/U_FHSQListCX.dfm
Normal file
1307
发货申请(ShipmentRequest.dll)/U_FHSQListCX.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1078
发货申请(ShipmentRequest.dll)/U_FHSQListCX.pas
Normal file
1078
发货申请(ShipmentRequest.dll)/U_FHSQListCX.pas
Normal file
File diff suppressed because it is too large
Load Diff
734
发货申请(ShipmentRequest.dll)/U_FHSQListSel.dfm
Normal file
734
发货申请(ShipmentRequest.dll)/U_FHSQListSel.dfm
Normal file
|
|
@ -0,0 +1,734 @@
|
|||
object frmFHSQListSel: TfrmFHSQListSel
|
||||
Left = 252
|
||||
Top = 36
|
||||
Width = 1556
|
||||
Height = 819
|
||||
Caption = #21457#36135#30003#35831#36873#25321
|
||||
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 = 1540
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton2: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 31
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
ImageIndex = 58
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1540
|
||||
Height = 43
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #30003#35831#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 263
|
||||
Top = 15
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #23458#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 430
|
||||
Top = 99
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 394
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #35745#21010#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 303
|
||||
Top = 99
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 303
|
||||
Top = 123
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #38376#24133
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 160
|
||||
Top = 15
|
||||
Width = 6
|
||||
Height = 12
|
||||
Caption = '-'
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 12
|
||||
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
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 293
|
||||
Top = 13
|
||||
Width = 78
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 2
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 483
|
||||
Top = 95
|
||||
Width = 76
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object HZSCConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 446
|
||||
Top = 13
|
||||
Width = 77
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 95
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
object MPRTMF: TEdit
|
||||
Tag = 2
|
||||
Left = 332
|
||||
Top = 119
|
||||
Width = 56
|
||||
Height = 20
|
||||
ImeName = #20013#25991' ('#31616#20307') - '#25628#29399#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = CustomerNoNameChange
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 75
|
||||
Width = 1540
|
||||
Height = 21
|
||||
Align = alTop
|
||||
Enabled = False
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 1
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectRight = 0
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 772
|
||||
Width = 1540
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 96
|
||||
Width = 1540
|
||||
Height = 426
|
||||
Align = alClient
|
||||
TabOrder = 4
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
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 = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column26
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 49
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #30003#35831#21333#21495
|
||||
DataBinding.FieldName = 'FSID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'HZSCConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 341
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 124
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #25910#36135#21333#20301
|
||||
DataBinding.FieldName = 'SHDanWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 124
|
||||
end
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #30003#35831#26085#26399
|
||||
DataBinding.FieldName = 'SQDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 70
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'SQQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #30003#35831#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #23457#26680#20154
|
||||
DataBinding.FieldName = 'Chker'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #23457#26680#26085#26399
|
||||
DataBinding.FieldName = 'ChkTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPSHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #21457#36135#25968#37327
|
||||
DataBinding.FieldName = 'FHQtyHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
Width = 70
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #21457#36135#26085#26399
|
||||
DataBinding.FieldName = 'fhDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
end
|
||||
object cv1Column12: TcxGridDBColumn
|
||||
Caption = #35746#21333#29366#24577
|
||||
DataBinding.FieldName = 'status2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 88
|
||||
end
|
||||
object cv1Column14: TcxGridDBColumn
|
||||
Caption = #20132#36135#30830#35748#26085#26399
|
||||
DataBinding.FieldName = 'dlydate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 522
|
||||
Width = 1540
|
||||
Height = 250
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cv2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cv2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column2
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object cv2Column10: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column7: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'ganghao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column5: TcxGridDBColumn
|
||||
Caption = #30003#35831#21305#25968
|
||||
DataBinding.FieldName = 'sqps'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cv2Column6: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #21457#36135#37325#37327
|
||||
DataBinding.FieldName = 'FHQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object Tv2Column5: TcxGridDBColumn
|
||||
Caption = #21457#36135#38271#24230
|
||||
DataBinding.FieldName = 'FHMS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Caption = #21253#32568#36153
|
||||
DataBinding.FieldName = 'BGFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column4: TcxGridDBColumn
|
||||
Caption = #20179#20301
|
||||
DataBinding.FieldName = 'cangwei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column6: TcxGridDBColumn
|
||||
Caption = #26159#21542#24320#21305
|
||||
DataBinding.FieldName = 'SFKP'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 1000
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 184
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 640
|
||||
Top = 176
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 704
|
||||
Top = 176
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 968
|
||||
Top = 184
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 936
|
||||
Top = 184
|
||||
end
|
||||
object ADOQuerySub: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 740
|
||||
Top = 176
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ClientDataSet2
|
||||
Left = 464
|
||||
Top = 504
|
||||
end
|
||||
object ClientDataSet2: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 496
|
||||
Top = 504
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 528
|
||||
Top = 504
|
||||
end
|
||||
end
|
||||
290
发货申请(ShipmentRequest.dll)/U_FHSQListSel.pas
Normal file
290
发货申请(ShipmentRequest.dll)/U_FHSQListSel.pas
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
unit U_FHSQListSel;
|
||||
|
||||
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,
|
||||
RM_E_llPDF, cxDropDownEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
dxBarBuiltInMenu, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmFHSQListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Order_Main: TClientDataSet;
|
||||
ToolButton1: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Label4: TLabel;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
Label12: TLabel;
|
||||
Label13: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CustomerNoName: TEdit;
|
||||
MPRTCodeName: TEdit;
|
||||
HZSCConNo: TEdit;
|
||||
MPRTKZ: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
cxTabControl1: TcxTabControl;
|
||||
cxSplitter1: TcxSplitter;
|
||||
ADOQuerySub: TADOQuery;
|
||||
DataSource2: TDataSource;
|
||||
Label2: TLabel;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
ToolButton2: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
cv1Column12: TcxGridDBColumn;
|
||||
cv1Column14: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cv2Column10: TcxGridDBColumn;
|
||||
cv2Column4: TcxGridDBColumn;
|
||||
cv2Column7: TcxGridDBColumn;
|
||||
cv2Column5: TcxGridDBColumn;
|
||||
cv2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
Tv2Column5: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
Tv2Column4: TcxGridDBColumn;
|
||||
Tv2Column6: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSubGrid();
|
||||
procedure InitForm();
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt: Integer;
|
||||
canshu1: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFHSQListSel: TfrmFHSQListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFHSQListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmFHSQListSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('发货申请选择ZY', Tv1, '发货申请管理');
|
||||
WriteCxGrid('发货申请选择ZY', Tv2, '发货申请管理');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,NoteZ=A.Note,dfpshz=(SQPSHZ-isnull(FHPSHZ,0)) ');
|
||||
Sql.Add(' ,HZSCConNo=CAST((select distinct(SCConNo) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where SQType=''订单'' ');
|
||||
sql.Add(' and chkstatus=''审核通过'' ');
|
||||
sql.Add(' and A.STATUS<>''已取消'' ');
|
||||
sql.Add('and SQQTYHZ>isnull(FHQTYHZ,0)');
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
begin
|
||||
sql.Add(' and SQDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.Add(' and SQDate<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.InitForm();
|
||||
begin
|
||||
ReadCxGrid('发货申请选择ZY', Tv1, '发货申请管理');
|
||||
ReadCxGrid('发货申请选择ZY', Tv2, '发货申请管理');
|
||||
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.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 TfrmFHSQListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
TBFind.Click;
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.InitSubGrid();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
sql.Add('select * from FHSQ_Sub A where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''')
|
||||
else
|
||||
sql.Add('select * from FHSQ_Sub A where 1=2');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
begin
|
||||
sql.Add('select A.* from FHSQ_Sub A ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.* from FHSQ_Sub A ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where 1=2');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListSel.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
ToolButton2.Click;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1067
发货申请(ShipmentRequest.dll)/U_FHSQListXH.dfm
Normal file
1067
发货申请(ShipmentRequest.dll)/U_FHSQListXH.dfm
Normal file
File diff suppressed because it is too large
Load Diff
875
发货申请(ShipmentRequest.dll)/U_FHSQListXH.pas
Normal file
875
发货申请(ShipmentRequest.dll)/U_FHSQListXH.pas
Normal file
|
|
@ -0,0 +1,875 @@
|
|||
unit U_FHSQListXH;
|
||||
|
||||
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,
|
||||
RM_E_llPDF, cxDropDownEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator, dxBarBuiltInMenu;
|
||||
|
||||
type
|
||||
TfrmFHSQListXH = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBAdd: TToolButton;
|
||||
TBEdit: TToolButton;
|
||||
TBDel: TToolButton;
|
||||
TBPrint: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
TBExport: TToolButton;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1OrdPerson1: TcxGridDBColumn;
|
||||
Order_Main: TClientDataSet;
|
||||
RMDBDataSet1: TRMDBDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
CDS_Print: TClientDataSet;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
Panel1: TPanel;
|
||||
Label8: TLabel;
|
||||
Label12: TLabel;
|
||||
Label13: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
MPRTCodeName: TEdit;
|
||||
MPRTKZ: TEdit;
|
||||
MPRTMF: TEdit;
|
||||
cxTabControl1: TcxTabControl;
|
||||
cxSplitter1: TcxSplitter;
|
||||
ADOQuerySub: TADOQuery;
|
||||
DataSource2: TDataSource;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
Label2: TLabel;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
ClientDataSet2: TClientDataSet;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
CDS_Note: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
Panel5: TPanel;
|
||||
Label28: TLabel;
|
||||
Button5: TButton;
|
||||
Button6: TButton;
|
||||
DateTimePicker1: TDateTimePicker;
|
||||
Label11: TLabel;
|
||||
lblFSID: TLabel;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
cv2Column4: TcxGridDBColumn;
|
||||
cv2Column5: TcxGridDBColumn;
|
||||
cv2Column6: TcxGridDBColumn;
|
||||
cv2Column7: TcxGridDBColumn;
|
||||
btn1: TToolButton;
|
||||
cv1Column12: TcxGridDBColumn;
|
||||
cv2Column10: TcxGridDBColumn;
|
||||
cv1Column14: TcxGridDBColumn;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
Tv2Column4: TcxGridDBColumn;
|
||||
Tv2Column5: TcxGridDBColumn;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
Label3: TLabel;
|
||||
CustomerNoName: TEdit;
|
||||
HZSCConNo: TEdit;
|
||||
status: TComboBox;
|
||||
Label5: TLabel;
|
||||
CRTYPE: TComboBox;
|
||||
Label6: TLabel;
|
||||
HZCODE: TEdit;
|
||||
Label7: TLabel;
|
||||
SALESMAN: TEdit;
|
||||
Label10: TLabel;
|
||||
SalesClass: TEdit;
|
||||
Label14: TLabel;
|
||||
FSID: TEdit;
|
||||
Label15: TLabel;
|
||||
HZcolor: TEdit;
|
||||
Label16: TLabel;
|
||||
HZganghao: TEdit;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
CheckBox1: TCheckBox;
|
||||
Tv2Column6: TcxGridDBColumn;
|
||||
Tv2Column7: TcxGridDBColumn;
|
||||
ToolButton3: TToolButton;
|
||||
Tv2Column8: TcxGridDBColumn;
|
||||
//RMllPDFExport1: TRMllPDFExport;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBEditClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBPrintClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBAddClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure CustomerNoNameChange(Sender: TObject);
|
||||
procedure tchkClick(Sender: TObject);
|
||||
procedure TnochkClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Button6Click(Sender: TObject);
|
||||
procedure Button5Click(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
procedure btn2Click(Sender: TObject);
|
||||
procedure btn3Click(Sender: TObject);
|
||||
procedure statusChange(Sender: TObject);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure InitSubGrid();
|
||||
procedure InitForm();
|
||||
procedure SetStatus();
|
||||
function DelData(): Boolean;
|
||||
{ Private declarations }
|
||||
public
|
||||
FFInt: Integer;
|
||||
canshu1: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFHSQListXH: tfrmFHSQListXH;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp, U_FHSQInPutXH, U_SysLogHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFHSQListXH.SetStatus();
|
||||
begin
|
||||
// tchk.Visible := False;
|
||||
// Tnochk.Visible := False;
|
||||
// btn2.Visible := False;
|
||||
// btn3.Visible := False;
|
||||
// case cxTabControl1.TabIndex of
|
||||
// 0:
|
||||
// begin
|
||||
// btn2.Visible := true;
|
||||
// end;
|
||||
// 1:
|
||||
// begin
|
||||
// btn3.Visible := true;
|
||||
// end;
|
||||
// 2:
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// end;
|
||||
// if canshu1 = '审核' then
|
||||
// begin
|
||||
// case cxTabControl1.TabIndex of
|
||||
// 0:
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// 1:
|
||||
// begin
|
||||
// tchk.Visible := true;
|
||||
// end;
|
||||
// 2:
|
||||
// begin
|
||||
// Tnochk.Visible := true;
|
||||
// end;
|
||||
// end;
|
||||
// end
|
||||
// else if canshu1 = '高权限' then
|
||||
// begin
|
||||
// case cxTabControl1.TabIndex of
|
||||
// 0:
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// 1:
|
||||
// begin
|
||||
//
|
||||
// tchk.Visible := true;
|
||||
// end;
|
||||
// 2:
|
||||
// begin
|
||||
// Tnochk.Visible := true;
|
||||
// end;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmFHSQListXH := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
WriteCxGrid('现货发货主表', Tv1, '发货管理');
|
||||
WriteCxGrid('现货发货子表', Tv2, '发货管理9');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,isnull(status,''未完成'')status2 ');
|
||||
Sql.Add(' ,HZCODE=CAST((select distinct(SPrtCode) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(2000))');
|
||||
Sql.Add(' ,HZcolor=CAST((select distinct(prtcolor) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(2000))');
|
||||
Sql.Add(' ,HZganghao=CAST((select distinct(ganghao) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(2000))');
|
||||
Sql.Add(' ,XHOrderno=CAST((select distinct(SCConNo) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(2000))');
|
||||
sql.Add(' from FHSQ_Main A ');
|
||||
sql.Add(' where SQType=''现货''');
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
begin
|
||||
if CheckBox1.Checked then
|
||||
begin
|
||||
sql.Add(' and SQDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.Add(' and SQDate<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
||||
end;
|
||||
end;
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.tjstatus,'''')='''' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.tjstatus,'''')<>'''' and isnull(A.Chker,'''')='''' ');
|
||||
end
|
||||
else if cxTabControl1.TabIndex = 2 then
|
||||
begin
|
||||
SQL.Add(' and isnull(A.Chker,'''')<>'''' ');
|
||||
end;
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
sql.Add(' and (isnull(A.Filler,'''')=''' + Trim(DName) + '''');
|
||||
sql.Add('or isnull(A.salesman,'''')=''' + Trim(DName) + '''');
|
||||
sql.Add('or (select top 1 xszl from COMPANY c where a.CustomerNoName=c.CONAME and c.valid=''Y'' ) like' + QuotedStr('%' + Trim(DName) + '%'));
|
||||
sql.Add(')');
|
||||
end;
|
||||
if status.Text <> '' then
|
||||
begin
|
||||
if status.Text = '未完成' then
|
||||
begin
|
||||
SQL.Add(' and isnull(STATUS,''未完成'')=''未完成'' ');
|
||||
end
|
||||
else
|
||||
begin
|
||||
SQL.Add(' and isnull(STATUS,''未完成'')<>''未完成'' ');
|
||||
end;
|
||||
|
||||
end;
|
||||
if CRTYPE.Text <> '' then
|
||||
begin
|
||||
sql.Add(' and isnull(A.CRTYPE,'''')=''' + Trim(CRTYPE.Text) + '''');
|
||||
end;
|
||||
SQL.Add('ORDER BY SQDate DESC');
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.InitForm();
|
||||
begin
|
||||
|
||||
ReadCxGrid('现货发货主表', Tv1, '发货管理');
|
||||
ReadCxGrid('现货发货子表', Tv2, '发货管理9');
|
||||
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime;
|
||||
InitGrid();
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.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 TfrmFHSQListXH.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||
sql.Add(' ' + quotedstr(trim(DName)));
|
||||
sql.Add(',getdate() ');
|
||||
sql.Add(',' + quotedstr(trim('生产发货申请')));
|
||||
sql.Add(',' + quotedstr(trim('生产发货申请修改')));
|
||||
sql.Add(',' + quotedstr(trim('发货单号:' + trim(Order_Main.FieldByName('FSID').AsString) + ';客户:' + trim(Order_Main.FieldByName('CustomerNoName').AsString))));
|
||||
sql.Add(',' + quotedstr(trim('成功')));
|
||||
sql.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
try
|
||||
frmFHSQInPutXH := TfrmFHSQInPutXH.Create(Application);
|
||||
with frmFHSQInPutXH do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('FSID').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPutXH.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
|
||||
if canshu1 <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select * from CK_BanCP_CR where CRFlag=''出库''');
|
||||
sql.add(' and CKOrdNo=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已发货不能删除数据!', '提示', 0);
|
||||
exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from yf_money_cr_sub');
|
||||
sql.Add('where yfpzno=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = false then
|
||||
begin
|
||||
Application.MessageBox('已生成账款不能删除!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if DelData() then
|
||||
begin
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmFHSQListXH.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete FHSQ_Sub where FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
sql.Add('delete FHSQ_Main where FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||
sql.Add(' ' + quotedstr(trim(DName)));
|
||||
sql.Add(',getdate() ');
|
||||
sql.Add(',' + quotedstr(trim('生产发货申请')));
|
||||
sql.Add(',' + quotedstr(trim('生产发货申请删除')));
|
||||
sql.Add(',' + quotedstr(trim('发货单号:' + trim(Order_Main.FieldByName('FSID').AsString) + ';客户:' + trim(Order_Main.FieldByName('CustomerNoName').AsString))));
|
||||
sql.Add(',' + quotedstr(trim('成功')));
|
||||
sql.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
SelExportData(Tv1, ADOQueryMain, '发货申请列表');
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
Txt, fImagePath: string;
|
||||
Moudle: THandle;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
// if cxTabControl1.TabIndex <> 1 then
|
||||
// Exit;
|
||||
ExportFtErpFile('现货发货申请单.rmf', ADOQueryTemp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\现货发货申请单.rmf';
|
||||
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('EXEC P_Print_XHSQD3 @FSID=' + quotedstr(Trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
try
|
||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||
Txt := Trim(Order_Main.fieldbyname('FSID').AsString);
|
||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||
if FileExists(fImagePath) then
|
||||
DeleteFile(fImagePath);
|
||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||
except
|
||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
TBFind.Click;
|
||||
InitSubGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.TBAddClick(Sender: TObject);
|
||||
var
|
||||
maxno: string;
|
||||
begin
|
||||
try
|
||||
frmFHSQInPutXH := TfrmFHSQInPutXH.Create(Application);
|
||||
with frmFHSQInPutXH do
|
||||
begin
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPutXH.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmFHSQInPutXH := TfrmFHSQInPutXH.Create(Application);
|
||||
with frmFHSQInPutXH do
|
||||
begin
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('FSID').AsString);
|
||||
ToolBar2.Visible := False;
|
||||
TBSave.Visible := False;
|
||||
ScrollBox1.Enabled := False;
|
||||
Tv1.OptionsSelection.CellSelect := False;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQInPutXH.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.CustomerNoNameChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.tchkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 1 then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET Chker=''' + Trim(DName) + ''',ChkTime=getdate(),ChkStatus=''审核通过'' ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('审核成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.InitSubGrid();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
sql.Add('select A.*,B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''')
|
||||
else
|
||||
sql.Add('select A.*,B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId where 1=2');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.TnochkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 2 then
|
||||
exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from yf_money_cr_sub');
|
||||
sql.Add('where yfpzno=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能撤销!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Order_Main.fieldbyname('STATUS').AsString = ' 已完成' then
|
||||
begin
|
||||
Application.MessageBox('已完成申请不能撤销!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
try
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET Chker=Null,ChkTime=Null,ChkStatus=Null ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('撤销成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('撤销失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if Order_Main.IsEmpty = False then
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where A.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + '''');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
|
||||
sql.Add(' where 1=2');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet2);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet2);
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if Trim(canshu1) <> '高权限' then
|
||||
begin
|
||||
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
|
||||
begin
|
||||
Application.MessageBox('不能操作他人的数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
lblFSID.Caption := Order_Main.fieldbyname('FSID').AsString;
|
||||
DateTimePicker1.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
Panel5.Left := (self.Width - Panel5.Width) div 2;
|
||||
Panel5.Visible := true;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.Button6Click(Sender: TObject);
|
||||
begin
|
||||
Panel5.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.Button5Click(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET fhDate=' + QuotedStr(Trim(FormatDateTime('yyyy-MM-dd', DateTimePicker1.Date))));
|
||||
sql.Add('where FSID=' + quotedstr(trim(lblFSID.Caption)));
|
||||
execsql;
|
||||
end;
|
||||
InitGrid();
|
||||
Order_Main.Locate('FSID', lblFSID.Caption, []);
|
||||
Panel5.Visible := false;
|
||||
application.MessageBox('修改成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('修改失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.btn1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET status='' 已完成'' ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
// ShowMessage(SQL.Text);
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('操作成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.btn2Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 0 then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET tjstatus=''审核通过'' ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('提交成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('提交失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.btn3Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
if cxTabControl1.TabIndex <> 1 then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update FHSQ_Main SET tjstatus=NULL ');
|
||||
sql.Add('where FSID=' + quotedstr(trim(Order_Main.fieldbyname('FSID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
Order_Main.Delete;
|
||||
InitSubGrid();
|
||||
application.MessageBox('撤销成功!', '提示信息');
|
||||
except
|
||||
application.MessageBox('撤销失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.statusChange(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmFHSQListXH.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
frmSysLogHelp := TfrmSysLogHelp.create(self);
|
||||
with frmSysLogHelp do
|
||||
begin
|
||||
fModel := '生产发货申请';
|
||||
// facction:='生产指示单删除';
|
||||
showmodal;
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
188
发货申请(ShipmentRequest.dll)/U_FileUp.dfm
Normal file
188
发货申请(ShipmentRequest.dll)/U_FileUp.dfm
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
object frmFileUp: TfrmFileUp
|
||||
Left = 247
|
||||
Top = 162
|
||||
Width = 634
|
||||
Height = 447
|
||||
Caption = #19978#20256#25991#20214
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid7: TcxGrid
|
||||
Left = 0
|
||||
Top = 41
|
||||
Width = 555
|
||||
Height = 367
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV7: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
object FileName: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #25991#20214#21517#31216
|
||||
DataBinding.FieldName = 'FileName'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 121
|
||||
end
|
||||
object FileDate: TcxGridDBColumn
|
||||
Tag = 1
|
||||
Caption = #19978#20256#26085#26399
|
||||
DataBinding.FieldName = 'FileDate'
|
||||
FooterAlignmentHorz = taCenter
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 104
|
||||
end
|
||||
end
|
||||
object cxGridLevel6: TcxGridLevel
|
||||
GridView = TV7
|
||||
end
|
||||
end
|
||||
object Panel16: TPanel
|
||||
Left = 190
|
||||
Top = 126
|
||||
Width = 138
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
Caption = #27491#22312#19978#20256#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ToolBar6: TToolBar
|
||||
Left = 555
|
||||
Top = 41
|
||||
Width = 63
|
||||
Height = 367
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Flat = True
|
||||
Images = DataLink_DDMD.ThreeImgList
|
||||
List = True
|
||||
ShowCaptions = True
|
||||
TabOrder = 2
|
||||
object FileUp: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19978#20256
|
||||
ImageIndex = 109
|
||||
Wrap = True
|
||||
OnClick = FileUpClick
|
||||
end
|
||||
object FileDel: TToolButton
|
||||
Left = 0
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 17
|
||||
Wrap = True
|
||||
OnClick = FileDelClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 618
|
||||
Height = 41
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 3
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 14
|
||||
Width = 68
|
||||
Height = 16
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Image2: TImage
|
||||
Left = 537
|
||||
Top = 17
|
||||
Width = 23
|
||||
Height = 16
|
||||
end
|
||||
object Code: TEdit
|
||||
Left = 78
|
||||
Top = 9
|
||||
Width = 211
|
||||
Height = 24
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ODPat: TOpenDialog
|
||||
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
|
||||
Left = 404
|
||||
Top = 197
|
||||
end
|
||||
object IdFTP1: TIdFTP
|
||||
MaxLineAction = maException
|
||||
ReadTimeout = 0
|
||||
ProxySettings.ProxyType = fpcmNone
|
||||
ProxySettings.Port = 0
|
||||
Left = 405
|
||||
Top = 236
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Left = 409
|
||||
Top = 285
|
||||
end
|
||||
object ADOQueryFile: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 488
|
||||
Top = 144
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryFile
|
||||
Left = 392
|
||||
Top = 168
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 216
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_DDMD.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 504
|
||||
Top = 264
|
||||
end
|
||||
end
|
||||
357
发货申请(ShipmentRequest.dll)/U_FileUp.pas
Normal file
357
发货申请(ShipmentRequest.dll)/U_FileUp.pas
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
unit U_FileUp;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, IdBaseComponent,
|
||||
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB,jpeg,
|
||||
BtnEdit,IniFiles;
|
||||
|
||||
type
|
||||
TfrmFileUp = class(TForm)
|
||||
cxGrid7: TcxGrid;
|
||||
TV7: TcxGridDBTableView;
|
||||
FileName: TcxGridDBColumn;
|
||||
FileDate: TcxGridDBColumn;
|
||||
cxGridLevel6: TcxGridLevel;
|
||||
Panel16: TPanel;
|
||||
ToolBar6: TToolBar;
|
||||
FileUp: TToolButton;
|
||||
FileDel: TToolButton;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
Code: TEdit;
|
||||
ODPat: TOpenDialog;
|
||||
IdFTP1: TIdFTP;
|
||||
SaveDialog1: TSaveDialog;
|
||||
ADOQueryFile: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
Image2: TImage;
|
||||
procedure FileUpClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FileDelClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
lstPat: TStringList;
|
||||
AJpeg: TJPEGImage;
|
||||
procedure CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
procedure SaveImageOther();
|
||||
procedure ReadINIFile10();
|
||||
{ Private declarations }
|
||||
public
|
||||
CYID:String;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmFileUp: TfrmFileUp;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_RTFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmFileUp.ReadINIFile10();
|
||||
var
|
||||
programIni:Tinifile; //配置文件名
|
||||
FileName:string;
|
||||
begin
|
||||
FileName:=ExtractFilePath(Paramstr(0))+'SYSTEMSET.INI';
|
||||
programIni:=Tinifile.create(FileName);
|
||||
server:=programIni.ReadString('SERVER','服务器地址','127.0.0.1');
|
||||
programIni.Free;
|
||||
end;
|
||||
procedure TfrmFileUp.FileUpClick(Sender: TObject);
|
||||
var
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo:string;
|
||||
AJpeg: TJPEGImage;
|
||||
begin
|
||||
if Trim(Code.Text)='' then
|
||||
begin
|
||||
Application.MessageBox('编号不能为空!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
lstPat.Clear;
|
||||
if ODPat.Execute then
|
||||
begin
|
||||
lstPat.AddStrings(ODPat.Files);
|
||||
end;
|
||||
|
||||
if lstPat.Count > 0 then
|
||||
begin
|
||||
try
|
||||
ReadINIFile10();
|
||||
server:=ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Host :=server;//PicSvr;
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
except
|
||||
IdFTP1.Quit;
|
||||
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Panel16.Visible:=True;
|
||||
Panel16.Refresh;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select Count(*) MM from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add('and filetype=''YP''');
|
||||
Open;
|
||||
j:=fieldbyname('MM').AsInteger;
|
||||
end;
|
||||
Image2.Picture.LoadFromFile(ODPat.FileName);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
CreThumb(AJpeg,Image2,216, 187);
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
for i := 0 to lstPat.Count - 1 do
|
||||
begin
|
||||
PatFile := ExtractFileName(lstPat[i]);
|
||||
PatFile:=Copy(PatFile,(Pos('.',PatFile)+1),(Length(PatFile)-Pos('.',PatFile)) ) ;
|
||||
FConNo:=Trim(Code.Text);
|
||||
while Pos('/',FConNo)>0 do
|
||||
begin
|
||||
Delete(FConNo,Pos('/',FConNo),1);
|
||||
end;
|
||||
PatFile:=Trim(FConNo)+'-'+Inttostr(j+i+1)+'.'+PatFile;
|
||||
if IdFTP1.Connected then
|
||||
begin
|
||||
try
|
||||
{if not DirectoryExists('D:\图片\'+Trim(gDef1)) then
|
||||
ForceDirectories('D:\图片\'+Trim(gDef1)); }
|
||||
IdFTP1.Put(lstPat[i], Trim('\YP')+'\'+Trim(PatFile));
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and filename='''+Trim(PatFile)+'''');
|
||||
SQL.Add(' and filetype=''YP''');
|
||||
Open;
|
||||
if not IsEmpty then
|
||||
begin
|
||||
Panel16.Visible:=False;
|
||||
Application.MessageBox(PChar('文件<'+Trim(PatFile)+'>重复,'+inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
if GetLSNo(ADOQueryCmd,MaxNo,'YP','XD_File',4,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('XFID').Value:=Trim(MaxNo);
|
||||
FieldByName('CYID').Value:=Trim(CYID);
|
||||
FieldByName('CYNO').Value:=Trim(Code.Text);
|
||||
FieldByName('filename').Value:=Trim(PatFile);
|
||||
FieldByName('FileDate').Value:=SGetServerDate(ADOQueryTemp);
|
||||
fieldbyname('FileType').value:=Trim('YP');
|
||||
Post;
|
||||
end;
|
||||
except
|
||||
//ADOQueryCmd.Connection.RollbackTrans;
|
||||
//Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=1 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
SaveImageOther();
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('图片上传失败!','提示',0);
|
||||
end;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
open;
|
||||
end;
|
||||
Panel16.Visible:=False;
|
||||
if i>0 then
|
||||
Application.MessageBox(PChar(inttostr(i)+'个文件上传成功!'),'提示',0);
|
||||
ModalResult:=1;
|
||||
end;
|
||||
procedure TfrmFileUp.CreThumb(AJPeg:TJPEGImage;Image1:TImage;Width, Height: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
Ratio: Double;
|
||||
ARect: TRect;
|
||||
AHeight, AHeightOffset: Integer;
|
||||
AWidth, AWidthOffset: Integer;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Ratio := AJPeg.Width /AJPeg.Height;
|
||||
if Ratio > 1.333 then
|
||||
begin
|
||||
AHeight := Round(Width / Ratio);
|
||||
AHeightOffset := (Height - AHeight) div 2;
|
||||
AWidth := Width;
|
||||
AWidthOffset := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
AWidth := Round(Height * Ratio);
|
||||
AWidthOffset := (Width - AWidth) div 2;
|
||||
AHeight := Height;
|
||||
AHeightOffset := 0;
|
||||
end;
|
||||
Bitmap.Width := Width;
|
||||
Bitmap.Height := Height;
|
||||
Bitmap.Canvas.Brush.Color := clBtnFace;
|
||||
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
|
||||
Bitmap.Canvas.StretchDraw(ARect, AJPeg);
|
||||
Image1.Picture.Assign(BitMap);
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
procedure TfrmFileUp.SaveImageOther();
|
||||
var
|
||||
AJpeg: TJPEGImage;
|
||||
myStream: TADOBlobStream;
|
||||
ImgMaxNo:String;
|
||||
i,j: Integer;
|
||||
PatFile: String;
|
||||
FTPPath,FConNo,MaxNo,FTFID:string;
|
||||
begin
|
||||
if Image2.Picture=nil then Exit;
|
||||
AJpeg:=TJpegImage.Create();
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File where WBID='''+Trim(CYID)+'''');
|
||||
Open;
|
||||
end;
|
||||
FTFID:=Trim(ADOQueryTemp.fieldbyname('TFID').AsString);
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd,ImgMaxNo,'TF','TP_File',3,1)=False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取图片表最大号失败!','提示',0);
|
||||
Exit;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
ImgMaxNo:=Trim(FTFID);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add( ' select * from TP_File where TFID='''+Trim(FTFID)+'''');
|
||||
open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
if Trim(FTFID)='' then
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('Editer').Value:=Trim(DName);
|
||||
FieldByName('EditTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
end;
|
||||
FieldByName('TFID').Value:=Trim(ImgMaxNo);
|
||||
FieldByName('WBID').Value:=Trim(CYID);
|
||||
//FieldByName('TFIdx').Value:=cxTabControl2.TabIndex;
|
||||
FieldByName('TFType').Value:='样品';
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
//CreThumb(AJpeg,Image1,160, 120);
|
||||
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
|
||||
AJpeg.Assign(Image2.Picture.Graphic);
|
||||
AJpeg.SaveToStream(myStream);
|
||||
myStream.Free;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
lstPat := TStringList.Create;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FileDelClick(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add(' Delete XD_File where XFID='''+Trim(ADOQueryFile.fieldbyname('XFID').AsString)+'''');
|
||||
SQL.Add(' Delete TP_File where WBID='''+Trim(CYID)+''' and TFType=''样品'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
open;
|
||||
end;
|
||||
if ADOQueryFile.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update CP_YDang Set TPFlag=0 where CYID='''+Trim(CYID)+'''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFileUp.FormShow(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryFile do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from XD_File where CYID='''+Trim(CYID)+'''');
|
||||
SQL.Add(' and FileType=''YP''');
|
||||
Open;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
880
发货申请(ShipmentRequest.dll)/U_GetDllForm.pas
Normal file
880
发货申请(ShipmentRequest.dll)/U_GetDllForm.pas
Normal file
|
|
@ -0,0 +1,880 @@
|
|||
unit U_GetDllForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, SysUtils, ADODB, dxCore,
|
||||
ActiveX;
|
||||
|
||||
function GetDllForm(App: Tapplication; FormH: hwnd; FormID: integer; Language: integer; WinStyle: integer; GCode: Pchar; GName: Pchar; DataBase: Pchar; Title: PChar; Parameters1: PChar; Parameters2: PChar; Parameters3: PChar; Parameters4: PChar; Parameters5: PChar; Parameters6: PChar; Parameters7: PChar; Parameters8: PChar; Parameters9: PChar; Parameters10: PChar; DataBaseStr: PChar): hwnd; export; stdcall;
|
||||
|
||||
function ConnData(): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_FHSQList, U_PBOutHZList, U_SQSMCK, U_SMPK, U_FHSQListXH,
|
||||
U_SQSMCKXH, U_SXKCCK, U_ProductOrderNewList_TC, U_THSQSMTH, U_DYSQList,
|
||||
U_FHSQListCX, U_CWOutHZList, U_THMXList;
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// 功能说明:取Dll中得窗体 //
|
||||
// 参数说明:App>>调用应用程序; //
|
||||
// FormH>>调用窗口句柄 ; //
|
||||
// FormID>>窗口号; //
|
||||
// Language>>语言种类; //
|
||||
// WinStyle>>窗口类型; //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
var
|
||||
frmFHSQListLR, frmFHSQListGQX, frmFHSQListChk, frmFHSQListChkWX: TfrmFHSQList;
|
||||
frmPBOutHZListGL, frmPBOutHZListCX, frmPBOutHZListCXD: TfrmPBOutHZList;
|
||||
frmFHSQListXHLR, frmFHSQListXHGQX, frmFHSQListXHChk: TfrmFHSQListXH;
|
||||
frmProductTCLR, frmProductTCJL, frmProductTCGL, frmProductTCQR, frmProductTCCX, frmProductTCXG: TfrmProductOrderNewList_TC;
|
||||
frmDYSQListLR, frmDYSQListGQX, frmDYSQListChk: TfrmDYSQList;
|
||||
|
||||
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 := '47.103.192.8,7781';
|
||||
// server := '.';
|
||||
dtbase := 'yushangdata';
|
||||
user := 'yushangsa';
|
||||
// user := 'sa';
|
||||
pswd := 'rightsoft@7112';
|
||||
// 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(frmFHSQListLR.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmFHSQListLR := TfrmFHSQList.Create(application.MainForm);
|
||||
with frmFHSQListLR do
|
||||
begin
|
||||
Title := '发货申请录入';
|
||||
canshu1 := '录入';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmFHSQListLR.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmFHSQListLR.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(frmFHSQListGQX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmFHSQListGQX := TfrmFHSQList.Create(application.MainForm);
|
||||
with frmFHSQListGQX do
|
||||
begin
|
||||
Title := '发货申请(高权限)';
|
||||
canshu1 := '高权限';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmFHSQListGQX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmFHSQListGQX.Handle;
|
||||
end;
|
||||
113: //发货申请审核
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '发货申请审核' then
|
||||
begin
|
||||
BringWindowToTop(frmFHSQListChk.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmFHSQListChk := TfrmFHSQList.Create(application.MainForm);
|
||||
with frmFHSQListChk do
|
||||
begin
|
||||
Title := '发货申请审核';
|
||||
canshu1 := '高权限';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmFHSQListChk.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmFHSQListChk.Handle;
|
||||
end;
|
||||
|
||||
{ 202: //扫描出库选库存
|
||||
begin
|
||||
if frmSXKCCK = nil then
|
||||
begin
|
||||
frmSXKCCK := TfrmSXKCCK.Create(application.MainForm);
|
||||
with frmSXKCCK do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmSXKCCK.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmSXKCCK.Handle;
|
||||
end; }
|
||||
114: //物流发货进度
|
||||
begin
|
||||
if frmFHSQListCX = nil then
|
||||
begin
|
||||
frmFHSQListCX := TfrmFHSQListCX.Create(application.MainForm);
|
||||
with frmFHSQListCX do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmFHSQListCX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmFHSQListCX.Handle;
|
||||
end;
|
||||
201: //扫描出库
|
||||
begin
|
||||
if frmSQSMCK = nil then
|
||||
begin
|
||||
frmSQSMCK := TfrmSQSMCK.Create(application.MainForm);
|
||||
with frmSQSMCK do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmSQSMCK.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmSQSMCK.Handle;
|
||||
end;
|
||||
|
||||
121: //码单打印
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '码单打印' then
|
||||
begin
|
||||
BringWindowToTop(frmPBOutHZListGL.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmPBOutHZListGL := TfrmPBOutHZList.Create(application.MainForm);
|
||||
with frmPBOutHZListGL do
|
||||
begin
|
||||
Title := '码单打印';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmPBOutHZListGL.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmPBOutHZListGL.Handle;
|
||||
end;
|
||||
|
||||
122: //码单查询
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '码单查询' then
|
||||
begin
|
||||
BringWindowToTop(frmPBOutHZListCX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmPBOutHZListCX := TfrmPBOutHZList.Create(application.MainForm);
|
||||
with frmPBOutHZListCX do
|
||||
begin
|
||||
Title := '码单查询';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmPBOutHZListCX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmPBOutHZListCX.Handle;
|
||||
end;
|
||||
123: //码单查询(低)
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '码单查询(低)' then
|
||||
begin
|
||||
BringWindowToTop(frmPBOutHZListCXD.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmPBOutHZListCXD := TfrmPBOutHZList.Create(application.MainForm);
|
||||
with frmPBOutHZListCXD do
|
||||
begin
|
||||
Title := '码单查询(低)';
|
||||
CANSHU1 := '查询';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmPBOutHZListCXD.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmPBOutHZListCXD.Handle;
|
||||
end;
|
||||
|
||||
125: //财务码单打印
|
||||
begin
|
||||
if frmCWOutHZList = nil then
|
||||
begin
|
||||
frmCWOutHZList := TfrmCWOutHZList.Create(application.MainForm);
|
||||
with frmCWOutHZList do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmCWOutHZList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmCWOutHZList.Handle;
|
||||
end;
|
||||
411: //生产发货申请
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '生产发货申请录入' then
|
||||
begin
|
||||
BringWindowToTop(frmFHSQListXHLR.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmFHSQListXHLR := TfrmFHSQListXH.Create(application.MainForm);
|
||||
with frmFHSQListXHLR do
|
||||
begin
|
||||
Title := '生产发货申请录入';
|
||||
canshu1 := '录入';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmFHSQListXHLR.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmFHSQListXHLR.Handle;
|
||||
end;
|
||||
412: //现货发货申请(高权限)
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '生产发货申请(高权限)' then
|
||||
begin
|
||||
BringWindowToTop(frmFHSQListXHGQX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmFHSQListXHGQX := TfrmFHSQListXH.Create(application.MainForm);
|
||||
with frmFHSQListXHGQX do
|
||||
begin
|
||||
Title := '生产发货申请(高权限)';
|
||||
canshu1 := '高权限';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmFHSQListXHGQX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmFHSQListXHGQX.Handle;
|
||||
end;
|
||||
|
||||
413: //生产发货申请审核
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '生产发货申请审核' then
|
||||
begin
|
||||
BringWindowToTop(frmFHSQListXHChk.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmFHSQListXHChk := TfrmFHSQListXH.Create(application.MainForm);
|
||||
with frmFHSQListXHChk do
|
||||
begin
|
||||
Title := '生产发货申请审核';
|
||||
canshu1 := '高权限';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmFHSQListXHChk.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmFHSQListXHChk.Handle;
|
||||
end;
|
||||
|
||||
421: //现货扫描出库
|
||||
begin
|
||||
if frmSQSMCKXH = nil then
|
||||
begin
|
||||
frmSQSMCKXH := TfrmSQSMCKXH.Create(application.MainForm);
|
||||
with frmSQSMCKXH do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmSQSMCKXH.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmSQSMCKXH.Handle;
|
||||
end;
|
||||
|
||||
311: //扫描盘库
|
||||
begin
|
||||
if frmSMPK = nil then
|
||||
begin
|
||||
frmSMPK := TfrmSMPK.Create(application.MainForm);
|
||||
with frmSMPK do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmSMPK.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmSMPK.Handle;
|
||||
end;
|
||||
510: //退货申请查询
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '退货申请查询' then
|
||||
begin
|
||||
BringWindowToTop(frmProductTCCX.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmProductTCCX := TfrmProductOrderNewList_TC.Create(application.MainForm);
|
||||
with frmProductTCCX do
|
||||
begin
|
||||
Title := '退货申请查询';
|
||||
canshu1 := '查询';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmProductTCCX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmProductTCCX.Handle;
|
||||
end;
|
||||
511: //退货申请
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '退货申请录入' then
|
||||
begin
|
||||
BringWindowToTop(frmProductTCLR.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmProductTCLR := TfrmProductOrderNewList_TC.Create(application.MainForm);
|
||||
with frmProductTCLR do
|
||||
begin
|
||||
Title := '退货申请录入';
|
||||
canshu1 := '录入';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmProductTCLR.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmProductTCLR.Handle;
|
||||
end;
|
||||
|
||||
512: //退货申请管理
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '退货申请管理' then
|
||||
begin
|
||||
BringWindowToTop(frmProductTCGL.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmProductTCGL := TfrmProductOrderNewList_TC.Create(application.MainForm);
|
||||
with frmProductTCGL do
|
||||
begin
|
||||
Title := '退货申请管理';
|
||||
canshu1 := '高权限';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmProductTCGL.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmProductTCGL.Handle;
|
||||
end;
|
||||
|
||||
513: //财务退仓确认
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '财务退仓确认' then
|
||||
begin
|
||||
BringWindowToTop(frmProductTCQR.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmProductTCQR := TfrmProductOrderNewList_TC.Create(application.MainForm);
|
||||
with frmProductTCQR do
|
||||
begin
|
||||
Title := '财务退仓确认';
|
||||
canshu1 := '财务';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmProductTCQR.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmProductTCQR.Handle;
|
||||
end;
|
||||
|
||||
515: //退仓调度
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '退仓信息修改' then
|
||||
begin
|
||||
BringWindowToTop(frmProductTCXG.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmProductTCXG := TfrmProductOrderNewList_TC.Create(application.MainForm);
|
||||
with frmProductTCXG do
|
||||
begin
|
||||
Title := '退仓信息修改';
|
||||
canshu1 := '调度';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmProductTCXG.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmProductTCXG.Handle;
|
||||
end;
|
||||
|
||||
516: //退仓经理审核
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '退仓经理审核' then
|
||||
begin
|
||||
BringWindowToTop(frmProductTCJL.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmProductTCJL := TfrmProductOrderNewList_TC.Create(application.MainForm);
|
||||
with frmProductTCJL do
|
||||
begin
|
||||
Title := '退仓经理审核';
|
||||
canshu1 := '经理';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmProductTCJL.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmProductTCJL.Handle;
|
||||
end;
|
||||
|
||||
514: //退货明细查询
|
||||
begin
|
||||
if frmTHMXList = nil then
|
||||
begin
|
||||
frmTHMXList := TfrmTHMXList.Create(application.MainForm);
|
||||
with frmTHMXList do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmTHMXList.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmTHMXList.Handle;
|
||||
end;
|
||||
521: //扫描退货
|
||||
begin
|
||||
if frmTHSQSMTH = nil then
|
||||
begin
|
||||
frmTHSQSMTH := TfrmTHSQSMTH.Create(application.MainForm);
|
||||
with frmTHSQSMTH do
|
||||
begin
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmTHSQSMTH.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmTHSQSMTH.Handle;
|
||||
end;
|
||||
|
||||
611: //板房调样申请
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '板房调样申请录入' then
|
||||
begin
|
||||
BringWindowToTop(frmDYSQListLR.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmDYSQListLR := TfrmDYSQList.Create(application.MainForm);
|
||||
with frmDYSQListLR do
|
||||
begin
|
||||
Title := '板房调样申请录入';
|
||||
canshu1 := '录入';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDYSQListLR.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDYSQListLR.Handle;
|
||||
end;
|
||||
612: //板房调样申请(高权限)
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '板房调样申请(高权限)' then
|
||||
begin
|
||||
BringWindowToTop(frmDYSQListGQX.Handle);
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmDYSQListGQX := TfrmDYSQList.Create(application.MainForm);
|
||||
with frmDYSQListGQX do
|
||||
begin
|
||||
Title := '板房调样申请(高权限)';
|
||||
canshu1 := '高权限';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDYSQListGQX.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDYSQListGQX.Handle;
|
||||
end;
|
||||
613: //板房调样申请审核
|
||||
begin
|
||||
bFound := FALSE;
|
||||
for i := (App.MainForm.MDIChildCount - 1) downto 0 do
|
||||
begin
|
||||
if App.MainForm.MDIChildren[i].Caption = '板房调样申请审核' then
|
||||
begin
|
||||
BringWindowToTop(frmDYSQListChk.Handle);
|
||||
|
||||
bFound := TRUE;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if not bFound then
|
||||
begin
|
||||
frmDYSQListChk := TfrmDYSQList.Create(application.MainForm);
|
||||
with frmDYSQListChk do
|
||||
begin
|
||||
Title := '板房调样申请审核';
|
||||
canshu1 := '高权限';
|
||||
caption := Trim(Title);
|
||||
FormStyle := mstyle;
|
||||
windowState := mstate;
|
||||
BorderStyle := mborderstyle;
|
||||
//show;
|
||||
end;
|
||||
end
|
||||
else
|
||||
frmDYSQListChk.BringToFront;
|
||||
//句柄
|
||||
mnewHandle := frmDYSQListChk.Handle;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := mnewHandle;
|
||||
end;
|
||||
//===========================================================
|
||||
//建立数据库连接池
|
||||
//===========================================================
|
||||
|
||||
function ConnData(): Boolean;
|
||||
begin
|
||||
if not Assigned(DataLink_ShipmentRequest) then
|
||||
DataLink_ShipmentRequest := TDataLink_ShipmentRequest.Create(Application);
|
||||
try
|
||||
with DataLink_ShipmentRequest.ADOLink do
|
||||
begin
|
||||
//if not Connected then
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
end;
|
||||
Result := true;
|
||||
except
|
||||
Result := false;
|
||||
application.MessageBox('数据库连接失败!', '错误', mb_Ok + MB_ICONERROR);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
initialization
|
||||
CoInitialize(nil);
|
||||
dxUnitsLoader.Initialize;
|
||||
|
||||
|
||||
finalization
|
||||
DataLink_ShipmentRequest.Free;
|
||||
application := NewDllApp;
|
||||
dxUnitsLoader.Finalize;
|
||||
|
||||
end.
|
||||
|
||||
398
发货申请(ShipmentRequest.dll)/U_JYMXInfo.dfm
Normal file
398
发货申请(ShipmentRequest.dll)/U_JYMXInfo.dfm
Normal file
|
|
@ -0,0 +1,398 @@
|
|||
object frmJYMXInfo: TfrmJYMXInfo
|
||||
Left = 82
|
||||
Top = 62
|
||||
Width = 1171
|
||||
Height = 576
|
||||
Caption = #26816#39564#26126#32454#25968#25454
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1155
|
||||
Height = 538
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Position = spFooter
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column31
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column32
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column16
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column24
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column31
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column32
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column8
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column16
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column9
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column24
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_TradeManagePB.SHuangSe
|
||||
Styles.IncSearch = DataLink_TradeManagePB.SHuangSe
|
||||
Styles.Selection = DataLink_TradeManagePB.SHuangSe
|
||||
Styles.Header = DataLink_TradeManagePB.Default
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 103
|
||||
end
|
||||
object v1Column33: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #38024#23544
|
||||
DataBinding.FieldName = 'ZhenCun'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #25377#36710#24037
|
||||
DataBinding.FieldName = 'SCPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #36710#21495
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 58
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #26816#39564#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #26816#39564#26102#38388
|
||||
DataBinding.FieldName = 'FillTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 94
|
||||
end
|
||||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #33853#24067#26102#38388
|
||||
DataBinding.FieldName = 'LBDate'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Options.Editing = False
|
||||
Width = 89
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21367#26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'APXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #35843#35797#26426#20462
|
||||
DataBinding.FieldName = 'JXPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object v1Column31: TcxGridDBColumn
|
||||
Caption = #20928#37325
|
||||
DataBinding.FieldName = 'MJJingZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column32: TcxGridDBColumn
|
||||
Caption = #30382#37325
|
||||
DataBinding.FieldName = 'MJPiZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #27611#37325
|
||||
DataBinding.FieldName = 'MJMaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 54
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #30133#28857#20010#25968
|
||||
DataBinding.FieldName = 'CDGS'
|
||||
Width = 61
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #30133#28857#31859#25968
|
||||
DataBinding.FieldName = 'CDHZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 63
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #30133#28857#20844#26020#25968
|
||||
DataBinding.FieldName = 'CDHZKgQty'
|
||||
Options.Editing = False
|
||||
Width = 72
|
||||
end
|
||||
object v1Column25: TcxGridDBColumn
|
||||
Caption = #36131#20219#20154
|
||||
DataBinding.FieldName = 'ZZPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #30133#28857#24773#20917
|
||||
DataBinding.FieldName = 'CDQK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #20837#24211#29366#24577
|
||||
DataBinding.FieldName = 'MJStr2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 63
|
||||
end
|
||||
object v1Column29: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'ClothType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
end
|
||||
object v1Column30: TcxGridDBColumn
|
||||
Caption = #33394#21035
|
||||
DataBinding.FieldName = 'MJStr3'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #36716#25968
|
||||
DataBinding.FieldName = 'ZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 50
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #22870#21169
|
||||
DataBinding.FieldName = 'AddMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column24: TcxGridDBColumn
|
||||
Caption = #22788#32602
|
||||
DataBinding.FieldName = 'DelMoney'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 57
|
||||
end
|
||||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #20132#29677
|
||||
DataBinding.FieldName = 'JBStr'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 62
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #20132#29677#20154'1'
|
||||
DataBinding.FieldName = 'JBSCPerson'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 61
|
||||
end
|
||||
object v1Column26: TcxGridDBColumn
|
||||
Caption = #20132#29677#36716#25968'1'
|
||||
DataBinding.FieldName = 'JBZhuanQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 69
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #20132#29677#20154'2'
|
||||
DataBinding.FieldName = 'JBSCPerson2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 56
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #20132#29677#36716#25968'2'
|
||||
DataBinding.FieldName = 'JBZhuanQty2'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object MovePanel2: TMovePanel
|
||||
Left = 408
|
||||
Top = 192
|
||||
Width = 289
|
||||
Height = 49
|
||||
BevelInner = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_TradeManagePB.ADOLink
|
||||
Parameters = <>
|
||||
Left = 824
|
||||
Top = 104
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_TradeManagePB.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 856
|
||||
Top = 104
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_TradeManagePB.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 888
|
||||
Top = 104
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 824
|
||||
Top = 144
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 144
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 856
|
||||
Top = 144
|
||||
end
|
||||
end
|
||||
115
发货申请(ShipmentRequest.dll)/U_JYMXInfo.pas
Normal file
115
发货申请(ShipmentRequest.dll)/U_JYMXInfo.pas
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
unit U_JYMXInfo;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, MovePanel, cxButtonEdit;
|
||||
|
||||
type
|
||||
TfrmJYMXInfo = class(TForm)
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
CDS_Main: TClientDataSet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column33: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column20: TcxGridDBColumn;
|
||||
v1Column21: TcxGridDBColumn;
|
||||
v1Column28: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column31: TcxGridDBColumn;
|
||||
v1Column32: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column25: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column29: TcxGridDBColumn;
|
||||
v1Column30: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column24: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
MovePanel2: TMovePanel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
FFMainId,FFClothType:String;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmJYMXInfo: TfrmJYMXInfo;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmJYMXInfo.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmJYMXInfo:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmJYMXInfo.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
WriteCxGrid('检验信息明细',Tv1,'坯布仓库');
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmJYMXInfo.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Viwe_JYInfo_MX :WSql');
|
||||
Parameters.ParamByName('WSql').Value:=' and C.MainId='''+Trim(FFMainId)+''' and C.ClothType='''+Trim(FFClothType)+'''' ;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmJYMXInfo.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('检验信息明细',Tv1,'坯布仓库');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
end.
|
||||
313
发货申请(ShipmentRequest.dll)/U_LabelAdd.dfm
Normal file
313
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_LabelAdd.pas
Normal file
455
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_LabelList.dfm
Normal file
438
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_LabelList.pas
Normal file
591
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_ModuleNote.dfm
Normal file
181
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_ModuleNote.pas
Normal file
220
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_ModulePromptList.dfm
Normal file
342
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_ModulePromptList.pas
Normal file
257
发货申请(ShipmentRequest.dll)/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.
|
||||
885
发货申请(ShipmentRequest.dll)/U_OrderInPut_TC.dfm
Normal file
885
发货申请(ShipmentRequest.dll)/U_OrderInPut_TC.dfm
Normal file
|
|
@ -0,0 +1,885 @@
|
|||
object frmOrderInPut_TC: TfrmOrderInPut_TC
|
||||
Left = 298
|
||||
Top = 65
|
||||
Width = 994
|
||||
Height = 683
|
||||
Caption = #36864#36135#30003#35831#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
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 978
|
||||
Height = 37
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clBtnFace
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ShipmentRequest.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 cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 37
|
||||
Width = 978
|
||||
Height = 18
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#36864#20179#20449#24687)
|
||||
ClientRectRight = 0
|
||||
ClientRectTop = 0
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 55
|
||||
Width = 978
|
||||
Height = 222
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
object Label1: TLabel
|
||||
Left = 31
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #36864#36135#21333#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label39: TLabel
|
||||
Left = 291
|
||||
Top = 15
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #36864#20179#26085#26399#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 = 290
|
||||
Top = 41
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #21512' '#21516' '#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 31
|
||||
Top = 96
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #36864#36135#23458#25143#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 = 31
|
||||
Top = 120
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #36864#20179#21407#22240#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 30
|
||||
Top = 42
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 551
|
||||
Top = 15
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #30003' '#35831' '#20154#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 291
|
||||
Top = 93
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #22238#20179#22320#22336#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label20: TLabel
|
||||
Left = 291
|
||||
Top = 67
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #23458#25143#31616#31216#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 = 31
|
||||
Top = 68
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #35746#21333#25968#37327#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 819
|
||||
Top = 89
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #22383#24067#25439#22833#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 987
|
||||
Top = 51
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #22383#24067#21333#20215#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 1155
|
||||
Top = 51
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #22383#24067#37329#39069#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 819
|
||||
Top = 117
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #26579#33394#25439#22833#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 987
|
||||
Top = 79
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #26579#33394#21333#20215#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label15: TLabel
|
||||
Left = 1155
|
||||
Top = 79
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #26579#33394#37329#39069#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label16: TLabel
|
||||
Left = 819
|
||||
Top = 145
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #36816#36153#25439#22833#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label17: TLabel
|
||||
Left = 987
|
||||
Top = 107
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #20854#20182#25439#22833#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label18: TLabel
|
||||
Left = 851
|
||||
Top = 195
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #24037#21378#21517#31216#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 552
|
||||
Top = 95
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #25552#36135#22320#22336#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label23: TLabel
|
||||
Left = 526
|
||||
Top = 38
|
||||
Width = 91
|
||||
Height = 12
|
||||
Caption = #38144#21806#21457#36135#30003#35831#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 = 775
|
||||
Top = 15
|
||||
Width = 66
|
||||
Height = 12
|
||||
Caption = #19994' '#21153' '#21592#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 = 776
|
||||
Top = 38
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #19994#21153#32452#21035#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object TCNO: TEdit
|
||||
Tag = 2
|
||||
Left = 97
|
||||
Top = 11
|
||||
Width = 150
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 0
|
||||
Text = #33258#21160#29983#25104
|
||||
end
|
||||
object TCDate: TDateTimePicker
|
||||
Tag = 2
|
||||
Left = 357
|
||||
Top = 11
|
||||
Width = 149
|
||||
Height = 20
|
||||
BevelInner = bvNone
|
||||
Date = 40916.670856296290000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40916.670856296290000000
|
||||
TabOrder = 1
|
||||
end
|
||||
object CustomerNoName: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 97
|
||||
Top = 92
|
||||
Width = 150
|
||||
Height = 20
|
||||
Hint = 'CustomerNo'
|
||||
ReadOnly = True
|
||||
TabOrder = 6
|
||||
OnBtnUpClick = CustomerNoNameBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object Note: TMemo
|
||||
Tag = 2
|
||||
Left = 101
|
||||
Top = 118
|
||||
Width = 681
|
||||
Height = 92
|
||||
Hint = 'TCNote/'#36864#20179#21407#22240
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 11
|
||||
OnDblClick = OtherNoteDblClick
|
||||
end
|
||||
object conNO: TEdit
|
||||
Tag = 2
|
||||
Left = 357
|
||||
Top = 38
|
||||
Width = 149
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
end
|
||||
object orderNo: TBtnEditA
|
||||
Tag = 2
|
||||
Left = 97
|
||||
Top = 38
|
||||
Width = 149
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
OnBtnClick = orderNoBtnClick
|
||||
end
|
||||
object OrdPerson1: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 617
|
||||
Top = 12
|
||||
Width = 150
|
||||
Height = 20
|
||||
Hint = 'OrdPerson2/'#19994#21153#21592
|
||||
TabOrder = 2
|
||||
OnBtnUpClick = OrdPerson1BtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object CustomerNoshortName: TEdit
|
||||
Tag = 2
|
||||
Left = 357
|
||||
Top = 65
|
||||
Width = 149
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
end
|
||||
object HCAdress: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 357
|
||||
Top = 92
|
||||
Width = 150
|
||||
Height = 20
|
||||
Hint = 'HCAdress/'#22238#20179#22320#22336
|
||||
TabOrder = 8
|
||||
Text = #23431#23578#25104#21697#20179#24211
|
||||
OnBtnUpClick = OrdPerson1BtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object OrderQty: TEdit
|
||||
Tag = 2
|
||||
Left = 98
|
||||
Top = 64
|
||||
Width = 116
|
||||
Height = 20
|
||||
Enabled = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object PBQty: TEdit
|
||||
Tag = 2
|
||||
Left = 885
|
||||
Top = 85
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 12
|
||||
Visible = False
|
||||
OnChange = PBQtyChange
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object PBPrice: TEdit
|
||||
Tag = 2
|
||||
Left = 1049
|
||||
Top = 47
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 13
|
||||
Visible = False
|
||||
OnChange = PBQtyChange
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object PBMoney: TEdit
|
||||
Tag = 2
|
||||
Left = 1217
|
||||
Top = 47
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 14
|
||||
Visible = False
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object RSQty: TEdit
|
||||
Tag = 2
|
||||
Left = 885
|
||||
Top = 113
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 15
|
||||
Visible = False
|
||||
OnChange = RSQtyChange
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object RSPrice: TEdit
|
||||
Tag = 2
|
||||
Left = 1049
|
||||
Top = 75
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 16
|
||||
Visible = False
|
||||
OnChange = RSQtyChange
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object RSMoney: TEdit
|
||||
Tag = 2
|
||||
Left = 1217
|
||||
Top = 75
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 17
|
||||
Visible = False
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object YFMoney: TEdit
|
||||
Tag = 2
|
||||
Left = 885
|
||||
Top = 141
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 18
|
||||
Visible = False
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object OtherMoney: TEdit
|
||||
Tag = 2
|
||||
Left = 1049
|
||||
Top = 103
|
||||
Width = 88
|
||||
Height = 20
|
||||
TabOrder = 19
|
||||
Visible = False
|
||||
OnKeyPress = PBQtyKeyPress
|
||||
end
|
||||
object THKHName: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 917
|
||||
Top = 190
|
||||
Width = 412
|
||||
Height = 20
|
||||
TabOrder = 10
|
||||
Visible = False
|
||||
OnBtnUpClick = THKHNameBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object THAdress: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 617
|
||||
Top = 94
|
||||
Width = 150
|
||||
Height = 20
|
||||
Hint = 'THAdress/'#25552#36135#22320#22336
|
||||
TabOrder = 9
|
||||
OnBtnUpClick = OrdPerson1BtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
object FROMFHSQ: TBtnEditA
|
||||
Tag = 2
|
||||
Left = 617
|
||||
Top = 34
|
||||
Width = 149
|
||||
Height = 20
|
||||
ReadOnly = True
|
||||
TabOrder = 20
|
||||
OnBtnClick = FROMFHSQBtnClick
|
||||
end
|
||||
object FROMSSID: TEdit
|
||||
Tag = 2
|
||||
Left = 617
|
||||
Top = 60
|
||||
Width = 149
|
||||
Height = 20
|
||||
TabOrder = 21
|
||||
Visible = False
|
||||
end
|
||||
object YWY: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 836
|
||||
Top = 11
|
||||
Width = 79
|
||||
Height = 20
|
||||
Hint = 'OrdPerson2/'#19994#21153#21592
|
||||
TabOrder = 22
|
||||
OnBtnUpClick = YWYBtnUpClick
|
||||
OnBtnDnClick = YWYBtnDnClick
|
||||
end
|
||||
object YWZB: TBtnEditC
|
||||
Tag = 2
|
||||
Left = 836
|
||||
Top = 34
|
||||
Width = 79
|
||||
Height = 20
|
||||
Hint = 'OrdPerson2/'#19994#21153#21592
|
||||
TabOrder = 23
|
||||
OnBtnUpClick = YWZBBtnUpClick
|
||||
OnBtnDnClick = CustomerNoNameBtnDnClick
|
||||
end
|
||||
end
|
||||
object ToolBar2: TToolBar
|
||||
Left = 0
|
||||
Top = 277
|
||||
Width = 978
|
||||
Height = 28
|
||||
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_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 3
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22686#34892
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#34892
|
||||
ImageIndex = 113
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 305
|
||||
Width = 978
|
||||
Height = 339
|
||||
Align = alClient
|
||||
TabOrder = 4
|
||||
object TV1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
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
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1PRTOrderQty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'PRTCODE'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = cxGridDBColumn1PropertiesButtonClick
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1PRTColor: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.ReadOnly = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 83
|
||||
end
|
||||
object cxGridDBColumn2: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'PRTMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn3: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'PRTKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'PRTPs'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 68
|
||||
end
|
||||
object v1PRTOrderQty: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'PRTOrderQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 115
|
||||
end
|
||||
object v1OrderUnit: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'OrderUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.Items.Strings = (
|
||||
'Kg'
|
||||
'M'
|
||||
'Y')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 131
|
||||
end
|
||||
object cxGridDBColumn5: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'SubNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 147
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = TV1
|
||||
end
|
||||
end
|
||||
object ADOTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 628
|
||||
Top = 377
|
||||
end
|
||||
object ADOCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 776
|
||||
Top = 365
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Sub
|
||||
Left = 744
|
||||
Top = 320
|
||||
end
|
||||
object Order_Sub: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 792
|
||||
Top = 332
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 664
|
||||
Top = 377
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 688
|
||||
Top = 324
|
||||
object N3: TMenuItem
|
||||
Caption = #21024#34892
|
||||
end
|
||||
end
|
||||
object CDS_CG: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 700
|
||||
Top = 377
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = ORDER_MX
|
||||
Left = 708
|
||||
Top = 433
|
||||
end
|
||||
object PopupMenu2: TPopupMenu
|
||||
Left = 824
|
||||
Top = 364
|
||||
object N9: TMenuItem
|
||||
Caption = #22686#21152
|
||||
end
|
||||
object N8: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object N4: TMenuItem
|
||||
Caption = #22686#34892
|
||||
end
|
||||
object N5: TMenuItem
|
||||
Caption = #21024#34892
|
||||
end
|
||||
object N6: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object N7: TMenuItem
|
||||
Caption = #29983#25104#37319#36141#21333
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 608
|
||||
Top = 337
|
||||
end
|
||||
object ORDER_MX: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 804
|
||||
Top = 396
|
||||
end
|
||||
end
|
||||
1307
发货申请(ShipmentRequest.dll)/U_OrderInPut_TC.pas
Normal file
1307
发货申请(ShipmentRequest.dll)/U_OrderInPut_TC.pas
Normal file
File diff suppressed because it is too large
Load Diff
525
发货申请(ShipmentRequest.dll)/U_PBKCListSel.dfm
Normal file
525
发货申请(ShipmentRequest.dll)/U_PBKCListSel.dfm
Normal file
|
|
@ -0,0 +1,525 @@
|
|||
object frmPBKCListSel: TfrmPBKCListSel
|
||||
Left = 338
|
||||
Top = 162
|
||||
Width = 1224
|
||||
Height = 511
|
||||
Caption = #22383#24067#24211#23384#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 = 1208
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36873#25321#20986#24211
|
||||
ImageIndex = 31
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 87
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 150
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object MovePanel2: TMovePanel
|
||||
Left = 408
|
||||
Top = 192
|
||||
Width = 289
|
||||
Height = 49
|
||||
BevelInner = bvLowered
|
||||
Caption = #27491#22312#22788#29702#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 94
|
||||
Width = 1208
|
||||
Height = 379
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseUp = Tv1MouseUp
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skCount
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
Width = 41
|
||||
end
|
||||
object cxgrdbclmnv1Column14: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 36
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #36710#38388
|
||||
DataBinding.FieldName = 'CheJian'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 84
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Focusing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column15: TcxGridDBColumn
|
||||
Caption = #26426#21488#21495
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'C_Color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Focusing = False
|
||||
Width = 77
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #33394#21035
|
||||
DataBinding.FieldName = 'MJStr3'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #38376#24133'CM'
|
||||
DataBinding.FieldName = 'MFQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20811#37325'GSM'
|
||||
DataBinding.FieldName = 'KZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'APXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 59
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'KuWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 75
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'CPType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 63
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #24211#23384#20844#26020#25968
|
||||
DataBinding.FieldName = 'KCKGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Focusing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #25209#21495
|
||||
DataBinding.FieldName = 'APBatchNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #30133#28857#24773#20917
|
||||
DataBinding.FieldName = 'CDQK'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 109
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #24037#33402
|
||||
DataBinding.FieldName = 'gongyi'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1208
|
||||
Height = 61
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 3
|
||||
object Label3: TLabel
|
||||
Left = 213
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #21697#21517
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 213
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #32534#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 34
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 34
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #26465' '#30721
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 360
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #31561#32423
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 360
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #33394#21035
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 472
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #24211#20301
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 642
|
||||
Top = 36
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #36710' '#38388
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 460
|
||||
Top = 12
|
||||
Width = 36
|
||||
Height = 12
|
||||
Caption = #26426#21488#21495
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 654
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #25209#21495
|
||||
end
|
||||
object C_CodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 242
|
||||
Top = 8
|
||||
Width = 100
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 242
|
||||
Top = 32
|
||||
Width = 100
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 6
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 84
|
||||
Top = 8
|
||||
Width = 109
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object MJID: TEdit
|
||||
Tag = 2
|
||||
Left = 84
|
||||
Top = 32
|
||||
Width = 109
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object MJStr3: TComboBox
|
||||
Tag = 2
|
||||
Left = 386
|
||||
Top = 8
|
||||
Width = 68
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 2
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
#27973#33394
|
||||
#28145#33394
|
||||
#28418#30333
|
||||
'')
|
||||
end
|
||||
object KuWei: TEdit
|
||||
Tag = 2
|
||||
Left = 498
|
||||
Top = 32
|
||||
Width = 119
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 8
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object CheJian: TComboBox
|
||||
Tag = 1
|
||||
Left = 679
|
||||
Top = 32
|
||||
Width = 99
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 9
|
||||
end
|
||||
object CarNo: TEdit
|
||||
Tag = 2
|
||||
Left = 498
|
||||
Top = 8
|
||||
Width = 119
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 3
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object APBatchNo: TEdit
|
||||
Tag = 2
|
||||
Left = 679
|
||||
Top = 8
|
||||
Width = 99
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object CPType: TComboBox
|
||||
Tag = 2
|
||||
Left = 385
|
||||
Top = 32
|
||||
Width = 68
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 7
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
''
|
||||
'A'
|
||||
'B'
|
||||
'C')
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 984
|
||||
Top = 40
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 944
|
||||
Top = 32
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 144
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 608
|
||||
Top = 160
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 408
|
||||
Top = 160
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
end
|
||||
220
发货申请(ShipmentRequest.dll)/U_PBKCListSel.pas
Normal file
220
发货申请(ShipmentRequest.dll)/U_PBKCListSel.pas
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
unit U_PBKCListSel;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||
cxDropDownEdit, MovePanel, Menus, cxCheckBox;
|
||||
|
||||
type
|
||||
TfrmPBKCListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
CDS_Main: TClientDataSet;
|
||||
MovePanel2: TMovePanel;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
ToolButton1: TToolButton;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
cxgrdbclmnv1Column14: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v1Column15: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
Panel1: TPanel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
Label1: TLabel;
|
||||
Label12: TLabel;
|
||||
Label9: TLabel;
|
||||
Label10: TLabel;
|
||||
C_CodeName: TEdit;
|
||||
C_Code: TEdit;
|
||||
ConNo: TEdit;
|
||||
MJID: TEdit;
|
||||
MJStr3: TComboBox;
|
||||
KuWei: TEdit;
|
||||
CheJian: TComboBox;
|
||||
CarNo: TEdit;
|
||||
APBatchNo: TEdit;
|
||||
CPType: TComboBox;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
FLeft, FTop: Integer;
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
FMainid, FSubId, FConNo, FColor, FCodeName, FCKOrdNo: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmPBKCListSel: TfrmPBKCListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmPBKCListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmPBKCListSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caHide;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('exec P_View_PBCPKCMX :WSQl');
|
||||
Parameters.ParamByName('WSQl').Value := '';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
// BegDate.SetFocus;
|
||||
ToolBar1.SetFocus;
|
||||
MovePanel2.Visible := True;
|
||||
MovePanel2.Refresh;
|
||||
InitGrid();
|
||||
MovePanel2.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('²Ö¿â¿â´æÁбíPB', Tv1, 'Å÷²¼²Ö¿â');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
|
||||
ReadCxGrid('²Ö¿â¿â´æÁбíPB', Tv1, 'Å÷²¼²Ö¿â');
|
||||
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
exit;
|
||||
TcxGridToExcel('¿â´æÁбí', cxGrid2);
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
FLeft := X;
|
||||
FTop := Y;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, False);
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmPBKCListSel.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
938
发货申请(ShipmentRequest.dll)/U_PBOutHZList.dfm
Normal file
938
发货申请(ShipmentRequest.dll)/U_PBOutHZList.dfm
Normal file
|
|
@ -0,0 +1,938 @@
|
|||
object frmPBOutHZList: TfrmPBOutHZList
|
||||
Left = -2
|
||||
Top = 64
|
||||
Width = 1541
|
||||
Height = 737
|
||||
Caption = #30721#21333#26597#35810'('#20302')'
|
||||
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 = 1533
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 95
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 189
|
||||
Top = 0
|
||||
Width = 172
|
||||
Height = 24
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemHeight = 16
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Text = #20986#24211#30721#21333'1'
|
||||
Items.Strings = (
|
||||
#20986#24211#30721#21333'1'
|
||||
#20986#24211#30721#21333'2'
|
||||
#20986#24211#30721#21333'3')
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 361
|
||||
Top = 0
|
||||
Caption = #25171#21360#20986#24211#21333
|
||||
ImageIndex = 14
|
||||
Visible = False
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 456
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 519
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1533
|
||||
Height = 60
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 64
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 189
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #30003#35831#21333#21495
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 190
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 357
|
||||
Top = 36
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #20986#24211#31867#22411
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 357
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #23458' '#25143
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 505
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32534' '#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 505
|
||||
Top = 36
|
||||
Width = 72
|
||||
Height = 12
|
||||
Caption = #39068' '#33394' '
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 653
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #32568' '#21495
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 77
|
||||
Top = 32
|
||||
Width = 87
|
||||
Height = 20
|
||||
Date = 40768.458268587970000000
|
||||
Time = 40768.458268587970000000
|
||||
TabOrder = 3
|
||||
end
|
||||
object FSID: TEdit
|
||||
Tag = 2
|
||||
Left = 246
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = PrtCodeNameChange
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 246
|
||||
Top = 32
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnChange = ConNoChange
|
||||
OnKeyPress = ConNoKeyPress
|
||||
end
|
||||
object CRType: TComboBox
|
||||
Tag = 4
|
||||
Left = 409
|
||||
Top = 32
|
||||
Width = 87
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ItemHeight = 12
|
||||
ItemIndex = 0
|
||||
TabOrder = 5
|
||||
Text = #38144#21806#20986#24211
|
||||
OnChange = CRTypeChange
|
||||
Items.Strings = (
|
||||
#38144#21806#20986#24211
|
||||
#20854#23427#20986#24211
|
||||
'')
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 409
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = PrtCodeNameChange
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 7
|
||||
Top = 10
|
||||
Width = 70
|
||||
Height = 17
|
||||
Caption = #26597#35810#26102#38388
|
||||
TabOrder = 6
|
||||
end
|
||||
object HZCODE: TEdit
|
||||
Tag = 2
|
||||
Left = 557
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
OnChange = PrtCodeNameChange
|
||||
end
|
||||
object HZcolor: TEdit
|
||||
Tag = 2
|
||||
Left = 557
|
||||
Top = 32
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 8
|
||||
OnChange = PrtCodeNameChange
|
||||
end
|
||||
object HZganghao: TEdit
|
||||
Tag = 2
|
||||
Left = 705
|
||||
Top = 8
|
||||
Width = 87
|
||||
Height = 20
|
||||
TabOrder = 9
|
||||
OnChange = PrtCodeNameChange
|
||||
end
|
||||
end
|
||||
object MovePanel2: TMovePanel
|
||||
Left = 344
|
||||
Top = 192
|
||||
Width = 289
|
||||
Height = 49
|
||||
BevelInner = bvLowered
|
||||
Caption = #27491#22312#25191#34892#25968#25454#25805#20316#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -13
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 92
|
||||
Width = 1533
|
||||
Height = 309
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
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 = skSum
|
||||
end
|
||||
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 = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column11
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column18
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column19
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #36130#21153#24050#29983#25104
|
||||
DataBinding.FieldName = 'ISCW'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #30003#35831#21333#21495
|
||||
DataBinding.FieldName = 'FSID'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 87
|
||||
end
|
||||
object v1OrdPerson1: TcxGridDBColumn
|
||||
Caption = #19994#21153#21592
|
||||
DataBinding.FieldName = 'Salesman'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 74
|
||||
end
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #30003#35831#26085#26399
|
||||
DataBinding.FieldName = 'SQDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 85
|
||||
end
|
||||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #20986#24211#31867#22411
|
||||
DataBinding.FieldName = 'CRType'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 85
|
||||
end
|
||||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #25910#36135#20154
|
||||
DataBinding.FieldName = 'ShouHuoer'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #25910#36135#22320#22336
|
||||
DataBinding.FieldName = 'FHDZ'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 97
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #30003#35831#21305#25968
|
||||
DataBinding.FieldName = 'SQPSHZ'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 92
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #30003#35831#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #23457#26680#20154
|
||||
DataBinding.FieldName = 'Chker'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1Column17: TcxGridDBColumn
|
||||
Caption = #23457#26680#26085#26399
|
||||
DataBinding.FieldName = 'ChkTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #21457#36135#26085#26399
|
||||
DataBinding.FieldName = 'FHDate'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 100
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPSHZ'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 122
|
||||
end
|
||||
object v1Column19: TcxGridDBColumn
|
||||
Caption = #21457#36135#37325#37327
|
||||
DataBinding.FieldName = 'FHQtyHZ'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 93
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #21457#36135#38271#24230
|
||||
DataBinding.FieldName = 'FHmsHZ'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 99
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #25171#21360#27425#25968
|
||||
DataBinding.FieldName = 'DYCS1'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taLeftJustify
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 100
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 401
|
||||
Width = 1533
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
AlignSplitter = salBottom
|
||||
Visible = False
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 409
|
||||
Width = 1533
|
||||
Height = 297
|
||||
Align = alBottom
|
||||
TabOrder = 5
|
||||
object Tv2: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource2
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Format = '0'
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column3
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cv2Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cv2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column2
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv2Column5
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.GroupFooters = gfAlwaysVisible
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object cv2Column10: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column7: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'ganghao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 66
|
||||
end
|
||||
object cv2Column5: TcxGridDBColumn
|
||||
Caption = #30003#35831#21305#25968
|
||||
DataBinding.FieldName = 'sqps'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cv2Column6: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #21457#36135#21305#25968
|
||||
DataBinding.FieldName = 'FHPS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #21457#36135#37325#37327
|
||||
DataBinding.FieldName = 'FHQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object Tv2Column5: TcxGridDBColumn
|
||||
Caption = #21457#36135#38271#24230
|
||||
DataBinding.FieldName = 'FHMS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 84
|
||||
end
|
||||
object Tv2Column1: TcxGridDBColumn
|
||||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column2: TcxGridDBColumn
|
||||
Caption = #37329#39069
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column3: TcxGridDBColumn
|
||||
Caption = #21253#32568#36153
|
||||
DataBinding.FieldName = 'BGFee'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column4: TcxGridDBColumn
|
||||
Caption = #20179#20301
|
||||
DataBinding.FieldName = 'cangwei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv2Column6: TcxGridDBColumn
|
||||
Caption = #26159#21542#24320#21305
|
||||
DataBinding.FieldName = 'SFKP'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv2
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 968
|
||||
Top = 16
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 936
|
||||
Top = 16
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1024
|
||||
Top = 16
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 784
|
||||
Top = 248
|
||||
end
|
||||
object CDS_Main1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 568
|
||||
Top = 280
|
||||
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 = 362
|
||||
Top = 218
|
||||
ReportData = {}
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 256
|
||||
Top = 260
|
||||
end
|
||||
object ADOQueryDH: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 496
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 703
|
||||
Top = 267
|
||||
end
|
||||
object CDS_Juan: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 272
|
||||
Top = 216
|
||||
end
|
||||
object CDS_JuanPRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 432
|
||||
Top = 288
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_JuanPRT
|
||||
Left = 320
|
||||
Top = 216
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 443
|
||||
Top = 134
|
||||
end
|
||||
object CDS_Label: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 243
|
||||
Top = 142
|
||||
end
|
||||
object DataSource2: TDataSource
|
||||
DataSet = CDS_Main1
|
||||
Left = 824
|
||||
Top = 316
|
||||
end
|
||||
end
|
||||
989
发货申请(ShipmentRequest.dll)/U_PBOutHZList.pas
Normal file
989
发货申请(ShipmentRequest.dll)/U_PBOutHZList.pas
Normal file
|
|
@ -0,0 +1,989 @@
|
|||
unit U_PBOutHZList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||
cxDropDownEdit, RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System,
|
||||
RM_GridReport, cxCheckBox, Menus, MovePanel, BtnEdit, cxCalendar,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, cxSplitter,
|
||||
dxSkinsCore, dxSkinsDefaultPainters, dxSkinscxPCPainter;
|
||||
|
||||
type
|
||||
TfrmPBOutHZList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main1: TClientDataSet;
|
||||
RM1: TRMGridReport;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
Label10: TLabel;
|
||||
FSID: TEdit;
|
||||
MovePanel2: TMovePanel;
|
||||
Label5: TLabel;
|
||||
ConNo: TEdit;
|
||||
Label8: TLabel;
|
||||
CRType: TComboBox;
|
||||
ADOQueryDH: TADOQuery;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
Label14: TLabel;
|
||||
CustomerNoName: TEdit;
|
||||
CDS_Juan: TClientDataSet;
|
||||
CDS_JuanPRT: TClientDataSet;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1OrdPerson1: TcxGridDBColumn;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column17: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v1Column19: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column23: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
ToolButton2: TToolButton;
|
||||
CDS_Main: TClientDataSet;
|
||||
CDS_Label: TClientDataSet;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
Tv1Column4: TcxGridDBColumn;
|
||||
CheckBox1: TCheckBox;
|
||||
Label1: TLabel;
|
||||
HZCODE: TEdit;
|
||||
Label3: TLabel;
|
||||
HZcolor: TEdit;
|
||||
Label4: TLabel;
|
||||
HZganghao: TEdit;
|
||||
cxSplitter1: TcxSplitter;
|
||||
cxGrid2: TcxGrid;
|
||||
Tv2: TcxGridDBTableView;
|
||||
cv2Column10: TcxGridDBColumn;
|
||||
cv2Column4: TcxGridDBColumn;
|
||||
cv2Column7: TcxGridDBColumn;
|
||||
cv2Column5: TcxGridDBColumn;
|
||||
cv2Column6: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
Tv2Column5: TcxGridDBColumn;
|
||||
Tv2Column1: TcxGridDBColumn;
|
||||
Tv2Column2: TcxGridDBColumn;
|
||||
Tv2Column3: TcxGridDBColumn;
|
||||
Tv2Column4: TcxGridDBColumn;
|
||||
Tv2Column6: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
DataSource2: TDataSource;
|
||||
Tv1Column5: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure MPRTCodeNameChange(Sender: TObject);
|
||||
procedure orderNoChange(Sender: TObject);
|
||||
procedure PrtCodeNameChange(Sender: TObject);
|
||||
procedure ConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure CheJianChange(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure v1Column4PropertiesChange(Sender: TObject);
|
||||
procedure ConNoChange(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
procedure CRTypeChange(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
private
|
||||
procedure InitGrid();
|
||||
function YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
procedure GetLotData();
|
||||
procedure GetLotDataPT();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
canshu1: string;
|
||||
end;
|
||||
|
||||
//var
|
||||
// frmPBOutHZList:TfrmPBOutHZList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_ZDYHelp;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmPBOutHZList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
// frmPBOutHZList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
//cxGrid1.Align:=alClient;
|
||||
BegDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp)
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,DYCS1=ISNULL(DYCS,0) ');
|
||||
// SQL.Add(',HZMONEY=(SELECT SUM(MONEY) FROM FHSQ_SUB B WHERE B.FSID=A.FSID)');
|
||||
// SQL.Add(',HZqty=(case when hzunit=''公斤'' then (SELECT SUM(FHQty) FROM FHSQ_SUB B WHERE B.FSID=A.FSID) else (SELECT SUM(FHMS) FROM FHSQ_SUB B WHERE B.FSID=A.FSID) end ) ');
|
||||
// sql.Add(',pjprice=(case when isnull( (case when hzunit=''公斤'' then (SELECT SUM(FHQty) FROM FHSQ_SUB B WHERE B.FSID=A.FSID) else (SELECT SUM(FHMS) FROM FHSQ_SUB B WHERE B.FSID=A.FSID) end ) ,0)<>0 ');
|
||||
// sql.Add('then round((SELECT SUM(MONEY) FROM FHSQ_SUB B WHERE B.FSID=A.FSID)/ (case when hzunit=''公斤'' then (SELECT SUM(FHQty) FROM FHSQ_SUB B WHERE B.FSID=A.FSID) else (SELECT SUM(FHMS) FROM FHSQ_SUB B WHERE B.FSID=A.FSID) end ),2) end )');
|
||||
SQL.Add(',ISCW=(cast((case when isnull((select count(x.YFPZNO) from YF_Money_CR_Sub x where x.YFPZNO = A.FSID ),0)>0 then 1 else 0 end ) as bit))');
|
||||
Sql.Add(' ,HZCODE=CAST((select distinct(SPrtCode) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
Sql.Add(' ,HZcolor=CAST((select distinct(prtcolor) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
Sql.Add(' ,HZganghao=CAST((select distinct(ganghao) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
sql.Add(' from FHSQ_Main A where 1=1 ');
|
||||
// SQL.Add('LEFT JOIN COMPANY c on a.CustomerNoName=c.CONAME and c.valid=''Y'' ');
|
||||
if CheckBox1.Checked then
|
||||
begin
|
||||
|
||||
sql.Add(' and A.FHDate>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.Add(' and A.FHDate<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
||||
end;
|
||||
|
||||
SQL.Add(' and isnull(A.Chker,'''')<>'''' ');
|
||||
sql.Add(' and FHPSHZ>0');
|
||||
SQL.Add('AND SQTYPE<>''调样''');
|
||||
if canshu1 = '查询' then
|
||||
begin
|
||||
sql.Add('and (A.filler=' + QuotedStr(Trim(DName)));
|
||||
sql.Add(' or A.salesman=' + QuotedStr(Trim(DName)));
|
||||
sql.Add('or (select top 1 xszl from COMPANY c where a.CustomerNoName=c.CONAME and c.valid=''Y'' ) like' + QuotedStr('%' + Trim(DName) + '%'));
|
||||
sql.Add(')');
|
||||
end;
|
||||
if CRType.Text = '其它出库' then
|
||||
begin
|
||||
SQL.Add('AND CRTYPE<>''销售出库''');
|
||||
end
|
||||
else if CRType.Text = '销售出库' then
|
||||
begin
|
||||
SQL.Add('AND CRTYPE=''销售出库''');
|
||||
end;
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
BegDate.SetFocus;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(Self.Caption + '1', Tv1, '坯布仓库9');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.FormShow(Sender: TObject);
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
ReadCxGrid(Self.Caption + '1', Tv1, '坯布仓库9');
|
||||
|
||||
// ShowMessage(Self.Caption);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then
|
||||
exit;
|
||||
SelExportData(Tv1, ADOQueryMain, '');
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.MPRTCodeNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.GetLotDataPT();
|
||||
var
|
||||
FPCode, FColor, FBaoNo, FHZ, fPrintFile, FPlanNo, PCodeColor, JSKHConNo: string;
|
||||
i, ii, j, z, bb, hh: Integer;
|
||||
XJ: Double;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select defStr0=Cast('''' as varchar(20)), defstr1=Cast(0 as decimal(18,2)),defstr2=Cast(0 as decimal(18,2))');
|
||||
sql.add(',defstr3=Cast(0 as decimal(18,2)),defstr4=Cast(0 as decimal(18,2)),defstr5=Cast(0 as decimal(18,2))');
|
||||
sql.add(',defstr6=Cast(0 as decimal(18,2)),defstr7=Cast(0 as decimal(18,2)),defstr8=Cast(0 as decimal(18,2))');
|
||||
sql.add(',defstr9=Cast(0 as decimal(18,2)),defstr10=Cast(0 as decimal(18,2))');
|
||||
sql.Add(',DefJ1=Cast(0 as int),DefJ2=Cast(0 as int),DefJ3=Cast(0 as int),DefJ4=Cast(0 as int)');
|
||||
sql.Add(',DefJ5=Cast(0 as int),DefJ6=Cast(0 as int),DefJ7=Cast(0 as int),DefJ8=Cast(0 as int)');
|
||||
sql.Add(',DefJ9=Cast(0 as int),DefJ10=Cast(0 as int)');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryPrint, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryPrint, CDS_JuanPRT);
|
||||
if CDS_JuanPRT.IsEmpty = False then
|
||||
begin
|
||||
CDS_JuanPRT.Delete;
|
||||
end;
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
for z := 1 to 10 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('defStr0').Value := IntToStr(z);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.KGQty,JQty=1 ');
|
||||
sql.Add(' from CK_PBCP_CR A ');
|
||||
sql.Add(' where 1=1 ');
|
||||
sql.Add(' and A.CRFlag=''出库'' ');
|
||||
SQL.Add(' and CKOrdNo=''' + Trim(CDS_Main.fieldbyname('CKOrdNo').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
ii := ADOQueryTemp.RecordCount;
|
||||
ii := ii div 100;
|
||||
ii := ii + 1;
|
||||
bb := ii;
|
||||
|
||||
i := 1;
|
||||
j := 1;
|
||||
hh := 0;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if i < 11 then
|
||||
begin
|
||||
CDS_JuanPRT.Locate('defstr0', IntToStr(i + hh * 10), []);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('defstr' + Trim(inttostr(j))).Value := ADOQueryTemp.fieldbyname('KGQty').Value;
|
||||
FieldByName('DefJ' + Trim(inttostr(j))).Value := 1;
|
||||
Post;
|
||||
end;
|
||||
i := i + 1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
j := j + 1;
|
||||
if j < 11 then
|
||||
begin
|
||||
CDS_JuanPRT.Locate('defstr0', IntToStr(1 + hh * 10), []);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('defstr' + Trim(inttostr(j))).Value := ADOQueryTemp.fieldbyname('KGQty').Value;
|
||||
FieldByName('DefJ' + Trim(inttostr(j))).Value := 1;
|
||||
Post;
|
||||
end;
|
||||
i := 2;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if bb = ii then
|
||||
begin
|
||||
hh := 1;
|
||||
end
|
||||
else
|
||||
begin
|
||||
hh := hh + 1;
|
||||
end;
|
||||
if hh < ii then
|
||||
begin
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
for z := 1 + hh * 10 to 10 + hh * 10 do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('defStr0').Value := IntToStr(z);
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
bb := -1;
|
||||
CDS_JuanPRT.Locate('defstr0', Trim(IntToStr(1 + hh * 10)), []);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('defstr1').Value := ADOQueryTemp.fieldbyname('KGQty').Value;
|
||||
FieldByName('DefJ' + Trim(inttostr(j - (10)))).Value := 1;
|
||||
Post;
|
||||
end;
|
||||
i := 2;
|
||||
j := 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_JuanPRT.DisableControls;
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
CDS_JuanPRT.Edit;
|
||||
if (CDS_JuanPRT.FieldByName('defstr0').AsInteger mod 10) <> 0 then
|
||||
CDS_JuanPRT.FieldByName('defstr0').Value := IntToStr(CDS_JuanPRT.FieldByName('defstr0').AsInteger mod 10)
|
||||
else
|
||||
CDS_JuanPRT.FieldByName('defstr0').Value := '10';
|
||||
CDS_JuanPRT.Post;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_JuanPRT.EnableControls;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.GetLotData();
|
||||
var
|
||||
XHLie, XHHang: Integer;
|
||||
FHZ: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select AA.* ');
|
||||
sql.Add('from(select gangno=B.CarNo,B.MJXH,MJMaoZ=A.KgQty,A.MainId,C.C_Color,C.BatchNoHZ');
|
||||
sql.Add(' ,GQty=(select sum(MJMaoZ) from CK_PBCP_CR CR inner join WFB_MJJY_PB XH on CR.MJID=XH.MJID ');
|
||||
sql.add(' where CR.CKOrdNo=A.CKOrdNo and XH.CarNo=B.CarNo and XH.MainId=B.MainId ) ');
|
||||
sql.Add(' ,GPS=(select count(*) from CK_PBCP_CR CR inner join WFB_MJJY_PB XH on CR.MJID=XH.MJID ');
|
||||
sql.add(' where CR.CKOrdNo=A.CKOrdNo and XH.CarNo=B.CarNo and XH.MainId=B.MainId) ');
|
||||
sql.add(' from CK_PBCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY_PB B on A.MJID=B.MJID ');
|
||||
sql.Add(' inner join Cloth_Sub C on B.SubId=C.SubId');
|
||||
sql.Add(' where A.CKOrdNo=''' + Trim(CDS_Main.fieldbyname('CKOrdNo').AsString) + '''');
|
||||
sql.Add(' )AA order by MainId,Cast(GangNo as int),MJXH');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Juan);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Juan);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select');
|
||||
sql.Add(' PCode=Cast('''' as varchar(20)),ColorNo=Cast('''' as varchar(20)),');
|
||||
sql.Add(' GangNo=Cast('''' as varchar(20)),MainId=Cast('''' as varchar(20)),');
|
||||
sql.Add(' LenQty0=Cast(0.00 as decimal(18,1)),LenQty1=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty2=Cast(0.00 as decimal(18,1)),LenQty3=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty4=Cast(0.00 as decimal(18,1)),LenQty5=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty6=Cast(0.00 as decimal(18,1)),LenQty7=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty8=Cast(0.00 as decimal(18,1)),LenQty9=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' LenQty10=Cast(0.00 as decimal(18,1)),LenQty11=Cast(0.00 as decimal(18,1)),');
|
||||
sql.Add(' MJPS0=Cast(0 as int),MJPS1=Cast(0 as int),');
|
||||
sql.Add(' MJPS2=Cast(0 as int),MJPS3=Cast(0 as int),');
|
||||
sql.Add(' MJPS4=Cast(0 as int),MJPS5=Cast(0 as int),');
|
||||
sql.Add(' MJPS6=Cast(0 as int),MJPS7=Cast(0 as int),');
|
||||
sql.Add(' MJPS8=Cast(0 as int),MJPS9=Cast(0 as int),');
|
||||
sql.Add(' MJPS10=Cast(0 as int),MJPS11=Cast(0 as int),');
|
||||
sql.Add(' JuanQty=Cast(0 as int),GPS=Cast(0 as int),GQty=Cast(0 as decimal(18,1)),');
|
||||
sql.Add(' GPrice=Cast(0 as decimal(18,2)),GMoney=Cast(0 as decimal(18,2)),');
|
||||
sql.Add(' PCodeColorNo=cast('''' as varchar(50)),Hang=Cast(0 as int),');
|
||||
sql.Add(' PCodeColorNoG=cast('''' as varchar(50))');
|
||||
sql.Add(' ,BatchNoHZ=cast('''' as varchar(50))');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
if CDS_JuanPRT.IsEmpty = False then
|
||||
begin
|
||||
CDS_JuanPRT.Delete;
|
||||
end;
|
||||
CDS_Juan.DisableControls;
|
||||
with CDS_Juan do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
if CDS_JuanPRT.IsEmpty then
|
||||
begin
|
||||
XHLie := 0;
|
||||
XHHang := 0;
|
||||
CDS_JuanPRT.Append;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('MainId').Value := CDS_Juan.fieldbyname('MainId').Value;
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('MainId').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
CDS_JuanPRT.Post;
|
||||
FHZ := Trim(CDS_Juan.fieldbyname('MainId').AsString) + Trim(CDS_Juan.fieldbyname('gangno').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (Trim(CDS_Juan.fieldbyname('MainId').AsString) + Trim(CDS_Juan.fieldbyname('GangNo').AsString)) <> FHZ then
|
||||
begin
|
||||
XHLie := 0;
|
||||
XHHang := 0;
|
||||
CDS_JuanPRT.Append;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('MainId').Value := CDS_Juan.fieldbyname('MainId').Value;
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('MainId').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
CDS_JuanPRT.Post;
|
||||
FHZ := Trim(CDS_Juan.fieldbyname('MainId').AsString) + Trim(CDS_Juan.fieldbyname('GangNo').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
XHLie := XHLie + 1;
|
||||
if XHLie < 10 then
|
||||
begin
|
||||
CDS_JuanPRT.Locate('Mainid;GangNo;Hang', VarArrayOf([Trim(CDS_Juan.fieldbyname('Mainid').AsString), Trim(CDS_Juan.fieldbyname('GangNo').AsString), XHHang]), [loPartialKey]);
|
||||
with CDS_JuanPRT do
|
||||
begin
|
||||
Edit;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('Mainid').Value := CDS_Juan.fieldbyname('Mainid').Value;
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('Mainid').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
Post;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
XHLie := 0;
|
||||
XHHang := XHHang + 1;
|
||||
CDS_JuanPRT.Append;
|
||||
CDS_JuanPRT.FieldByName('GangNo').Value := CDS_Juan.fieldbyname('GangNo').Value;
|
||||
CDS_JuanPRT.FieldByName('BatchNoHZ').Value := CDS_Juan.fieldbyname('BatchNoHZ').Value;
|
||||
CDS_JuanPRT.FieldByName('Mainid').Value := CDS_Juan.fieldbyname('Mainid').Value;
|
||||
//CDS_JuanPRT.FieldByName('PCodeColorNo').Value:=' '+Trim(CDS_Juan.fieldbyname('PCode').AsString)+'#'
|
||||
//+Trim(CDS_Juan.fieldbyname('ColorNo').AsString);
|
||||
CDS_JuanPRT.FieldByName('PCodeColorNoG').Value := ' ' + Trim(CDS_Juan.fieldbyname('Mainid').AsString) + '#' + Trim(CDS_Juan.fieldbyname('gangno').AsString) + ' ';
|
||||
CDS_JuanPRT.FieldByName('MJPS' + Inttostr(XHLie)).Value := 1;
|
||||
CDS_JuanPRT.FieldByName('Hang').Value := XHHang;
|
||||
CDS_JuanPRT.FieldByName('LenQty' + Trim(IntToStr(XHLie))).Value := CDS_Juan.fieldbyname('MJMaoZ').Value;
|
||||
CDS_JuanPRT.FieldByName('GPS').Value := CDS_Juan.fieldbyname('GPS').Value;
|
||||
CDS_JuanPRT.FieldByName('GQty').Value := CDS_Juan.fieldbyname('GQty').Value;
|
||||
CDS_JuanPRT.Post;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_Juan.EnableControls;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.orderNoChange(Sender: TObject);
|
||||
begin
|
||||
if Length(ConNo.Text) < 4 then
|
||||
Exit;
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
function TfrmPBOutHZList.YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
var
|
||||
CRID, YFID, Price, PriceUnit, OrderUnit: string;
|
||||
begin
|
||||
Result := False;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 * from JYOrder_Sub Where Mainid=''' + Trim(Order_Main10.fieldbyname('MainId').AsString) + '''');
|
||||
//sql.Add(' and PRTPrice>0');
|
||||
Open;
|
||||
end;
|
||||
{Price:=ADOQueryTemp.fieldbyname('PRTPrice').AsString;
|
||||
if Trim(Price)='' then
|
||||
begin
|
||||
Price:='0';
|
||||
end; }
|
||||
PriceUnit := Trim(ADOQueryTemp.fieldbyname('PriceUnit').AsString);
|
||||
OrderUnit := Trim(ADOQueryTemp.fieldbyname('OrderUnit').AsString);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from YF_Money_KC where FactoryName=''' + Trim(Order_Main10.fieldbyname('KHName').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
CRID := ADOQueryTemp.fieldbyname('CRID').AsString;
|
||||
end
|
||||
else
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YF_Money_CRID set CRID=CRID+1');
|
||||
sql.Add('select * from YF_Money_CRID ');
|
||||
Open;
|
||||
end;
|
||||
CRID := ADOQueryCmd.fieldbyname('CRID').AsString;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select * from YF_Money_KC where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('CRID').Value := StrToInt(CRID);
|
||||
FieldByName('FactoryName').Value := Trim(Order_Main10.fieldbyname('KHName').AsString);
|
||||
FieldByName('ZdyStr1').Value := '应收收';
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where FactoryName=''' + Trim(Order_Main10.fieldbyname('KHName').AsString) + '''');
|
||||
sql.Add(' and YFTypeId=''' + Trim(Order_Main10.fieldbyname('Mainid').AsString) + '''');
|
||||
sql.Add(' and Price=''' + Trim(Order_Main10.fieldbyname('PRTPrice').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
if GetLSNo(ADOQueryCmd, YFID, 'CS', 'YF_Money_CR', 3, 1) = False then
|
||||
begin
|
||||
Application.MessageBox('取坯布应付最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
{with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where 1<>1');
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('YFID').Value:=Trim(YFID);
|
||||
FieldByName('YFTypeId').Value:=Trim(Order_Main10.fieldbyname('MainId').AsString);
|
||||
FieldByName('CRID').Value:=StrToInt(CRID);
|
||||
FieldByName('Filler').Value:=Trim(DName);
|
||||
FieldByName('CRType').Value:='应收款登记';
|
||||
FieldByName('CRFlag').Value:='应收收';
|
||||
FieldByName('QtyFlag').Value:=1;
|
||||
FieldByName('FactoryName').Value:=Trim(Order_Main10.fieldbyname('KHName').AsString);
|
||||
FieldByName('CRTime').Value:=SGetServerDateTime(ADOQueryTemp);
|
||||
FieldByName('YFType').Value:='自动生成';
|
||||
FieldByName('Price').Value:=Price;
|
||||
//FieldByName('HuiLv').Value:=1;
|
||||
FieldByName('BZType').Value:=Trim(PriceUnit);
|
||||
FieldByName('QtyUnit').Value:=Trim(OrderUnit);
|
||||
FieldByName('YFName').Value:='销售金额';
|
||||
FieldByName('MainId').Value:=Trim(Order_Main10.fieldbyname('Mainid').AsString);
|
||||
Post;
|
||||
end; }
|
||||
end
|
||||
else
|
||||
begin
|
||||
YFID := Trim(ADOQueryTemp.fieldbyname('YFID').AsString);
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(Qty),0) from CK_BanCP_CR A ');
|
||||
sql.Add(' inner join JYOrder_Sub B on A.SubId=B.SubId where');
|
||||
SQL.Add(' A.MainId=YF_Money_CR.YFTypeId and A.CRType=''正常出库'' and CPType=''正品'' ');
|
||||
SQL.Add(' and B.PRTPrice=YF_Money_CR.Price)');
|
||||
sql.Add(',PS=(select isnull(count(*),0) from CK_BanCP_CR A ');
|
||||
sql.Add(' inner join JYOrder_Sub B on A.SubId=B.SubId where');
|
||||
SQL.Add(' A.MainId=YF_Money_CR.YFTypeId and A.CRType=''正常出库'' and CPType=''正品'' ');
|
||||
SQL.Add(' and B.PRTPrice=YF_Money_CR.Price )');
|
||||
sql.Add(' where YFTypeId=''' + Trim(Order_Main10.fieldbyname('Mainid').AsString) + '''');
|
||||
sql.Add(' and Price=' + Order_Main10.fieldbyname('PRTPrice').AsString);
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YF_Money_CR Set Money=Price*Qty,BBMoney=Price*Qty*HuiLv');
|
||||
sql.Add(' where YFID=''' + Trim(YFID) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Update YF_Money_KC Set KCMoney=(select isnull(Sum(Money*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||
sql.Add(',KCBBMoney=(select isnull(Sum(BBMoney*QtyFlag),0) from YF_Money_CR A where A.CRID=YF_Money_KC.CRID)');
|
||||
sql.Add(' where CRID=' + CRID);
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where YFId=''' + Trim(YFID) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.FieldByName('Qty').Value = 0 then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from YF_Money_CR where YFID=''' + Trim(YFID) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from YF_Money_CR where CRId=' + CRID);
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from YF_Money_KC where CRId=' + CRID);
|
||||
ExecSQL;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.PrtCodeNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.ConNoKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
if Length(Trim(ConNo.Text)) < 4 then
|
||||
Exit;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
SQL.Add('select A.*,B.ConNo,C.C_CodeName,C.C_Code,C.C_Color,D.APXH ');
|
||||
sql.add('from CK_PBCP_CR A ');
|
||||
Sql.add(' inner join Cloth_Main B on A.MainId=B.MainId');
|
||||
Sql.add(' inner join Cloth_Sub C on A.MainId=C.MainId');
|
||||
Sql.add(' inner join WFB_MJJY_PB D on A.MJId=D.MJId');
|
||||
sql.add('where B.ConNo like :ConNo');
|
||||
SQL.Add(' and CRFlag=''出库'' ');
|
||||
Parameters.ParamByName('ConNo').Value := '%' + Trim(ConNo.Text) + '%';
|
||||
Open;
|
||||
//ShowMessage(SQL.Text);
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.CheJianChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
EXIT;
|
||||
ExportFtErpFile(trim(ComboBox1.Text) + '.rmf', ADOQueryTemp);
|
||||
|
||||
if trim(ComboBox1.Text) = '出库码单1' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMD4 @FSID=' + quotedstr(Trim(CDS_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
if trim(ComboBox1.Text) = '出库码单2' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMD2 @CKOrdNo=' + quotedstr(Trim(CDS_Main.fieldbyname('FSID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ComboBox1.Text) + '.rmf';
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('UPDATE FHSQ_Main SET DYCS=ISNULL(DYCS,0)+1 WHERE FSID=' + quotedstr(Trim(CDS_Main.fieldbyname('FSID').AsString)));
|
||||
ExecSQL;
|
||||
end;
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
// RMVariables['OrdNo'] := Trim(CDS_Main.fieldbyname('OrdNo').AsString);
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete TBSubID where DName=''' + Trim(DCode) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('SELECT * FROM TBSubID where 1=2 ');
|
||||
open;
|
||||
end;
|
||||
CDS_Main.DisableControls;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_Main.Fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
ADOQueryCmd.append;
|
||||
ADOQueryCmd.fieldbyname('SubId').Value := Trim(CDS_Main.fieldbyname('CKOrdNo').AsString);
|
||||
ADOQueryCmd.fieldbyname('Dname').Value := Trim(DCode);
|
||||
ADOQueryCmd.post;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end;
|
||||
CDS_Main.EnableControls;
|
||||
|
||||
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select D.ConNo orderno,count(B.MJXH) ps,sum(A.KgQty) mz,C.C_Color,C.BatchNoHZ');
|
||||
// sql.Add(' from CK_PBCP_CR A');
|
||||
// sql.Add(' inner join WFB_MJJY_PB B on A.MJID=B.MJID');
|
||||
// sql.Add(' inner join Cloth_Sub C on B.SubId=C.SubId');
|
||||
// sql.Add(' inner join Cloth_Main D on D.MainId=C.MainId');
|
||||
// SQL.Add(' where A.CKOrdNo='+quotedstr(Trim(CDS_Main.fieldbyname('CKOrdNo').AsString)));
|
||||
// SQL.Add(' group by D.ConNo,C.C_Color,C.BatchNoHZ ');
|
||||
// SQL.Add(' order by D.ConNo,C.C_Color,C.BatchNoHZ');
|
||||
// Open;
|
||||
// end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select MAX(A.FHDate) MJDate,A.SHDanWei,A.CRType,A.TruckId,B.PrtCode,B.PrtCodeName,B.prtspec,C.CustomerNoName');
|
||||
sql.Add(' ,G.ConNo,F.C_Color,F.BatchNoHZ,count(E.MJXH) ps,sum(D.KgQty) mz');
|
||||
sql.Add(' from FHSQ_Main A inner join JYOrderCon_Sub_PB B on A.ConSubId=B.SubId');
|
||||
sql.Add(' inner join JYOrderCon_Main_PB C on B.MainId=C.MainId');
|
||||
sql.Add(' inner join CK_PBCP_CR D on D.CKOrdNo=A.FSId');
|
||||
sql.Add(' inner join WFB_MJJY_PB E on E.MJID=D.MJID');
|
||||
sql.Add(' inner join Cloth_Sub F on F.SubId=E.SubId');
|
||||
sql.Add(' inner join Cloth_Main G on G.MainId=E.MainId');
|
||||
SQL.Add(' where A.FSId in (SELECT distinct SubId FROM TBSubID where Dname=' + quotedstr(Trim(DCode)) + ')');
|
||||
SQL.Add(' group by A.SHDanWei,A.CRType,A.TruckId,B.PrtCode,B.PrtCodeName,B.prtspec,C.CustomerNoName,G.ConNo,F.C_Color,F.BatchNoHZ');
|
||||
SQL.Add(' order by A.SHDanWei,A.CRType,A.TruckId,B.PrtCode,B.PrtCodeName,B.prtspec,C.CustomerNoName,G.ConNo,F.C_Color,F.BatchNoHZ');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\出库码单.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
// RMVariables['ranchang']:=Trim(CDS_Main.fieldbyname('ranchang').AsString);
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.v1Column4PropertiesChange(Sender: TObject);
|
||||
var
|
||||
mvalue, FFieldName: string;
|
||||
begin
|
||||
mvalue := TcxCheckBox(Sender).EditValue;
|
||||
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
|
||||
with CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
CDS_Main.FieldByName('SSel').value := mvalue;
|
||||
post;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.ConNoChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
begin
|
||||
if (AViewInfo.GridRecord.Values[Tv1Column1.Index] <> null) and (AViewInfo.GridRecord.Values[Tv1Column1.Index] <> 0) then
|
||||
begin
|
||||
ACanvas.Brush.Color := $008080FF;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.CRTypeChange(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPBOutHZList.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
if CDS_Main.IsEmpty = False then
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
// sql.Add(' inner join CLoth_Sub B on A.SubId=B.SubId');
|
||||
// sql.Add(' inner join CLoth_Main C on B.MainId=C.MainId');
|
||||
sql.Add(' where A.FSId=''' + Trim(CDS_Main.fieldbyname('FSId').AsString) + '''');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.*, B.ORDERNO from FHSQ_Sub A LEFT JOIN JYOrder_Main B ON A.MainId=B.MainId ');
|
||||
|
||||
sql.Add(' where 1=2');
|
||||
end;
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Main1);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Main1);
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
406
发货申请(ShipmentRequest.dll)/U_PBSHSMCK.dfm
Normal file
406
发货申请(ShipmentRequest.dll)/U_PBSHSMCK.dfm
Normal file
|
|
@ -0,0 +1,406 @@
|
|||
object frmPBSHSMCK: TfrmPBSHSMCK
|
||||
Left = 322
|
||||
Top = 47
|
||||
Width = 1109
|
||||
Height = 648
|
||||
Caption = #30424#20179#20986#24211
|
||||
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 cxGrid3: TcxGrid
|
||||
Left = 505
|
||||
Top = 0
|
||||
Width = 588
|
||||
Height = 610
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DS_MainSel
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = #21367#25968#37327#65306'#'
|
||||
Kind = skCount
|
||||
Column = cxGridDBColumn1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v3Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = cxStyle1
|
||||
Styles.Inactive = cxStyle1
|
||||
Styles.IncSearch = cxStyle1
|
||||
Styles.Header = cxStyle1
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 87
|
||||
end
|
||||
object v3Column4: TcxGridDBColumn
|
||||
Caption = #25209#21495
|
||||
DataBinding.FieldName = 'APBatchNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 119
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'APXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
object v3Column3: TcxGridDBColumn
|
||||
end
|
||||
object v3Column5: TcxGridDBColumn
|
||||
end
|
||||
object v3Column1: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'MJMaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v3Column2: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 210
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 505
|
||||
Height = 610
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label5: TLabel
|
||||
Left = 6
|
||||
Top = 34
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 6
|
||||
Top = 91
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#26102#38388
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 232
|
||||
Top = 218
|
||||
Width = 33
|
||||
Height = 99
|
||||
Caption = #24050#13#10#20986#13#10#24211
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 454
|
||||
Top = 243
|
||||
Width = 49
|
||||
Height = 48
|
||||
Caption = #21305
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -48
|
||||
Font.Name = #26999#20307'_GB2312'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 13
|
||||
Top = 338
|
||||
Width = 66
|
||||
Height = 33
|
||||
Caption = #25195#25551
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 30
|
||||
Top = 218
|
||||
Width = 33
|
||||
Height = 99
|
||||
Caption = #24635#13#10#21305#13#10#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CKPSQty: TEdit
|
||||
Tag = 2
|
||||
Left = 68
|
||||
Top = 230
|
||||
Width = 155
|
||||
Height = 75
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -67
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object CKOrdNo: TEdit
|
||||
Left = 88
|
||||
Top = 8
|
||||
Width = 409
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object BaoID: TEdit
|
||||
Left = 86
|
||||
Top = 325
|
||||
Width = 411
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
OnKeyPress = BaoIDKeyPress
|
||||
end
|
||||
object CRTime: TDateTimePicker
|
||||
Left = 86
|
||||
Top = 86
|
||||
Width = 153
|
||||
Height = 28
|
||||
Date = 41337.663190821760000000
|
||||
Time = 41337.663190821760000000
|
||||
Enabled = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 293
|
||||
Top = 416
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #20851#38381
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 265
|
||||
Top = 215
|
||||
Width = 196
|
||||
Height = 105
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -96
|
||||
Font.Name = #26999#20307'_GB2312'
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 5
|
||||
end
|
||||
object CRType: TEdit
|
||||
Tag = 2
|
||||
Left = 512
|
||||
Top = 239
|
||||
Width = 154
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 115
|
||||
Top = 420
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #36873#21333
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnClick = Button1Click
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 752
|
||||
Top = 336
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 720
|
||||
Top = 336
|
||||
end
|
||||
object DS_MainSel: TDataSource
|
||||
DataSet = CDS_MainSel
|
||||
Left = 616
|
||||
Top = 336
|
||||
end
|
||||
object CDS_MainSel: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 648
|
||||
Top = 336
|
||||
end
|
||||
object cxGridPopupMenu4: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 680
|
||||
Top = 336
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 792
|
||||
Top = 336
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 640
|
||||
Top = 408
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 612
|
||||
Top = 244
|
||||
end
|
||||
object RMDBMX: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_JuanPRT
|
||||
Left = 688
|
||||
Top = 244
|
||||
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 = RMDBMX
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 728
|
||||
Top = 244
|
||||
ReportData = {}
|
||||
end
|
||||
object CDS_JuanPRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 652
|
||||
Top = 244
|
||||
end
|
||||
end
|
||||
646
发货申请(ShipmentRequest.dll)/U_PBSHSMCK.pas
Normal file
646
发货申请(ShipmentRequest.dll)/U_PBSHSMCK.pas
Normal file
|
|
@ -0,0 +1,646 @@
|
|||
unit U_PBSHSMCK;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, MovePanel, cxCheckBox, Menus, ComCtrls, BtnEdit, ShellAPI, cxTextEdit,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_System, RM_Dataset, RM_e_Xls;
|
||||
|
||||
type
|
||||
TfrmPBSHSMCK = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_MainSel: TDataSource;
|
||||
CDS_MainSel: TClientDataSet;
|
||||
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
v3Column1: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
v3Column2: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
Label5: TLabel;
|
||||
Label4: TLabel;
|
||||
CKPSQty: TEdit;
|
||||
CKOrdNo: TEdit;
|
||||
BaoID: TEdit;
|
||||
CRTime: TDateTimePicker;
|
||||
Button2: TButton;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Edit1: TEdit;
|
||||
Label12: TLabel;
|
||||
CDS_Main: TClientDataSet;
|
||||
CRType: TEdit;
|
||||
Button1: TButton;
|
||||
v3Column4: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDBMX: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
CDS_JuanPRT: TClientDataSet;
|
||||
v3Column3: TcxGridDBColumn;
|
||||
v3Column5: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
function YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
procedure Button3Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FCKOrdNo, FSMStr, JXFlag: string;
|
||||
procedure TMPanDuan();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmPBSHSMCK: TfrmPBSHSMCK;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_RTFun, MMSystem, U_FHSQListSel, U_PBKCListSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
function TfrmPBSHSMCK.YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
var
|
||||
CRID, YFID, PriceUnit, OrderUnit, FComTaiTou, FromSubID: string;
|
||||
fprice, huilv: double;
|
||||
begin
|
||||
// Result:=False;
|
||||
// fprice:=0;
|
||||
// huilv:=0;
|
||||
// PriceUnit:='RMB';
|
||||
// with Order_Main10 do
|
||||
// begin
|
||||
// begin
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// SQL.Clear;
|
||||
// sql.Add('select *,fPrice=dbo.F_Get_Order_Price(MainID,subID) from JYOrder_Sub Where subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// IF not ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// PriceUnit:=Trim(ADOQueryTemp.fieldbyname('PriceUnit').AsString);
|
||||
// OrderUnit:=Trim(ADOQueryTemp.fieldbyname('OrderUnit').AsString);
|
||||
// fPrice:= ADOQueryTemp.fieldbyname('fPrice').AsFloat;
|
||||
// huilv:= ADOQueryTemp.fieldbyname('huilv').AsFloat;
|
||||
// end;
|
||||
// IF huilv=0 then huilv:=1;
|
||||
// CRID:='0';
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select * from YF_Money_CR ');
|
||||
// sql.Add(' where mainID='''+Trim(Order_Main10.fieldbyname('mainID').AsString)+'''');
|
||||
// sql.Add(' and subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// sql.Add(' and CRTime='''+FormatDateTime('yyyy-MM-dd',CRTime.Date)+'''') ;
|
||||
// sql.Add(' and YFName=''销售金额'' ');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',3,1)=False then
|
||||
// begin
|
||||
// Application.MessageBox('取成品应收最大号失败!','提示',0);
|
||||
// Exit;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where 1<>1');
|
||||
// Open;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Append;
|
||||
// FieldByName('YFID').Value:=Trim(YFID);
|
||||
// FieldByName('YFTypeId').Value:=Trim(Order_Main10.fieldbyname('mainID').AsString);
|
||||
// FieldByName('CRID').Value:=StrToInt(CRID);
|
||||
// FieldByName('Filler').Value:=Trim(DName);
|
||||
// FieldByName('CRType').Value:='应收款登记';
|
||||
// FieldByName('CRFlag').Value:='应收收';
|
||||
// FieldByName('QtyFlag').Value:=1;
|
||||
// FieldByName('FactoryName').Value:=Trim(TocustName.Text);
|
||||
// FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',CRTime.Date));
|
||||
// FieldByName('YFType').Value:='自动生成';
|
||||
// FieldByName('Price').Value:=fprice;
|
||||
// FieldByName('HuiLv').Value:=huilv;
|
||||
// FieldByName('BZType').Value:=Trim(PriceUnit);
|
||||
// FieldByName('QtyUnit').Value:=Trim(OrderUnit);
|
||||
// FieldByName('ComTaiTou').Value:=Trim(FComTaiTou);
|
||||
// FieldByName('YFName').Value:='销售金额';
|
||||
// FieldByName('MainId').Value:=Trim(Order_Main10.fieldbyname('Mainid').AsString);
|
||||
// FieldByName('subID').Value:=Trim(Order_Main10.fieldbyname('subID').AsString);
|
||||
// FieldByName('OrderNO').Value:=Trim(Order_Main10.fieldbyname('OrderNO').AsString);
|
||||
// FieldByName('P_CodeName').Value:=Trim(Order_Main10.fieldbyname('MprtCodeName').AsString);
|
||||
// FieldByName('P_Spec').Value:=Trim(Order_Main10.fieldbyname('MprtSpec').AsString);
|
||||
// FieldByName('P_color').Value:=Trim(Order_Main10.fieldbyname('PRTColor').AsString);
|
||||
// FieldByName('status').Value:='0';
|
||||
// Post;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// YFID:=Trim(ADOQueryTemp.fieldbyname('YFID').AsString);
|
||||
// end;
|
||||
// IF uppercase(OrderUnit)='KG' then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(B.MJQty4),0) from CK_BanCP_CR A,WFB_MJJY B where A.MJID=B.MJID and A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='Y') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='M') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)/0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='M') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='Y') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)*0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(A.Qty),0) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('Update YF_Money_CR Set Money=Price*Qty,BBMoney=Price*Qty*HuiLv');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where YFId='''+Trim(YFID)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.FieldByName('Qty').Value=0 then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('delete from YF_Money_CR where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// //Next;
|
||||
// end;
|
||||
// end;
|
||||
// Result:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmPBSHSMCK := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.FormShow(Sender: TObject);
|
||||
begin
|
||||
BaoID.SetFocus;
|
||||
ReadCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
CRTime.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.TMPanDuan();
|
||||
begin
|
||||
//判断扫描的是发货申请单,还是布匹条码 ,判断是否已经扫描过发货单 ,或者更改了发货单
|
||||
JXFlag := '';
|
||||
FSMStr := Trim(BaoID.Text);
|
||||
if Copy(FSMStr, 1, 2) = 'SM' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main A inner join FHSQ_Sub B on A.FSID=B.FSID where A.FSID=''' + Trim(FSMStr) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('申请单不存在暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(FSMStr)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已对账暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CKOrdNo.Text) <> '' then
|
||||
begin
|
||||
FCKOrdNo := Trim(CKOrdNo.Text);
|
||||
end;
|
||||
CKOrdNo.Text := Trim(FSMStr);
|
||||
if FSMStr <> FCKOrdNo then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select B.* ');
|
||||
sql.Add(' from CK_PBCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY_PB B on A.MJID=B.MJID');
|
||||
sql.Add(' where A.CKOrdNO=''' + Trim(CKOrdNo.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MainSel);
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := IntToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
end;
|
||||
BaoID.Text := '';
|
||||
JXFlag := '888';
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(CKOrdNo.Text) = '' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未扫描申请单暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from WFB_MJJY_PB A ');
|
||||
sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add('and A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.APID from WFB_MJJY_PB A ');
|
||||
sql.Add('where A.APID=' + quotedstr(Trim(FSMStr)));
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未检验暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\条码错误暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.CKOrdNo from CK_PBCP_CR A ');
|
||||
sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add(' and A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and A.CRFlag=''出库'' ');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('CKOrdNo').AsString) = Trim(CKOrdNo.Text) then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已扫描.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已出库暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.CKOrdNo from CK_PBCP_CR A ');
|
||||
sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add(' and A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and A.CRFlag=''入库'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未入库暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(Edit1.Text) <> '' then
|
||||
begin
|
||||
if StrToInt(Edit1.Text) >= StrToInt(CKPSQty.Text) then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\超出发货上限暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
//判断扫描的是发货申请单,还是布匹条码 ,判断是否已经扫描过发货单 ,或者更改了发货单 FHDate
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
maxno, SMFlag, KYCKFlag, FMainId: string;
|
||||
FFQty: Integer;
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
TMPanDuan();
|
||||
if Trim(JXFlag) = '999' then
|
||||
begin
|
||||
BaoID.Text := '';
|
||||
Exit;
|
||||
end;
|
||||
if Trim(JXFlag) = '888' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ,KHName=CustomerNoName,CKPSQty=A.SQPSHZ ');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
|
||||
sql.Add(' where FSId=''' + Trim(CKOrdNo.Text) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
SCSHDataNew(ADOQueryTemp, Panel2, 2);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.*,B.CRID ');
|
||||
sql.Add(' from WFB_MJJY_PB A');
|
||||
sql.Add(' inner join CK_PBCP_CR B on A.MJID=B.MJID and B.CRFlag=''入库'' ');
|
||||
sql.Add(' where A. MJID=''' + Trim(BaoID.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Main);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Main);
|
||||
try
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CK_PBCp_KC where MJID=''' + Trim(BaoID.Text) + '''');
|
||||
sql.Add(' and KCKGQty>0');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
KYCKFlag := '不能出库';
|
||||
end
|
||||
else
|
||||
begin
|
||||
KYCKFlag := '能出库';
|
||||
end;
|
||||
if Trim(KYCKFlag) = '能出库' then
|
||||
begin
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Do_PBCK @CRFlag=''直接出库'', @CKOrdNo=' + quotedstr(trim(CKOrdNo.Text)) + ', @MJID=' + quotedstr(trim(CDS_Main.fieldbyname('MJID').asstring)) + ', @DName=' + quotedstr(trim(DName)));
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
FMainId := Trim(CDS_Main.fieldbyname('MainID').AsString);
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Do_FHSQ ''' + Trim(CKOrdNo.Text) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
with CDS_MainSel do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Mainid').Value := Self.CDS_Main.fieldbyname('Mainid').Value;
|
||||
FieldByName('SubID').Value := Self.CDS_Main.fieldbyname('SubID').Value;
|
||||
FieldByName('MJMaoZ').Value := Self.CDS_Main.fieldbyname('MJMaoZ').Value;
|
||||
FieldByName('MJId').Value := Self.CDS_Main.fieldbyname('MJId').Value;
|
||||
FieldByName('APXH').Value := Self.CDS_Main.fieldbyname('APXH').Value;
|
||||
FieldByName('CarNo').Value := Self.CDS_Main.fieldbyname('CarNo').Value;
|
||||
FieldByName('APBatchNo').Value := Self.CDS_Main.fieldbyname('APBatchNo').Value;
|
||||
Post;
|
||||
end;
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := IntToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select COUNT(*) fhjs from CK_PBCP_CR where CKOrdNo= ''' + Trim(CKOrdNo.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
|
||||
if StrToInt(Edit1.Text) <> ADOQueryTemp.FieldByName('fhjs').AsInteger then
|
||||
begin
|
||||
PlaySound('数据保存失败暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Application.MessageBox('出库异常,请重新选择申请单!', '提示', 0);
|
||||
end;
|
||||
BaoID.Text := '';
|
||||
PlaySound('正确.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
except
|
||||
BaoID.Text := '';
|
||||
PlaySound('数据保存失败暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('出库异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.Button1Click(Sender: TObject);
|
||||
var
|
||||
MKey: Char;
|
||||
begin
|
||||
MKey := #13;
|
||||
try
|
||||
frmPBKCListSel := TfrmPBKCListSel.Create(Application);
|
||||
with frmPBKCListSel do
|
||||
begin
|
||||
FCKOrdNo := trim(CKOrdNo.text);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with frmPBKCListSel.CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Fieldbyname('ssel').AsBoolean then
|
||||
begin
|
||||
BaoID.Text := Trim(Fieldbyname('MJID').AsString);
|
||||
BaoIDKeyPress(BaoID, MKey);
|
||||
Sleep(200);
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmPBKCListSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPBSHSMCK.Button3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
if Trim(CKOrdNo.Text) = '' then
|
||||
EXIT;
|
||||
ExportFtErpFile(trim(ComboBox1.Text) + '.rmf', ADOQueryTemp);
|
||||
if ComboBox1.Text = '普通码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDZZ1 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
|
||||
if trim(ComboBox1.Text) = '普通机台码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDZZ2 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
if ComboBox1.Text = '单页机台码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDZZ3 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ComboBox1.Text) + '.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
// RMVariables['OrdNo'] := Trim(CDS_Main.fieldbyname('OrdNo').AsString);
|
||||
RM1.DefaultCopies := 2;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
703
发货申请(ShipmentRequest.dll)/U_PieceSampleKcList.dfm
Normal file
703
发货申请(ShipmentRequest.dll)/U_PieceSampleKcList.dfm
Normal file
|
|
@ -0,0 +1,703 @@
|
|||
object frmPieceSampleKcList: TfrmPieceSampleKcList
|
||||
Left = 182
|
||||
Top = 173
|
||||
Width = 1290
|
||||
Height = 643
|
||||
Caption = #24211#23384#20449#24687#34920
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object Label7: TLabel
|
||||
Left = 268
|
||||
Top = 16
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #35268#26684#22411#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1274
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 107
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TOk: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30830#23450
|
||||
ImageIndex = 31
|
||||
OnClick = TOkClick
|
||||
end
|
||||
object TBRafresh: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #24211#20301#35843#25972
|
||||
ImageIndex = 102
|
||||
Visible = False
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object btn1: TToolButton
|
||||
Left = 276
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20998#21305
|
||||
ImageIndex = 22
|
||||
Visible = False
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 339
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26356#26032#24211#23384
|
||||
ImageIndex = 86
|
||||
Visible = False
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 426
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26679#21697#26631#31614#25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 537
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 600
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1274
|
||||
Height = 66
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label3: TLabel
|
||||
Left = 33
|
||||
Top = 40
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 209
|
||||
Top = 16
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #39068' '#33394
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 375
|
||||
Top = 16
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #24211' '#20301
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 265
|
||||
Top = 16
|
||||
Width = 6
|
||||
Height = 12
|
||||
end
|
||||
object Label18: TLabel
|
||||
Left = 33
|
||||
Top = 16
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label31: TLabel
|
||||
Left = 211
|
||||
Top = 40
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #23384#25918#24037#21378
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl1: TLabel
|
||||
Left = 376
|
||||
Top = 41
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #31867' '#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object P_CodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 89
|
||||
Top = 36
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object P_Color: TEdit
|
||||
Tag = 2
|
||||
Left = 269
|
||||
Top = 12
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object kuwei: TEdit
|
||||
Tag = 2
|
||||
Left = 431
|
||||
Top = 12
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object P_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 89
|
||||
Top = 12
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 0
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object FactoryName: TEdit
|
||||
Tag = 2
|
||||
Left = 273
|
||||
Top = 36
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 4
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
object yptype: TEdit
|
||||
Tag = 2
|
||||
Left = 431
|
||||
Top = 36
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = P_CodeNameChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 129
|
||||
Width = 1274
|
||||
Height = 280
|
||||
Align = alClient
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBtnShadow
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellClick = Tv1CellClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = 'C_Code'
|
||||
Column = v1P_CodeName
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Qty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsBehavior.FocusCellOnTab = True
|
||||
OptionsBehavior.GoToNextCellOnEnter = True
|
||||
OptionsBehavior.FocusCellOnCycle = True
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v1Ssel: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'Ssel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Sorting = False
|
||||
Width = 48
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #20837#24211#21333#21495
|
||||
DataBinding.FieldName = 'INoutNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1CRTime: TcxGridDBColumn
|
||||
Caption = #20837#24211#26085#26399
|
||||
DataBinding.FieldName = 'CRTime'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1CRType: TcxGridDBColumn
|
||||
Caption = #20837#24211#31867#22411
|
||||
DataBinding.FieldName = 'CRType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'P_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 60
|
||||
end
|
||||
object v1P_CodeName: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'P_CodeName'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 91
|
||||
end
|
||||
object cv1Column12: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'yptype'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #26469#28304
|
||||
DataBinding.FieldName = 'fromFactoryName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 77
|
||||
end
|
||||
object cv1Column13: TcxGridDBColumn
|
||||
Caption = #31867#22411
|
||||
DataBinding.FieldName = 'yptype'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 73
|
||||
end
|
||||
object v1Column16: TcxGridDBColumn
|
||||
Caption = #23384#25918#24037#21378
|
||||
DataBinding.FieldName = 'FactoryName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 103
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'P_Color'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #25104#20998
|
||||
DataBinding.FieldName = 'p_CF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'p_hx'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 65
|
||||
end
|
||||
object v1P_SPEC: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'P_SPEC'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'P_MF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'P_KZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'kuwei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #20837#24211#25968#37327
|
||||
DataBinding.FieldName = 'Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object v1Qty: TcxGridDBColumn
|
||||
Caption = #24211#23384#25968#37327
|
||||
DataBinding.FieldName = 'kcQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_ShipmentRequest.FontBlue
|
||||
Styles.Footer = DataLink_ShipmentRequest.FontBlue
|
||||
Styles.Header = DataLink_ShipmentRequest.FontBlue
|
||||
Width = 70
|
||||
end
|
||||
object v1QtyUnit: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'QtyUnit'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.DropDownListStyle = lsFixedList
|
||||
Properties.Items.Strings = (
|
||||
'M'
|
||||
'Kg')
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Content = DataLink_ShipmentRequest.FontBlue
|
||||
Styles.Footer = DataLink_ShipmentRequest.FontBlue
|
||||
Styles.Header = DataLink_ShipmentRequest.FontBlue
|
||||
Width = 70
|
||||
end
|
||||
object v1Note: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'isph'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
VisibleForCustomization = False
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'gangno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 98
|
||||
Width = 1274
|
||||
Height = 31
|
||||
Align = alTop
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object Label1: TLabel
|
||||
Left = 16
|
||||
Top = 10
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #24211#20301
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 280
|
||||
Top = 9
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #25968' '#37327
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
Visible = False
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 303
|
||||
Top = 3
|
||||
Width = 75
|
||||
Height = 21
|
||||
Caption = #30830#23450
|
||||
TabOrder = 0
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object edtKuWei: TBtnEditA
|
||||
Left = 49
|
||||
Top = 6
|
||||
Width = 200
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnBtnClick = edtKuWeiBtnClick
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Tag = 2
|
||||
Left = 345
|
||||
Top = 5
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object btn2: TButton
|
||||
Left = 443
|
||||
Top = 2
|
||||
Width = 75
|
||||
Height = 21
|
||||
Caption = #30830#23450
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
OnClick = btn2Click
|
||||
end
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 0
|
||||
Top = 409
|
||||
Width = 1274
|
||||
Height = 195
|
||||
Align = alBottom
|
||||
Caption = #32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
TabOrder = 4
|
||||
Visible = False
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 1270
|
||||
Height = 179
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 391
|
||||
Top = 230
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 352
|
||||
Top = 225
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 619
|
||||
Top = 233
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 569
|
||||
Top = 231
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 617
|
||||
Top = 307
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 427
|
||||
Top = 391
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOPrint
|
||||
Left = 474
|
||||
Top = 391
|
||||
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 = 517
|
||||
Top = 392
|
||||
ReportData = {}
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 303
|
||||
Top = 223
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 381
|
||||
Top = 300
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
object adoqueryPicture: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 312
|
||||
Top = 313
|
||||
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 = 886
|
||||
Top = 231
|
||||
end
|
||||
object ADOPrint: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 783
|
||||
Top = 231
|
||||
end
|
||||
end
|
||||
573
发货申请(ShipmentRequest.dll)/U_PieceSampleKcList.pas
Normal file
573
发货申请(ShipmentRequest.dll)/U_PieceSampleKcList.pas
Normal file
|
|
@ -0,0 +1,573 @@
|
|||
unit U_PieceSampleKcList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ToolWin, StdCtrls, ExtCtrls, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
|
||||
cxButtonEdit, cxDropDownEdit, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, DBClient, ADODB, cxGridCustomPopupMenu, cxGridPopupMenu, cxCheckBox,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_System, RM_Dataset, MMSystem, Menus,
|
||||
BtnEdit, U_SLT, jpeg, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
|
||||
cxCalendar, RM_e_Xls;
|
||||
|
||||
type
|
||||
TfrmPieceSampleKcList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBExport: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
v1P_CodeName: TcxGridDBColumn;
|
||||
v1P_SPEC: TcxGridDBColumn;
|
||||
v1Qty: TcxGridDBColumn;
|
||||
v1QtyUnit: TcxGridDBColumn;
|
||||
v1Note: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1CRType: TcxGridDBColumn;
|
||||
v1CRTime: TcxGridDBColumn;
|
||||
Label3: TLabel;
|
||||
P_CodeName: TEdit;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
CDS_Main: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
TOk: TToolButton;
|
||||
v1Ssel: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
P_Color: TEdit;
|
||||
Label8: TLabel;
|
||||
Label9: TLabel;
|
||||
kuwei: TEdit;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
ADOQueryPrint: TADOQuery;
|
||||
RMDB_Main: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
ADOQueryMain: TADOQuery;
|
||||
Label13: TLabel;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
P_Code: TEdit;
|
||||
Label18: TLabel;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
Label31: TLabel;
|
||||
FactoryName: TEdit;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
ToolButton2: TToolButton;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
Label1: TLabel;
|
||||
Button1: TButton;
|
||||
edtKuWei: TBtnEditA;
|
||||
ToolButton1: TToolButton;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
GroupBox1: TGroupBox;
|
||||
ScrollBox1: TScrollBox;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
adoqueryPicture: TADOQuery;
|
||||
ToolButton3: TToolButton;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
cv1Column12: TcxGridDBColumn;
|
||||
lbl1: TLabel;
|
||||
yptype: TEdit;
|
||||
cv1Column13: TcxGridDBColumn;
|
||||
btn1: TToolButton;
|
||||
Edit1: TEdit;
|
||||
lbl2: TLabel;
|
||||
btn2: TButton;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
ToolButton4: TToolButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
ADOPrint: TADOQuery;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure P_CodeNameChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TOkClick(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
procedure edtKuWeiBtnClick(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure btn2Click(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
procedure SetStatus();
|
||||
procedure InitImage();
|
||||
{ Private declarations }
|
||||
public
|
||||
fType: integer;
|
||||
fCKName: string;
|
||||
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmPieceSampleKcList: TfrmPieceSampleKcList;
|
||||
|
||||
var
|
||||
Mach: array of TfrmSlt;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun10, U_ZDYHelp, U_Fun;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmPieceSampleKcList.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 ');
|
||||
if CDS_Main.IsEmpty = False then
|
||||
begin
|
||||
sql.Add('and A.WBID=' + quotedstr(trim(CDS_Main.fieldbyname('MJID').AsString)));
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.add(' and 1=2');
|
||||
end;
|
||||
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 TfrmPieceSampleKcList.SetStatus();
|
||||
begin
|
||||
if fType = 10 then
|
||||
begin
|
||||
TOk.Visible := true;
|
||||
v1Ssel.Visible := true;
|
||||
ToolButton1.Visible := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.InitGrid();
|
||||
begin
|
||||
try
|
||||
with adoqueryMain do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
SQL.Add(' from CK_Sample_CR A ');
|
||||
sql.Add(' where A.kcQty<>0 and CKName=' + quotedstr(trim(fCKName)));
|
||||
sql.ADD(' and A.Valid=''Y'' and A.CRFlag=''入库'' ');
|
||||
sql.Add(' order by A.CRTime desc,A.CRNO desc');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(adoqueryMain, CDS_Main);
|
||||
SInitCDSData20(adoqueryMain, CDS_Main);
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
writeCxGrid(self.Caption + tv1.Name, Tv1, '面料仓库');
|
||||
if fType = 10 then
|
||||
Action := cahide
|
||||
else
|
||||
Action := cafree;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmPieceSampleKcList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.P_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
if adoqueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(adoqueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(adoqueryMain, CDS_Main);
|
||||
SInitCDSData20(adoqueryMain, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.FormShow(Sender: TObject);
|
||||
begin
|
||||
readCxGrid(self.Caption + tv1.Name, Tv1, '面料仓库');
|
||||
SetStatus();
|
||||
// InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
with adoqueryMain do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
SQL.Add(' from CK_Sample_CR A ');
|
||||
|
||||
sql.Add(' where A.kcQty<>0 and CKName=' + quotedstr(trim(fCKName)));
|
||||
SQL.Add('AND Chkstatus=''1''');
|
||||
sql.ADD(' and A.Valid=''Y'' and A.CRFlag=''入库'' ');
|
||||
if Trim(P_Code.Text) <> '' then
|
||||
begin
|
||||
SQL.Add('AND P_CODE LIKE ' + quotedstr('%' + trim(P_Code.Text) + '%'));
|
||||
end;
|
||||
if Trim(P_Color.Text) <> '' then
|
||||
begin
|
||||
SQL.Add('AND P_Color LIKE ' + quotedstr('%' + trim(P_Color.Text) + '%'));
|
||||
end;
|
||||
|
||||
sql.Add(' order by A.CRTime desc,A.CRNO desc');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(adoqueryMain, CDS_Main);
|
||||
SInitCDSData20(adoqueryMain, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel(self.Caption, cxgrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.TOkClick(Sender: TObject);
|
||||
begin
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, true);
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(CDS_Main, false);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.edtKuWeiBtnClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'mykuwei';
|
||||
flagname := '库位';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
edtKuWei.Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
if adoqueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(adoqueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(adoqueryMain, CDS_Main);
|
||||
SInitCDSData20(adoqueryMain, CDS_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Panel2.Visible = False then
|
||||
begin
|
||||
Panel2.Visible := True;
|
||||
Edit1.Visible := False;
|
||||
btn2.Visible := False;
|
||||
lbl2.Visible := False;
|
||||
Button1.Visible := True;
|
||||
end
|
||||
else
|
||||
Panel2.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.Button1Click(Sender: TObject);
|
||||
begin
|
||||
|
||||
if trim(edtKuWei.Text) = '' then
|
||||
exit;
|
||||
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
while CDS_Main.Locate('SSel', true, []) do
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update CK_Sample_CR set kuwei=' + quotedstr(trim(edtKuWei.Text)));
|
||||
sql.Add(' where CRNO=' + quotedstr(trim(CDS_Main.FieldByName('CRNO').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
with CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SSel').Value := false;
|
||||
FieldByName('KuWei').Value := trim(edtKuWei.Text);
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Up_SampleKcAll');
|
||||
execsql;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.btn2Click(Sender: TObject);
|
||||
var
|
||||
maxno, maxno2: string;
|
||||
F1: string;
|
||||
begin
|
||||
if trim(Edit1.Text) = '' then
|
||||
exit;
|
||||
if trim(edtKuWei.Text) = '' then
|
||||
exit;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
F1 := CDS_Main.FieldByName('CRNO').AsString;
|
||||
while CDS_Main.Locate('SSel', true, []) do
|
||||
begin
|
||||
if F1 <> trim(CDS_Main.FieldByName('CRNO').AsString) then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('不能选择多个库存!', '提示', 0);
|
||||
Exit;
|
||||
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from CK_Sample_CR where crno= ' + quotedstr(trim(CDS_Main.FieldByName('CRNO').AsString)));
|
||||
|
||||
Open;
|
||||
end;
|
||||
if (StrToFloat(Edit1.Text) < (ADOQueryCmd.FieldByName('kcqty').AsFloat)) then
|
||||
begin
|
||||
if GetLSNo(ADOQueryTmp, maxno, 'SPR', 'CK_Sample_CR', 3, 1) = False then //ADOQueryTmp yaoduiyingma
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if GetLSNo(ADOQueryTmp, maxno2, 'SPC', 'CK_Sample_CR', 3, 1) = False then
|
||||
begin
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('取最大号失败!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Up_BPCP @rkID=' + quotedstr(trim(CDS_Main.fieldbyname('crno').AsString)));
|
||||
sql.Add(',@maxno=' + quotedstr(trim(maxno)));
|
||||
SQL.Add(',@fqty=' + quotedstr(trim(Edit1.Text)));
|
||||
|
||||
SQL.Add(',@kuwei=' + quotedstr(Trim(edtkuwei.text)));
|
||||
sql.Add(',@maxno2=' + quotedstr(trim(maxno2)));
|
||||
sql.Add(',@filler=' + quotedstr(trim(DName)));
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('exec P_Up_SampleKc ' + quotedstr(trim(CDS_Main.fieldbyname('MJID').AsString)));
|
||||
Open;
|
||||
end;
|
||||
|
||||
if Trim(ADOQueryCmd.FieldByName('Msg').AsString) = '操作失败' then
|
||||
begin
|
||||
CDS_Main.EnableControls;
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('出库数量超出库存数量!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with CDS_Main do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SSel').Value := false;
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Application.MessageBox('分匹成功!', '提示', 0);
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.btn1Click(Sender: TObject);
|
||||
begin
|
||||
if Panel2.Visible = False then
|
||||
begin
|
||||
Panel2.Visible := True;
|
||||
lbl2.Visible := True;
|
||||
Edit1.Visible := True;
|
||||
btn2.visible := True;
|
||||
|
||||
Button1.Visible := False;
|
||||
end
|
||||
else
|
||||
Panel2.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfrmPieceSampleKcList.ToolButton4Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
Txt, fImagePath: string;
|
||||
Moudle: THandle;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
|
||||
ExportFtErpFile('样品入库标签.rmf', ADOQueryTmp);
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\样品入库标签.rmf';
|
||||
while CDS_Main.Locate('SSel', True, []) do
|
||||
begin
|
||||
|
||||
with ADOPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
// sql.Add('select * from CP_YDang A inner join CK_Sample_CR B on A.CYNo=B.P_Code and A.CYColor=B.P_COLOR ');
|
||||
sql.Add('select * from CK_Sample_CR A ');
|
||||
sql.Add('where CRNO=''' + Trim(CDS_Main.fieldbyname('CRNO').AsString) + '''');
|
||||
// showmessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
try
|
||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||
Txt := Trim(ADOPrint.fieldbyname('crno').AsString);
|
||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||
if FileExists(fImagePath) then
|
||||
DeleteFile(fImagePath);
|
||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||
except
|
||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM1.ShowPrintDialog := False;
|
||||
Rm1.DefaultCopies := strtointdef(trim(Edit1.Text), 1);
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
// RM1.DefaultCopies := 1;
|
||||
RM1.PrintReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
CDS_Main.edit;
|
||||
CDS_Main.FieldByName('ssel').Value := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
519
发货申请(ShipmentRequest.dll)/U_ProductOrderListSel.dfm
Normal file
519
发货申请(ShipmentRequest.dll)/U_ProductOrderListSel.dfm
Normal file
|
|
@ -0,0 +1,519 @@
|
|||
object frmProductOrderListSel: TfrmProductOrderListSel
|
||||
Left = 203
|
||||
Top = 45
|
||||
Width = 1556
|
||||
Height = 813
|
||||
Align = alClient
|
||||
Caption = #29983#20135#25351#31034#21333
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1540
|
||||
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_ShipmentRequest.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 btn1: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 31
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 122
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 185
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1540
|
||||
Height = 64
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 23
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #21046#21333#26085#26399
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 179
|
||||
Top = 15
|
||||
Width = 39
|
||||
Height = 12
|
||||
Caption = #35745#21010#21333
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 318
|
||||
Top = 15
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #23458' '#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 479
|
||||
Top = 15
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#21517#31216
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 179
|
||||
Top = 39
|
||||
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 Label10: TLabel
|
||||
Left = 479
|
||||
Top = 39
|
||||
Width = 54
|
||||
Height = 12
|
||||
Caption = #35268' '#26684
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 318
|
||||
Top = 39
|
||||
Width = 52
|
||||
Height = 12
|
||||
Caption = #20135#21697#32534#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 613
|
||||
Top = 119
|
||||
Width = 26
|
||||
Height = 12
|
||||
Caption = #20811#37325
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 76
|
||||
Top = 11
|
||||
Width = 85
|
||||
Height = 20
|
||||
Date = 40675.464742650460000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464742650460000000
|
||||
TabOrder = 0
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 75
|
||||
Top = 35
|
||||
Width = 86
|
||||
Height = 20
|
||||
Date = 40675.464761099540000000
|
||||
Format = 'yyyy-MM-dd'
|
||||
Time = 40675.464761099540000000
|
||||
TabOrder = 4
|
||||
end
|
||||
object OrderNoM: TEdit
|
||||
Tag = 2
|
||||
Left = 220
|
||||
Top = 11
|
||||
Width = 77
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = OrderNoMChange
|
||||
end
|
||||
object CustomerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 374
|
||||
Top = 11
|
||||
Width = 76
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = OrderNoMChange
|
||||
end
|
||||
object MPRTCodeName: TEdit
|
||||
Tag = 2
|
||||
Left = 534
|
||||
Top = 11
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 3
|
||||
OnChange = OrderNoMChange
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 220
|
||||
Top = 35
|
||||
Width = 77
|
||||
Height = 20
|
||||
TabOrder = 5
|
||||
OnChange = OrderNoMChange
|
||||
end
|
||||
object MPRTSpec: TEdit
|
||||
Tag = 2
|
||||
Left = 534
|
||||
Top = 35
|
||||
Width = 80
|
||||
Height = 20
|
||||
TabOrder = 7
|
||||
OnChange = OrderNoMChange
|
||||
end
|
||||
object MPRTCode: TEdit
|
||||
Tag = 2
|
||||
Left = 374
|
||||
Top = 35
|
||||
Width = 76
|
||||
Height = 20
|
||||
TabOrder = 6
|
||||
OnChange = OrderNoMChange
|
||||
end
|
||||
object MPRTKZ: TEdit
|
||||
Tag = 2
|
||||
Left = 654
|
||||
Top = 99
|
||||
Width = 56
|
||||
Height = 20
|
||||
TabOrder = 8
|
||||
OnChange = OrderNoMChange
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 96
|
||||
Width = 1540
|
||||
Height = 678
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
PopupMenu = PopupMenu1
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.CancelOnExit = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.DeletingConfirmation = False
|
||||
OptionsData.Inserting = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.Indicator = True
|
||||
Styles.Content = DataLink_ShipmentRequest.Default
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object cv1Column2: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'ssel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Width = 51
|
||||
end
|
||||
object v1OrdDate: TcxGridDBColumn
|
||||
Caption = #21046#21333#26085#26399
|
||||
DataBinding.FieldName = 'OrdDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 80
|
||||
end
|
||||
object v1OrderNo: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 80
|
||||
end
|
||||
object v1CustomerNoName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'CustomerNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 120
|
||||
end
|
||||
object v1DeliveryDate: TcxGridDBColumn
|
||||
Caption = #20132#36135#26085#26399
|
||||
DataBinding.FieldName = 'DlyDate'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 80
|
||||
end
|
||||
object v1ConNo: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 80
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #20013#25991#39068#33394
|
||||
DataBinding.FieldName = 'PRTColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #33521#25991#39068#33394
|
||||
DataBinding.FieldName = 'PRTEColor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #36319#21333#21592
|
||||
DataBinding.FieldName = 'GDY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 60
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'MPRTCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object v1MPRTCodeName: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'MPRTCodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 80
|
||||
end
|
||||
object v1MPRTSpec: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'MPRTSpec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 80
|
||||
end
|
||||
object v1MPRTMF: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'MPRTMF'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
Width = 80
|
||||
end
|
||||
object v1MPRTKZ: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'MPRTKZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object cv1Column3: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'kuanhao'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'PRTOrderQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #25968#37327#21333#20301
|
||||
DataBinding.FieldName = 'OrderUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'PRTHX'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 45
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #21253#35013#35201#27714
|
||||
DataBinding.FieldName = 'MPRTBZNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 98
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'SubNote'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 73
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #24211#23384'Kg'
|
||||
DataBinding.FieldName = 'KCKg'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #24211#23384'M'
|
||||
DataBinding.FieldName = 'KCM'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 68
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #24211#23384'Y'
|
||||
DataBinding.FieldName = 'KCY'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
HeaderGlyphAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 65
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
Left = 284
|
||||
Top = 292
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 728
|
||||
Top = 240
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 676
|
||||
Top = 240
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 448
|
||||
Top = 288
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = Order_Main
|
||||
Left = 236
|
||||
Top = 296
|
||||
end
|
||||
object Order_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 184
|
||||
Top = 288
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 603
|
||||
Top = 173
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = #20840#24323
|
||||
OnClick = N2Click
|
||||
end
|
||||
end
|
||||
end
|
||||
248
发货申请(ShipmentRequest.dll)/U_ProductOrderListSel.pas
Normal file
248
发货申请(ShipmentRequest.dll)/U_ProductOrderListSel.pas
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
unit U_ProductOrderListSel;
|
||||
|
||||
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,
|
||||
cxCurrencyEdit, cxImage, cxDBEdit, Menus, RM_Common, RM_Class, RM_e_Xls,
|
||||
RM_Dataset, RM_System, RM_GridReport, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
cxPC, cxSplitter, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
|
||||
IdFTP, ShellAPI, cxCheckBox, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
cxNavigator;
|
||||
|
||||
type
|
||||
TfrmProductOrderListSel = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
Label1: TLabel;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
Label3: TLabel;
|
||||
OrderNoM: TEdit;
|
||||
Order_Main: TClientDataSet;
|
||||
Label4: TLabel;
|
||||
CustomerNoName: TEdit;
|
||||
Label8: TLabel;
|
||||
MPRTCodeName: TEdit;
|
||||
Label9: TLabel;
|
||||
ConNo: TEdit;
|
||||
Label10: TLabel;
|
||||
MPRTSpec: TEdit;
|
||||
Label11: TLabel;
|
||||
MPRTCode: TEdit;
|
||||
Label12: TLabel;
|
||||
MPRTKZ: TEdit;
|
||||
btn1: TToolButton;
|
||||
cxGrid1: TcxGrid;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cv1Column2: TcxGridDBColumn;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1OrderNo: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
v1DeliveryDate: TcxGridDBColumn;
|
||||
v1ConNo: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1MPRTCodeName: TcxGridDBColumn;
|
||||
v1MPRTSpec: TcxGridDBColumn;
|
||||
v1MPRTMF: TcxGridDBColumn;
|
||||
v1MPRTKZ: TcxGridDBColumn;
|
||||
cv1Column3: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
PopupMenu1: TPopupMenu;
|
||||
N1: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure OrderNoMChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CheckBox1Click(Sender: TObject);
|
||||
procedure CheckBox2Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure N2Click(Sender: TObject);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmProductOrderListSel: TfrmProductOrderListSel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmProductOrderListSel.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmProductOrderListSel := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
DQdate := SGetServerDate(ADOQueryTemp);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('指示单列表选择ZY', Tv1, '生产指示单管理');
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.InitGrid();
|
||||
var
|
||||
strwhere: string;
|
||||
begin
|
||||
strwhere := '';
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('Select AA.*,KCY=Cast(KCM*1.0936 as decimal(18,1)) from(');
|
||||
sql.add('select b.prtcolor,B.SUBID ,B.PRTHX ');
|
||||
sql.add(',OrderQty=(select Sum(PRTOrderQty) from JYOrder_Sub B where B.MainId=A.MainId group by B.MainId)');
|
||||
sql.add(',ZQty=(select Sum(PRTOrderQty) from JYOrder_Sub B where B.MainId=A.MainId group by B.MainId)');
|
||||
sql.add(',OrderUnit=(select Top 1 OrderUnit from JYOrder_Sub B where B.MainId=A.MainId)');
|
||||
sql.add(', PriceUnit=(select Top 1 PriceUnit from JYOrder_Sub B where B.MainId=A.MainId)');
|
||||
sql.add(',PRTPrice=(select Top 1 PRTPrice from JYOrder_Sub B where B.MainId=A.MainId)');
|
||||
sql.add(',SLBName=(select Top 1 SLBName from JYOrder_Sub B where B.MainId=A.MainId)');
|
||||
sql.add(',A.*,A.OrderNo OrderNoM, isnull(b.prtorderqty,0)prtorderqty,isnull(b.prtps,0)prtps');
|
||||
sql.Add(',KCKg=(select sum(KgQty) from CK_BanCP_CR CR where cr.mainid=b.mainid and CR.subId=B.Subid and isnull(CR.CRFlag,'''')=''待出库'') ');
|
||||
sql.Add(',KCM=(select sum(Qty) from CK_BanCP_CR CR where cr.mainid=b.mainid and CR.subId=B.Subid and isnull(CR.CRFlag,'''')=''待出库'') ');
|
||||
sql.add('from JYOrder_Main A inner join JYOrder_sub B on a.mainid=b.mainid ');
|
||||
sql.add('where A.OrdDate>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)));
|
||||
sql.add('and A.OrdDate<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)));
|
||||
if Trim(CustomerNoName.Text) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.CustomerNoName=''' + Trim(CustomerNoName.Text) + '''');
|
||||
end;
|
||||
Sql.Add(') AA order by KCM desc');
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.InitForm();
|
||||
begin
|
||||
ReadCxGrid('指示单列表选择ZY', Tv1, '生产指示单管理');
|
||||
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 180;
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.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 TfrmProductOrderListSel.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.OrderNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.FormShow(Sender: TObject);
|
||||
begin
|
||||
InitForm();
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.CheckBox1Click(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.CheckBox2Click(Sender: TObject);
|
||||
begin
|
||||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.cxTabControl1Change(Sender: TObject);
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.btn1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if Order_Main.Locate('SSel', True, []) = False then
|
||||
Exit;
|
||||
ModalResult := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main, True);
|
||||
end;
|
||||
|
||||
procedure TfrmProductOrderListSel.N2Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNo(Order_Main, False);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1155
发货申请(ShipmentRequest.dll)/U_ProductOrderNewList_TC.dfm
Normal file
1155
发货申请(ShipmentRequest.dll)/U_ProductOrderNewList_TC.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1120
发货申请(ShipmentRequest.dll)/U_ProductOrderNewList_TC.pas
Normal file
1120
发货申请(ShipmentRequest.dll)/U_ProductOrderNewList_TC.pas
Normal file
File diff suppressed because it is too large
Load Diff
36
发货申请(ShipmentRequest.dll)/U_SLT.dfm
Normal file
36
发货申请(ShipmentRequest.dll)/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
发货申请(ShipmentRequest.dll)/U_SLT.pas
Normal file
84
发货申请(ShipmentRequest.dll)/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.
|
||||
293
发货申请(ShipmentRequest.dll)/U_SMPK.dfm
Normal file
293
发货申请(ShipmentRequest.dll)/U_SMPK.dfm
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
object frmSMPK: TfrmSMPK
|
||||
Left = 322
|
||||
Top = 47
|
||||
Width = 1109
|
||||
Height = 648
|
||||
Caption = #25195#25551#30424#24211
|
||||
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 cxGrid3: TcxGrid
|
||||
Left = 505
|
||||
Top = 0
|
||||
Width = 588
|
||||
Height = 610
|
||||
Align = alClient
|
||||
TabOrder = 1
|
||||
object Tv3: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
DataController.DataSource = DS_MainSel
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = #21367#25968#37327#65306'#'
|
||||
Kind = skCount
|
||||
Column = cxGridDBColumn1
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v3Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = cxStyle1
|
||||
Styles.Inactive = cxStyle1
|
||||
Styles.IncSearch = cxStyle1
|
||||
Styles.Header = cxStyle1
|
||||
object cxGridDBColumn1: TcxGridDBColumn
|
||||
Caption = #26426#21488
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 87
|
||||
end
|
||||
object v3Column3: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'KuWei'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 131
|
||||
end
|
||||
object v3Column2: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 210
|
||||
end
|
||||
object cxGridDBColumn4: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'APXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
object v3Column1: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'MJMaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v3Column4: TcxGridDBColumn
|
||||
Caption = #25209#21495
|
||||
DataBinding.FieldName = 'APBatchNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 119
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 505
|
||||
Height = 610
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label5: TLabel
|
||||
Left = 142
|
||||
Top = 14
|
||||
Width = 194
|
||||
Height = 97
|
||||
Caption = #24211#20301
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -96
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 25
|
||||
Top = 312
|
||||
Width = 33
|
||||
Height = 66
|
||||
Caption = #25195#13#10#25551
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object KuWei: TEdit
|
||||
Left = 61
|
||||
Top = 132
|
||||
Width = 409
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object BaoID: TEdit
|
||||
Left = 61
|
||||
Top = 309
|
||||
Width = 411
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
OnKeyPress = BaoIDKeyPress
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 189
|
||||
Top = 424
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #20851#38381
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object CRType: TEdit
|
||||
Tag = 2
|
||||
Left = 512
|
||||
Top = 239
|
||||
Width = 154
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 752
|
||||
Top = 336
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 720
|
||||
Top = 336
|
||||
end
|
||||
object DS_MainSel: TDataSource
|
||||
DataSet = CDS_MainSel
|
||||
Left = 616
|
||||
Top = 336
|
||||
end
|
||||
object CDS_MainSel: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 648
|
||||
Top = 336
|
||||
end
|
||||
object cxGridPopupMenu4: TcxGridPopupMenu
|
||||
Grid = cxGrid3
|
||||
PopupMenus = <>
|
||||
Left = 680
|
||||
Top = 336
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 792
|
||||
Top = 336
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 640
|
||||
Top = 408
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 612
|
||||
Top = 244
|
||||
end
|
||||
object RMDBMX: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_JuanPRT
|
||||
Left = 688
|
||||
Top = 244
|
||||
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 = RMDBMX
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 728
|
||||
Top = 244
|
||||
ReportData = {}
|
||||
end
|
||||
object CDS_JuanPRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 652
|
||||
Top = 244
|
||||
end
|
||||
end
|
||||
345
发货申请(ShipmentRequest.dll)/U_SMPK.pas
Normal file
345
发货申请(ShipmentRequest.dll)/U_SMPK.pas
Normal file
|
|
@ -0,0 +1,345 @@
|
|||
unit U_SMPK;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, MovePanel, cxCheckBox, Menus, ComCtrls, BtnEdit, ShellAPI, cxTextEdit,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_System, RM_Dataset, RM_e_Xls;
|
||||
|
||||
type
|
||||
TfrmSMPK = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_MainSel: TDataSource;
|
||||
CDS_MainSel: TClientDataSet;
|
||||
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
v3Column1: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
v3Column2: TcxGridDBColumn;
|
||||
Panel2: TPanel;
|
||||
Label5: TLabel;
|
||||
KuWei: TEdit;
|
||||
BaoID: TEdit;
|
||||
Button2: TButton;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
Label12: TLabel;
|
||||
CDS_Main: TClientDataSet;
|
||||
CRType: TEdit;
|
||||
v3Column4: TcxGridDBColumn;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDBMX: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
CDS_JuanPRT: TClientDataSet;
|
||||
v3Column3: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
function YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
private
|
||||
{ Private declarations }
|
||||
FCKOrdNo, FSMStr, JXFlag: string;
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSMPK: TfrmSMPK;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, MMSystem, U_FHSQListSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
function TfrmSMPK.YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
var
|
||||
CRID, YFID, PriceUnit, OrderUnit, FComTaiTou, FromSubID: string;
|
||||
fprice, huilv: double;
|
||||
begin
|
||||
// Result:=False;
|
||||
// fprice:=0;
|
||||
// huilv:=0;
|
||||
// PriceUnit:='RMB';
|
||||
// with Order_Main10 do
|
||||
// begin
|
||||
// begin
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// SQL.Clear;
|
||||
// sql.Add('select *,fPrice=dbo.F_Get_Order_Price(MainID,subID) from JYOrder_Sub Where subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// IF not ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// PriceUnit:=Trim(ADOQueryTemp.fieldbyname('PriceUnit').AsString);
|
||||
// OrderUnit:=Trim(ADOQueryTemp.fieldbyname('OrderUnit').AsString);
|
||||
// fPrice:= ADOQueryTemp.fieldbyname('fPrice').AsFloat;
|
||||
// huilv:= ADOQueryTemp.fieldbyname('huilv').AsFloat;
|
||||
// end;
|
||||
// IF huilv=0 then huilv:=1;
|
||||
// CRID:='0';
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select * from YF_Money_CR ');
|
||||
// sql.Add(' where mainID='''+Trim(Order_Main10.fieldbyname('mainID').AsString)+'''');
|
||||
// sql.Add(' and subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// sql.Add(' and CRTime='''+FormatDateTime('yyyy-MM-dd',CRTime.Date)+'''') ;
|
||||
// sql.Add(' and YFName=''销售金额'' ');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',3,1)=False then
|
||||
// begin
|
||||
// Application.MessageBox('取成品应收最大号失败!','提示',0);
|
||||
// Exit;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where 1<>1');
|
||||
// Open;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Append;
|
||||
// FieldByName('YFID').Value:=Trim(YFID);
|
||||
// FieldByName('YFTypeId').Value:=Trim(Order_Main10.fieldbyname('mainID').AsString);
|
||||
// FieldByName('CRID').Value:=StrToInt(CRID);
|
||||
// FieldByName('Filler').Value:=Trim(DName);
|
||||
// FieldByName('CRType').Value:='应收款登记';
|
||||
// FieldByName('CRFlag').Value:='应收收';
|
||||
// FieldByName('QtyFlag').Value:=1;
|
||||
// FieldByName('FactoryName').Value:=Trim(TocustName.Text);
|
||||
// FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',CRTime.Date));
|
||||
// FieldByName('YFType').Value:='自动生成';
|
||||
// FieldByName('Price').Value:=fprice;
|
||||
// FieldByName('HuiLv').Value:=huilv;
|
||||
// FieldByName('BZType').Value:=Trim(PriceUnit);
|
||||
// FieldByName('QtyUnit').Value:=Trim(OrderUnit);
|
||||
// FieldByName('ComTaiTou').Value:=Trim(FComTaiTou);
|
||||
// FieldByName('YFName').Value:='销售金额';
|
||||
// FieldByName('MainId').Value:=Trim(Order_Main10.fieldbyname('Mainid').AsString);
|
||||
// FieldByName('subID').Value:=Trim(Order_Main10.fieldbyname('subID').AsString);
|
||||
// FieldByName('OrderNO').Value:=Trim(Order_Main10.fieldbyname('OrderNO').AsString);
|
||||
// FieldByName('P_CodeName').Value:=Trim(Order_Main10.fieldbyname('MprtCodeName').AsString);
|
||||
// FieldByName('P_Spec').Value:=Trim(Order_Main10.fieldbyname('MprtSpec').AsString);
|
||||
// FieldByName('P_color').Value:=Trim(Order_Main10.fieldbyname('PRTColor').AsString);
|
||||
// FieldByName('status').Value:='0';
|
||||
// Post;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// YFID:=Trim(ADOQueryTemp.fieldbyname('YFID').AsString);
|
||||
// end;
|
||||
// IF uppercase(OrderUnit)='KG' then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(B.MJQty4),0) from CK_BanCP_CR A,WFB_MJJY B where A.MJID=B.MJID and A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='Y') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='M') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)/0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='M') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='Y') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)*0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(A.Qty),0) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('Update YF_Money_CR Set Money=Price*Qty,BBMoney=Price*Qty*HuiLv');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where YFId='''+Trim(YFID)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.FieldByName('Qty').Value=0 then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('delete from YF_Money_CR where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// //Next;
|
||||
// end;
|
||||
// end;
|
||||
// Result:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmSMPK.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSMPK.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSMPK := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSMPK.FormShow(Sender: TObject);
|
||||
begin
|
||||
BaoID.SetFocus;
|
||||
ReadCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.kuwei,B.* ');
|
||||
sql.Add(' from CK_PBCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY_PB B on A.MJID=B.MJID');
|
||||
sql.Add(' where 1=2');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
end;
|
||||
|
||||
procedure TfrmSMPK.BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
maxno, SMFlag, KYCKFlag, FMainId: string;
|
||||
FFQty: Integer;
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
if trim(KuWei.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('请输入库位!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.*,B.CRID ');
|
||||
sql.Add(' from WFB_MJJY_PB A');
|
||||
sql.Add(' inner join CK_PBCP_CR B on A.MJID=B.MJID and B.CRFlag=''入库'' ');
|
||||
sql.Add(' where A. MJID=''' + Trim(BaoID.Text) + '''');
|
||||
// showmessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
PlaySound('wav\扫描错误.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
BaoID.Text := '';
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Main);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Main);
|
||||
end;
|
||||
|
||||
try
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('update CK_PBCP_CR set KuWei =' + quotedstr(trim(KuWei.Text)));
|
||||
sql.Add(' where MJID=''' + Trim(BaoID.Text) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
with CDS_MainSel do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Mainid').Value := Self.CDS_Main.fieldbyname('Mainid').Value;
|
||||
FieldByName('SubID').Value := Self.CDS_Main.fieldbyname('SubID').Value;
|
||||
FieldByName('MJMaoZ').Value := Self.CDS_Main.fieldbyname('MJMaoZ').Value;
|
||||
FieldByName('MJId').Value := Self.CDS_Main.fieldbyname('MJId').Value;
|
||||
FieldByName('APXH').Value := Self.CDS_Main.fieldbyname('APXH').Value;
|
||||
FieldByName('CarNo').Value := Self.CDS_Main.fieldbyname('CarNo').Value;
|
||||
FieldByName('KuWei').Value := trim(KuWei.Text);
|
||||
FieldByName('APBatchNo').Value := Self.CDS_Main.fieldbyname('APBatchNo').Value;
|
||||
Post;
|
||||
end;
|
||||
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\正确.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
|
||||
except
|
||||
BaoID.Text := '';
|
||||
PlaySound('数据保存失败暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('盘库异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSMPK.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
401
发货申请(ShipmentRequest.dll)/U_SQKCHZSelList.dfm
Normal file
401
发货申请(ShipmentRequest.dll)/U_SQKCHZSelList.dfm
Normal file
|
|
@ -0,0 +1,401 @@
|
|||
object frmSQKCHZSelList: TfrmSQKCHZSelList
|
||||
Left = 261
|
||||
Top = 86
|
||||
Width = 1339
|
||||
Height = 576
|
||||
Caption = #25104#21697#24211#23384#27719#24635#21015#34920
|
||||
Color = clBtnFace
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnClose = FormClose
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 12
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1323
|
||||
Height = 33
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_ShipmentRequest.ThreeImgList
|
||||
List = True
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
TabOrder = 0
|
||||
object TBRafresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 0
|
||||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBFind: TToolButton
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #36807#28388
|
||||
ImageIndex = 20
|
||||
OnClick = TBFindClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 126
|
||||
Top = 0
|
||||
Caption = #36873#25321
|
||||
ImageIndex = 31
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 185
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 21
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 33
|
||||
Width = 1323
|
||||
Height = 36
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
object Label4: TLabel
|
||||
Left = 201
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #35268#26684
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 816
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 12
|
||||
Caption = #33267
|
||||
Visible = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 23
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 12
|
||||
Caption = #35746' '#21333' '#21495
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 348
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #31561#32423
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 460
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #33394#21035
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 569
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 12
|
||||
Caption = #25209#21495
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 713
|
||||
Top = 12
|
||||
Width = 60
|
||||
Height = 12
|
||||
Caption = #24037#21378#20195#21495#8216
|
||||
end
|
||||
object C_Spec: TEdit
|
||||
Tag = 2
|
||||
Left = 228
|
||||
Top = 8
|
||||
Width = 100
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 1
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object ConNo: TEdit
|
||||
Tag = 2
|
||||
Left = 73
|
||||
Top = 8
|
||||
Width = 109
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 0
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object MJStr3: TComboBox
|
||||
Tag = 2
|
||||
Left = 486
|
||||
Top = 8
|
||||
Width = 68
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 3
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
#27973#33394
|
||||
#28145#33394
|
||||
#28418#30333
|
||||
'')
|
||||
end
|
||||
object BatchNoHZ: TEdit
|
||||
Tag = 2
|
||||
Left = 596
|
||||
Top = 8
|
||||
Width = 100
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 4
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object GCCode: TEdit
|
||||
Tag = 2
|
||||
Left = 762
|
||||
Top = 8
|
||||
Width = 100
|
||||
Height = 20
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
TabOrder = 5
|
||||
OnChange = C_CodeNameChange
|
||||
end
|
||||
object ClothType: TComboBox
|
||||
Tag = 2
|
||||
Left = 377
|
||||
Top = 8
|
||||
Width = 68
|
||||
Height = 20
|
||||
Style = csDropDownList
|
||||
ImeName = #20013#25991' - QQ'#25340#38899#36755#20837#27861
|
||||
ItemHeight = 12
|
||||
TabOrder = 2
|
||||
OnChange = TBFindClick
|
||||
Items.Strings = (
|
||||
''
|
||||
#27491#21697
|
||||
#27425#21697)
|
||||
end
|
||||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 69
|
||||
Width = 1323
|
||||
Height = 469
|
||||
Align = alClient
|
||||
TabOrder = 2
|
||||
object Tv1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v1Column6
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v2Column5
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.IncSearch = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Selection = DataLink_ShipmentRequest.SHuangSe
|
||||
Styles.Header = DataLink_ShipmentRequest.Default
|
||||
object v2Column3: TcxGridDBColumn
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'XSConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 77
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'KHName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 90
|
||||
end
|
||||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 81
|
||||
end
|
||||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #25209#21495
|
||||
DataBinding.FieldName = 'BatchNoHZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 79
|
||||
end
|
||||
object v1Column11: TcxGridDBColumn
|
||||
Caption = #24037#21378#20195#21495
|
||||
DataBinding.FieldName = 'GCCode'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 72
|
||||
end
|
||||
object v1Column7: TcxGridDBColumn
|
||||
Caption = #32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object v2Column1: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 92
|
||||
end
|
||||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'C_Spec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 136
|
||||
end
|
||||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #33394#21035
|
||||
DataBinding.FieldName = 'MJStr3'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
end
|
||||
object v1Column2: TcxGridDBColumn
|
||||
Caption = #38376#24133'CM'
|
||||
DataBinding.FieldName = 'MFQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #20811#37325'GSM'
|
||||
DataBinding.FieldName = 'KZQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #31561#32423
|
||||
DataBinding.FieldName = 'ClothType'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 63
|
||||
end
|
||||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'JQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Focusing = False
|
||||
Width = 74
|
||||
end
|
||||
object v2Column5: TcxGridDBColumn
|
||||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'KCKGQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Focusing = False
|
||||
Width = 83
|
||||
end
|
||||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #21305#37325
|
||||
DataBinding.FieldName = 'PiKgQty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 64
|
||||
end
|
||||
end
|
||||
object cxGrid2Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object MovePanel2: TMovePanel
|
||||
Left = 408
|
||||
Top = 192
|
||||
Width = 289
|
||||
Height = 49
|
||||
BevelInner = bvLowered
|
||||
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
|
||||
Color = clSkyBlue
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -14
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 984
|
||||
Top = 24
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 936
|
||||
Top = 48
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 880
|
||||
Top = 24
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 920
|
||||
Top = 152
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 888
|
||||
Top = 144
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 896
|
||||
Top = 128
|
||||
end
|
||||
end
|
||||
210
发货申请(ShipmentRequest.dll)/U_SQKCHZSelList.pas
Normal file
210
发货申请(ShipmentRequest.dll)/U_SQKCHZSelList.pas
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
unit U_SQKCHZSelList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, MovePanel, cxButtonEdit;
|
||||
|
||||
type
|
||||
TfrmSQKCHZSelList = class(TForm)
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
TBClose: TToolButton;
|
||||
Panel1: TPanel;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryMain: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
DataSource1: TDataSource;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label4: TLabel;
|
||||
C_Spec: TEdit;
|
||||
Label2: TLabel;
|
||||
CDS_Main: TClientDataSet;
|
||||
Tv1: TcxGridDBTableView;
|
||||
cxGrid2Level1: TcxGridLevel;
|
||||
cxGrid2: TcxGrid;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v2Column5: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
Label5: TLabel;
|
||||
ConNo: TEdit;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
Label7: TLabel;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
MovePanel2: TMovePanel;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
MJStr3: TComboBox;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
v1Column10: TcxGridDBColumn;
|
||||
v1Column11: TcxGridDBColumn;
|
||||
Label1: TLabel;
|
||||
BatchNoHZ: TEdit;
|
||||
Label3: TLabel;
|
||||
GCCode: TEdit;
|
||||
ClothType: TComboBox;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure ConNoMChange(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBFindClick(Sender: TObject);
|
||||
procedure C_CodeNameChange(Sender: TObject);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
procedure InitGrid();
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
FCode,FClothType,FSeBie:String;
|
||||
end;
|
||||
|
||||
var
|
||||
frmSQKCHZSelList: TfrmSQKCHZSelList;
|
||||
|
||||
implementation
|
||||
uses
|
||||
U_DataLink,U_Fun,U_ZDYHelp,U_JYMXInfo;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSQKCHZSelList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSQKCHZSelList:=nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.InitGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ,C.C_CodeName,C.C_Code,C.MFQty,C.KZQty,C.C_Spec,C.PiKgQty');
|
||||
sql.Add(' ,D.ConNo,XSConNo=E.ConNo,KHName=E.CustomerNoName,D.ConMainId,D.ConSubId,C.BatchNoHZ,D.GCCode');
|
||||
sql.Add(' from(');
|
||||
sql.Add(' select Sum(KCKgQty) KCKgQty,count(*) JQty,PB.MainId,PB.SubId,PB.ClothType '); //,MJStr3=isnull(PB.MJStr3,'''')
|
||||
sql.Add(' from CK_PBCP_KC KC ');
|
||||
sql.Add(' inner join WFB_MJJY_PB PB on KC.MJID=PB.MJID ');
|
||||
sql.Add(' inner join Cloth_Sub CS on PB.SubId=CS.SubId');
|
||||
sql.Add(' where KC.KCKGQty>0 and CS.C_Code='''+Trim(FCode)+'''');
|
||||
if Trim(FClothType)<>'' then
|
||||
begin
|
||||
sql.Add(' and isnull(PB.Cloth_Type,'''')='''+Trim(FClothType)+'''');
|
||||
end;
|
||||
if Trim(FSeBie)<>'' then
|
||||
begin
|
||||
sql.Add(' and isnull(PB.MJStr3,'''')='''+Trim(FSeBie)+'''');
|
||||
end;
|
||||
sql.Add(' group by PB.MainId,PB.SubId,PB.ClothType'); //,isnull(PB.MJStr3,'''')
|
||||
sql.Add(' )A');
|
||||
Sql.add(' inner join Cloth_Sub C on A.MainId=C.MainId');
|
||||
sql.Add(' inner join Cloth_Main D on A.Mainid=D.Mainid');
|
||||
sql.Add(' inner join JYOrderCon_Main_PB E on D.ConMainId=E.MainId');
|
||||
Open;
|
||||
// ShowMessage(SQL.Text);
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
//BegDate.SetFocus;
|
||||
MovePanel2.Visible:=True;
|
||||
MovePanel2.Refresh;
|
||||
InitGrid();
|
||||
MovePanel2.Visible:=False;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('发货申请专用',Tv1,'坯布仓库');
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('发货申请专用',Tv1,'坯布仓库');
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.C_CodeNameChange(Sender: TObject);
|
||||
begin
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.Tv1CellDblClick(
|
||||
Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
// try
|
||||
// frmJYMXInfo:=TfrmJYMXInfo.Create(Application);
|
||||
// with frmJYMXInfo do
|
||||
// begin
|
||||
// FFMainId:=Trim(self.CDS_Main.fieldbyname('MainId').AsString);
|
||||
// FFClothType:=Trim(self.CDS_Main.fieldbyname('ClothType').AsString);
|
||||
// if ShowModal=1 then
|
||||
// begin
|
||||
//
|
||||
// end;
|
||||
// end;
|
||||
// finally
|
||||
// frmJYMXInfo.Free;
|
||||
// end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQKCHZSelList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=1;
|
||||
end;
|
||||
|
||||
end.
|
||||
631
发货申请(ShipmentRequest.dll)/U_SQSMCK.dfm
Normal file
631
发货申请(ShipmentRequest.dll)/U_SQSMCK.dfm
Normal file
|
|
@ -0,0 +1,631 @@
|
|||
object frmSQSMCK: TfrmSQSMCK
|
||||
Left = 400
|
||||
Top = 37
|
||||
Width = 1149
|
||||
Height = 840
|
||||
Caption = #25104#21697#20986#24211#25195#25551'('#30003#35831')'
|
||||
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 Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 525
|
||||
Height = 801
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label5: TLabel
|
||||
Left = 6
|
||||
Top = 34
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 6
|
||||
Top = 91
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#26102#38388
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 254
|
||||
Top = 91
|
||||
Width = 73
|
||||
Height = 19
|
||||
Caption = #23458' '#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 227
|
||||
Top = 172
|
||||
Width = 25
|
||||
Height = 96
|
||||
Caption = #24050#13#10#21457#13#10#21305#13#10#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 13
|
||||
Top = 353
|
||||
Width = 66
|
||||
Height = 33
|
||||
Caption = #25195#25551
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 128
|
||||
Top = 272
|
||||
Width = 196
|
||||
Height = 48
|
||||
Caption = #25195#25551#36864#22238
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -48
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 14
|
||||
Top = 176
|
||||
Width = 33
|
||||
Height = 66
|
||||
Caption = #21305#13#10#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 5
|
||||
Top = 127
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CKPSQty: TEdit
|
||||
Tag = 2
|
||||
Left = 51
|
||||
Top = 180
|
||||
Width = 155
|
||||
Height = 61
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -53
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
end
|
||||
object CKOrdNo: TEdit
|
||||
Left = 88
|
||||
Top = 8
|
||||
Width = 409
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object BaoID: TEdit
|
||||
Left = 86
|
||||
Top = 340
|
||||
Width = 411
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
OnKeyPress = BaoIDKeyPress
|
||||
end
|
||||
object CRTime: TDateTimePicker
|
||||
Left = 86
|
||||
Top = 86
|
||||
Width = 153
|
||||
Height = 28
|
||||
Date = 41337.663190821760000000
|
||||
Time = 41337.663190821760000000
|
||||
Enabled = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object KHName: TEdit
|
||||
Tag = 2
|
||||
Left = 344
|
||||
Top = 86
|
||||
Width = 154
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 353
|
||||
Top = 417
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #20851#38381
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 256
|
||||
Top = 165
|
||||
Width = 196
|
||||
Height = 105
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -96
|
||||
Font.Name = #26999#20307'_GB2312'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 5
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 51
|
||||
Top = 417
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #36873#21333
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 159
|
||||
Top = 503
|
||||
Width = 320
|
||||
Height = 64
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -56
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemHeight = 56
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
Text = #20844#26020#30721#21333
|
||||
Visible = False
|
||||
Items.Strings = (
|
||||
#20844#26020#30721#21333
|
||||
#25442#31639#30721#21333
|
||||
#20844#26020#19982#25442#31639#30721#21333
|
||||
'')
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 49
|
||||
Top = 497
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #25171#21360
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 9
|
||||
Visible = False
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object edtIsSMTH: TEdit
|
||||
Left = 87
|
||||
Top = 277
|
||||
Width = 39
|
||||
Height = 37
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 10
|
||||
OnClick = edtIsSMTHClick
|
||||
end
|
||||
object btn1: TButton
|
||||
Left = 204
|
||||
Top = 415
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #24211#23384
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 11
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object CRTYPE: TComboBox
|
||||
Tag = 3
|
||||
Left = 86
|
||||
Top = 123
|
||||
Width = 151
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemHeight = 19
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 12
|
||||
Text = #38144#21806#20986#24211
|
||||
Items.Strings = (
|
||||
#38144#21806#20986#24211
|
||||
#25340#32568#20986#24211
|
||||
#20379#24212#21830#36864#36135
|
||||
#22238#20462#20986#24211
|
||||
#25913#33394#20986#24211
|
||||
#37325#26032#26816#39564)
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 525
|
||||
Top = 0
|
||||
Width = 608
|
||||
Height = 801
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 1
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 1
|
||||
Top = 214
|
||||
Width = 606
|
||||
Height = 586
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DS_MainSel
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = #21367#25968#37327#65306'#'
|
||||
Kind = skCount
|
||||
Column = VC_MJXH
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v3Column1
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Column = VC_MJXH
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = cxStyle1
|
||||
Styles.Inactive = cxStyle1
|
||||
Styles.IncSearch = cxStyle1
|
||||
Styles.Header = cxStyle1
|
||||
object cv3Column3: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'mjstr4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 98
|
||||
end
|
||||
object VC_MJXH: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'MJXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
object v3Column1: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'MJMaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #38271#24230
|
||||
DataBinding.FieldName = 'MJLEN'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
object v3Column2: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 118
|
||||
end
|
||||
object cv3Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 92
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 606
|
||||
Height = 213
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object TV4: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = ds2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cCXSQPS
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = cxStyle1
|
||||
Styles.Inactive = cxStyle1
|
||||
Styles.IncSearch = cxStyle1
|
||||
Styles.Header = cxStyle1
|
||||
object cCXCONNO: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'SCCONNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 98
|
||||
end
|
||||
object TV4Column1: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
Width = 93
|
||||
end
|
||||
object cV4Column1: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'gangno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
object cCXCOLOR: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
end
|
||||
object cCXSQPS: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 104
|
||||
end
|
||||
object cCXFHPS: TcxGridDBColumn
|
||||
Caption = #21457#36135#37325#37327
|
||||
DataBinding.FieldName = 'fhqty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
object TV4Column2: TcxGridDBColumn
|
||||
Caption = #21457#36135#38271#24230
|
||||
DataBinding.FieldName = 'FHMS'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 108
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = TV4
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 752
|
||||
Top = 336
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 720
|
||||
Top = 336
|
||||
end
|
||||
object DS_MainSel: TDataSource
|
||||
DataSet = CDS_MainSel
|
||||
Left = 616
|
||||
Top = 336
|
||||
end
|
||||
object CDS_MainSel: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 648
|
||||
Top = 336
|
||||
end
|
||||
object cxGridPopupMenu4: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 680
|
||||
Top = 336
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 792
|
||||
Top = 336
|
||||
PixelsPerInch = 96
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 576
|
||||
Top = 332
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 616
|
||||
Top = 264
|
||||
end
|
||||
object RMDBMX: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_JuanPRT
|
||||
Left = 692
|
||||
Top = 264
|
||||
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 = RMDBMX
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 728
|
||||
Top = 264
|
||||
ReportData = {}
|
||||
end
|
||||
object CDS_JuanPRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 652
|
||||
Top = 264
|
||||
end
|
||||
object ds1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 864
|
||||
Top = 308
|
||||
end
|
||||
object ds2: TDataSource
|
||||
DataSet = ds1
|
||||
Left = 864
|
||||
Top = 344
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 712
|
||||
Top = 400
|
||||
end
|
||||
end
|
||||
893
发货申请(ShipmentRequest.dll)/U_SQSMCK.pas
Normal file
893
发货申请(ShipmentRequest.dll)/U_SQSMCK.pas
Normal file
|
|
@ -0,0 +1,893 @@
|
|||
unit U_SQSMCK;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, MovePanel, cxCheckBox, Menus, ComCtrls, BtnEdit, ShellAPI, cxTextEdit,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_System, RM_Dataset, RM_e_Xls,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmSQSMCK = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_MainSel: TDataSource;
|
||||
CDS_MainSel: TClientDataSet;
|
||||
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Label5: TLabel;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
CKPSQty: TEdit;
|
||||
CKOrdNo: TEdit;
|
||||
BaoID: TEdit;
|
||||
CRTime: TDateTimePicker;
|
||||
KHName: TEdit;
|
||||
Button2: TButton;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
Label2: TLabel;
|
||||
Edit1: TEdit;
|
||||
Label12: TLabel;
|
||||
CDS_Main: TClientDataSet;
|
||||
Button1: TButton;
|
||||
ComboBox1: TComboBox;
|
||||
Button3: TButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDBMX: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
CDS_JuanPRT: TClientDataSet;
|
||||
Label10: TLabel;
|
||||
edtIsSMTH: TEdit;
|
||||
btn1: TButton;
|
||||
lbl2: TLabel;
|
||||
ds1: TClientDataSet;
|
||||
ds2: TDataSource;
|
||||
Panel1: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cv3Column3: TcxGridDBColumn;
|
||||
VC_MJXH: TcxGridDBColumn;
|
||||
v3Column1: TcxGridDBColumn;
|
||||
v3Column2: TcxGridDBColumn;
|
||||
cv3Column4: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
TV4: TcxGridDBTableView;
|
||||
cCXCONNO: TcxGridDBColumn;
|
||||
cV4Column1: TcxGridDBColumn;
|
||||
cCXCOLOR: TcxGridDBColumn;
|
||||
cCXSQPS: TcxGridDBColumn;
|
||||
cCXFHPS: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
TV4Column1: TcxGridDBColumn;
|
||||
TV4Column2: TcxGridDBColumn;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
CRTYPE: TComboBox;
|
||||
ADOQuery1: TADOQuery;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
function YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure edtIsSMTHClick(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FCKOrdNo, FSMStr, JXFlag, CZZT, fcuowu: string;
|
||||
procedure TMPanDuan();
|
||||
procedure InitCKGrid();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSQSMCK: TfrmSQSMCK;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_RTFun, MMSystem, U_FHSQListSel, U_CKProductBCPKCListSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
function TfrmSQSMCK.YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
var
|
||||
CRID, YFID, PriceUnit, OrderUnit, FComTaiTou, FromSubID: string;
|
||||
fprice, huilv: double;
|
||||
begin
|
||||
// Result:=False;
|
||||
// fprice:=0;
|
||||
// huilv:=0;
|
||||
// PriceUnit:='RMB';
|
||||
// with Order_Main10 do
|
||||
// begin
|
||||
// begin
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// SQL.Clear;
|
||||
// sql.Add('select *,fPrice=dbo.F_Get_Order_Price(MainID,subID) from JYOrder_Sub Where subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// IF not ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// PriceUnit:=Trim(ADOQueryTemp.fieldbyname('PriceUnit').AsString);
|
||||
// OrderUnit:=Trim(ADOQueryTemp.fieldbyname('OrderUnit').AsString);
|
||||
// fPrice:= ADOQueryTemp.fieldbyname('fPrice').AsFloat;
|
||||
// huilv:= ADOQueryTemp.fieldbyname('huilv').AsFloat;
|
||||
// end;
|
||||
// IF huilv=0 then huilv:=1;
|
||||
// CRID:='0';
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select * from YF_Money_CR ');
|
||||
// sql.Add(' where mainID='''+Trim(Order_Main10.fieldbyname('mainID').AsString)+'''');
|
||||
// sql.Add(' and subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// sql.Add(' and CRTime='''+FormatDateTime('yyyy-MM-dd',CRTime.Date)+'''') ;
|
||||
// sql.Add(' and YFName=''销售金额'' ');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',3,1)=False then
|
||||
// begin
|
||||
// Application.MessageBox('取成品应收最大号失败!','提示',0);
|
||||
// Exit;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where 1<>1');
|
||||
// Open;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Append;
|
||||
// FieldByName('YFID').Value:=Trim(YFID);
|
||||
// FieldByName('YFTypeId').Value:=Trim(Order_Main10.fieldbyname('mainID').AsString);
|
||||
// FieldByName('CRID').Value:=StrToInt(CRID);
|
||||
// FieldByName('Filler').Value:=Trim(DName);
|
||||
// FieldByName('CRType').Value:='应收款登记';
|
||||
// FieldByName('CRFlag').Value:='应收收';
|
||||
// FieldByName('QtyFlag').Value:=1;
|
||||
// FieldByName('FactoryName').Value:=Trim(TocustName.Text);
|
||||
// FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',CRTime.Date));
|
||||
// FieldByName('YFType').Value:='自动生成';
|
||||
// FieldByName('Price').Value:=fprice;
|
||||
// FieldByName('HuiLv').Value:=huilv;
|
||||
// FieldByName('BZType').Value:=Trim(PriceUnit);
|
||||
// FieldByName('QtyUnit').Value:=Trim(OrderUnit);
|
||||
// FieldByName('ComTaiTou').Value:=Trim(FComTaiTou);
|
||||
// FieldByName('YFName').Value:='销售金额';
|
||||
// FieldByName('MainId').Value:=Trim(Order_Main10.fieldbyname('Mainid').AsString);
|
||||
// FieldByName('subID').Value:=Trim(Order_Main10.fieldbyname('subID').AsString);
|
||||
// FieldByName('OrderNO').Value:=Trim(Order_Main10.fieldbyname('OrderNO').AsString);
|
||||
// FieldByName('P_CodeName').Value:=Trim(Order_Main10.fieldbyname('MprtCodeName').AsString);
|
||||
// FieldByName('P_Spec').Value:=Trim(Order_Main10.fieldbyname('MprtSpec').AsString);
|
||||
// FieldByName('P_color').Value:=Trim(Order_Main10.fieldbyname('PRTColor').AsString);
|
||||
// FieldByName('status').Value:='0';
|
||||
// Post;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// YFID:=Trim(ADOQueryTemp.fieldbyname('YFID').AsString);
|
||||
// end;
|
||||
// IF uppercase(OrderUnit)='KG' then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(B.MJQty4),0) from CK_BanCP_CR A,WFB_MJJY B where A.MJID=B.MJID and A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='Y') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='M') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)/0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='M') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='Y') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)*0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(A.Qty),0) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('Update YF_Money_CR Set Money=Price*Qty,BBMoney=Price*Qty*HuiLv');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where YFId='''+Trim(YFID)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.FieldByName('Qty').Value=0 then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('delete from YF_Money_CR where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// //Next;
|
||||
// end;
|
||||
// end;
|
||||
// Result:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSQSMCK := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.FormShow(Sender: TObject);
|
||||
begin
|
||||
BaoID.SetFocus;
|
||||
ReadCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
CRTime.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.TMPanDuan();
|
||||
begin
|
||||
//判断扫描的是发货申请单,还是布匹条码 ,判断是否已经扫描过发货单 ,或者更改了发货单
|
||||
JXFlag := '';
|
||||
|
||||
if Copy(FSMStr, 1, 2) = 'SM' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main A inner join FHSQ_Sub B on A.FSID=B.FSID where SQType=''订单'' AND A.STATUS<>''已取消'' and A.FSID=''' + Trim(FSMStr) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\申请单不存在暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(FSMStr)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已对账暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CKOrdNo.Text) <> '' then
|
||||
begin
|
||||
FCKOrdNo := Trim(CKOrdNo.Text);
|
||||
end;
|
||||
CKOrdNo.Text := Trim(FSMStr);
|
||||
if FSMStr <> FCKOrdNo then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select B.*');
|
||||
sql.Add(' from CK_BanCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY B on A.MJID=B.MJID');
|
||||
sql.Add(' where A.CKOrdNO=''' + Trim(CKOrdNo.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MainSel);
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := floatToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
end;
|
||||
BaoID.Text := '';
|
||||
JXFlag := '888';
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(CKOrdNo.Text) = '' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未扫描申请单暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_SUB A ');
|
||||
// sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add('WHERE A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add('and A.FSID=' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
|
||||
// ShowMessage(SQL.Text);
|
||||
|
||||
Open;
|
||||
end;
|
||||
if ADOQuery1.IsEmpty then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.APID from WFB_MJJY A ');
|
||||
sql.Add('where A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未检验暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
JXFlag := '999';
|
||||
// Application.MessageBox('请检查指示单是否正确!', '提示', 0);
|
||||
PlaySound('wav\条码错误暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else if ADOQuery1.fieldbyname('sfkp').AsString = '是' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
Application.MessageBox('请先开匹!', '提示', 0);
|
||||
|
||||
Exit;
|
||||
end;
|
||||
// else
|
||||
// begin
|
||||
//// if Trim(BatchNo.Text) <> '' then
|
||||
//// begin
|
||||
//// if FormatTitle(Trim(ADOQueryTemp.fieldbyname('APBatchNo').AsString)) <> FormatTitle(Trim(BatchNo.Text)) then
|
||||
//// begin
|
||||
//// JXFlag := '999';
|
||||
//// PlaySound('批号不同暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
//// Exit;
|
||||
//// end;
|
||||
//// end;
|
||||
//// if ((ADOQueryTemp.fieldbyname('MJMaoZ').AsFloat < 5) or (ADOQueryTemp.fieldbyname('MJMaoZ').AsFloat > 50)) then
|
||||
//// begin
|
||||
//// JXFlag := '999';
|
||||
//// PlaySound('重量异常暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
//// Application.MessageBox('重量异常暂停发货!', '提示', 0);
|
||||
//// Exit;
|
||||
//// end;
|
||||
//
|
||||
// end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
sql.Add('select A.CKOrdNo from CK_BanCP_CR A ');
|
||||
sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add(' and A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and A.CRFlag=''出库'' ');
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('CKOrdNo').AsString) = Trim(CKOrdNo.Text) then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已扫描.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已出库暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.CKOrdNo from CK_BanCP_CR A ');
|
||||
sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add(' and A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and A.CRFlag=''入库'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未入库暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
// if Trim(Edit1.Text) <> '' then
|
||||
// begin
|
||||
// if StrToFloat(Edit1.Text) >= StrToFloat(CKPSQty.Text) then
|
||||
// begin
|
||||
// JXFlag := '999';
|
||||
// PlaySound('wav\超出发货上限暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
// Exit;
|
||||
// end;
|
||||
// end;
|
||||
// 判断每个颜色有没有超
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
//
|
||||
// sql.Add(' select * from FHSQ_Sub A where isnull(SQQty,0)+isnull(fdfw,0)<isnull(FHQty,0) ');
|
||||
//
|
||||
// sql.Add(' and A.FSID=' + quotedstr(Trim(FSMStr)));
|
||||
//
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.IsEmpty = False then
|
||||
// begin
|
||||
// JXFlag := '999';
|
||||
// PlaySound('wav\超出发货上限暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
// Exit;
|
||||
// end;
|
||||
|
||||
end;
|
||||
//判断扫描的是发货申请单,还是布匹条码 ,判断是否已经扫描过发货单 ,或者更改了发货单 FHDate
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
maxno, SMFlag, KYCKFlag, FMainId, ff: string;
|
||||
FFQty: Integer;
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
FSMStr := Trim(BaoID.Text);
|
||||
|
||||
if edtIsSMTH.Text = '' then
|
||||
begin
|
||||
|
||||
TMPanDuan();
|
||||
if Trim(JXFlag) = '999' then
|
||||
begin
|
||||
BaoID.Text := '';
|
||||
fcuowu := '错误';
|
||||
Exit;
|
||||
end;
|
||||
if Trim(JXFlag) = '888' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ,KHName=CustomerNoName,CKPSQty=A.SQPSHZ ');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where FSId=''' + Trim(CKOrdNo.Text) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCSHDataNew(ADOQueryTemp, Panel2, 2);
|
||||
InitCKGrid();
|
||||
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.*,B.CRID ,C.PRTColor ');
|
||||
sql.Add(' from WFB_MJJY A');
|
||||
sql.Add(' inner join CK_BanCP_CR B on A.MJID=B.MJID and B.CRFlag=''入库'' ');
|
||||
SQL.Add(' inner join JYOrder_Sub C ON A.SUBID=C.SubId');
|
||||
sql.Add(' where A. MJID=''' + Trim(BaoID.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Main);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Main);
|
||||
try
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_CPCK_Up_CK ');
|
||||
sql.add(' @CKOrdNo=' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
sql.add(',@Dname=' + quotedstr(DName));
|
||||
sql.Add(',@MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(',@CRTYPE=' + quotedstr(Trim(CRTYPE.Text)));
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
FMainId := Trim(CDS_Main.fieldbyname('MainID').AsString);
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Do_FHSQ ''' + Trim(CKOrdNo.Text) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
sql.Add(' select * from FHSQ_Sub A where isnull(SQQty,0)*(1+0.01*isnull(fdfw,0))<isnull(FHQty,0) ');
|
||||
|
||||
sql.Add(' and A.FSID=' + quotedstr(Trim(FSMStr)));
|
||||
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty = False then
|
||||
begin
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\超出发货上限暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
|
||||
Exit;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
with CDS_MainSel do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Mainid').Value := Self.CDS_Main.fieldbyname('Mainid').Value;
|
||||
FieldByName('SubID').Value := Self.CDS_Main.fieldbyname('SubID').Value;
|
||||
FieldByName('MJMaoZ').Value := Self.CDS_Main.fieldbyname('MJMaoZ').Value;
|
||||
FieldByName('MJId').Value := Self.CDS_Main.fieldbyname('MJId').Value;
|
||||
FieldByName('MJXH').Value := Self.CDS_Main.fieldbyname('MJXH').Value;
|
||||
FieldByName('mjstr4').Value := Self.CDS_Main.fieldbyname('mjstr4').Value;
|
||||
FieldByName('prtcolor').Value := Self.CDS_Main.fieldbyname('prtcolor').Value;
|
||||
// FieldByName('CarNo').Value := Self.CDS_Main.fieldbyname('CarNo').Value;
|
||||
// FieldByName('APBatchNo').Value := Self.CDS_Main.fieldbyname('APBatchNo').Value;
|
||||
Post;
|
||||
end;
|
||||
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\正确.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
|
||||
except
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\数据保存失败暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('出库异常!', '提示', 0);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if not CDS_MainSel.Locate('MJID', FSMStr, []) then
|
||||
Exit;
|
||||
try
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPDATE CK_BanCP_CR Set ');
|
||||
sql.add(' CRTime=null,CRType=null,CRFlag=''待出库'' ');
|
||||
sql.add(',CKOrdNo=''''');
|
||||
sql.add(',filler=''''');
|
||||
sql.Add(' where ISNowCycle=1 and MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add('and CK_BanCP_CR.CRFlag=''出库'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
//更新出入库状态
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPDATE WFB_MJJY Set MJStr2=''已入库'' ');
|
||||
sql.Add(' where MJID=' + quotedstr(Trim(FSMStr)));
|
||||
SQL.Add(' and WFB_MJJY.MJStr2=''已出库'' ');
|
||||
sql.Add(' UPdate CK_BanCP_KC Set KCValid=''Y'' ');
|
||||
sql.Add(' where CK_BanCP_KC.MJID=' + Quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and KCValid=''N'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||
sql.Add(' ' + quotedstr(trim(DName)));
|
||||
sql.Add(',getdate() ');
|
||||
sql.Add(',' + quotedstr(''));
|
||||
sql.Add(',' + quotedstr(trim('出库扫描撤销')));
|
||||
sql.Add(',' + quotedstr('卷条码:' + trim(FSMStr) + ' 出库单号:' + trim(CKOrdNo.Text)));
|
||||
sql.Add(',' + quotedstr(trim('成功')));
|
||||
sql.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Do_FHSQ ''' + Trim(CKOrdNo.Text) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('撤销出库失败!', '提示信息', 0);
|
||||
end;
|
||||
CDS_MainSel.Locate('MJID', FSMStr, []);
|
||||
CDS_MainSel.Delete;
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\正确.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
end;
|
||||
end;
|
||||
|
||||
//判断发货匹数 CDS_MainSel
|
||||
// if CDS_MainSel.IsEmpty = False then
|
||||
// Edit1.Text := IntToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
// else
|
||||
// Edit1.Text := '0';
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := floatToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
//
|
||||
//// with ADOQueryTemp do
|
||||
//// begin
|
||||
//// Close;
|
||||
//// sql.Clear;
|
||||
//// sql.Add(' select COUNT(*) fhjs from CK_BanCP_CR where CKOrdNo= ''' + Trim(CKOrdNo.Text) + '''');
|
||||
//// Open;
|
||||
//// end;
|
||||
//// ff := Format('%.2f', [StrToFloat(Edit1.Text)]);
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select sum(KGQTY) FMJMaoZ from CK_BanCP_CR where CKOrdNo= ''' + Trim(CKOrdNo.Text) + '''');
|
||||
// Open;
|
||||
// end;
|
||||
//
|
||||
//// if StrToFloat(Edit1.Text) <> ADOQueryTemp.FieldByName('FMJMaoZ').AsFloat then //asfloat
|
||||
// if Tv3.DataController.Summary.FooterSummaryValues[3] <> ADOQueryTemp.FieldByName('FMJMaoZ').AsFloat then
|
||||
// begin
|
||||
// PlaySound('wav\数据保存失败暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
// Application.MessageBox('出库异常,请重新选择申请单!', '提示', 0);
|
||||
// end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.Button1Click(Sender: TObject);
|
||||
var
|
||||
MKey: Char;
|
||||
begin
|
||||
MKey := #13;
|
||||
try
|
||||
frmFHSQListSel := TfrmFHSQListSel.Create(self);
|
||||
with frmFHSQListSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
BaoID.Text := Trim(Order_Main.fieldbyname('FSID').AsString);
|
||||
BaoIDKeyPress(BaoID, MKey);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQListSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.Button3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
if Trim(CKOrdNo.Text) = '' then
|
||||
EXIT;
|
||||
ExportFtErpFile(trim(ComboBox1.Text) + '.rmf', ADOQueryTemp);
|
||||
if ComboBox1.Text = '公斤码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_RKMDGangNo2 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
|
||||
if trim(ComboBox1.Text) = '换算码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_RKMDGangNo2 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
if ComboBox1.Text = '公斤与换算码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_RKMDGangNo5 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ComboBox1.Text) + '.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
// RMVariables['OrdNo'] := Trim(CDS_Main.fieldbyname('OrdNo').AsString);
|
||||
RM1.DefaultCopies := 2;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.edtIsSMTHClick(Sender: TObject);
|
||||
begin
|
||||
if Trim(edtIsSMTH.Text) = '' then
|
||||
edtIsSMTH.Text := '√'
|
||||
else
|
||||
edtIsSMTH.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.btn1Click(Sender: TObject);
|
||||
var
|
||||
MKey: Char;
|
||||
begin
|
||||
MKey := #13;
|
||||
CZZT := '选择库存';
|
||||
fcuowu := '1';
|
||||
try
|
||||
frmCKProductBCPKCListSel := TfrmCKProductBCPKCListSel.Create(Application);
|
||||
with frmCKProductBCPKCListSel do
|
||||
begin
|
||||
FSID.Text := Trim(CKOrdNo.Text);
|
||||
// CustomerNoName.text := trim(Self.KHName.text);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
with frmCKProductBCPKCListSel.CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Fieldbyname('ssel').AsBoolean then
|
||||
begin
|
||||
BaoID.Text := Trim(Fieldbyname('MJID').AsString);
|
||||
BaoIDKeyPress(BaoID, MKey);
|
||||
if fcuowu = '错误' then
|
||||
begin
|
||||
Break;
|
||||
end;
|
||||
Sleep(200);
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCKProductBCPKCListSel.Free;
|
||||
end;
|
||||
InitCKGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCK.InitCKGrid();
|
||||
begin
|
||||
if CKOrdNo.Text <> '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.MAINID,A.SUBID, B.MJMaoZ,B.MJLEN,B.MJStr4,B.MJXH,B.MJID,C.PRTColor');
|
||||
sql.Add(' from CK_BanCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY B on A.MJID=B.MJID');
|
||||
SQL.Add(' inner join JYOrder_Sub C ON B.SUBID=C.SubId');
|
||||
sql.Add(' where A.CKOrdNO=''' + Trim(CKOrdNo.Text) + '''');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MainSel);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('SELECT b.*,A.ConNo FROM FHSQ_Sub B');
|
||||
sql.Add('inner join FHSQ_Main A ON A.FSId=B.FSId ');
|
||||
sql.Add('WHERE B.FSId=''' + Trim(CKOrdNo.Text) + '''');
|
||||
|
||||
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, DS1);
|
||||
SInitCDSData20(ADOQueryTemp, DS1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
634
发货申请(ShipmentRequest.dll)/U_SQSMCKXH.dfm
Normal file
634
发货申请(ShipmentRequest.dll)/U_SQSMCKXH.dfm
Normal file
|
|
@ -0,0 +1,634 @@
|
|||
object frmSQSMCKXH: TfrmSQSMCKXH
|
||||
Left = 311
|
||||
Top = 89
|
||||
Width = 1149
|
||||
Height = 840
|
||||
Caption = #29616#36135#20986#24211
|
||||
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 Panel2: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 517
|
||||
Height = 801
|
||||
Align = alLeft
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label5: TLabel
|
||||
Left = 6
|
||||
Top = 34
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#21333#21495
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 6
|
||||
Top = 91
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#26102#38388
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 254
|
||||
Top = 91
|
||||
Width = 73
|
||||
Height = 19
|
||||
Caption = #23458' '#25143
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 227
|
||||
Top = 163
|
||||
Width = 25
|
||||
Height = 96
|
||||
Caption = #24050#13#10#21457#13#10#21305#13#10#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -24
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 13
|
||||
Top = 353
|
||||
Width = 66
|
||||
Height = 33
|
||||
Caption = #25195#25551
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 128
|
||||
Top = 272
|
||||
Width = 196
|
||||
Height = 48
|
||||
Caption = #25195#25551#36864#22238
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -48
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lbl2: TLabel
|
||||
Left = 14
|
||||
Top = 167
|
||||
Width = 33
|
||||
Height = 66
|
||||
Caption = #21305#13#10#25968
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -32
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 5
|
||||
Top = 127
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #20986#24211#31867#22411
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CKPSQty: TEdit
|
||||
Tag = 2
|
||||
Left = 51
|
||||
Top = 171
|
||||
Width = 155
|
||||
Height = 61
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -53
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 3
|
||||
end
|
||||
object CKOrdNo: TEdit
|
||||
Left = 88
|
||||
Top = 8
|
||||
Width = 409
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlue
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object BaoID: TEdit
|
||||
Left = 86
|
||||
Top = 340
|
||||
Width = 411
|
||||
Height = 72
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -64
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
OnKeyPress = BaoIDKeyPress
|
||||
end
|
||||
object CRTime: TDateTimePicker
|
||||
Left = 86
|
||||
Top = 86
|
||||
Width = 153
|
||||
Height = 28
|
||||
Date = 41337.663190821760000000
|
||||
Time = 41337.663190821760000000
|
||||
Enabled = False
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object KHName: TEdit
|
||||
Tag = 2
|
||||
Left = 344
|
||||
Top = 86
|
||||
Width = 154
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 353
|
||||
Top = 417
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #20851#38381
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 7
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 256
|
||||
Top = 156
|
||||
Width = 196
|
||||
Height = 105
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clRed
|
||||
Font.Height = -96
|
||||
Font.Name = #26999#20307'_GB2312'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 5
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 51
|
||||
Top = 417
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #36873#21333
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 159
|
||||
Top = 503
|
||||
Width = 320
|
||||
Height = 64
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -56
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemHeight = 56
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 8
|
||||
Text = #20844#26020#30721#21333
|
||||
Visible = False
|
||||
Items.Strings = (
|
||||
#20844#26020#30721#21333
|
||||
#25442#31639#30721#21333
|
||||
#20844#26020#19982#25442#31639#30721#21333
|
||||
'')
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 49
|
||||
Top = 497
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #25171#21360
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 9
|
||||
Visible = False
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object edtIsSMTH: TEdit
|
||||
Left = 87
|
||||
Top = 277
|
||||
Width = 39
|
||||
Height = 37
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 10
|
||||
OnClick = edtIsSMTHClick
|
||||
end
|
||||
object btn1: TButton
|
||||
Left = 204
|
||||
Top = 415
|
||||
Width = 100
|
||||
Height = 76
|
||||
Caption = #24211#23384
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -29
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 11
|
||||
OnClick = btn1Click
|
||||
end
|
||||
object CRTYPE: TComboBox
|
||||
Tag = 2
|
||||
Left = 86
|
||||
Top = 123
|
||||
Width = 151
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ItemHeight = 19
|
||||
ParentFont = False
|
||||
TabOrder = 12
|
||||
Items.Strings = (
|
||||
#22238#20462#20986#24211
|
||||
#25253#24223#20986#24211
|
||||
#20379#24212#21830#36864#36135
|
||||
#21152#24037#20986#24211
|
||||
#20020#26102#20986#24211
|
||||
#25439#32791#20986#24211
|
||||
#30424#20111#20986#24211)
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 517
|
||||
Top = 0
|
||||
Width = 616
|
||||
Height = 801
|
||||
Align = alClient
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 1
|
||||
object cxGrid3: TcxGrid
|
||||
Left = 1
|
||||
Top = 214
|
||||
Width = 614
|
||||
Height = 586
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object Tv3: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DS_MainSel
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Format = #21367#25968#37327#65306'#'
|
||||
Kind = skCount
|
||||
Column = VC_MJXH
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = v3Column1
|
||||
end
|
||||
item
|
||||
Kind = skCount
|
||||
Column = VC_MJXH
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = Tv3Column1
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = cxStyle1
|
||||
Styles.Inactive = cxStyle1
|
||||
Styles.IncSearch = cxStyle1
|
||||
Styles.Header = cxStyle1
|
||||
object cv3Column3: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'mjstr4'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 98
|
||||
end
|
||||
object VC_MJXH: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'MJXH'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
object v3Column1: TcxGridDBColumn
|
||||
Caption = #20844#26020#25968
|
||||
DataBinding.FieldName = 'MJMaoZ'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 79
|
||||
end
|
||||
object v3Column2: TcxGridDBColumn
|
||||
Caption = #26465#30721
|
||||
DataBinding.FieldName = 'MJID'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 118
|
||||
end
|
||||
object cv3Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 92
|
||||
end
|
||||
object Tv3Column1: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'MJLEN'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
end
|
||||
object cxGridLevel1: TcxGridLevel
|
||||
GridView = Tv3
|
||||
end
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 1
|
||||
Top = 1
|
||||
Width = 614
|
||||
Height = 213
|
||||
Align = alTop
|
||||
TabOrder = 1
|
||||
object TV4: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = ds2
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = cCXSQPS
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Content = cxStyle1
|
||||
Styles.Inactive = cxStyle1
|
||||
Styles.IncSearch = cxStyle1
|
||||
Styles.Header = cxStyle1
|
||||
object cCXCONNO: TcxGridDBColumn
|
||||
Caption = #35746#21333#21495
|
||||
DataBinding.FieldName = 'SCCONNO'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 98
|
||||
end
|
||||
object TV4Column1: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'SPrtCodeName'
|
||||
Width = 93
|
||||
end
|
||||
object cV4Column1: TcxGridDBColumn
|
||||
Caption = #32568#21495
|
||||
DataBinding.FieldName = 'gangno'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 91
|
||||
end
|
||||
object cCXCOLOR: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'prtcolor'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 95
|
||||
end
|
||||
object cCXSQPS: TcxGridDBColumn
|
||||
Caption = #30003#35831#25968#37327
|
||||
DataBinding.FieldName = 'sqqty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 111
|
||||
end
|
||||
object cCXFHPS: TcxGridDBColumn
|
||||
Caption = #21457#36135#37325#37327
|
||||
DataBinding.FieldName = 'fhqty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
object TV4Column2: TcxGridDBColumn
|
||||
Caption = #21457#36135#38271#24230
|
||||
DataBinding.FieldName = 'fhms'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 94
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = TV4
|
||||
end
|
||||
end
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 752
|
||||
Top = 336
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 720
|
||||
Top = 336
|
||||
end
|
||||
object DS_MainSel: TDataSource
|
||||
DataSet = CDS_MainSel
|
||||
Left = 616
|
||||
Top = 336
|
||||
end
|
||||
object CDS_MainSel: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 648
|
||||
Top = 336
|
||||
end
|
||||
object cxGridPopupMenu4: TcxGridPopupMenu
|
||||
PopupMenus = <>
|
||||
Left = 680
|
||||
Top = 336
|
||||
end
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 792
|
||||
Top = 336
|
||||
PixelsPerInch = 96
|
||||
object cxStyle1: TcxStyle
|
||||
AssignedValues = [svFont]
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -21
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 576
|
||||
Top = 332
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
ExportPrecision = 1
|
||||
PagesOfSheet = 100
|
||||
ExportImages = True
|
||||
ExportFrames = True
|
||||
ExportImageFormat = ifBMP
|
||||
JPEGQuality = 0
|
||||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 616
|
||||
Top = 264
|
||||
end
|
||||
object RMDBMX: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_JuanPRT
|
||||
Left = 692
|
||||
Top = 264
|
||||
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 = RMDBMX
|
||||
CompressLevel = rmzcFastest
|
||||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 728
|
||||
Top = 264
|
||||
ReportData = {}
|
||||
end
|
||||
object CDS_JuanPRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 652
|
||||
Top = 264
|
||||
end
|
||||
object ds1: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 864
|
||||
Top = 308
|
||||
end
|
||||
object ds2: TDataSource
|
||||
DataSet = ds1
|
||||
Left = 864
|
||||
Top = 344
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_ShipmentRequest.ADOLink
|
||||
Parameters = <>
|
||||
Left = 720
|
||||
Top = 336
|
||||
end
|
||||
end
|
||||
848
发货申请(ShipmentRequest.dll)/U_SQSMCKXH.pas
Normal file
848
发货申请(ShipmentRequest.dll)/U_SQSMCKXH.pas
Normal file
|
|
@ -0,0 +1,848 @@
|
|||
unit U_SQSMCKXH;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, MovePanel, cxCheckBox, Menus, ComCtrls, BtnEdit, ShellAPI, cxTextEdit,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_System, RM_Dataset, RM_e_Xls,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmSQSMCKXH = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_MainSel: TDataSource;
|
||||
CDS_MainSel: TClientDataSet;
|
||||
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||
Panel2: TPanel;
|
||||
Label5: TLabel;
|
||||
Label4: TLabel;
|
||||
Label9: TLabel;
|
||||
CKPSQty: TEdit;
|
||||
CKOrdNo: TEdit;
|
||||
BaoID: TEdit;
|
||||
CRTime: TDateTimePicker;
|
||||
KHName: TEdit;
|
||||
Button2: TButton;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
Label2: TLabel;
|
||||
Edit1: TEdit;
|
||||
Label12: TLabel;
|
||||
CDS_Main: TClientDataSet;
|
||||
Button1: TButton;
|
||||
ComboBox1: TComboBox;
|
||||
Button3: TButton;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDBMX: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
CDS_JuanPRT: TClientDataSet;
|
||||
Label10: TLabel;
|
||||
edtIsSMTH: TEdit;
|
||||
btn1: TButton;
|
||||
lbl2: TLabel;
|
||||
ds1: TClientDataSet;
|
||||
ds2: TDataSource;
|
||||
Panel1: TPanel;
|
||||
cxGrid3: TcxGrid;
|
||||
Tv3: TcxGridDBTableView;
|
||||
cv3Column3: TcxGridDBColumn;
|
||||
VC_MJXH: TcxGridDBColumn;
|
||||
v3Column1: TcxGridDBColumn;
|
||||
v3Column2: TcxGridDBColumn;
|
||||
cv3Column4: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGrid1: TcxGrid;
|
||||
TV4: TcxGridDBTableView;
|
||||
cCXCONNO: TcxGridDBColumn;
|
||||
cV4Column1: TcxGridDBColumn;
|
||||
cCXCOLOR: TcxGridDBColumn;
|
||||
cCXSQPS: TcxGridDBColumn;
|
||||
cCXFHPS: TcxGridDBColumn;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
TV4Column1: TcxGridDBColumn;
|
||||
TV4Column2: TcxGridDBColumn;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
Label6: TLabel;
|
||||
CRTYPE: TComboBox;
|
||||
ADOQuery1: TADOQuery;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
function YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure edtIsSMTHClick(Sender: TObject);
|
||||
procedure btn1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FCKOrdNo, FSMStr, JXFlag, CZZT, fcuowu: string;
|
||||
procedure TMPanDuan();
|
||||
procedure InitCKGrid();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSQSMCKXH: TfrmSQSMCKXH;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_RTFun, MMSystem, U_XHFHSQListSel, U_CKProductBCPKCListSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
function TfrmSQSMCKXH.YSData(Order_Main10: TClientDataSet): Boolean;
|
||||
var
|
||||
CRID, YFID, PriceUnit, OrderUnit, FComTaiTou, FromSubID: string;
|
||||
fprice, huilv: double;
|
||||
begin
|
||||
// Result:=False;
|
||||
// fprice:=0;
|
||||
// huilv:=0;
|
||||
// PriceUnit:='RMB';
|
||||
// with Order_Main10 do
|
||||
// begin
|
||||
// begin
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// SQL.Clear;
|
||||
// sql.Add('select *,fPrice=dbo.F_Get_Order_Price(MainID,subID) from JYOrder_Sub Where subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// IF not ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// PriceUnit:=Trim(ADOQueryTemp.fieldbyname('PriceUnit').AsString);
|
||||
// OrderUnit:=Trim(ADOQueryTemp.fieldbyname('OrderUnit').AsString);
|
||||
// fPrice:= ADOQueryTemp.fieldbyname('fPrice').AsFloat;
|
||||
// huilv:= ADOQueryTemp.fieldbyname('huilv').AsFloat;
|
||||
// end;
|
||||
// IF huilv=0 then huilv:=1;
|
||||
// CRID:='0';
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select * from YF_Money_CR ');
|
||||
// sql.Add(' where mainID='''+Trim(Order_Main10.fieldbyname('mainID').AsString)+'''');
|
||||
// sql.Add(' and subID='''+Trim(Order_Main10.fieldbyname('subID').AsString)+'''');
|
||||
// sql.Add(' and CRTime='''+FormatDateTime('yyyy-MM-dd',CRTime.Date)+'''') ;
|
||||
// sql.Add(' and YFName=''销售金额'' ');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.IsEmpty then
|
||||
// begin
|
||||
// if GetLSNo(ADOQueryCmd,YFID,'CS','YF_Money_CR',3,1)=False then
|
||||
// begin
|
||||
// Application.MessageBox('取成品应收最大号失败!','提示',0);
|
||||
// Exit;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where 1<>1');
|
||||
// Open;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Append;
|
||||
// FieldByName('YFID').Value:=Trim(YFID);
|
||||
// FieldByName('YFTypeId').Value:=Trim(Order_Main10.fieldbyname('mainID').AsString);
|
||||
// FieldByName('CRID').Value:=StrToInt(CRID);
|
||||
// FieldByName('Filler').Value:=Trim(DName);
|
||||
// FieldByName('CRType').Value:='应收款登记';
|
||||
// FieldByName('CRFlag').Value:='应收收';
|
||||
// FieldByName('QtyFlag').Value:=1;
|
||||
// FieldByName('FactoryName').Value:=Trim(TocustName.Text);
|
||||
// FieldByName('CRTime').Value:=Trim(FormatDateTime('yyyy-MM-dd',CRTime.Date));
|
||||
// FieldByName('YFType').Value:='自动生成';
|
||||
// FieldByName('Price').Value:=fprice;
|
||||
// FieldByName('HuiLv').Value:=huilv;
|
||||
// FieldByName('BZType').Value:=Trim(PriceUnit);
|
||||
// FieldByName('QtyUnit').Value:=Trim(OrderUnit);
|
||||
// FieldByName('ComTaiTou').Value:=Trim(FComTaiTou);
|
||||
// FieldByName('YFName').Value:='销售金额';
|
||||
// FieldByName('MainId').Value:=Trim(Order_Main10.fieldbyname('Mainid').AsString);
|
||||
// FieldByName('subID').Value:=Trim(Order_Main10.fieldbyname('subID').AsString);
|
||||
// FieldByName('OrderNO').Value:=Trim(Order_Main10.fieldbyname('OrderNO').AsString);
|
||||
// FieldByName('P_CodeName').Value:=Trim(Order_Main10.fieldbyname('MprtCodeName').AsString);
|
||||
// FieldByName('P_Spec').Value:=Trim(Order_Main10.fieldbyname('MprtSpec').AsString);
|
||||
// FieldByName('P_color').Value:=Trim(Order_Main10.fieldbyname('PRTColor').AsString);
|
||||
// FieldByName('status').Value:='0';
|
||||
// Post;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// YFID:=Trim(ADOQueryTemp.fieldbyname('YFID').AsString);
|
||||
// end;
|
||||
// IF uppercase(OrderUnit)='KG' then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(B.MJQty4),0) from CK_BanCP_CR A,WFB_MJJY B where A.MJID=B.MJID and A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='Y') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='M') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)/0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// IF (uppercase(OrderUnit)='M') and (uppercase(Trim(Order_Main10.fieldbyname('QtyUnit').AsString))='Y') then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select cast(isnull(Sum(A.Qty),0)*0.9144 as decimal(18,1)) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('update YF_Money_CR Set Qty=(select isnull(Sum(A.Qty),0) from CK_BanCP_CR A where A.MainID=YF_Money_CR.MainID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(',PS=(select isnull(count(A.mainID),0) from CK_BanCP_CR A where A.maiNID=YF_Money_CR.maiNID and A.subID=YF_Money_CR.subID and A.CRtime=YF_Money_CR.CRTime and A.CRType=''销售出库'') ');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('Update YF_Money_CR Set Money=Price*Qty,BBMoney=Price*Qty*HuiLv');
|
||||
// sql.Add(' where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('select * from YF_Money_CR where YFId='''+Trim(YFID)+'''');
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.FieldByName('Qty').Value=0 then
|
||||
// begin
|
||||
// with ADOQueryCmd do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add('delete from YF_Money_CR where YFID='''+Trim(YFID)+'''');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
// //Next;
|
||||
// end;
|
||||
// end;
|
||||
// Result:=True;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSQSMCKXH := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.FormShow(Sender: TObject);
|
||||
begin
|
||||
BaoID.SetFocus;
|
||||
ReadCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
CRTime.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.TMPanDuan();
|
||||
begin
|
||||
//判断扫描的是发货申请单,还是布匹条码 ,判断是否已经扫描过发货单 ,或者更改了发货单
|
||||
JXFlag := '';
|
||||
|
||||
if Copy(FSMStr, 1, 2) = 'SM' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main A inner join FHSQ_Sub B on A.FSID=B.FSID where SQType=''现货'' and a.status<>''已取消'' and A.FSID=''' + Trim(FSMStr) + '''');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\申请单不存在暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_Main');
|
||||
sql.Add('where FSID=' + quotedstr(trim(FSMStr)));
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已对账暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
if Trim(CKOrdNo.Text) <> '' then
|
||||
begin
|
||||
FCKOrdNo := Trim(CKOrdNo.Text);
|
||||
end;
|
||||
CKOrdNo.Text := Trim(FSMStr);
|
||||
if FSMStr <> FCKOrdNo then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select B.*');
|
||||
sql.Add(' from CK_BanCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY B on A.MJID=B.MJID');
|
||||
sql.Add(' where A.CKOrdNO=''' + Trim(CKOrdNo.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MainSel);
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := floatToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
end;
|
||||
BaoID.Text := '';
|
||||
JXFlag := '888';
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Trim(CKOrdNo.Text) = '' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未扫描申请单暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from FHSQ_SUB A ');
|
||||
// sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add('WHERE A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add('and A.FSID=' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
|
||||
Open;
|
||||
end;
|
||||
if ADOQuery1.IsEmpty then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.APID from WFB_MJJY A ');
|
||||
sql.Add('where A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未检验暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
JXFlag := '999';
|
||||
Application.MessageBox('请检查指示单是否正确!', '提示', 0);
|
||||
PlaySound('wav\条码错误暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end
|
||||
else if ADOQuery1.fieldbyname('sfkp').AsString = '是' then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
Application.MessageBox('请先开匹!', '提示', 0);
|
||||
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
sql.Add('select A.CKOrdNo from CK_BanCP_CR A ');
|
||||
sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add(' and A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and A.CRFlag=''出库'' ');
|
||||
sql.Add('and a.Cycle=(select max(e.Cycle) from CK_BanCP_CR e where e.mjid=a.mjid)');
|
||||
// ShowMessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
if not ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
if Trim(ADOQueryTemp.fieldbyname('CKOrdNo').AsString) = Trim(CKOrdNo.Text) then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已扫描.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\已出库暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.CKOrdNo from CK_BanCP_CR A ');
|
||||
sql.Add('where exists (select Y.SubId from FHSQ_Sub Y where Y.SubId=A.SubId and Y.FSId=' + quotedstr(Trim(CKOrdNo.Text)) + ')');
|
||||
sql.Add(' and A.MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and A.CRFlag=''入库'' ');
|
||||
Open;
|
||||
end;
|
||||
if ADOQueryTemp.IsEmpty then
|
||||
begin
|
||||
JXFlag := '999';
|
||||
PlaySound('wav\未入库暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.BaoIDKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
maxno, SMFlag, KYCKFlag, FMainId, ff: string;
|
||||
FFQty: Integer;
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
FSMStr := Trim(BaoID.Text);
|
||||
|
||||
if edtIsSMTH.Text = '' then
|
||||
begin
|
||||
|
||||
TMPanDuan();
|
||||
if Trim(JXFlag) = '999' then
|
||||
begin
|
||||
BaoID.Text := '';
|
||||
fcuowu := '错误';
|
||||
Exit;
|
||||
end;
|
||||
if Trim(JXFlag) = '888' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.* ,KHName=CustomerNoName,CKPSQty=(SELECT SUM(ISNULL(SQPS,0))FROM FHSQ_SUB B WHERE B.FSID=A.FSID ) ');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where FSId=''' + Trim(CKOrdNo.Text) + ''' ');
|
||||
Open;
|
||||
end;
|
||||
|
||||
SCSHDataNew(ADOQueryTemp, Panel2, 2);
|
||||
InitCKGrid();
|
||||
|
||||
Exit;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.*,B.CRID ,C.PRTColor ');
|
||||
sql.Add(' from WFB_MJJY A');
|
||||
sql.Add(' inner join CK_BanCP_CR B on A.MJID=B.MJID and B.CRFlag=''入库'' ');
|
||||
SQL.Add(' LEFT join JYOrder_Sub C ON A.SUBID=C.SubId');
|
||||
sql.Add(' where A. MJID=''' + Trim(BaoID.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_Main);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_Main);
|
||||
try
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' exec P_CPCK_Up_CK ');
|
||||
sql.add(' @CKOrdNo=' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
sql.add(',@Dname=' + quotedstr(DName));
|
||||
sql.Add(',@MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add(',@CRTYPE=' + quotedstr(Trim(CRTYPE.Text)));
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
FMainId := Trim(CDS_Main.fieldbyname('MainID').AsString);
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Do_FHSQ ''' + Trim(CKOrdNo.Text) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
//
|
||||
// sql.Add(' select * from FHSQ_Sub A where isnull(SQQty,0)*(1+0.01*isnull(fdfw,0))<isnull(FHQty,0) ');
|
||||
//
|
||||
// sql.Add(' and A.FSID=' + quotedstr(Trim(FSMStr)));
|
||||
//
|
||||
// Open;
|
||||
// end;
|
||||
// if ADOQueryTemp.IsEmpty = False then
|
||||
// begin
|
||||
// BaoID.Text := '';
|
||||
// PlaySound('wav\超出发货上限暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
// ADOQueryCmd.Connection.RollbackTrans;
|
||||
//
|
||||
// Exit;
|
||||
// end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
with CDS_MainSel do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('Mainid').Value := Self.CDS_Main.fieldbyname('Mainid').Value;
|
||||
FieldByName('SubID').Value := Self.CDS_Main.fieldbyname('SubID').Value;
|
||||
FieldByName('MJMaoZ').Value := Self.CDS_Main.fieldbyname('MJMaoZ').Value;
|
||||
FieldByName('MJId').Value := Self.CDS_Main.fieldbyname('MJId').Value;
|
||||
FieldByName('MJXH').Value := Self.CDS_Main.fieldbyname('MJXH').Value;
|
||||
FieldByName('mjstr4').Value := Self.CDS_Main.fieldbyname('mjstr4').Value;
|
||||
FieldByName('prtcolor').Value := Self.CDS_Main.fieldbyname('prtcolor').Value;
|
||||
FieldByName('mjlen').Value := Self.CDS_Main.fieldbyname('mjlen').Value;
|
||||
// FieldByName('CarNo').Value := Self.CDS_Main.fieldbyname('CarNo').Value;
|
||||
// FieldByName('APBatchNo').Value := Self.CDS_Main.fieldbyname('APBatchNo').Value;
|
||||
Post;
|
||||
end;
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := floatToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\正确.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
|
||||
except
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\数据保存失败暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox('出库异常!', '提示', 0);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if not CDS_MainSel.Locate('MJID', FSMStr, []) then
|
||||
Exit;
|
||||
try
|
||||
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPDATE CK_BanCP_CR Set ');
|
||||
sql.add(' CRTime=null,CRType=null,CRFlag=''待出库'' ');
|
||||
sql.add(',CKOrdNo=''''');
|
||||
sql.add(',filler=''''');
|
||||
sql.Add(' where ISNowCycle=1 and MJID=' + quotedstr(Trim(FSMStr)));
|
||||
sql.Add('and CK_BanCP_CR.CRFlag=''出库'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
//更新出入库状态
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPDATE WFB_MJJY Set MJStr2=''已入库'' ');
|
||||
sql.Add(' where MJID=' + quotedstr(Trim(FSMStr)));
|
||||
SQL.Add(' and WFB_MJJY.MJStr2=''已出库'' ');
|
||||
sql.Add(' UPdate CK_BanCP_KC Set KCValid=''Y'' ');
|
||||
sql.Add(' where CK_BanCP_KC.MJID=' + Quotedstr(Trim(FSMStr)));
|
||||
sql.Add(' and KCValid=''N'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||
sql.Add(' ' + quotedstr(trim(DName)));
|
||||
sql.Add(',getdate() ');
|
||||
sql.Add(',' + quotedstr(''));
|
||||
sql.Add(',' + quotedstr(trim('出库扫描撤销')));
|
||||
sql.Add(',' + quotedstr('卷条码:' + trim(FSMStr) + ' 出库单号:' + trim(CKOrdNo.Text)));
|
||||
sql.Add(',' + quotedstr(trim('成功')));
|
||||
sql.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Do_FHSQ ''' + Trim(CKOrdNo.Text) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := floatToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox('撤销出库失败!', '提示信息', 0);
|
||||
end;
|
||||
CDS_MainSel.Locate('MJID', FSMStr, []);
|
||||
CDS_MainSel.Delete;
|
||||
BaoID.Text := '';
|
||||
PlaySound('wav\正确.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
end;
|
||||
end;
|
||||
|
||||
//判断发货匹数 CDS_MainSel
|
||||
if CDS_MainSel.IsEmpty = False then
|
||||
Edit1.Text := IntToStr(Tv3.DataController.Summary.FooterSummaryValues[2])
|
||||
else
|
||||
Edit1.Text := '0';
|
||||
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select COUNT(*) fhjs from CK_BanCP_CR where CKOrdNo= ''' + Trim(CKOrdNo.Text) + '''');
|
||||
// Open;
|
||||
// end;
|
||||
// ff := Format('%.2f', [StrToFloat(Edit1.Text)]);
|
||||
// with ADOQueryTemp do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' select sum(KGQTY) FMJMaoZ from CK_BanCP_CR where CKOrdNo= ''' + Trim(CKOrdNo.Text) + '''');
|
||||
// Open;
|
||||
// end;
|
||||
// if StrToFloat(Edit1.Text) <> ADOQueryTemp.FieldByName('FMJMaoZ').AsFloat then //asfloat
|
||||
// if Tv3.DataController.Summary.FooterSummaryValues[3] <> ADOQueryTemp.FieldByName('FMJMaoZ').AsFloat then
|
||||
// begin
|
||||
// PlaySound('wav\数据保存失败暂停发货.wav', 0, SND_FILENAME or SND_ASYNC);
|
||||
// Application.MessageBox('出库异常,请重新选择申请单!', '提示', 0);
|
||||
// end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('扫描出库', Tv3, '坯布仓库');
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.Button1Click(Sender: TObject);
|
||||
var
|
||||
MKey: Char;
|
||||
begin
|
||||
MKey := #13;
|
||||
try
|
||||
frmXHFHSQListSel := TfrmXHFHSQListSel.Create(self);
|
||||
with frmXHFHSQListSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
BaoID.Text := Trim(Order_Main.fieldbyname('FSID').AsString);
|
||||
BaoIDKeyPress(BaoID, MKey);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmXHFHSQListSel.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.Button3Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile: string;
|
||||
begin
|
||||
if Trim(CKOrdNo.Text) = '' then
|
||||
EXIT;
|
||||
ExportFtErpFile(trim(ComboBox1.Text) + '.rmf', ADOQueryTemp);
|
||||
if ComboBox1.Text = '公斤码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_RKMDGangNo2 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
|
||||
if trim(ComboBox1.Text) = '换算码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_RKMDGangNo2 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
if ComboBox1.Text = '公斤与换算码单' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_RKMDGangNo5 ' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_JuanPRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_JuanPRT);
|
||||
end;
|
||||
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ComboBox1.Text) + '.rmf';
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
// RMVariables['OrdNo'] := Trim(CDS_Main.fieldbyname('OrdNo').AsString);
|
||||
RM1.DefaultCopies := 2;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.edtIsSMTHClick(Sender: TObject);
|
||||
begin
|
||||
if Trim(edtIsSMTH.Text) = '' then
|
||||
edtIsSMTH.Text := '√'
|
||||
else
|
||||
edtIsSMTH.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.btn1Click(Sender: TObject);
|
||||
var
|
||||
MKey: Char;
|
||||
begin
|
||||
MKey := #13;
|
||||
CZZT := '选择库存';
|
||||
fcuowu := '1';
|
||||
try
|
||||
frmCKProductBCPKCListSel := TfrmCKProductBCPKCListSel.Create(Application);
|
||||
with frmCKProductBCPKCListSel do
|
||||
begin
|
||||
FSID.Text := Trim(CKOrdNo.Text);
|
||||
// CustomerNoName.text := trim(Self.KHName.text);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
with frmCKProductBCPKCListSel.CDS_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Fieldbyname('ssel').AsBoolean then
|
||||
begin
|
||||
BaoID.Text := Trim(Fieldbyname('MJID').AsString);
|
||||
BaoIDKeyPress(BaoID, MKey);
|
||||
if fcuowu = '错误' then
|
||||
begin
|
||||
Break;
|
||||
end;
|
||||
Sleep(200);
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmCKProductBCPKCListSel.Free;
|
||||
end;
|
||||
InitCKGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmSQSMCKXH.InitCKGrid();
|
||||
begin
|
||||
if CKOrdNo.Text <> '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select A.MAINID,A.SUBID,B.MJLEN, B.MJMaoZ,B.MJStr4,B.MJXH,B.MJID,C.PRTColor');
|
||||
sql.Add(' from CK_BanCP_CR A');
|
||||
sql.Add(' inner join WFB_MJJY B on A.MJID=B.MJID');
|
||||
SQL.Add(' inner join JYOrder_Sub C ON B.SUBID=C.SubId');
|
||||
sql.Add(' where A.CKOrdNO=''' + Trim(CKOrdNo.Text) + '''');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MainSel);
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('SELECT b.*,A.ConNo FROM FHSQ_Sub B');
|
||||
sql.Add('inner join FHSQ_Main A ON A.FSId=B.FSId ');
|
||||
sql.Add('WHERE B.FSId=''' + Trim(CKOrdNo.Text) + '''');
|
||||
|
||||
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, DS1);
|
||||
SInitCDSData20(ADOQueryTemp, DS1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1230
发货申请(ShipmentRequest.dll)/U_SXKCCK.dfm
Normal file
1230
发货申请(ShipmentRequest.dll)/U_SXKCCK.dfm
Normal file
File diff suppressed because it is too large
Load Diff
810
发货申请(ShipmentRequest.dll)/U_SXKCCK.pas
Normal file
810
发货申请(ShipmentRequest.dll)/U_SXKCCK.pas
Normal file
|
|
@ -0,0 +1,810 @@
|
|||
unit U_SXKCCK;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||
cxEdit, DB, cxDBData, StdCtrls, ExtCtrls, ADODB, DBClient,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxGridCustomTableView,
|
||||
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
|
||||
cxGrid, MovePanel, cxCheckBox, Menus, ComCtrls, BtnEdit, ShellAPI, cxTextEdit,
|
||||
RM_Common, RM_Class, RM_GridReport, RM_System, RM_Dataset, RM_e_Xls,
|
||||
cxCalendar, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
|
||||
|
||||
type
|
||||
TfrmSXKCCK = class(TForm)
|
||||
ADOQueryTemp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
DS_MainSel: TDataSource;
|
||||
cxGridPopupMenu4: TcxGridPopupMenu;
|
||||
cxStyleRepository1: TcxStyleRepository;
|
||||
cxStyle1: TcxStyle;
|
||||
CDS_YanSe: TClientDataSet;
|
||||
RMXLSExport1: TRMXLSExport;
|
||||
RMDBMX: TRMDBDataSet;
|
||||
RM1: TRMGridReport;
|
||||
DS_YanSe: TDataSource;
|
||||
Panel1: TPanel;
|
||||
Panel3: TPanel;
|
||||
Label5: TLabel;
|
||||
CKOrdNo: TEdit;
|
||||
cxGrid5: TcxGrid;
|
||||
TV5: TcxGridDBTableView;
|
||||
v1Column12: TcxGridDBColumn;
|
||||
v1Column14: TcxGridDBColumn;
|
||||
v1Column1: TcxGridDBColumn;
|
||||
v2Column1: TcxGridDBColumn;
|
||||
v2Column3: TcxGridDBColumn;
|
||||
v1Column8: TcxGridDBColumn;
|
||||
v1Column9: TcxGridDBColumn;
|
||||
v1Column6: TcxGridDBColumn;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
v1Column2: TcxGridDBColumn;
|
||||
v1Column4: TcxGridDBColumn;
|
||||
v1Column3: TcxGridDBColumn;
|
||||
v1Column18: TcxGridDBColumn;
|
||||
v2Column6: TcxGridDBColumn;
|
||||
v1Column7: TcxGridDBColumn;
|
||||
v1Column5: TcxGridDBColumn;
|
||||
v1Column16: TcxGridDBColumn;
|
||||
cxGrid5Level1: TcxGridLevel;
|
||||
Button2: TButton;
|
||||
Button1: TButton;
|
||||
Panel2: TPanel;
|
||||
Button3: TButton;
|
||||
Button4: TButton;
|
||||
cxGrid1: TcxGrid;
|
||||
TV1: TcxGridDBTableView;
|
||||
cxGridLevel2: TcxGridLevel;
|
||||
Panel4: TPanel;
|
||||
V1Column15: TcxGridDBColumn;
|
||||
V1Column17: TcxGridDBColumn;
|
||||
V1Column19: TcxGridDBColumn;
|
||||
V1Column20: TcxGridDBColumn;
|
||||
V1Column21: TcxGridDBColumn;
|
||||
V1Column22: TcxGridDBColumn;
|
||||
V1Column23: TcxGridDBColumn;
|
||||
cxGrid2: TcxGrid;
|
||||
TV2: TcxGridDBTableView;
|
||||
cxGridDBColumn1: TcxGridDBColumn;
|
||||
cxGridDBColumn2: TcxGridDBColumn;
|
||||
cxGridDBColumn3: TcxGridDBColumn;
|
||||
cxGridDBColumn4: TcxGridDBColumn;
|
||||
cxGridDBColumn5: TcxGridDBColumn;
|
||||
cxGridDBColumn6: TcxGridDBColumn;
|
||||
cxGridDBColumn7: TcxGridDBColumn;
|
||||
cxGridLevel1: TcxGridLevel;
|
||||
cxGrid3: TcxGrid;
|
||||
TV3: TcxGridDBTableView;
|
||||
cxGridDBColumn8: TcxGridDBColumn;
|
||||
cxGridDBColumn11: TcxGridDBColumn;
|
||||
cxGridDBColumn12: TcxGridDBColumn;
|
||||
cxGridDBColumn13: TcxGridDBColumn;
|
||||
cxGridDBColumn14: TcxGridDBColumn;
|
||||
cxGridLevel3: TcxGridLevel;
|
||||
Panel6: TPanel;
|
||||
Panel5: TPanel;
|
||||
Panel7: TPanel;
|
||||
Button5: TButton;
|
||||
Panel8: TPanel;
|
||||
LabHZ: TLabel;
|
||||
CDS_MainSel: TClientDataSet;
|
||||
CDS_GangHao: TClientDataSet;
|
||||
CDS_TuoTuan: TClientDataSet;
|
||||
DS_GangHao: TDataSource;
|
||||
DS_TuoTuan: TDataSource;
|
||||
V1Column10: TcxGridDBColumn;
|
||||
V2Column2: TcxGridDBColumn;
|
||||
V3Column1: TcxGridDBColumn;
|
||||
V3Column2: TcxGridDBColumn;
|
||||
V2Column4: TcxGridDBColumn;
|
||||
V2Column7: TcxGridDBColumn;
|
||||
V1Column11: TcxGridDBColumn;
|
||||
V2Column8: TcxGridDBColumn;
|
||||
V3Column3: TcxGridDBColumn;
|
||||
CDS_YanSeSel: TClientDataSet;
|
||||
CDS_GangHaoSel: TClientDataSet;
|
||||
CDS_TuoTuanSel: TClientDataSet;
|
||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||
cxGridPopupMenu3: TcxGridPopupMenu;
|
||||
cxGrid4: TcxGrid;
|
||||
Tv7: TcxGridDBTableView;
|
||||
cv2Column10: TcxGridDBColumn;
|
||||
cxGridDBColumn9: TcxGridDBColumn;
|
||||
cv2Column4: TcxGridDBColumn;
|
||||
cv2Column12: TcxGridDBColumn;
|
||||
cxGridDBColumn10: TcxGridDBColumn;
|
||||
cv2Column6: TcxGridDBColumn;
|
||||
cxGridDBColumn15: TcxGridDBColumn;
|
||||
cxGridDBColumn16: TcxGridDBColumn;
|
||||
cxGridLevel4: TcxGridLevel;
|
||||
btnCX: TButton;
|
||||
cxGrid6: TcxGrid;
|
||||
Tv6: TcxGridDBTableView;
|
||||
cxGridDBColumn19: TcxGridDBColumn;
|
||||
v1CustomerNoName: TcxGridDBColumn;
|
||||
cxGridDBColumn20: TcxGridDBColumn;
|
||||
v1OrdDate: TcxGridDBColumn;
|
||||
v1Column26: TcxGridDBColumn;
|
||||
cxGridDBColumn21: TcxGridDBColumn;
|
||||
cxGridDBColumn24: TcxGridDBColumn;
|
||||
cxGridDBColumn25: TcxGridDBColumn;
|
||||
cxGridDBColumn26: TcxGridDBColumn;
|
||||
v1Column27: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
DataSource6: TDataSource;
|
||||
ClientDataSet6: TClientDataSet;
|
||||
ClientDataSet7: TClientDataSet;
|
||||
DataSource7: TDataSource;
|
||||
cxStyleRepository2: TcxStyleRepository;
|
||||
cxStyle2: TcxStyle;
|
||||
CRTime: TDateTimePicker;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure btnCXClick(Sender: TObject);
|
||||
procedure Button5Click(Sender: TObject);
|
||||
procedure V1Column10PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V2Column2PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure V3Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure v1Column12PropertiesEditValueChanged(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
fsjYS, fsjGH, fsjTP: string;
|
||||
XZPS: Integer;
|
||||
XZMS, XZKg, XZYS: Double;
|
||||
procedure InitKC();
|
||||
procedure initMXKC();
|
||||
procedure initHZData();
|
||||
procedure initLab();
|
||||
procedure FHSQ();
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmSXKCCK: TfrmSXKCCK;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_Fun, U_RTFun, MMSystem, U_FHSQListSel, U_CKProductBCPKCListSel;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSXKCCK.InitKC();
|
||||
var
|
||||
fwhere, Pwhere: string;
|
||||
begin
|
||||
|
||||
Pwhere := SGetFilters(Panel1, 1, 2);
|
||||
if trim(Pwhere) <> '' then
|
||||
fwhere := fwhere + ' where ' + trim(Pwhere);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' Select AA.* ');
|
||||
sql.Add(' ,B.OrderNo,B.MPRTCode,B.MPRTCodeName,B.MPRTMF,B.MPRTKZ ');
|
||||
sql.Add(' ,C.PRTColor,C.PRTEColor,C.PRTHX,C.PrtKuanNo,C.PRTColorNo ');
|
||||
sql.Add(' from(select A.MainId,A.Subid,QtyY=sum(Cast(A.Qty*1.0936 as decimal(18,1))),QtyM=sum(Qty),QtyKg=Sum(KgQty),PS=Count(*) ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
sql.Add(' Group by A.MainId,A.Subid) AA ');
|
||||
sql.Add(' inner join JYOrder_Main B on AA.MainId=B.MainId ');
|
||||
sql.Add(' inner join JYOrder_Sub C on AA.SubId=C.SubId ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_YanSe);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_YanSe);
|
||||
// SelOKNo(CDS_YanSe, True);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' Select AA.* ');
|
||||
sql.Add(' ,B.OrderNo,B.MPRTCode,B.MPRTCodeName,B.MPRTMF,B.MPRTKZ ');
|
||||
sql.Add(' ,C.PRTColor,C.PRTEColor,C.PRTHX,C.PrtKuanNo,C.PRTColorNo ');
|
||||
sql.Add(' from(select A.MainId,A.Subid,A.APID,A.GangHao,QtyY=sum(Cast(A.Qty*1.0936 as decimal(18,1))),QtyM=sum(Qty),QtyKg=Sum(KgQty),PS=Count(*) ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
sql.Add(' Group by A.MainId,A.Subid,A.APID,A.GangHao) AA ');
|
||||
sql.Add(' inner join JYOrder_Main B on AA.MainId=B.MainId ');
|
||||
sql.Add(' inner join JYOrder_Sub C on AA.SubId=C.SubId ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_GangHao);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_GangHao);
|
||||
// SelOKNo(CDS_GangHao, True);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' Select AA.* ');
|
||||
sql.Add(' ,B.OrderNo,B.MPRTCode,B.MPRTCodeName,B.MPRTMF,B.MPRTKZ ');
|
||||
sql.Add(' from(select A.MainId,A.RKOrdID,QtyY=sum(Cast(A.Qty*1.0936 as decimal(18,1))),QtyM=sum(Qty),QtyKg=Sum(KgQty),PS=Count(*) ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
sql.Add(' Group by A.MainId,A.RKOrdID) AA ');
|
||||
sql.Add(' inner join JYOrder_Main B on AA.MainId=B.MainId ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_TuoTuan);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_TuoTuan);
|
||||
// SelOKNo(CDS_TuoTuan, True);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
||||
sql.Add(' select A.*,QtyY=Cast(A.Qty*1.0936 as decimal(18,1)) ');
|
||||
sql.Add(' ,B.OrderNo,B.MPRTCode,B.MPRTCodeName,B.MPRTMF,B.MPRTKZ ');
|
||||
sql.Add(' ,C.PRTColor,C.PRTEColor,C.PRTHX,C.PrtKuanNo ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' inner join JYOrder_Main B on A.MainId=B.MainId ');
|
||||
sql.Add(' inner join JYOrder_Sub C on A.SubId=C.SubId ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MainSel);
|
||||
// SelOKNo(CDS_MainSel, True);
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.initMXKC();
|
||||
var
|
||||
fsj: string;
|
||||
begin
|
||||
fsj := '';
|
||||
with CDS_YanSeSel do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(fsj) = '' then
|
||||
begin
|
||||
fsj := fsj + '''' + Trim(fieldbyname('SubId').AsString) + '''';
|
||||
end
|
||||
else
|
||||
fsj := fsj + ',' + '''' + Trim(fieldbyname('SubId').AsString) + '''';
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
fsjYS := fsj;
|
||||
|
||||
fsj := '';
|
||||
with CDS_GangHaoSel do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(fsj) = '' then
|
||||
begin
|
||||
fsj := fsj + '''' + Trim(fieldbyname('APId').AsString) + '''';
|
||||
end
|
||||
else
|
||||
fsj := fsj + ',' + '''' + Trim(fieldbyname('APId').AsString) + '''';
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
fsjGH := fsj;
|
||||
|
||||
fsj := '';
|
||||
with CDS_TuoTuanSel do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(fsj) = '' then
|
||||
begin
|
||||
fsj := fsj + '''' + Trim(fieldbyname('RKOrdID').AsString) + '''';
|
||||
end
|
||||
else
|
||||
fsj := fsj + ',' + '''' + Trim(fieldbyname('RKOrdID').AsString) + '''';
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
fsjTP := fsj;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.*,QtyY=Cast(A.Qty*1.0936 as decimal(18,1)) ');
|
||||
sql.Add(' ,B.OrderNo,B.MPRTCode,B.MPRTCodeName,B.MPRTMF,B.MPRTKZ ');
|
||||
sql.Add(' ,C.PRTColor,C.PRTEColor,C.PRTHX,C.PrtKuanNo ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' inner join JYOrder_Main B on A.MainId=B.MainId ');
|
||||
sql.Add(' inner join JYOrder_Sub C on A.SubId=C.SubId ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
if Trim(fsjYS) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.Subid in(' + Trim(fsjYS) + ')');
|
||||
end;
|
||||
if Trim(fsjGH) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.APid in(' + Trim(fsjGH) + ')');
|
||||
end;
|
||||
if Trim(fsjTP) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.RKOrdID in(' + Trim(fsjTP) + ')');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_MainSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_MainSel);
|
||||
SelOKNo(CDS_MainSel, True);
|
||||
initHZData();
|
||||
initLab();
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.initHZData();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select PS=count(*),QtyY=sum(MJYLen),QtyKg=sum(KgQty),QtyM=sum(Qty) ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
if Trim(fsjYS) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.Subid in(' + Trim(fsjYS) + ')');
|
||||
end;
|
||||
if Trim(fsjGH) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.APid in(' + Trim(fsjGH) + ')');
|
||||
end;
|
||||
if Trim(fsjTP) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.RKOrdID in(' + Trim(fsjTP) + ')');
|
||||
end;
|
||||
Open;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('PS').AsString) <> '' then
|
||||
begin
|
||||
XZPS := ADOQueryTemp.fieldbyname('PS').Value;
|
||||
end
|
||||
else
|
||||
begin
|
||||
XZPS := 0;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('QtyM').AsString) <> '' then
|
||||
begin
|
||||
XZMS := ADOQueryTemp.fieldbyname('QtyM').Value;
|
||||
end
|
||||
else
|
||||
begin
|
||||
XZMS := 0;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('QtyKg').AsString) <> '' then
|
||||
begin
|
||||
XZKg := ADOQueryTemp.fieldbyname('QtyKg').Value;
|
||||
end
|
||||
else
|
||||
begin
|
||||
XZKg := 0;
|
||||
end;
|
||||
if Trim(ADOQueryTemp.fieldbyname('QtyY').AsString) <> '' then
|
||||
begin
|
||||
XZYS := ADOQueryTemp.fieldbyname('QtyY').Value;
|
||||
end
|
||||
else
|
||||
begin
|
||||
XZYS := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.initLab();
|
||||
begin
|
||||
LabHZ.Caption := '选中:' + inttostr(XZPS) + '匹,' + ' ' + FloatToStr(XZMS) + '米,' + ' ' + FloatToStr(XZYS) + '码,' + ' ' + FloatToStr(XZKg) + '公斤';
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmSXKCCK := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.FormShow(Sender: TObject);
|
||||
begin
|
||||
CRTime.DateTime := SGetServerDate(ADOQueryTemp);
|
||||
ReadCxGrid('扫描出库1', Tv1, '成品仓库');
|
||||
ReadCxGrid('扫描出库2', Tv2, '成品仓库');
|
||||
ReadCxGrid('扫描出库3', Tv3, '成品仓库');
|
||||
ReadCxGrid('扫描出库5', Tv5, '成品仓库');
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid('扫描出库1', Tv1, '成品仓库');
|
||||
WriteCxGrid('扫描出库2', Tv2, '成品仓库');
|
||||
WriteCxGrid('扫描出库3', Tv3, '成品仓库');
|
||||
WriteCxGrid('扫描出库5', Tv5, '成品仓库');
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.Button1Click(Sender: TObject);
|
||||
var
|
||||
MKey: Char;
|
||||
begin
|
||||
|
||||
try
|
||||
frmFHSQListSel := TfrmFHSQListSel.Create(self);
|
||||
with frmFHSQListSel do
|
||||
begin
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
self.CKOrdNo.Text := Trim(Order_Main.fieldbyname('FSID').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmFHSQListSel.Free;
|
||||
end;
|
||||
fsjYS := '';
|
||||
fsjGH := '';
|
||||
fsjTP := '';
|
||||
btnCX.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.btnCXClick(Sender: TObject);
|
||||
begin
|
||||
if Trim(CKOrdNo.Text) = '' then
|
||||
Exit;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select SubId from FHSQ_Sub where FSId=' + QUOTEDSTR(CKOrdNo.Text));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_YanSeSel);
|
||||
// SInitCDSData20(ADOQueryTemp, CDS_YanSeSel);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select APId from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
sql.Add(' Group by APID ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_GangHaoSel);
|
||||
// SInitCDSData20(ADOQueryTemp, CDS_GangHaoSel);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.RKOrdID ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and A.CPType=''正品'' and D.KCValid=''Y'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
sql.Add(' Group by A.RKOrdID ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_TuoTuanSel);
|
||||
// SInitCDSData20(ADOQueryTemp, CDS_TuoTuanSel);
|
||||
FHSQ();
|
||||
InitKC();
|
||||
initHZData();
|
||||
initLab();
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.FHSQ();
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.*,isnull(status,''未完成'')status2 ');
|
||||
Sql.Add(' ,HZSCConNo=CAST((select distinct(SCConNo) + '' '' from FHSQ_Sub X where A.FSID=X.FSID for xml path('''') ) AS VARCHAR(100))');
|
||||
sql.Add(' from FHSQ_Main A');
|
||||
sql.Add(' where FSID=''' + Trim(CKOrdNo.Text) + ''' and SQType=''订单'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet6);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet6);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
Sql.Add(' select A.* ');
|
||||
sql.Add(' from FHSQ_Sub A');
|
||||
sql.Add(' where FSID=''' + Trim(CKOrdNo.Text) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet7);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet7);
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.Button5Click(Sender: TObject);
|
||||
var
|
||||
SqlMJID: string;
|
||||
begin
|
||||
CDS_MainSel.DisableControls;
|
||||
with CDS_MainSel do
|
||||
begin
|
||||
First;
|
||||
SqlMJID := '';
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_MainSel.FieldByName('SSel').AsBoolean then
|
||||
begin
|
||||
if Trim(SqlMJID) = '' then
|
||||
SqlMJID := QuotedStr(Trim(CDS_MainSel.fieldbyname('MJID').AsString))
|
||||
else
|
||||
SqlMJID := SqlMJID + ',' + QuotedStr(Trim(CDS_MainSel.fieldbyname('MJID').AsString));
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
SqlMJID := 'MJID IN (' + SqlMJID + ')'
|
||||
end;
|
||||
CDS_MainSel.EnableControls;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPDATE CK_BanCP_CR Set ');
|
||||
sql.add(' CRTime=' + Quotedstr(Trim(FormatDateTime('yyyy-MM-dd', CRTime.Date))) + ',CRType=''扫描出库'',CRFlag=''出库'' ');
|
||||
sql.add(',CKOrdNo=' + quotedstr(Trim(CKOrdNo.Text)));
|
||||
sql.add(',filler=' + quotedstr(DName));
|
||||
sql.Add(' where ' + SqlMJID);
|
||||
sql.Add('and CK_BanCP_CR.CRFlag=''待出库'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
//更新kcvalid状态
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPDATE CK_BanCP_KC Set ');
|
||||
sql.add(' KCValid=''N'' ');
|
||||
sql.Add(' where ' + SqlMJID);
|
||||
ExecSQL;
|
||||
end;
|
||||
//更新出入库状态
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('UPDATE WFB_MJJY Set MJStr2=''已出库'' ');
|
||||
sql.Add(' where ' + SqlMJID);
|
||||
SQL.Add(' and WFB_MJJY.MJStr2=''已入库'' ');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('exec P_Do_FHSQ ''' + Trim(CKOrdNo.Text) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
FHSQ();
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.V1Column10PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: Boolean;
|
||||
fsj: string;
|
||||
begin
|
||||
mvalue := TcxCheckBox(Sender).EditingValue;
|
||||
with CDS_YanSe do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SSel').Value := mvalue;
|
||||
end;
|
||||
if mvalue = True then
|
||||
begin
|
||||
with CDS_YanSeSel do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('SubId').Value := Trim(CDS_YanSe.fieldbyname('SubId').AsString);
|
||||
Post;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
CDS_YanSeSel.Locate('SubId', Trim(CDS_YanSe.fieldbyname('SubId').AsString), []);
|
||||
CDS_YanSeSel.Delete;
|
||||
end;
|
||||
fsj := '';
|
||||
with CDS_YanSeSel do
|
||||
begin
|
||||
First;
|
||||
while not eof do
|
||||
begin
|
||||
if Trim(fsj) = '' then
|
||||
begin
|
||||
fsj := fsj + '''' + Trim(fieldbyname('SubId').AsString) + '''';
|
||||
end
|
||||
else
|
||||
fsj := fsj + ',' + '''' + Trim(fieldbyname('SubId').AsString) + '''';
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' Select AA.* ');
|
||||
sql.Add(' ,B.OrderNo,B.MPRTCode,B.MPRTCodeName,B.MPRTMF,B.MPRTKZ ');
|
||||
sql.Add(' ,C.PRTColor,C.PRTEColor,C.PRTHX,C.PrtKuanNo,C.PRTColorNo ');
|
||||
sql.Add(' from(select A.MainId,A.Subid,A.GangHao,A.APID,QtyY=sum(Cast(A.Qty*1.0936 as decimal(18,1))),QtyM=sum(Qty),QtyKg=Sum(KgQty),PS=Count(*) ');
|
||||
sql.Add(' from CK_BanCP_CR A inner join CK_BanCP_KC D on A.MJID=D.MJID ');
|
||||
sql.Add(' where A.CRFlag=''入库'' and D.KCValid=''Y'' and A.CPType=''正品'' ');
|
||||
sql.Add(' and exists(select SubId from FHSQ_Sub X where X.SubId=A.SubId and X.FSId=' + QUOTEDSTR(CKOrdNo.Text) + ') ');
|
||||
if Trim(fsj) <> '' then
|
||||
begin
|
||||
sql.Add(' and A.Subid in(' + Trim(fsj) + ')');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add(' and 1=2');
|
||||
end;
|
||||
sql.Add(' Group by A.MainId,A.Subid,A.GangHao,A.APID) AA ');
|
||||
sql.Add(' inner join JYOrder_Main B on AA.MainId=B.MainId ');
|
||||
sql.Add(' inner join JYOrder_Sub C on AA.SubId=C.SubId ');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_GangHao);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_GangHao);
|
||||
// SelOKNo(CDS_GangHao, True);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select APId=Cast(Null as varchar(20))');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_GangHaoSel);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_GangHaoSel);
|
||||
if CDS_GangHaoSel.IsEmpty = False then
|
||||
begin
|
||||
CDS_GangHaoSel.Delete;
|
||||
end;
|
||||
CDS_GangHao.DisableControls;
|
||||
with CDS_GangHao do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if FieldByName('SSel').AsBoolean = True then
|
||||
begin
|
||||
with CDS_GangHaoSel do
|
||||
begin
|
||||
Append;
|
||||
CDS_GangHaoSel.FieldByName('APID').Value := CDS_GangHao.FieldByName('APID').Value;
|
||||
Post;
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
CDS_GangHao.EnableControls;
|
||||
initMXKC();
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.V2Column2PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: Boolean;
|
||||
begin
|
||||
mvalue := TcxCheckBox(Sender).EditingValue;
|
||||
with CDS_GangHao do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SSel').Value := mvalue;
|
||||
end;
|
||||
if mvalue = True then
|
||||
begin
|
||||
with CDS_GangHaoSel do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('APId').Value := Trim(CDS_GangHao.fieldbyname('APId').AsString);
|
||||
Post;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
CDS_GangHaoSel.Locate('APId', Trim(CDS_GangHao.fieldbyname('APId').AsString), []);
|
||||
CDS_GangHaoSel.Delete;
|
||||
end;
|
||||
initMXKC();
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.V3Column1PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: Boolean;
|
||||
begin
|
||||
mvalue := TcxCheckBox(Sender).EditingValue;
|
||||
with CDS_TuoTuan do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SSel').Value := mvalue;
|
||||
end;
|
||||
if mvalue = True then
|
||||
begin
|
||||
with CDS_TuoTuanSel do
|
||||
begin
|
||||
Append;
|
||||
FieldByName('RKOrdID').Value := Trim(CDS_TuoTuan.fieldbyname('RKOrdID').AsString);
|
||||
Post;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
CDS_TuoTuanSel.Locate('RKOrdID', Trim(CDS_TuoTuan.fieldbyname('RKOrdID').AsString), []);
|
||||
CDS_TuoTuanSel.Delete;
|
||||
end;
|
||||
initMXKC();
|
||||
end;
|
||||
|
||||
procedure TfrmSXKCCK.v1Column12PropertiesEditValueChanged(Sender: TObject);
|
||||
var
|
||||
mvalue: Boolean;
|
||||
begin
|
||||
mvalue := TcxCheckBox(Sender).EditingValue;
|
||||
with CDS_MainSel do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('SSel').Value := mvalue;
|
||||
Post;
|
||||
end;
|
||||
if mvalue = False then
|
||||
begin
|
||||
XZPS := XZPS - 1;
|
||||
XZMS := XZMS - CDS_MainSel.fieldbyname('Qty').Value;
|
||||
XZYS := XZYS - CDS_MainSel.fieldbyname('MJYLen').Value;
|
||||
XZKg := XZKg - CDS_MainSel.fieldbyname('KGQty').Value;
|
||||
end
|
||||
else
|
||||
begin
|
||||
XZPS := XZPS + 1;
|
||||
XZMS := XZMS + CDS_MainSel.fieldbyname('Qty').Value;
|
||||
XZYS := XZYS + CDS_MainSel.fieldbyname('MJYLen').Value;
|
||||
XZKg := XZKg + CDS_MainSel.fieldbyname('KGQty').Value;
|
||||
end;
|
||||
initLab();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
1294
发货申请(ShipmentRequest.dll)/U_SXKCCK220314.dfm
Normal file
1294
发货申请(ShipmentRequest.dll)/U_SXKCCK220314.dfm
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user