默认打印机选择

This commit is contained in:
ddf 2025-10-21 14:30:06 +08:00
parent 43e5c78e1d
commit cf9bd30f92
5 changed files with 50 additions and 62 deletions

View File

@ -9,15 +9,15 @@ MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $** DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $** BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
PROJECTS = testDll.exe ProductPrice.dll PROJECTS = WTOA.dll testDll.exe
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
default: $(PROJECTS) default: $(PROJECTS)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
WTOA.dll: WTOA.dpr
$(DCC)
testDll.exe: testDll.dpr testDll.exe: testDll.dpr
$(DCC) $(DCC)
ProductPrice.dll: ProductPrice.dpr
$(DCC)

View File

@ -1,6 +1,6 @@
object frmYGList: TfrmYGList object frmYGList: TfrmYGList
Left = 196 Left = 362
Top = 405 Top = 311
Width = 1405 Width = 1405
Height = 715 Height = 715
Caption = #21592#24037#26723#26696#21015#34920 Caption = #21592#24037#26723#26696#21015#34920
@ -137,16 +137,8 @@ object frmYGList: TfrmYGList
ImageIndex = 4 ImageIndex = 4
OnClick = TPrintClick OnClick = TPrintClick
end end
object ToolButton6: TToolButton
Left = 63
Top = 30
AutoSize = True
Caption = #39044#35272#25171#21360
ImageIndex = 4
OnClick = ToolButton6Click
end
object TBExport: TToolButton object TBExport: TToolButton
Left = 150 Left = 63
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #23548#20986 Caption = #23548#20986
@ -154,7 +146,7 @@ object frmYGList: TfrmYGList
OnClick = TBExportClick OnClick = TBExportClick
end end
object ToolButton2: TToolButton object ToolButton2: TToolButton
Left = 213 Left = 126
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#20837#32844#34920 Caption = #25171#21360#20837#32844#34920
@ -162,7 +154,7 @@ object frmYGList: TfrmYGList
OnClick = ToolButton2Click OnClick = ToolButton2Click
end end
object ComboBox1: TComboBox object ComboBox1: TComboBox
Left = 312 Left = 225
Top = 33 Top = 33
Width = 40 Width = 40
Height = 24 Height = 24
@ -184,7 +176,7 @@ object frmYGList: TfrmYGList
'4') '4')
end end
object ToolButton3: TToolButton object ToolButton3: TToolButton
Left = 352 Left = 265
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#21592#24037#33457#21517#20876 Caption = #25171#21360#21592#24037#33457#21517#20876
@ -192,7 +184,7 @@ object frmYGList: TfrmYGList
OnClick = ToolButton3Click OnClick = ToolButton3Click
end end
object ToolButton4: TToolButton object ToolButton4: TToolButton
Left = 475 Left = 388
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #36523#20221#35777#27491#38754 Caption = #36523#20221#35777#27491#38754
@ -200,7 +192,7 @@ object frmYGList: TfrmYGList
OnClick = ToolButton4Click OnClick = ToolButton4Click
end end
object ToolButton5: TToolButton object ToolButton5: TToolButton
Left = 574 Left = 487
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #36523#20221#35777#21453#38754 Caption = #36523#20221#35777#21453#38754
@ -208,7 +200,7 @@ object frmYGList: TfrmYGList
OnClick = ToolButton5Click OnClick = ToolButton5Click
end end
object TBClose: TToolButton object TBClose: TToolButton
Left = 673 Left = 586
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381

View File

