?? jm_rkdrpt.pas
字號:
{*******************************************************}
{ }
{ 營業(yè)員分票打印 }
{ }
{ 中軟金馬公司版權(quán)所有。2002.12前 }
{ }
{ 編制:中軟金馬郵資票品項目開發(fā)組 }
{ }
{ }
{*******************************************************}
(*
本模塊在地市pub營業(yè)員分票模塊,地市集郵票管理,地市集郵品管理,地市市場購入票里面調(diào)用。
*)
{===============================================================================
郵資票品管理系統(tǒng) V1.0——集郵門市管理系統(tǒng),該系統(tǒng)的主要功能完成票品的銷售。
其中包括預(yù)訂銷售,零售業(yè)務(wù),以及營業(yè)員的票品入庫,票品退繳,營業(yè)員票款上繳。
還包括營業(yè)員庫存狀況查詢、銷售情況統(tǒng)計等功能。
集郵門市管理子系統(tǒng)與其他子系統(tǒng)的關(guān)系:系統(tǒng)管理子系統(tǒng)負責(zé)集郵業(yè)務(wù)管理子系統(tǒng)的
各種數(shù)據(jù)的初始化工作。預(yù)訂類型設(shè)置、抽獎、新卡數(shù)據(jù)導(dǎo)入、類代碼維護等工作在該
模塊中完成,只有完成了以上工作集郵門市管理子系統(tǒng)才能正常工作。集郵門市中營業(yè)
員入庫票品是通過所謂“后臺”的集郵票業(yè)務(wù)管理子系統(tǒng)、集郵品業(yè)務(wù)管理子系統(tǒng)、購
入票業(yè)務(wù)管理子系統(tǒng)的“營業(yè)員發(fā)票”完成,營業(yè)員的繳款、票品退繳都需后臺的復(fù)核。
本模塊功能:營業(yè)員入庫通知單的打印
問題:
1、不能確定打印紙張的型號,隨客戶的需求隨時可能改變。
2、
徐 申 2001.10.14
更改:1、依照省級打印的入庫通知單格式更改
2、更改了所有的控件名稱符合規(guī)定
徐申 2002.02.25
===============================================================================}
unit JM_RKDRPT;
interface
uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Forms, Quickrpt, QRCtrls, Dialogs, Db, DBTables;
type
TFrm_RKDRPT = class(TQuickRep)
PageHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel6: TQRLabel;
QRLabel8: TQRLabel;
QRLabel25: TQRLabel;
QRLabel4: TQRLabel;
Qry_ckdayin: TQuery;
Qry_bz: TQuery;
QRLabel11: TQRLabel;
QRLabel10: TQRLabel;
PageFooterBand1: TQRBand;
QRLabel13: TQRLabel;
QRRichText1: TQRRichText;
QRRichText11: TQRRichText;
QRLabel14: TQRLabel;
QRLabel15: TQRLabel;
QRLabel2: TQRLabel;
QRLabel26: TQRLabel;
QRLabel27: TQRLabel;
QRLabel28: TQRLabel;
QRSysData1: TQRSysData;
QRLabel29: TQRLabel;
QRLabel30: TQRLabel;
ColumnHeaderBand1: TQRBand;
QRLabel19: TQRLabel;
QRLabel20: TQRLabel;
QRLabel23: TQRLabel;
QRLabel12: TQRLabel;
QRLabel22: TQRLabel;
QRLabel3: TQRLabel;
QRLabel16: TQRLabel;
QRLabel5: TQRLabel;
QRLabel17: TQRLabel;
QRLabel24: TQRLabel;
QRLabel18: TQRLabel;
QRShape1: TQRShape;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRShape10: TQRShape;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRShape13: TQRShape;
QRShape14: TQRShape;
QRShape15: TQRShape;
QRShape26: TQRShape;
QRShape27: TQRShape;
QRShape28: TQRShape;
QRShape29: TQRShape;
QRShape30: TQRShape;
QRShape31: TQRShape;
QRShape32: TQRShape;
QRShape33: TQRShape;
DetailBand1: TQRBand;
qrrt_zh: TQRRichText;
qrrt_ppmc: TQRRichText;
qrrt_xj: TQRRichText;
qrrt_sl: TQRRichText;
qrrt_zjje: TQRRichText;
qrrt_jj: TQRRichText;
qrrt_jjje: TQRRichText;
qrrt_fxrq: TQRRichText;
QRShape5: TQRShape;
QRShape16: TQRShape;
QRShape17: TQRShape;
QRShape19: TQRShape;
QRShape20: TQRShape;
QRShape21: TQRShape;
QRShape22: TQRShape;
QRShape23: TQRShape;
QRShape24: TQRShape;
QRShape25: TQRShape;
QRLabel7: TQRLabel;
procedure QuickRepNeedData(Sender: TObject; var MoreData: Boolean);
procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
procedure QuickRepStartPage(Sender: TCustomQuickRep);
private
public
sumzj: double; {總計金額}
sumjsj: double; {進價金額}
DetailLines: Integer; {頁內(nèi)行數(shù)}
Tao_Print_Flag: Boolean; {套打標(biāo)志}
end;
var
Frm_RKDRPT: TFrm_RKDRPT;
implementation
uses pub,jm_data;
{$R *.DFM}
procedure TFrm_RKDRPT.QuickRepNeedData(Sender: TObject;
var MoreData: Boolean);
var
zjje, jsje: double;
begin
{每頁限制行數(shù)為5行}
if DetailLines = 6 then
DetailLines := 1;
if DetailLines <= 5 then
begin
Inc(DetailLines);
MoreData := True;
end;
if not Qry_ckdayin.Eof then
begin
qrrt_ppmc.Lines.Text := Qry_ckdayin.FieldByName('ppmc').AsString;
{如果票品名稱過長,那么設(shè)置顯示在兩行中}
if qrrt_ppmc.Lines.Count > 1 then
begin
qrrt_ppmc.Font.Size := 9;
if qrrt_ppmc.Lines.Count > 1 then
qrrt_ppmc.Top := -2
else qrrt_ppmc.Top := 1;
end
else begin
qrrt_ppmc.Font.Size := 11;
qrrt_ppmc.Top := 1;
end;
{對志號信息做與票品名稱信息同樣的處理}
qrrt_zh.Lines.Text := Qry_ckdayin.FieldByName('zh').AsString;
if qrrt_zh.Lines.Count > 1 then
begin
qrrt_zh.Font.Size := 9;
if qrrt_zh.Lines.Count > 1 then
qrrt_zh.Top := 1
else qrrt_zh.Top := -2;
end
else begin
qrrt_zh.Font.Size := 11;
qrrt_zh.Top := 1;
end;
qrrt_sl.Lines.Text := FormatFloat('#,##', Qry_ckdayin.fieldbyname('sl').AsFloat);
qrrt_xj.Lines.Text := FormatFloat('#,##0.00', Qry_ckdayin.fieldbyname('xj').AsFloat);
qrrt_zjje.Lines.Text := FormatFloat('#,##0.00', Qry_ckdayin.fieldbyname('zjje').AsFloat);
qrrt_jj.Lines.Text := FormatFloat('#,##0.00', Qry_ckdayin.fieldbyname('JJ').asFloat);
qrrt_jjje.Lines.Text := FormatFloat('#,##0.00', Qry_ckdayin.fieldbyname('jjje').AsFloat);
qrrt_fxrq.Lines.Text := FormatDateTime('YYYY"/"MM"/"DD', Qry_ckdayin.FieldByName('fxrq').AsDateTime);
zjje := Qry_ckdayin.fieldbyname('zjje').asfloat;
jsje := Qry_ckdayin.fieldbyname('jjje').asfloat;
{循環(huán)統(tǒng)計總計金額、進價金額}
sumzj := sumzj + zjje;
sumjsj := sumjsj + jsje;
QRRichText1.Lines.Text := FormatFloat('#,##0.00', sumzj);
QRRichText11.Lines.Text := FormatFloat('#,##0.00', sumjsj);
DetailBand1.Height := 28;
end;
{如果票品信息沒能把本頁顯示滿,那么顯示空白行}
if MoreData and (Qry_ckdayin.Eof) then
begin
qrrt_ppmc.Lines.Text := '';
qrrt_sl.Lines.Text := '';
qrrt_xj.Lines.Text := '';
qrrt_zjje.Lines.Text := '';
qrrt_jj.Lines.Text := '';
qrrt_jjje.Lines.Text := '';
qrrt_fxrq.Lines.Text := '';
qrrt_zh.Lines.text := '';
if DetailLines = 6 then
MoreData := False;
end;
if (not Qry_ckdayin.Eof) then
begin
MoreData := not Qry_ckdayin.eof;
Qry_ckdayin.Next;
end;
end;
procedure TFrm_RKDRPT.QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
{再次的初始化全局變量}
Qry_ckdayin.First;
sumzj := 0;
sumjsj := 0;
DetailLines := 0;
end;
procedure TFrm_RKDRPT.QuickRepStartPage(Sender: TCustomQuickRep);
var
i: integer;
begin
{設(shè)置套打信息}
for I := 0 to PageHeaderBand1.ControlCount - 1 do //設(shè)置頁頭的套打
begin
if PageHeaderBand1.Controls[I] is TQRLabel then
begin
if Tao_Print_Flag then
begin
TQRLabel(PageHeaderBand1.Controls[I]).Enabled := False;
if (PageHeaderBand1.Controls[I].Name = 'QRLabel25') or
(PageHeaderBand1.Controls[I].Name = 'QRLabel11') or
(PageHeaderBand1.Controls[I].Name = 'QRLabel8') or
(PageHeaderBand1.Controls[I].Name = 'QRLabel1') then
TQRLabel(PageHeaderBand1.Controls[I]).Enabled := True;
end
else TQRLabel(PageHeaderBand1.Controls[I]).Enabled := True;
end;
if PageHeaderBand1.Controls[I] is TQRShape then
if Tao_Print_Flag then TQRShape(PageHeaderBand1.Controls[i]).Enabled := False
else TQRShape(PageHeaderBand1.Controls[i]).Enabled := True;
end;
for I := 0 to ColumnHeaderBand1.ControlCount - 1 do //設(shè)置表頭的套打
begin
if ColumnHeaderBand1.Controls[I] is TQRShape then
begin
if Tao_Print_Flag then
TQRShape(ColumnHeaderBand1.Controls[I]).Enabled := False
else TQRShape(ColumnHeaderBand1.Controls[I]).Enabled := True;
end;
if ColumnHeaderBand1.Controls[I] is TQRLabel then
begin
if Tao_Print_Flag then
TQRLabel(ColumnHeaderBand1.Controls[I]).Enabled := False
else TQRLabel(ColumnHeaderBand1.Controls[I]).Enabled := True;
end;
end;
for I := 0 to DetailBand1.ControlCount - 1 do //設(shè)置表內(nèi)容的套打
begin
if DetailBand1.Controls[I] is TQRShape then
begin
if Tao_Print_Flag then
TQRShape(DetailBand1.Controls[I]).Enabled := False
else TQRShape(DetailBand1.Controls[I]).Enabled := True;
end;
end;
for i := 0 to PageFooterBand1.ControlCount - 1 do //設(shè)置頁尾的套打
begin
if PageFooterBand1.Controls[I] is TQRLabel then
begin
if Tao_Print_Flag then
begin
TQRLabel(PageFooterBand1.Controls[I]).Enabled := False;
if (PageFooterBand1.Controls[I].Name = 'QRLabel29') then
TQRLabel(PageFooterBand1.Controls[I]).Enabled := True;
end
else TQRLabel(PageFooterBand1.Controls[I]).Enabled := True;
end;
if PageFooterBand1.Controls[I] is TQRShape then
begin
if Tao_Print_Flag then
TQRShape(PageFooterBand1.Controls[I]).enabled := False
else
TQRShape(PageFooterBand1.Controls[I]).Enabled := True;
end;
if PageFooterBand1.Controls[i] is TQRRichText then
begin
if IntToStr(Printer.PageNumber) = QRLabel29.caption then
TQRRichText(PageFooterBand1.Controls[I]).Enabled := True
else TQRRichText(PageFooterBand1.Controls[I]).Enabled := False;
end;
end;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -