This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-08-08 10:52:04 +08:00
parent bb338744d7
commit 736bc77a38
5 changed files with 152 additions and 86 deletions

View File

@ -17,7 +17,7 @@ function FormPrint(App: Tapplication; JsonArgs: PChar): PChar;
begin
with TfrmLabelPrint.Create(App, PChar(JsonArgs)) do
begin
Show;
if ShowModal = 1 then
Result := FJsonOut

View File

@ -1,7 +1,7 @@
object frmYMTRKList: TfrmYMTRKList
Left = 436
Top = 278
Width = 1372
Left = 530
Top = 497
Width = 1370
Height = 750
Caption = #38754#26009#22238#20179#30331#35760
Color = clBtnFace
@ -20,7 +20,7 @@ object frmYMTRKList: TfrmYMTRKList
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1364
Width = 1362
Height = 33
ButtonHeight = 30
ButtonWidth = 101
@ -112,7 +112,7 @@ object frmYMTRKList: TfrmYMTRKList
object Panel1: TPanel
Left = 0
Top = 33
Width = 1364
Width = 1362
Height = 72
Align = alTop
BevelInner = bvRaised
@ -406,7 +406,7 @@ object frmYMTRKList: TfrmYMTRKList
object cxGrid2: TcxGrid
Left = 0
Top = 105
Width = 1224
Width = 1177
Height = 614
Align = alClient
TabOrder = 2
@ -659,64 +659,137 @@ object frmYMTRKList: TfrmYMTRKList
GridView = Tv1
end
end
object cxGrid1: TcxGrid
Left = 1224
object Panel2: TPanel
Left = 1177
Top = 105
Width = 140
Width = 185
Height = 614
Align = alRight
Caption = 'Panel2'
TabOrder = 3
object TvMX: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
DataController.DataSource = DS_MX
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Kind = skCount
Position = spFooter
object cxGrid1: TcxGrid
Left = -13
Top = 71
Width = 197
Height = 542
Align = alRight
TabOrder = 0
object TvMX: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
DataController.DataSource = DS_MX
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Kind = skCount
Position = spFooter
end
item
Kind = skSum
Position = spFooter
Column = TvMXMXQty
end
item
Kind = skCount
end
item
Kind = skSum
Column = TvMXMXQty
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skCount
end
item
Kind = skSum
Column = TvMXMXQty
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
OptionsView.IndicatorWidth = 33
OnCustomDrawIndicatorCell = TvMXCustomDrawIndicatorCell
object TvMXMXID: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'MXID'
HeaderAlignmentHorz = taCenter
Width = 80
end
item
Kind = skSum
Position = spFooter
Column = cxGridDBColumn8
object TvMXMXQty: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'MXQty'
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Sorting = False
Width = 80
end
item
Kind = skCount
end
item
Kind = skSum
Column = cxGridDBColumn8
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skCount
end
item
Kind = skSum
Column = cxGridDBColumn8
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
OptionsView.IndicatorWidth = 33
OnCustomDrawIndicatorCell = TvMXCustomDrawIndicatorCell
object cxGridDBColumn8: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'MXQty'
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Sorting = False
Width = 112
end
object cxGridLevel2: TcxGridLevel
GridView = TvMX
end
end
object cxGridLevel2: TcxGridLevel
GridView = TvMX
object ToolBar2: TToolBar
Left = 1
Top = 42
Width = 183
Height = 29
ButtonHeight = 30
ButtonWidth = 71
Caption = 'ToolBar2'
Images = DataLink_YXYMT.ThreeImgList
List = True
ShowCaptions = True
TabOrder = 1
object ToolButton3: TToolButton
Left = 0
Top = 2
AutoSize = True
Caption = #22686#21333#34892
ImageIndex = 12
end
object ToolButton4: TToolButton
Left = 75
Top = 2
AutoSize = True
Caption = #21024#34892
ImageIndex = 13
end
end
object Panel3: TPanel
Left = 1
Top = 1
Width = 183
Height = 41
Align = alTop
TabOrder = 2
object Label17: TLabel
Left = 1
Top = 12
Width = 36
Height = 12
Caption = #22686#34892#25968
end
object Edit1: TEdit
Left = 40
Top = 9
Width = 41
Height = 20
TabOrder = 0
Text = 'Edit1'
end
object Button1: TButton
Left = 96
Top = 7
Width = 75
Height = 25
Caption = #24555#36895#22686#34892
TabOrder = 1
end
end
end
object ADOQueryCmd: TADOQuery

View File

