📄 fee_balance_smallfont_r.pas
字号:
unit Fee_Balance_SmallFont_R;
interface
uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Forms, Quickrpt, QRCtrls;
type
TR_Fee_Balance_SmallFont = class(TQuickRep)
DetailBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRL_Title: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel3: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel11: TQRLabel;
QRLabel12: TQRLabel;
QRLabel13: TQRLabel;
QRLabel14: TQRLabel;
QRL_Rate: TQRLabel;
QRLabel16: TQRLabel;
QRLabel17: TQRLabel;
QRLabel18: TQRLabel;
QRLabel19: TQRLabel;
QRLabel20: TQRLabel;
QRLabel21: TQRLabel;
QRLabel22: TQRLabel;
QRLabel23: TQRLabel;
QRLabel24: TQRLabel;
QRLabel25: TQRLabel;
QRLabel26: TQRLabel;
QRLabel27: TQRLabel;
QRLabel28: TQRLabel;
QRLabel29: TQRLabel;
QRLabel30: TQRLabel;
QRLabel31: TQRLabel;
QRLabel32: TQRLabel;
QRLabel33: TQRLabel;
QRLabel34: TQRLabel;
QRLabel35: TQRLabel;
QRShape1: TQRShape;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRLabel36: TQRLabel;
QRLabel37: TQRLabel;
QRLabel38: TQRLabel;
QRLabel39: TQRLabel;
QRLabel40: TQRLabel;
QRLabel10: TQRLabel;
QRLabel41: TQRLabel;
QRLabel42: TQRLabel;
QRLabel43: TQRLabel;
QRLabel44: TQRLabel;
QRShape9: TQRShape;
QRLabel45: TQRLabel;
QRLabel46: TQRLabel;
QRLabel47: TQRLabel;
QRLabel48: TQRLabel;
QRLabel49: TQRLabel;
QRL_Month: TQRLabel;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
QRDBText3: TQRDBText;
QRL_Add: TQRLabel;
QRLabel51: TQRLabel;
QRDBText21: TQRDBText;
QRL_Line: TQRLabel;
QRDBText23: TQRDBText;
QRL_Ammeter_no1: TQRLabel;
QRL_Ammeter_No2: TQRLabel;
QRL_Ammeter_No3: TQRLabel;
QRL_Last3: TQRLabel;
QRL_Last2: TQRLabel;
QRL_Last1: TQRLabel;
QRL_Count1: TQRLabel;
QRL_Count2: TQRLabel;
QRL_Count3: TQRLabel;
QRDBText7: TQRDBText;
QRDBText8: TQRDBText;
QRDB_Rate1: TQRDBText;
QRDB_Rate2: TQRDBText;
QRDB_Rate3: TQRDBText;
QRM_Note: TQRMemo;
QRDBText22: TQRDBText;
QRDB_Count: TQRDBText;
QRDB_Count1: TQRDBText;
QRDB_Count2: TQRDBText;
QRDB_Count3: TQRDBText;
QRExpr1: TQRExpr;
QRL_Country_Price1: TQRLabel;
QRL_Country_Price2: TQRLabel;
QRL_Country_Price3: TQRLabel;
QRL_Country_Price4: TQRLabel;
QRDBText6: TQRDBText;
QRL_Country_Amount1: TQRLabel;
QRL_Country_Amount2: TQRLabel;
QRL_Country_Amount3: TQRLabel;
QRL_Country_Amount4: TQRLabel;
QRL_Country_Amount: TQRLabel;
QRSysData1: TQRSysData;
QRL_Fee: TQRLabel;
QRL_Service_Amount: TQRLabel;
QRL_Service_Amount4: TQRLabel;
QRL_Service_Amount3: TQRLabel;
QRL_Service_Amount2: TQRLabel;
QRL_Service_Amount1: TQRLabel;
QRL_Comput: TQRLabel;
QRL_Auditing: TQRLabel;
QRL_Amount: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRLabel50: TQRLabel;
QRDB_Arrearage: TQRDBText;
QRDBText4: TQRDBText;
QRShape11: TQRShape;
QRShape10: TQRShape;
QRLabel52: TQRLabel;
QRDBText5: TQRDBText;
QRDBText9: TQRDBText;
procedure DetailBand1BeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
procedure QRDBText22Print(sender: TObject; var Value: String);
procedure R_Fee_Balance_EmptyAfterPrint(Sender: TObject);
procedure DetailBand1AfterPrint(Sender: TQRCustomBand;
BandPrinted: Boolean);
procedure QRDB_Rate1Print(sender: TObject; var Value: String);
procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
procedure QRDB_ArrearagePrint(sender: TObject; var Value: String);
procedure QRDBText4Print(sender: TObject; var Value: String);
procedure QRDBText9Print(sender: TObject; var Value: String);
private
public
end;
var
R_Fee_Balance_SmallFont: TR_Fee_Balance_SmallFont;
implementation
uses CommSmdljf, Table_DM, Comm;
{$R *.DFM}
var
nHouseCount:Integer;//户数
procedure TR_Fee_Balance_SmallFont.DetailBand1BeforePrint(
Sender: TQRCustomBand; var PrintBand: Boolean);
var
//三块表的表号,上次抄表数,本次抄表数
A_No1, A_No2, A_No3:String;
A_Last1, A_Last2, A_Last3:Extended;
A_Count1, A_Count2, A_Count3:Extended;
//农网维护费,单价
// V_Service_Fee, V_Service_Price:Extended;
v_Service_Price1, v_Service_Price2, v_Service_Price3, v_Service_Price4: Extended;
v_Service_Amount1, v_Service_Amount2, v_Service_Amount3, v_Service_Amount4: Extended;
v_Service_Amount: Extended;
//国家价
v_Country_Price1, v_Country_Price2, v_Country_Price3, v_Country_Price4: Extended;
v_Country_Amount1, v_Country_Amount2, v_Country_Amount3, v_Country_Amount4: Extended;
v_Country_Amount: Extended;
//滞纳金
v_LateFee: Extended;
//用户编号
V_House_No:String;
begin
QRL_Title.Caption := CorpName+StationName+'电费结算单';
QRL_Comput.Caption := Default_Comput;
QRL_Auditing.Caption := Default_Auditing;
QRL_Fee.Caption := Default_Fee;
QRL_Month.Caption := CurrentYear+' 年 '+CurrentMonth+' 月份';
//通过用户编号得到用户地址和线路
V_House_No := Dm_Table.V_House['F_House_No'];
QRL_Add.Caption := F_GetAddress(V_House_No);
QRL_Line.Caption := F_GetLine(V_House_No);
//得到指定用户相关表的信息
P_GetAmmeter(V_House_No,A_No1,A_No2,A_No3,
A_Last1,A_Last2,A_Last3,
A_Count1,A_Count2,A_Count3);
QRL_Ammeter_No1.Caption := Trim(A_No1);
QRL_Last1.Caption := F_FloatToStrF(A_Last1,10,-1);
If A_Count1 < 0 Then
QRL_Count1.Caption := '未抄'
Else
QRL_Count1.Caption := F_FloatToStrF(A_Count1,10,-1);
QRL_Ammeter_No2.Caption := Trim(A_No2);
QRL_Last2.Caption := '';
QRL_Count2.Caption := '';
QRL_Last3.Caption := '';
QRL_Count3.Caption := '';
If Trim(A_No2) <> '' Then
Begin
QRL_Last2.Caption := F_FloatToStrF(A_Last2,10,-1);
If A_Count2 < 0 Then
QRL_Count2.Caption := '未抄'
Else
QRL_Count2.Caption := F_FloatToStrF(A_Count2,10,-1);
End;
QRL_Ammeter_No3.Caption := Trim(A_No3);
If Trim(A_No3) <> '' Then
Begin
QRL_Last3.Caption := F_FloatToStrF(A_Last3,10,-1);
If A_Count3 < 0 Then
QRL_Count3.Caption := '未抄'
Else
QRL_Count3.Caption := F_FloatToStrF(A_Count3,10,-1);
End;
//打印备注栏
QRM_Note.Lines.Clear();
If Dm_Table.V_House['F_Note'] <> Null Then
QRM_Note.Lines.Add(F_Warp(Dm_Table.V_House['F_Note']))
Else
QRM_Note.Lines.Add('');
//求农网维护费和国家费
With Dm_Table Do
Begin
p_GetService(V_House['F_House_No'],
v_Service_Price1, v_Service_Price2, v_Service_Price3, v_Service_Price4,
v_Service_Amount1, v_Service_Amount2, v_Service_Amount3, v_Service_Amount4,
v_Service_Amount);
QRL_Service_Amount1.Caption := F_FloatToStrF(V_Service_Amount1,10,2);
QRL_Service_Amount2.Caption := F_FloatToStrF(V_Service_Amount2,10,2);
QRL_Service_Amount3.Caption := F_FloatToStrF(V_Service_Amount3,10,2);
QRL_Service_Amount4.Caption := F_FloatToStrF(V_Service_Amount4,10,2);
QRL_Service_Amount.Caption := F_FloatToStrF(V_Service_Amount,10,2);
p_GetCountry(V_House['F_House_No'],
v_Country_Price1, v_Country_Price2, v_Country_Price3, v_Country_Price4,
v_Country_Amount1, v_Country_Amount2, v_Country_Amount3, v_Country_Amount4,
v_Country_Amount);
QRL_Country_Price1.Caption := F_FloatToStrF(V_Country_Price1,10,3);
QRL_Country_Price2.Caption := F_FloatToStrF(V_Country_Price2,10,3);
QRL_Country_Price3.Caption := F_FloatToStrF(V_Country_Price3,10,3);
QRL_Country_Price4.Caption := F_FloatToStrF(V_Country_Price4,10,3);
QRL_Country_Amount1.Caption := F_FloatToStrF(V_Country_Amount1,10,2);
QRL_Country_Amount2.Caption := F_FloatToStrF(V_Country_Amount2,10,2);
QRL_Country_Amount3.Caption := F_FloatToStrF(V_Country_Amount3,10,2);
QRL_Country_Amount4.Caption := F_FloatToStrF(V_Country_Amount4,10,2);
QRL_Country_Amount.Caption := F_FloatToStrF(V_Country_Amount,10,2);
End;
v_LateFee := DM_Table.v_House['f_LateFee'];
QRL_Amount.Caption := F_FloatToStrF(v_Country_Amount
+ v_Service_Amount
+ v_LateFee
,10,2);
end;
procedure TR_Fee_Balance_SmallFont.QRDBText22Print(sender: TObject;
var Value: String);
begin
// If StrToInt(Value) = 1 Then
// Value := '';
end;
procedure TR_Fee_Balance_SmallFont.R_Fee_Balance_EmptyAfterPrint(
Sender: TObject);
begin
P_Log('打印: 电费结算单。户数'+IntToStr(nHouseCount));
end;
procedure TR_Fee_Balance_SmallFont.DetailBand1AfterPrint(Sender: TQRCustomBand;
BandPrinted: Boolean);
begin
if BandPrinted Then
Inc(nHouseCount);//户数增加
end;
procedure TR_Fee_Balance_SmallFont.QRDB_Rate1Print(sender: TObject;
var Value: String);
begin
Value:= F_FloatToStrF(StrToFloat(Value) * 100, 0, 0);
If Value <> '' Then
Value := Value + ' %'
end;
procedure TR_Fee_Balance_SmallFont.QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
nHouseCount := 0;//户数初始为零
end;
procedure TR_Fee_Balance_SmallFont.QRDB_ArrearagePrint(sender: TObject;
var Value: String);
begin
Value := F_FloatToStrF(StrToFloat(Value),10,2);
end;
procedure TR_Fee_Balance_SmallFont.QRDBText4Print(sender: TObject;
var Value: String);
begin
Value := F_FloatToStrF(StrToFloat(Value),10,2);
end;
procedure TR_Fee_Balance_SmallFont.QRDBText9Print(sender: TObject;
var Value: String);
begin
If StrToInt(Value) <> 1 Then
Value := IntToStr(StrToInt(Value) * 5)
else
Value := '';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -