~
This commit is contained in:
parent
5d18573069
commit
fdae87e8bd
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
||||||
UsePackages=0
|
UsePackages=0
|
||||||
[Parameters]
|
[Parameters]
|
||||||
RunParams=
|
RunParams=
|
||||||
HostApplication=D:\徐加艳项目代码\项目代码\寅诗纺织品\打卷检验管理\testDll.exe
|
HostApplication=D:\Dp7Repo\项目代码\D7DJyinshi\打卷检验管理\testDll.exe
|
||||||
Launcher=
|
Launcher=
|
||||||
UseLauncher=0
|
UseLauncher=0
|
||||||
DebugCWD=
|
DebugCWD=
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ uses
|
||||||
classes,
|
classes,
|
||||||
forms,
|
forms,
|
||||||
WinTypes,
|
WinTypes,
|
||||||
WinProcs,
|
WinProcs,
|
||||||
U_DataLink in 'U_DataLink.pas' {DataLink_TradeManage: TDataModule},
|
U_DataLink in 'U_DataLink.pas' {DataLink_TradeManage: TDataModule},
|
||||||
U_GetDllForm in 'U_GetDllForm.pas',
|
U_GetDllForm in 'U_GetDllForm.pas',
|
||||||
U_ZDYHelpSel in '..\..\..\ThreeFun\Form\U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
U_ZDYHelpSel in '..\..\..\ThreeFun\Form\U_ZDYHelpSel.pas' {frmZDYHelpSel},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,21 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||||
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, ExtCtrls,SyncObjs;
|
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, ExtCtrls,SyncObjs,
|
||||||
|
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
|
||||||
|
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||||
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
||||||
|
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||||
|
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||||
|
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
|
||||||
type
|
type
|
||||||
TMyThread = class(TThread)
|
TMyThread = class(TThread)
|
||||||
protected
|
protected
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1384
|
Width = 1384
|
||||||
Height = 92
|
Height = 62
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 119
|
ButtonWidth = 119
|
||||||
|
|
@ -101,28 +101,27 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
Top = 0
|
Top = 0
|
||||||
Caption = #25209#37327#20462#25913#32568#21495
|
Caption = #25209#37327#20462#25913#32568#21495
|
||||||
ImageIndex = 54
|
ImageIndex = 54
|
||||||
Wrap = True
|
|
||||||
OnClick = ToolButton11Click
|
OnClick = ToolButton11Click
|
||||||
end
|
end
|
||||||
object TBDW: TToolButton
|
object TBDW: TToolButton
|
||||||
Left = 0
|
Left = 608
|
||||||
Top = 30
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20462#25913#25968#37327#21333#20301
|
Caption = #20462#25913#25968#37327#21333#20301
|
||||||
ImageIndex = 54
|
ImageIndex = 54
|
||||||
OnClick = TBDWClick
|
OnClick = TBDWClick
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
object ToolButton4: TToolButton
|
||||||
Left = 111
|
Left = 719
|
||||||
Top = 30
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25209#37327#35843#25972#31859#25968
|
Caption = #25209#37327#35843#25972#31859#25968
|
||||||
ImageIndex = 54
|
ImageIndex = 54
|
||||||
OnClick = ToolButton4Click
|
OnClick = ToolButton4Click
|
||||||
end
|
end
|
||||||
object ToolButton13: TToolButton
|
object ToolButton13: TToolButton
|
||||||
Left = 222
|
Left = 830
|
||||||
Top = 30
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25209#37327#20928#37325#36716#38271#24230
|
Caption = #25209#37327#20928#37325#36716#38271#24230
|
||||||
ImageIndex = 54
|
ImageIndex = 54
|
||||||
|
|
@ -130,15 +129,16 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
OnClick = ToolButton13Click
|
OnClick = ToolButton13Click
|
||||||
end
|
end
|
||||||
object ToolButton8: TToolButton
|
object ToolButton8: TToolButton
|
||||||
Left = 345
|
Left = 953
|
||||||
Top = 30
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25209#37327#20462#25913#30382#37325
|
Caption = #25209#37327#20462#25913#30382#37325
|
||||||
ImageIndex = 54
|
ImageIndex = 54
|
||||||
|
Wrap = True
|
||||||
OnClick = ToolButton8Click
|
OnClick = ToolButton8Click
|
||||||
end
|
end
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 456
|
Left = 0
|
||||||
Top = 30
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25171#21360#26631#31614
|
Caption = #25171#21360#26631#31614
|
||||||
|
|
@ -146,7 +146,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
OnClick = ToolButton1Click
|
OnClick = ToolButton1Click
|
||||||
end
|
end
|
||||||
object TCPDB: TToolButton
|
object TCPDB: TToolButton
|
||||||
Left = 543
|
Left = 87
|
||||||
Top = 30
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25104#21697#25171#21253
|
Caption = #25104#21697#25171#21253
|
||||||
|
|
@ -154,7 +154,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
OnClick = TCPDBClick
|
OnClick = TCPDBClick
|
||||||
end
|
end
|
||||||
object ToolButton3: TToolButton
|
object ToolButton3: TToolButton
|
||||||
Left = 630
|
Left = 174
|
||||||
Top = 30
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25171#21360#21253#26631#31614
|
Caption = #25171#21360#21253#26631#31614
|
||||||
|
|
@ -163,25 +163,24 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
OnClick = ToolButton3Click
|
OnClick = ToolButton3Click
|
||||||
end
|
end
|
||||||
object ToolButton2: TToolButton
|
object ToolButton2: TToolButton
|
||||||
Left = 729
|
Left = 273
|
||||||
Top = 30
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25171#21360#26816#39564#25253#21578
|
Caption = #25171#21360#26816#39564#25253#21578
|
||||||
ImageIndex = 12
|
ImageIndex = 12
|
||||||
Wrap = True
|
|
||||||
OnClick = ToolButton2Click
|
OnClick = ToolButton2Click
|
||||||
end
|
end
|
||||||
object ToolButton5: TToolButton
|
object ToolButton5: TToolButton
|
||||||
Left = 0
|
Left = 384
|
||||||
Top = 60
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25171#21360
|
Caption = #25171#21360
|
||||||
ImageIndex = 12
|
ImageIndex = 12
|
||||||
OnClick = ToolButton5Click
|
OnClick = ToolButton5Click
|
||||||
end
|
end
|
||||||
object Edit3: TEdit
|
object Edit3: TEdit
|
||||||
Left = 63
|
Left = 447
|
||||||
Top = 60
|
Top = 30
|
||||||
Width = 68
|
Width = 68
|
||||||
Height = 30
|
Height = 30
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -195,8 +194,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
OnKeyPress = Edit3KeyPress
|
OnKeyPress = Edit3KeyPress
|
||||||
end
|
end
|
||||||
object ComboBox1: TComboBox
|
object ComboBox1: TComboBox
|
||||||
Left = 131
|
Left = 515
|
||||||
Top = 63
|
Top = 33
|
||||||
Width = 149
|
Width = 149
|
||||||
Height = 24
|
Height = 24
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
|
|
@ -220,8 +219,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
#26816#39564#30721#21333)
|
#26816#39564#30721#21333)
|
||||||
end
|
end
|
||||||
object Edit4: TEdit
|
object Edit4: TEdit
|
||||||
Left = 280
|
Left = 664
|
||||||
Top = 60
|
Top = 30
|
||||||
Width = 121
|
Width = 121
|
||||||
Height = 30
|
Height = 30
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -234,32 +233,32 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object ToolButton12: TToolButton
|
object ToolButton12: TToolButton
|
||||||
Left = 401
|
Left = 785
|
||||||
Top = 60
|
Top = 30
|
||||||
Caption = #20462#25913#30721#21333
|
Caption = #20462#25913#30721#21333
|
||||||
ImageIndex = 54
|
ImageIndex = 54
|
||||||
Visible = False
|
Visible = False
|
||||||
OnClick = ToolButton12Click
|
OnClick = ToolButton12Click
|
||||||
end
|
end
|
||||||
object ToolButton9: TToolButton
|
object ToolButton9: TToolButton
|
||||||
Left = 520
|
Left = 904
|
||||||
Top = 60
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #24322#24120#25968#25454
|
Caption = #24322#24120#25968#25454
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
OnClick = ToolButton9Click
|
OnClick = ToolButton9Click
|
||||||
end
|
end
|
||||||
object TBExport: TToolButton
|
object TBExport: TToolButton
|
||||||
Left = 607
|
Left = 991
|
||||||
Top = 60
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #23548#20986
|
Caption = #23548#20986
|
||||||
ImageIndex = 75
|
ImageIndex = 75
|
||||||
OnClick = TBExportClick
|
OnClick = TBExportClick
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
Left = 670
|
Left = 1054
|
||||||
Top = 60
|
Top = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
ImageIndex = 55
|
ImageIndex = 55
|
||||||
|
|
@ -268,7 +267,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 92
|
Top = 62
|
||||||
Width = 1384
|
Width = 1384
|
||||||
Height = 88
|
Height = 88
|
||||||
Align = alTop
|
Align = alTop
|
||||||
|
|
@ -783,9 +782,9 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
||||||
end
|
end
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 180
|
Top = 150
|
||||||
Width = 1384
|
Width = 1384
|
||||||
Height = 538
|
Height = 568
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
unit U_JYOrderCDOne;
|
unit U_JYOrderCDOne;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
|
@ -11,20 +11,20 @@ uses
|
||||||
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
||||||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, MovePanel, cxTextEdit,
|
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, MovePanel, cxTextEdit,
|
||||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxContainer, ShellAPI,
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxContainer, ShellAPI,
|
||||||
cxCurrencyEdit, MMSystem, dxSkinsCore, dxSkinBlack, dxSkinBlue,
|
cxCurrencyEdit, MMSystem, dxSkinsCore, dxSkinBlack, dxSkinBlue,
|
||||||
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
|
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
|
||||||
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
dxSkinscxPCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmJYOrderCDOne = class(TForm)
|
TfrmJYOrderCDOne = class(TForm)
|
||||||
|
|
@ -374,7 +374,7 @@ end;
|
||||||
procedure TfrmJYOrderCDOne.TBCloseClick(Sender: TObject);
|
procedure TfrmJYOrderCDOne.TBCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
WriteCxGrid('检验报告JF', Tv1, '检验管理');
|
WriteCxGrid('检验报告JF', Tv1, '检验管理');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmJYOrderCDOne.InitGrid();
|
procedure TfrmJYOrderCDOne.InitGrid();
|
||||||
|
|
@ -389,7 +389,7 @@ begin
|
||||||
Close;
|
Close;
|
||||||
Filtered := False;
|
Filtered := False;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select A.*,');
|
sql.Add('select A.*,');
|
||||||
SQL.Add('cast(A.MJSTR4 as varchar(20)) as gangno,');
|
SQL.Add('cast(A.MJSTR4 as varchar(20)) as gangno,');
|
||||||
sql.Add('C.OrderNo,C.MPRTCodeName,C.MPRTMF,C.MPRTKZ,B.*,');
|
sql.Add('C.OrderNo,C.MPRTCodeName,C.MPRTMF,C.MPRTKZ,B.*,');
|
||||||
sql.Add('KouFenQty=(select Sum(X.KouFenQty) from WFB_MJJY_CD X where X.MJID=A.MJID),');
|
sql.Add('KouFenQty=(select Sum(X.KouFenQty) from WFB_MJJY_CD X where X.MJID=A.MJID),');
|
||||||
|
|
@ -400,7 +400,7 @@ begin
|
||||||
sql.Add('where A.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' ');
|
sql.Add('where A.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' ');
|
||||||
sql.Add('and A.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
|
sql.Add('and A.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' ');
|
||||||
if Trim(DParameters2) = '´ÎÆ·' then
|
if Trim(DParameters2) = '´ÎÆ·' then
|
||||||
begin
|
begin
|
||||||
sql.add('and mjtype=''´ÎÆ·'' ');
|
sql.add('and mjtype=''´ÎÆ·'' ');
|
||||||
end;
|
end;
|
||||||
sql.add('order by A.mainid,A.subid,gangno,A.mjxh'); //,B.prthx,B.SOrddefstr1,B.prtcolor
|
sql.add('order by A.mainid,A.subid,gangno,A.mjxh'); //,B.prthx,B.SOrddefstr1,B.prtcolor
|
||||||
|
|
@ -538,7 +538,7 @@ begin
|
||||||
TBManage.Visible := True;
|
TBManage.Visible := True;
|
||||||
v1Column22.visible := True;
|
v1Column22.visible := True;
|
||||||
v1Column15.Options.Focusing := True;
|
v1Column15.Options.Focusing := True;
|
||||||
ToolButton1.Visible := True;
|
ToolButton1.Visible := True;
|
||||||
TCPDB.Visible := True;
|
TCPDB.Visible := True;
|
||||||
ToolButton3.Visible := True;
|
ToolButton3.Visible := True;
|
||||||
end;
|
end;
|
||||||
|
|
@ -1128,71 +1128,86 @@ var
|
||||||
begin
|
begin
|
||||||
if Order_Main.IsEmpty then
|
if Order_Main.IsEmpty then
|
||||||
Exit;
|
Exit;
|
||||||
if trim(Order_Main.FieldByName('BaoID').AsString) = '' then
|
Order_Main.DisableControls;
|
||||||
|
with Order_Main do
|
||||||
begin
|
begin
|
||||||
application.MessageBox('未打包不能打印', '提示');
|
First;
|
||||||
exit;
|
while not Eof do
|
||||||
end;
|
begin
|
||||||
try
|
if Order_Main.FieldByName('SSel').AsBoolean = True then
|
||||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
begin
|
||||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
if trim(Order_Main.FieldByName('BaoID').AsString) = '' then
|
||||||
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
begin
|
||||||
Txt := Trim(Order_Main.fieldbyname('BaoID').AsString);
|
application.MessageBox('未打包不能打印', '提示');
|
||||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
exit;
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
end;
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
try
|
||||||
if FileExists(fImagePath) then
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
DeleteFile(fImagePath);
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
except
|
Txt := Trim(Order_Main.fieldbyname('BaoID').AsString);
|
||||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
Order_Main.EnableControls;
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
exit;
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
end;
|
if FileExists(fImagePath) then
|
||||||
with ADOQueryPrint do
|
DeleteFile(fImagePath);
|
||||||
begin
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
Close;
|
except
|
||||||
SQL.Clear;
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,');
|
Order_Main.EnableControls;
|
||||||
sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),');
|
exit;
|
||||||
sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), ');
|
end;
|
||||||
sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
|
with ADOQueryPrint do
|
||||||
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
|
begin
|
||||||
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),');
|
Close;
|
||||||
sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), ');
|
SQL.Clear;
|
||||||
sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), ');
|
sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,');
|
||||||
SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen');
|
sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),');
|
||||||
sql.Add('from WFB_MJJY A');
|
sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), ');
|
||||||
sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID');
|
sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
|
||||||
sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID');
|
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
|
||||||
SQL.Add(' where A.BaoID=''' + Trim(Order_Main.fieldbyname('BaoID').AsString) + '''');
|
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),');
|
||||||
SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName');
|
sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), ');
|
||||||
Open;
|
sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), ');
|
||||||
end;
|
SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen');
|
||||||
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then
|
sql.Add('from WFB_MJJY A');
|
||||||
begin
|
sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID');
|
||||||
ExportFtErpFile(Trim(ADOQueryPrint.fieldbyname('NLBName').AsString), ADOQueryCmd);
|
sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID');
|
||||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString);
|
SQL.Add(' where A.BaoID=''' + Trim(Order_Main.fieldbyname('BaoID').AsString) + '''');
|
||||||
end
|
SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName');
|
||||||
else
|
Open;
|
||||||
begin
|
end;
|
||||||
ExportFtErpFile('通用包标签.rmf', ADOQueryCmd);
|
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then
|
||||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\通用包标签.rmf';
|
begin
|
||||||
end;
|
ExportFtErpFile(Trim(ADOQueryPrint.fieldbyname('NLBName').AsString), ADOQueryCmd);
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ExportFtErpFile('通用包标签.rmf', ADOQueryCmd);
|
||||||
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\通用包标签.rmf';
|
||||||
|
end;
|
||||||
|
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
RMVariables['QRBARCODE'] := fImagePath;
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
RM2.LoadFromFile(fPrintFile);
|
RM2.LoadFromFile(fPrintFile);
|
||||||
RM2.ShowReport;
|
// RM2.ShowReport;
|
||||||
//RM2.printReport;
|
RM2.printReport;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Order_Main.EnableControls;
|
Order_Main.EnableControls;
|
||||||
Application.MessageBox(PChar('没有找' + trim(fPrintFile)), '提示', 0);
|
Application.MessageBox(PChar('没有找' + trim(fPrintFile)), '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
Order_Main.EnableControls;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmJYOrderCDOne.Button6Click(Sender: TObject);
|
procedure TfrmJYOrderCDOne.Button6Click(Sender: TObject);
|
||||||
|
|
@ -1604,7 +1619,7 @@ begin
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.add('exec P_Print_CKMDYDL_SM ');
|
sql.add('exec P_Print_CKMDYDL_SM ');
|
||||||
sql.add('@DName=' + quotedstr(Trim(DCode)));
|
sql.add('@DName=' + quotedstr(Trim(DCode)));
|
||||||
Open;
|
Open;
|
||||||
|
|
@ -1623,7 +1638,7 @@ begin
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if (trim(ComboBox1.Text) = '总码单(公斤米数)') then
|
if (trim(ComboBox1.Text) = '总码单(公斤米数)') then
|
||||||
begin
|
begin
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user