@ -111,13 +111,22 @@ type
CustomerNoName: TEdit;
cxGrid1: TcxGrid;
TvMX: TcxGridDBTableView;
cxGridDBColumn8: TcxGridDBColumn;
TvMXMXQty: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
CDS_MX: TClientDataSet;
DS_MX: TDataSource;
cxGridPopupMenu2: TcxGridPopupMenu;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
TvMXMXID: TcxGridDBColumn;
Panel2: TPanel;
ToolBar2: TToolBar;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
Panel3: TPanel;
Edit1: TEdit;
Label17: TLabel;
Button1: TButton;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
@ -155,17 +164,16 @@ var
implementation
uses
U_DataLink, U_RTFun, U_YMTRKInPut, U_ZdyAttachGYS, U_LabelPrint,
U_ClientPrintRmf;
U_DataLink, U_RTFun, U_YMTRKInPut, U_ZdyAttachGYS ,U_LabelPrintFun;
{$R *.dfm}
procedure TfrmYMTRKList.InitMXGrid(MCRNO: string);
procedure TfrmYMTRKList.InitMXGrid(SPID: string);
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from YMT_CK_MX where CRNO=' + quotedstr(Trim(MCRNO)));
sql.Add('select * from YMT_CK_MX where SPID=' + quotedstr(Trim(SPID)));
sql.Add(' order by MXID');
Open;
end;
@ -267,8 +275,8 @@ begin
TBDel.Visible := True;
TBEdit.Visible := True;
end;
ReadCxGrid('´ý¼ì²¼Èë¿âÁбí', Tv1, '´ý¼ì²¼²Ö¿â');
ReadCxGrid('´ý¼ì²¼Èë¿âÁбí2', TvMX, '´ý¼ì²¼²Ö¿â');
// ReadCxGrid('´ý¼ì²¼Èë¿âÁбí', Tv1, '´ý¼ì²¼²Ö¿â');
// ReadCxGrid('´ý¼ì²¼Èë¿âÁбí2', TvMX, '´ý¼ì²¼²Ö¿â');
//InitGrid();
end;
@ -439,34 +447,18 @@ procedure TfrmYMTRKList.ToolButton1Click(Sender: TObject);
var
FPrintJson, JsonResult: string;
begin
FPrintJson := '{ "LMType": "LMType","PreviewPrint": true, "PrtArgs": [ { "IsSql": true, "Filtration": "Filtration1" }, { "IsSql": true, "Filtration": "Filtration2" }, { "IsSql": true, "Filtration": "Filtration3" } ] }';
with TfrmLabelPrint.Create(Application, PChar(FPrintJson)) do
begin
FPrintJson := '{ "LMType": "LMType","PreviewPrint": true,"DConString": "' + DConString + '","DCode": "' + DCode + '","DName": "' + DName + '", "PrtArgs": [ { "IsSql": true, "Filtration": "Filtration1" }] }';
if ShowModal = 1 then
begin
JsonResult := FJsonOut;
end;
end;
ShowMessage(JsonResult);
ShowMessage(FormPrint(Application, PChar(FPrintJson)));
end;
procedure TfrmYMTRKList.ToolButton2Click(Sender: TObject);
var
MPrintJson, JsonResult: string;
begin
MPrintJson := '{ "LBName": "²âÊÔ","IsPreview": true,"printerIndex": 0,"ExportFileType": "", "PrtArgs": [ {"SqlStr": "EXEC p_test ''22'' " }, {"SqlStr": "select x=2" }, {"SqlStr": "select x=2" } ] }';
MPrintJson := '{ "LBName": "²âÊÔ","DConString": "' + DConString + '","DCode": "' + DCode + '","DName": "' + DName + '","IsPreview": true,"printerIndex": 0,"ExportFileType": "", "PrtArgs": [ {"SqlStr": "EXEC p_test ''22'' " }] }';
ShowMessage(FunPrint(Application, PChar(MPrintJson)));
with TfrmClientPrintRmf.Create(Application, PChar(MPrintJson)) do
begin
Show;
JsonResult := FJsonOut;
end;
ShowMessage(JsonResult);
end;
end.

View File

@ -101,7 +101,7 @@ DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=E:\项目资料\00_重点客户\云翔\D7myYunxiang\云翔一码通\testDll.exe
HostApplication=D:\Project\D7myYunxiang\云翔一码通\testDll.exe
Launcher=
UseLauncher=0
DebugCWD=

View File

@ -22,7 +22,8 @@ uses
superobject in '..\Z99Dependency\ThreeFun\Fun\superobject.pas',
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_LabelPrint in '..\A00±êÇ©´òÓ¡\U_LabelPrint.pas' {frmLabelPrint},
U_LabelPrintFun in '..\A00±êÇ©´òÓ¡\U_LabelPrintFun.pas';
{$R *.res}