@ -14,22 +14,21 @@ uses
cxTimeEdit, cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxTimeEdit, cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu,
dxBarBuiltInMenu, cxNavigator, jpeg, U_SLT, dxSkinsCore, dxSkinBlack, dxBarBuiltInMenu, cxNavigator, jpeg, U_SLT, dxSkinsCore, dxSkinBlack,
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinDarkSide, 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
TfrmYGList = class(TForm) TfrmYGList = class(TForm)
ToolBar1: TToolBar; ToolBar1: TToolBar;
TBRafresh: TToolButton; TBRafresh: TToolButton;
TBFind: TToolButton; TBFind: TToolButton;
@ -108,7 +107,6 @@ type
ScrollBox1: TScrollBox; ScrollBox1: TScrollBox;
RM2: TRMGridReport; RM2: TRMGridReport;
RMDBMain2: TRMDBDataSet; RMDBMain2: TRMDBDataSet;
ToolButton6: TToolButton;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
@ -142,7 +140,6 @@ type
procedure ToolButton4Click(Sender: TObject); procedure ToolButton4Click(Sender: TObject);
procedure ToolButton5Click(Sender: TObject); procedure ToolButton5Click(Sender: TObject);
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean); procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure ToolButton6Click(Sender: TObject);
private private
canshu1: string; canshu1: string;
DQdate: TDateTime; DQdate: TDateTime;
@ -167,7 +164,7 @@ implementation
uses uses
U_DataLink, U_RTFun, U_ZDYHelp, U_YGInPut, U_YGYPZZChkList_NXZZJL, U_FjList_RZ, U_DataLink, U_RTFun, U_ZDYHelp, U_YGInPut, U_YGYPZZChkList_NXZZJL, U_FjList_RZ,
U_ZDYBZType, U_FileUp3, U_FileUp4 ,superobject, U_LabelPrintFun; U_ZDYBZType, U_FileUp3, U_FileUp4, U_LabelPrintFun;
{$R *.dfm} {$R *.dfm}
@ -609,6 +606,20 @@ end;
procedure TfrmYGList.TPrintClick(Sender: TObject); procedure TfrmYGList.TPrintClick(Sender: TObject);
var var
FPrintJson, JsonResult, MFiltration: string;
RTValues: TStringArray;
begin
if Order_Main.IsEmpty then
Exit;
MFiltration := Trim(Order_Main.fieldbyname('YGId').AsString);
FPrintJson := '{ "LMType": "YGList","QrCodeField": "YGID","PreviewPrint": true,"DConString": "' + DConString + '","DCode": "' + DCode + '","DName": "' + DName + '", "PrtArgs": [ { "IsSql": true, "Filtration": " ' + MFiltration + '" }] }';
FormPrint(Application, PChar(FPrintJson));
end;
{var
fPrintFile: string; fPrintFile: string;
Txt, fImagePath: string; Txt, fImagePath: string;
Moudle: THandle; Moudle: THandle;
@ -645,7 +656,7 @@ begin
Application.MessageBox(PChar('ûÓÐÕÒ' + ExtractFilePath(Application.ExeName) + 'Report\Ô±¹¤¿¨.rmf'), 'Ìáʾ', 0); Application.MessageBox(PChar('ûÓÐÕÒ' + ExtractFilePath(Application.ExeName) + 'Report\Ô±¹¤¿¨.rmf'), 'Ìáʾ', 0);
Exit; Exit;
end; end;
end; end; }
procedure TfrmYGList.TFJClick(Sender: TObject); procedure TfrmYGList.TFJClick(Sender: TObject);
begin begin
@ -838,26 +849,5 @@ begin
InitImage(); InitImage();
end; end;
procedure TfrmYGList.ToolButton6Click(Sender: TObject);
var
FPrintJson, JsonResult, MFiltration: string;
RTValues: TStringArray;
begin
if Order_Main.IsEmpty then
Exit;
if Order_Main.Locate('SSel', True, []) then
begin
RTValues := SelCDSKey(Order_Main, ['YGID']);
MFiltration := RTValues[0];
end
else
begin
MFiltration := Trim(Order_Main.fieldbyname('YGID').AsString);
end;
FPrintJson := '{ "LMType": "LMType","QrCodeField": "YGID","PreviewPrint": true,"DConString": "' + DConString + '","DCode": "' + DCode + '","DName": "' + DName + '", "PrtArgs": [ { "IsSql": true, "Filtration": " ' + MFiltration + '" }] }';
FormPrint(Application, PChar(FPrintJson));
end;
end. end.

