|
|
unit u_rp_ch_balance_pay;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, bsSkinCtrls, dxDBTLCl, dxGrClms, dxDBGrid, dxTL,
|
|
|
dxDBCtrl, dxCntner, ComCtrls, bsSkinTabs, DB, ADODB, Menus;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_ch_balance_pay = class(TForm)
|
|
|
p_detail: TADOStoredProc;
|
|
|
p_detail1: TDataSource;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column6: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
RadioGroup1: TbsSkinRadioGroup;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column5: TdxDBGridColumn;
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn11: TdxDBGridColumn;
|
|
|
dxDBGridColumn12: TdxDBGridColumn;
|
|
|
dxDBGridColumn13: TdxDBGridColumn;
|
|
|
dxDBGridColumn14: TdxDBGridColumn;
|
|
|
p_total: TADOStoredProc;
|
|
|
p_total1: TDataSource;
|
|
|
p_currency: TADOStoredProc;
|
|
|
p_currency1: TDataSource;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
p_sales: TADOStoredProc;
|
|
|
p_sales1: TDataSource;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
bsSkinPageControl2: TbsSkinPageControl;
|
|
|
tabsheet1: TbsSkinTabSheet;
|
|
|
tabsheet2: TbsSkinTabSheet;
|
|
|
tabsheet3: TbsSkinTabSheet;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column21: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridDateColumn;
|
|
|
p_detail_bill: TADOStoredProc;
|
|
|
p_detail_bill1: TDataSource;
|
|
|
p_detail_fee: TADOStoredProc;
|
|
|
p_detail_fee1: TDataSource;
|
|
|
dxDBGrid6: TdxDBGrid;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid6Column18: TdxDBGridColumn;
|
|
|
dxDBGrid6Column19: TdxDBGridColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGridDateColumn2: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn16: TdxDBGridColumn;
|
|
|
dxDBGridColumn22: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid9: TdxDBGrid;
|
|
|
dxDBGridMaskColumn43: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn44: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn45: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn46: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn47: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn17: TdxDBGridColumn;
|
|
|
dxDBGridColumn18: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn48: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn19: TdxDBGridColumn;
|
|
|
dxDBGridDateColumn10: TdxDBGridDateColumn;
|
|
|
dxDBGridDateColumn11: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn49: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn50: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn51: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn52: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn53: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn20: TdxDBGridColumn;
|
|
|
dxDBGridColumn21: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn54: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn55: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn56: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn57: TdxDBGridMaskColumn;
|
|
|
dxDBGrid6Column20: TdxDBGridColumn;
|
|
|
dxDBGrid9Column23: TdxDBGridColumn;
|
|
|
dxDBGrid6Column21: TdxDBGridColumn;
|
|
|
dxDBGrid6Column22: TdxDBGridColumn;
|
|
|
dxDBGrid6Column23: TdxDBGridColumn;
|
|
|
dxDBGrid9Column24: TdxDBGridColumn;
|
|
|
dxDBGrid9Column25: TdxDBGridColumn;
|
|
|
dxDBGrid9Column26: TdxDBGridColumn;
|
|
|
dxDBGrid6Column24: TdxDBGridColumn;
|
|
|
dxDBGrid9Column27: TdxDBGridColumn;
|
|
|
dxDBGrid6Column25: TdxDBGridColumn;
|
|
|
dxDBGrid6Column26: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridColumn;
|
|
|
dxDBGrid2Column7: TdxDBGridColumn;
|
|
|
dxDBGrid2Column8: TdxDBGridColumn;
|
|
|
dxDBGrid3Column6: TdxDBGridColumn;
|
|
|
dxDBGrid3Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
dxDBGrid6Column27: TdxDBGridColumn;
|
|
|
dxDBGrid9Column28: TdxDBGridColumn;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinPageControl1Resize(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinPageControl1Change(Sender: TObject);
|
|
|
procedure RadioGroup1Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_ch_balance_pay: Tfrm_rp_ch_balance_pay;
|
|
|
frm_rp_ch_balance_pay_open:boolean;
|
|
|
frm_rp_ch_balance_pay_str:widestring;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_ch_balance_query, my_sys_function, u_main, u_rp_ch_balance_view;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
savereggrid(dxdbgrid6,caption+'2');
|
|
|
savereggrid(dxdbgrid9,caption+'3');
|
|
|
frm_rp_ch_balance_pay_open:=false;
|
|
|
frm_rp_ch_balance_pay.Hide;
|
|
|
frm_rp_ch_balance_pay.ManualFloat(frm_rp_ch_balance_pay.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_ch_balance_pay');
|
|
|
action:=cafree;
|
|
|
frm_rp_ch_balance_pay:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption+'1');
|
|
|
loadreggrid(dxdbgrid6,false,caption+'2');
|
|
|
loadreggrid(dxdbgrid9,false,caption+'3');
|
|
|
frm_rp_ch_balance_pay_open:=true;
|
|
|
|
|
|
if StrToBool(get_parameters_value(83,'false')) then begin
|
|
|
dxdbgrid1.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=false;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid1.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
|
|
|
dxdbgrid2.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=false;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid2.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=True;
|
|
|
|
|
|
dxdbgrid3.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=false;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid3.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=True;
|
|
|
|
|
|
dxdbgrid5.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=false;
|
|
|
dxdbgrid5.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid5.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=false;
|
|
|
dxdbgrid5.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
// dxdbgrid5.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
// dxdbgrid5.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=True;
|
|
|
|
|
|
end else begin
|
|
|
dxdbgrid1.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid1.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=false;
|
|
|
|
|
|
dxdbgrid2.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=True;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid2.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid2.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
|
|
|
|
|
|
dxdbgrid3.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=True;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid3.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
dxdbgrid3.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
|
|
|
|
|
|
dxdbgrid5.ColumnByFieldName('<27>ұ<EFBFBD>').Visible:=True;
|
|
|
dxdbgrid5.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid5.ColumnByFieldName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
dxdbgrid5.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Visible:=True;
|
|
|
// dxdbgrid5.ColumnByFieldName('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Visible:=False;
|
|
|
// dxdbgrid5.ColumnByFieldName('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Visible:=False;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.bsSkinPageControl1Resize(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPanel1.Left:=bsSkinPageControl1.Width-bsSkinPanel1.Width-5;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_ch_balance_query:=tfrm_ch_balance_query.Create (self);
|
|
|
balance_query_type:=7;
|
|
|
frm_ch_balance_query.ShowModal;
|
|
|
finally
|
|
|
frm_ch_balance_query.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.bsSkinPageControl1Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_rp_ch_balance_pay_open then
|
|
|
begin
|
|
|
if bsSkinTabSheet2.Showing then
|
|
|
frm_rp_ch_balance_pay.RadioGroup1Click(Sender);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.RadioGroup1Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
if p_detail.Active then
|
|
|
begin
|
|
|
if StrToBool(get_parameters_value(83,'false')) then begin
|
|
|
str:='select '+RadioGroup1.Items[RadioGroup1.ItemIndex]
|
|
|
+' as ͳ<>Ʊ<EFBFBD>,'+''''+RadioGroup1.Items[RadioGroup1.ItemIndex]+''''
|
|
|
+' as base,sum(<28><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,sum(<28><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>'
|
|
|
+',count(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>'
|
|
|
+' from t_ch_balance '+frm_rp_ch_balance_pay_str
|
|
|
+' group by '+RadioGroup1.Items[RadioGroup1.ItemIndex]
|
|
|
+',<2C>ұ<EFBFBD>'
|
|
|
+' order by '+RadioGroup1.Items[RadioGroup1.ItemIndex];
|
|
|
end else begin
|
|
|
str:='select '+RadioGroup1.Items[RadioGroup1.ItemIndex]
|
|
|
+' as ͳ<>Ʊ<EFBFBD>,'+''''+RadioGroup1.Items[RadioGroup1.ItemIndex]+''''
|
|
|
+' as base,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,sum(ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+',count(<28>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>'
|
|
|
+' from t_ch_balance '+frm_rp_ch_balance_pay_str
|
|
|
+' group by '+RadioGroup1.Items[RadioGroup1.ItemIndex]
|
|
|
+',<2C>ұ<EFBFBD>'
|
|
|
+' order by '+RadioGroup1.Items[RadioGroup1.ItemIndex];
|
|
|
end;
|
|
|
p_total.close;
|
|
|
p_total.Parameters.ParamByName('SQLStr').value:=str;
|
|
|
p_total.open;
|
|
|
dxDBGridMaskColumn3.Caption:=RadioGroup1.Items[RadioGroup1.ItemIndex];
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,p_detail1,p_total1,p_sales1,p_currency1,p_detail_bill1,p_detail_fee1,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
if (not p_detail.active)or(p_detail.IsEmpty)then
|
|
|
begin
|
|
|
showmessage('û<><C3BB><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>Ϣ<EFBFBD><CFA2>');
|
|
|
exit;
|
|
|
end;
|
|
|
try
|
|
|
if not assigned(frm_rp_ch_balance_view) then
|
|
|
frm_rp_ch_balance_view:=tfrm_rp_ch_balance_view.Create (self);
|
|
|
with frm_rp_ch_balance_view do
|
|
|
begin
|
|
|
v_fee_do_seae.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_seae.open;
|
|
|
|
|
|
v_fee_do_seai.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_seai.open;
|
|
|
|
|
|
v_fee_do_aire.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_aire.open;
|
|
|
|
|
|
v_fee_do_airi.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_airi.open;
|
|
|
|
|
|
v_fee_do_seae_sum.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_seae_sum.open;
|
|
|
|
|
|
v_fee_do_seai_sum.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_seai_sum.open;
|
|
|
|
|
|
v_fee_do_aire_sum.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_aire_sum.open;
|
|
|
|
|
|
v_fee_do_airi_sum.Parameters.ParamByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').value:=
|
|
|
p_detail.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
v_fee_do_airi_sum.open;
|
|
|
end;
|
|
|
frm_rp_ch_balance_view.ShowModal;
|
|
|
finally
|
|
|
frm_rp_ch_balance_view.free;
|
|
|
frm_rp_ch_balance_view:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinTabSheet1.showing then
|
|
|
begin
|
|
|
if tabsheet1.Showing then
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
if tabsheet2.Showing then
|
|
|
update_grid_view_all(dxdbgrid6);
|
|
|
if tabsheet3.Showing then
|
|
|
update_grid_view_all(dxdbgrid9);
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet2.showing then
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid2);
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet3.showing then
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid4);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinTabSheet1.showing then
|
|
|
begin
|
|
|
if tabsheet1.Showing then
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
if tabsheet2.Showing then
|
|
|
update_grid_view_no(dxdbgrid6);
|
|
|
if tabsheet3.Showing then
|
|
|
update_grid_view_no(dxdbgrid9);
|
|
|
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet2.showing then
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid2);
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet3.showing then
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid4);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_pay.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinTabSheet1.showing then
|
|
|
begin
|
|
|
if tabsheet1.Showing then
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
if tabsheet2.Showing then
|
|
|
grid_save_xls(dxdbgrid6);
|
|
|
if tabsheet3.Showing then
|
|
|
grid_save_xls(dxdbgrid9);
|
|
|
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet2.showing then
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid2);
|
|
|
exit;
|
|
|
end;
|
|
|
if bsSkinTabSheet3.showing then
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid4);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|