出库码单

This commit is contained in:
ddf 2025-11-08 14:07:37 +08:00
parent 4eeb6d249c
commit 56bb51aac2
2 changed files with 24 additions and 57 deletions

View File

@ -1,6 +1,6 @@
object frmYMTFHSQList: TfrmYMTFHSQList object frmYMTFHSQList: TfrmYMTFHSQList
Left = 566 Left = 378
Top = 427 Top = 203
Width = 1308 Width = 1308
Height = 679 Height = 679
Caption = #21457#36135#30003#35831 Caption = #21457#36135#30003#35831
@ -21,7 +21,6 @@ object frmYMTFHSQList: TfrmYMTFHSQList
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1300 Width = 1300
Height = 62
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 115 ButtonWidth = 115
@ -93,76 +92,50 @@ object frmYMTFHSQList: TfrmYMTFHSQList
AutoSize = True AutoSize = True
Caption = #21024#38500 Caption = #21024#38500
ImageIndex = 3 ImageIndex = 3
Wrap = True
OnClick = TBDelClick OnClick = TBDelClick
end end
object tchk: TToolButton object tchk: TToolButton
Left = 0 Left = 593
Top = 30 Top = 0
AutoSize = True AutoSize = True
Caption = #23457#26680 Caption = #23457#26680
ImageIndex = 75 ImageIndex = 75
OnClick = tchkClick OnClick = tchkClick
end end
object Tnochk: TToolButton object Tnochk: TToolButton
Left = 79 Left = 672
Top = 30 Top = 0
AutoSize = True AutoSize = True
Caption = #25764#38144#23457#26680 Caption = #25764#38144#23457#26680
ImageIndex = 52 ImageIndex = 52
OnClick = TnochkClick OnClick = TnochkClick
end end
object TBPrint: TToolButton object TBPrint: TToolButton
Left = 198 Left = 791
Top = 30 Top = 0
AutoSize = True AutoSize = True
Caption = #25171#21360 Caption = #25171#21360
ImageIndex = 4 ImageIndex = 4
OnClick = TBPrintClick OnClick = TBPrintClick
end end
object PrintMD: TToolButton object PrintMD: TToolButton
Left = 277 Left = 870
Top = 30 Top = 0
Caption = #25171#21360#30721#21333 Caption = #25171#21360#30721#21333
ImageIndex = 4 ImageIndex = 4
OnClick = PrintMDClick OnClick = PrintMDClick
end end
object Panel4: TPanel
Left = 392
Top = 30
Width = 249
Height = 30
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 0
object Label12: TLabel
Left = 8
Top = 7
Width = 80
Height = 19
Caption = #30721#21333#21517#31216
end
object MDName: TComboBox
Left = 94
Top = 2
Width = 145
Height = 27
ItemHeight = 19
TabOrder = 0
end
end
object TBClose: TToolButton object TBClose: TToolButton
Left = 641 Left = 985
Top = 30 Top = 0
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
ImageIndex = 21 ImageIndex = 21
OnClick = TBCloseClick OnClick = TBCloseClick
end end
object OutStock: TToolButton object OutStock: TToolButton
Left = 720 Left = 1064
Top = 30 Top = 0
Caption = #26680#38144#20986#24211 Caption = #26680#38144#20986#24211
ImageIndex = 8 ImageIndex = 8
OnClick = OutStockClick OnClick = OutStockClick
@ -170,9 +143,9 @@ object frmYMTFHSQList: TfrmYMTFHSQList
end end
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 0 Left = 0
Top = 119 Top = 89
Width = 1300 Width = 1300
Height = 271 Height = 301
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
@ -420,7 +393,7 @@ object frmYMTFHSQList: TfrmYMTFHSQList
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 62 Top = 32
Width = 1300 Width = 1300
Height = 57 Height = 57
Align = alTop Align = alTop

View File

@ -114,9 +114,6 @@ type
Tv2Column1: TcxGridDBColumn; Tv2Column1: TcxGridDBColumn;
OutStock: TToolButton; OutStock: TToolButton;
PrintMD: TToolButton; PrintMD: TToolButton;
Panel4: TPanel;
Label12: TLabel;
MDName: TComboBox;
//RMllPDFExport1: TRMllPDFExport; //RMllPDFExport1: TRMllPDFExport;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
@ -401,7 +398,7 @@ begin
TBAdd2.Visible := True; TBAdd2.Visible := True;
TBAdd.Visible := False; TBAdd.Visible := False;
PrintMD.Visible := False; PrintMD.Visible := False;
Panel4.Visible := False; // Panel4.Visible := False;
end; end;
end; end;
@ -869,7 +866,7 @@ end;
procedure TfrmYMTFHSQList.PrintMDClick(Sender: TObject); procedure TfrmYMTFHSQList.PrintMDClick(Sender: TObject);
var var
fPrintFile, FCKNO, msql, MPrintJson: string; FPrintJson, MFiltration: string;
begin begin
if Order_Main.IsEmpty then if Order_Main.IsEmpty then
Exit; Exit;
@ -879,16 +876,13 @@ begin
application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý', 'Ìáʾ'); application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý', 'Ìáʾ');
exit; exit;
end; end;
if Trim(MDName.Text) = '' then
begin
Application.MessageBox('码单名称不能为空!', '提示', 0);
Exit;
end;
msql := 'SELECT A.* FROM YMT_CK_CR A LEFT JOIN YMT_FHSQ_Sub S ON A.ToSSID=S.SSId LEFT JOIN YMT_FHSQ_Main M ON M.FSId=S.FSId WHERE A.CRType=''销售出库'' AND M.FSId=''' + Trim(Order_Main.fieldbyname('FSId').AsString) + ''''; MFiltration := Trim(Order_Main.fieldbyname('FSId').AsString);
MPrintJson := '{ "LBName": "' + Trim(MDName.Text) + '","QrCodeField": "ssid","DConString": "' + DConString + '","DCode": "' + DCode + '","DName": "' + DName + '","IsPreview": true,"printerIndex": 0,"ExportFileType": "", "PrtArgs": [ {"SqlStr": "' + msql + '" }] }';
FPrintJson := '{ "LMType": "YMTCKMD","PreviewPrint": true,"DConString": "' + DConString + '","DCode": "' + DCode + '","DName": "' + DName + '", "PrtArgs": [ { "IsSql": false, "Filtration": " ' + MFiltration + '" }] }';
FormPrint(Application, PChar(FPrintJson));
FunPrint(Application, PChar(MPrintJson));
end; end;
end. end.