View File

@ -101,7 +101,7 @@ DebugSourceDirs=
UsePackages=0 UsePackages=0
[Parameters] [Parameters]
RunParams= RunParams=
HostApplication=D:\马国钢开发代码\项目代码\云翔\云翔OA(WTOA.dll)\testDll.exe HostApplication=E:\项目资料\00_重点客户\云翔\D7myYunxiang\云翔OA(WTOA.dll)\testDll.exe
Launcher= Launcher=
UseLauncher=0 UseLauncher=0
DebugCWD= DebugCWD=

View File

@ -29,7 +29,6 @@ uses
U_KDInPut in 'U_KDInPut.pas' {frmKDInPut}, U_KDInPut in 'U_KDInPut.pas' {frmKDInPut},
U_KDChkList in 'U_KDChkList.pas' {frmKDChkList}, U_KDChkList in 'U_KDChkList.pas' {frmKDChkList},
U_KDList in 'U_KDList.pas' {frmKDList}, U_KDList in 'U_KDList.pas' {frmKDList},
U_RTFun in '..\Z99Dependency\ThreeFun\Fun\U_RTFun.pas',
U_YGYPZZSChkList_SH in 'U_YGYPZZSChkList_SH.pas' {frmYGYPZZSChkList_SH}, U_YGYPZZSChkList_SH in 'U_YGYPZZSChkList_SH.pas' {frmYGYPZZSChkList_SH},
U_WorkDeptList_DKCX in 'U_WorkDeptList_DKCX.pas' {FrmWorkDeptList_DKCX}, U_WorkDeptList_DKCX in 'U_WorkDeptList_DKCX.pas' {FrmWorkDeptList_DKCX},
U_Fun in '..\Z99Dependency\ThreeFun\Fun\U_Fun.pas', U_Fun in '..\Z99Dependency\ThreeFun\Fun\U_Fun.pas',
@ -39,7 +38,14 @@ uses
U_SelPrintFieldNew in '..\Z99Dependency\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew}, U_SelPrintFieldNew in '..\Z99Dependency\ThreeFun\Form\U_SelPrintFieldNew.pas' {frmSelPrintFieldNew},
U_Fun10 in '..\Z99Dependency\ThreeFun\Fun\U_Fun10.pas', U_Fun10 in '..\Z99Dependency\ThreeFun\Fun\U_Fun10.pas',
U_CompressionFun in '..\Z99Dependency\ThreeFun\Fun\U_CompressionFun.pas', U_CompressionFun in '..\Z99Dependency\ThreeFun\Fun\U_CompressionFun.pas',
U_ShaRKList in 'U_ShaRKList.pas' {frmShaRKList}; U_ShaRKList in 'U_ShaRKList.pas' {frmShaRKList},
U_ClientPrintRmf in '..\A00±êÇ©´òÓ¡\U_ClientPrintRmf.pas' {frmClientPrintRmf},
U_LabelMapSet in '..\A00±êÇ©´òÓ¡\U_LabelMapSet.pas' {frmLabelMapSet},
U_LabelPrint in '..\A00±êÇ©´òÓ¡\U_LabelPrint.pas' {frmLabelPrint},
U_LabelPrintFun in '..\A00±êÇ©´òÓ¡\U_LabelPrintFun.pas',
U_QrCodeFun in '..\A00±êÇ©´òÓ¡\U_QrCodeFun.pas',
superobject in '..\Z99Dependency\ThreeFun\Fun\superobject.pas',
U_RTFun in '..\Z99Dependency\RTFunAndForm\Fun\U_RTFun.pas';
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas', // U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField}, // U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},