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