|
|
|
|
unit u_rp_fenzhang;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB,
|
|
|
|
|
ADODB, dxDBTLCl, dxGrClms, ComCtrls, bsSkinTabs, wwdblook, RxLookup,
|
|
|
|
|
wwdbdatetimepicker, StdCtrls, Menus, ExtCtrls, XPMenu;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_rp_fenzhang = class(TForm)
|
|
|
|
|
p_fenzhang: TADOStoredProc;
|
|
|
|
|
p_fenzhang1: TDataSource;
|
|
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column59: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1DEBIT: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1CREDIT: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column13: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column16: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column17: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column19: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid11: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid12: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid13: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid14: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid15: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid16: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid17: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid18: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid19: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid110: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid111: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid112: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid113: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid114: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid115: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid116: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid117: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid118: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid119: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid120: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column43: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1TEU: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column45: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column58: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column48: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column49: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column50: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column57: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column56: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column46: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column47: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column51: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column52: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column53: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column54: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column55: TdxDBGridColumn;
|
|
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
|
|
p_sum_daili: TADOStoredProc;
|
|
|
|
|
p_sum_daili1: TDataSource;
|
|
|
|
|
p_sum_currency: TADOStoredProc;
|
|
|
|
|
p_sum_currency1: TDataSource;
|
|
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
|
|
dxDBGrid2Column1: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2DEBIT: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid2CREDIT: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid3Column4: TdxDBGridColumn;
|
|
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
|
|
N10: TMenuItem;
|
|
|
|
|
N11: TMenuItem;
|
|
|
|
|
N14: TMenuItem;
|
|
|
|
|
N13: TMenuItem;
|
|
|
|
|
N12: TMenuItem;
|
|
|
|
|
N15: TMenuItem;
|
|
|
|
|
N16: TMenuItem;
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
Label6: TLabel;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Label10: TLabel;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
Label11: TLabel;
|
|
|
|
|
Label8: TLabel;
|
|
|
|
|
Label9: TLabel;
|
|
|
|
|
Label23: TLabel;
|
|
|
|
|
Label22: TLabel;
|
|
|
|
|
Label124: TLabel;
|
|
|
|
|
Label16: TLabel;
|
|
|
|
|
Label14: TLabel;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
Label7: TLabel;
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
Edit4: TEdit;
|
|
|
|
|
Edit3: TEdit;
|
|
|
|
|
Edit2: TEdit;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
|
|
RxDBLookupCombo10: TRxDBLookupCombo;
|
|
|
|
|
RxDBLookupCombo12: TRxDBLookupCombo;
|
|
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
XPMenu1: TXPMenu;
|
|
|
|
|
p_fenzhangbill: TADOStoredProc;
|
|
|
|
|
p_fenzhangbill1: TDataSource;
|
|
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid4Column5: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid4Column6: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid4Column7: TdxDBGridColumn;
|
|
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
|
|
Label12: TLabel;
|
|
|
|
|
Edit5: TEdit;
|
|
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
|
|
MenuItem7: TMenuItem;
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure MenuItem7Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_rp_fenzhang: Tfrm_rp_fenzhang;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, u_data_share, my_sys_function;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
|
|
frm_rp_fenzhang.Hide;
|
|
|
|
|
frm_rp_fenzhang.ManualFloat(frm_rp_fenzhang.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_rp_fenzhang');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_rp_fenzhang:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
Edit1.text:='';
|
|
|
|
|
Edit4.text:='';
|
|
|
|
|
Edit2.text:='';
|
|
|
|
|
Edit3.text:='';
|
|
|
|
|
Edit5.text:='';
|
|
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
|
|
wwDBDateTimePicker2.text:='';
|
|
|
|
|
wwDBDateTimePicker3.text:='';
|
|
|
|
|
wwDBDateTimePicker4.text:='';
|
|
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
|
|
RxDBLookupCombo1.ClearValue;
|
|
|
|
|
wwDBLookupCombo52.text:='';
|
|
|
|
|
wwDBLookupCombo3.text:='';
|
|
|
|
|
RxDBLookupCombo6.ClearValue;
|
|
|
|
|
RxDBLookupCombo12.ClearValue;
|
|
|
|
|
RxDBLookupCombo3.ClearValue;
|
|
|
|
|
RxDBLookupCombo10.ClearValue;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str:widestring;
|
|
|
|
|
str_fields:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str_fields:='v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, v_op_bscard.ί<>б<EFBFBD><D0B1><EFBFBD>, v_op_bscard.װ<>˷<EFBFBD>ʽ, v_op_bscard.ί<>е<EFBFBD>λ, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD><EFBFBD>, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.װ<><D7B0><EFBFBD><EFBFBD>, v_op_bscard.ж<><D0B6><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>1, v_op_bscard.<2E><><EFBFBD><EFBFBD>2, v_op_bscard.<2E><><EFBFBD><EFBFBD>3, v_op_bscard.<2E><><EFBFBD><EFBFBD>4, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD><EFBFBD>5, v_op_bscard.<2E><><EFBFBD><EFBFBD>6, v_op_bscard.<2E><><EFBFBD><EFBFBD>7, v_op_bscard.<2E><><EFBFBD><EFBFBD>8, v_op_bscard.<2E><><EFBFBD><EFBFBD>9, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD><EFBFBD>10,v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E><>TEU, v_op_bscard.<2E><>װ<EFBFBD><D7B0>, v_op_bscard.¼<><C2BC><EFBFBD><EFBFBD>, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E>ͷ<EFBFBD>Ա, v_op_bscard.<2E><><EFBFBD><EFBFBD>, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD><EFBFBD>˾, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ';
|
|
|
|
|
str_fields:=str_fields+'v_op_bscard.<2E><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD>Դ, t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_fenzhang.<2E>ұ<EFBFBD>';
|
|
|
|
|
str:=' where '+open_data('0037','v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա','v_op_bscard.<2E>ͷ<EFBFBD>Ա','v_op_bscard.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
if Edit1.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+Edit1.text+'''';
|
|
|
|
|
if Edit4.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+Edit4.text+'''';
|
|
|
|
|
if Edit2.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+Edit2.text+'''';
|
|
|
|
|
if Edit3.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+Edit3.text+'''';
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
|
|
if wwDBDateTimePicker4.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
|
|
|
|
|
if RxDBLookupCombo2.DisplayValue<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
|
|
if RxDBLookupCombo1.DisplayValue<>''then
|
|
|
|
|
str:=str+' and t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValues[1]+'''';
|
|
|
|
|
if RxDBLookupCombo6.DisplayValue<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo6.DisplayValue+'''';
|
|
|
|
|
if RxDBLookupCombo12.DisplayValue<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo12.DisplayValue+'''';
|
|
|
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValue+'''';
|
|
|
|
|
if RxDBLookupCombo10.DisplayValue<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.<2E><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>='+''''+RxDBLookupCombo10.DisplayValue+'''';
|
|
|
|
|
|
|
|
|
|
if wwDBLookupCombo52.text<>''then
|
|
|
|
|
str:=str+' and v_op_bscard.ж<><D0B6><EFBFBD><EFBFBD> like '+''''+wwDBLookupCombo52.text+'''';
|
|
|
|
|
|
|
|
|
|
if wwDBLookupCombo3.text<>''then
|
|
|
|
|
str:=str+' and t_ch_fee_fenzhang.<2E>ұ<EFBFBD>='+''''+wwDBLookupCombo3.text+'''';
|
|
|
|
|
|
|
|
|
|
p_fenzhang.close;
|
|
|
|
|
p_fenzhang.Parameters.ParamByName('SQLStr').value:='select '
|
|
|
|
|
+str_fields
|
|
|
|
|
+', SUM(t_ch_fee_fenzhang.Ӧ<>ս<EFBFBD><D5BD><EFBFBD>) AS DEBIT,'
|
|
|
|
|
+'SUM(t_ch_fee_fenzhang.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AS CREDIT '
|
|
|
|
|
+'FROM v_op_bscard INNER JOIN '
|
|
|
|
|
+'t_ch_fee_fenzhang ON '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD> = t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+str
|
|
|
|
|
+' group by '+str_fields;
|
|
|
|
|
p_fenzhang.open;
|
|
|
|
|
|
|
|
|
|
p_sum_daili.close;
|
|
|
|
|
p_sum_daili.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_fenzhang.<2E>ұ<EFBFBD>'
|
|
|
|
|
+', SUM(t_ch_fee_fenzhang.Ӧ<>ս<EFBFBD><D5BD><EFBFBD>) AS DEBIT,'
|
|
|
|
|
+'SUM(t_ch_fee_fenzhang.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AS CREDIT '
|
|
|
|
|
+'FROM v_op_bscard INNER JOIN '
|
|
|
|
|
+'t_ch_fee_fenzhang ON '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD> = t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+str
|
|
|
|
|
+' group by t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_fenzhang.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' order by t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_fenzhang.<2E>ұ<EFBFBD>';
|
|
|
|
|
p_sum_daili.open;
|
|
|
|
|
|
|
|
|
|
p_sum_currency.close;
|
|
|
|
|
p_sum_currency.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select t_ch_fee_fenzhang.<2E>ұ<EFBFBD>'
|
|
|
|
|
+', SUM(t_ch_fee_fenzhang.Ӧ<>ս<EFBFBD><D5BD><EFBFBD>) AS DEBIT,'
|
|
|
|
|
+'SUM(t_ch_fee_fenzhang.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AS CREDIT '
|
|
|
|
|
+'FROM v_op_bscard INNER JOIN '
|
|
|
|
|
+'t_ch_fee_fenzhang ON '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD> = t_ch_fee_fenzhang.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+str
|
|
|
|
|
+' group by t_ch_fee_fenzhang.<2E>ұ<EFBFBD>'
|
|
|
|
|
+' order by t_ch_fee_fenzhang.<2E>ұ<EFBFBD>';
|
|
|
|
|
p_sum_currency.open;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Edit5.text<>''then
|
|
|
|
|
str:=str+' and t_ch_fee_agentdc.<2E>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit5.text+'%'+'''';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p_fenzhangbill.close;
|
|
|
|
|
p_fenzhangbill.Parameters.ParamByName('SQLStr').value:=
|
|
|
|
|
'select v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,t_ch_fee_agentdc.<2E>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_agentdc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_agentdc.<2E>ұ<EFBFBD>'
|
|
|
|
|
+', t_ch_fee_agentdc.Ӧ<>ս<EFBFBD><D5BD><EFBFBD> DEBIT'
|
|
|
|
|
+',t_ch_fee_agentdc.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CREDIT'
|
|
|
|
|
+',t_ch_fee_agentdc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BALANCE'
|
|
|
|
|
+' FROM v_op_bscard INNER JOIN '
|
|
|
|
|
+'t_ch_fee_agentdc ON '
|
|
|
|
|
+'v_op_bscard.<2E><><EFBFBD><EFBFBD> = t_ch_fee_agentdc.<2E><><EFBFBD><EFBFBD>'
|
|
|
|
|
+str
|
|
|
|
|
+' order by t_ch_fee_agentdc.<2E>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_agentdc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee_agentdc.<2E>ұ<EFBFBD>';
|
|
|
|
|
|
|
|
|
|
// showmessage(p_fenzhangbill.Parameters.ParamByName('SQLStr').value);
|
|
|
|
|
p_fenzhangbill.open;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
sys_print('<27><><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,p_fenzhang1,p_sum_daili1,p_sum_currency1,p_fenzhangbill1,nil,nil,nil);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
loadreggrid(dxdbgrid1,true,caption);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.N10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.N14Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.N12Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid1,97);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.N16Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
key:=#0;
|
|
|
|
|
frm_rp_fenzhang.bsSkinButton10Click(Sender);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_rp_fenzhang.MenuItem7Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid4);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|