You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

475 lines
18 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit U_op_state_view;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, u_fee_check, StdCtrls, Mask, DBCtrls, dxDBTLCl,
dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner, bsSkinCtrls, DB, ADODB,
Menus, Grids, Wwdbigrd, Wwdbgrid, ExtCtrls, bsSkinBoxCtrls, bsdbctrls,
DBGrids, DBGridEh, RxLookup, ComCtrls, bsSkinTabs, wwdblook, cxControls,
cxSplitter, wwdbedit, Wwdotdot, Wwdbcomb, wwdbdatetimepicker;
type
Tfrm_op_state_view = class(TForm)
tv_bscard_all: TADOQuery;
tv_bscard_all1: TDataSource;
Panel3: TPanel;
DBEdit1: TDBEdit;
DBEdit6: TDBEdit;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
qrytmp: TADOQuery;
bsSkinPanel4: TbsSkinPanel;
bsSkinPanel1: TbsSkinPanel;
Label116: TLabel;
Edit16: TEdit;
Label40: TLabel;
RxDBLookupCombo15: TRxDBLookupCombo;
Label2: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
bsSkinPanel6: TbsSkinPanel;
Label6: TLabel;
wwDBLookupCombo49: TwwDBLookupCombo;
Label5: TLabel;
Edit7: TEdit;
bsSkinPanel7: TbsSkinPanel;
bsSkinButton44: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
Panel1: TPanel;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridDateColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridCurrencyColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridDateColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridMaskColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column27: TdxDBGridCheckColumn;
dxDBGrid1Column28: TdxDBGridCheckColumn;
dxDBGrid1Column29: TdxDBGridCheckColumn;
dxDBGrid1Column30: TdxDBGridDateColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
dxDBGrid1Column34: TdxDBGridMaskColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column36: TdxDBGridMaskColumn;
dxDBGrid1Column37: TdxDBGridMaskColumn;
dxDBGrid1Column38: TdxDBGridDateColumn;
dxDBGrid1Column39: TdxDBGridMaskColumn;
dxDBGrid1Column40: TdxDBGridMaskColumn;
dxDBGrid1Column41: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
dxDBGrid1Column68: TdxDBGridColumn;
dxDBGrid1Column70: TdxDBGridColumn;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinGroupBox2: TbsSkinGroupBox;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridCheckColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridDateColumn2: TdxDBGridDateColumn;
dxDBGridColumn1: TdxDBGridColumn;
t_op_state: TADOQuery;
t_op_state1: TDataSource;
t_op_fee_group: TADOQuery;
t_op_fee_group1: TDataSource;
cxSplitter1: TcxSplitter;
Label10: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label1: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label3: TLabel;
wwDBComboBox8: TwwDBComboBox;
bsSkinPanel3: TbsSkinPanel;
bsSkinGroupBox3: TbsSkinGroupBox;
bsSkinGroupBox4: TbsSkinGroupBox;
cxSplitter2: TcxSplitter;
bsSkinPanel5: TbsSkinPanel;
Label4: TLabel;
DBText1: TDBText;
Label7: TLabel;
DBText6: TDBText;
Label8: TLabel;
DBText7: TDBText;
DBText2: TDBText;
Label9: TLabel;
Label11: TLabel;
DBText3: TDBText;
DBText8: TDBText;
Label12: TLabel;
Label13: TLabel;
DBText5: TDBText;
Label14: TLabel;
DBText4: TDBText;
DBText9: TDBText;
t_op_fee_groupC1: TDataSource;
t_op_fee_groupC: TADOQuery;
bsSkinPanel2: TbsSkinPanel;
bsSkinPanel8: TbsSkinPanel;
bsSkinBevel1: TbsSkinBevel;
bsSkinBevel2: TbsSkinBevel;
Memo1: TMemo;
Memo2: TMemo;
DBGridEh1: TDBGridEh;
DBGridEh2: TDBGridEh;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N74Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton44Click(Sender: TObject);
procedure Edit16KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinPanel3Resize(Sender: TObject);
procedure dxDBGrid1DblClick(Sender: TObject);
procedure tv_bscard_allBeforeScroll(DataSet: TDataSet);
procedure tv_bscard_allAfterScroll(DataSet: TDataSet);
procedure t_op_fee_groupAfterScroll(DataSet: TDataSet);
procedure t_op_fee_groupCAfterScroll(DataSet: TDataSet);
private
procedure getdrstrlist;
procedure getcrstrlist;
{ Private declarations }
public
isquery,getstr:boolean;
{ Public declarations }
end;
var
frm_op_state_view: Tfrm_op_state_view;
implementation
{$R *.dfm}
uses u_main,my_sys_function, u_data_share;
procedure Tfrm_op_state_view.bsSkinButton5Click(Sender: TObject);
begin
close ;
end;
procedure Tfrm_op_state_view.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption+'1');
frm_op_state_view.Hide;
frm_op_state_view.ManualFloat(frm_op_state_view.BoundsRect );
frm_main.freeTabs('frm_op_state_view');
action:=cafree;
frm_op_state_view:=nil;
end;
procedure Tfrm_op_state_view.FormShow(Sender: TObject);
begin
isquery:=false;
with tv_bscard_all,sql do
begin
Close; clear ;
add('select top 0 * from v_op_bscard_detail where (¼<><C2BC><EFBFBD><EFBFBD>='''+employee+''' or <20><><EFBFBD><EFBFBD>Ա='''+employee+''' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+employee+''') order by <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD> desc,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD> '); //<2F><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
open;
end ;
loadreggrid(dxdbgrid1,true,caption+'1');
t_op_state.open;
t_op_fee_group.Open;
t_op_fee_groupc.Open;
Edit16.SetFocus;
isquery:=true;
// getdrstrlist;
// getcrstrlist;
end;
procedure Tfrm_op_state_view.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_state_view.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_state_view.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,201);
end;
procedure Tfrm_op_state_view.N74Click(Sender: TObject);
begin
update_grid_sort(dxdbgrid1,201);
end;
procedure Tfrm_op_state_view.bsSkinButton1Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_state_view.bsSkinButton44Click(Sender: TObject);
begin
isquery:=false;
t_op_fee_group.close;
t_op_fee_groupC.close;
with tv_bscard_all,sql do
begin
close ; clear ;
add('select * from v_op_bscard_detail where '+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no'));
if Edit16.text<>''then
add(' and (v_op_bscard_detail.<2E><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit16.text+'%'+''' or v_op_bscard_detail.<2E><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit16.text+'%'+''' or v_op_bscard_detail.ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit16.text+'%'+''')');
if RxDBLookupCombo15.DisplayValue<>'' then
add(' and v_op_bscard_detail.<2E>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>='''+RxDBLookupCombo15.DisplayValue+'''');
if RxDBLookupCombo5.DisplayValue<>'' then
add(' and v_op_bscard_detail.<2E><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+RxDBLookupCombo5.DisplayValues[1]+''')');
if wwDBLookupCombo49.text<>''then
add(' and v_op_bscard_detail.<2E><><EFBFBD><EFBFBD> like ''%'+wwDBLookupCombo49.text+'%''');
if Edit7.text<>''then
add(' and v_op_bscard_detail.<2E><><EFBFBD><EFBFBD> like ''%'+Edit7.text+'%''');
if (wwDBDateTimePicker1.text<>'')or(wwDBDateTimePicker2.text<>'') then
begin
if wwDBDateTimePicker1.text<>'' then
add(' and v_op_bscard_detail.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='''+wwDBDateTimePicker1.text+'''');
if wwDBDateTimePicker2.text<>'' then
add(' and v_op_bscard_detail.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='''+wwDBDateTimePicker2.text+'''');
end;
if wwDBComboBox8.Text<>'' then
add(' and v_op_bscard_detail.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+wwDBComboBox8.Text+'''');
add(' order by v_op_bscard_detail.<2E><><EFBFBD><EFBFBD> ');
open ;
end ;
t_op_fee_group.open;
t_op_fee_groupC.open;
isquery:=true;
getdrstrlist;
getcrstrlist;
end;
procedure Tfrm_op_state_view.Edit16KeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_op_state_view.bsSkinPanel3Resize(Sender: TObject);
begin
bsSkinGroupBox3.Width:=round((bsSkinPanel3.Width)/2);
end;
procedure Tfrm_op_state_view.dxDBGrid1DblClick(Sender: TObject);
begin
fee_view(tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
end;
procedure Tfrm_op_state_view.getcrstrlist;
var
aQuery:TAdoQuery;
begin
Memo2.Lines.Clear;
if tv_bscard_all.IsEmpty then exit;
if t_op_fee_groupC.IsEmpty then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
sql.Add('select distinct <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ʽ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_balance where ');
sql.Add('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where <20><><EFBFBD><EFBFBD>=''4'' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('ch_id in (select ch_id from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_op_fee_groupC.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('<27><><EFBFBD><EFBFBD>״̬='''+t_op_fee_groupC.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString+''' and <20>ұ<EFBFBD>='''+t_op_fee_groupC.fieldbyname('<27>ұ<EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''))');
open;
if not IsEmpty then begin
Memo2.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ:');
first;
while not eof do begin
Memo2.Lines.Add('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD>ʽ:'+fieldbyname('<27><><EFBFBD>ʽ').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+formatdatetime('YYYY-MM-DD',fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDatetime));
next;
end;
Memo2.Lines.Add('---------------------------------------------------------------------------');
end;
close;sql.clear;
sql.Add('select distinct <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_dui where ');
sql.Add('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> in (select <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> from t_ch_fee where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>=1 and <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_op_fee_groupC.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('<27><><EFBFBD><EFBFBD>״̬='''+t_op_fee_groupC.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString+''' and <20>ұ<EFBFBD>='''+t_op_fee_groupC.fieldbyname('<27>ұ<EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''')');
open;
if not IsEmpty then begin
Memo2.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ:');
first;
while not eof do begin
Memo2.Lines.Add('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>:'+fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+formatdatetime('YYYY-MM-DD',fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDatetime));
next;
end;
Memo2.Lines.Add('---------------------------------------------------------------------------');
end;
close;sql.clear;
sql.Add('select distinct <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_check where ');
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where <20><><EFBFBD><EFBFBD>=''2'' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('ch_id in (select ch_id from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_op_fee_groupC.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('<27><><EFBFBD><EFBFBD>״̬='''+t_op_fee_groupC.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString+''' and <20>ұ<EFBFBD>='''+t_op_fee_groupC.fieldbyname('<27>ұ<EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''))');
open;
if not IsEmpty then begin
Memo2.Lines.Add('<27><><EFBFBD><EFBFBD><EBB8B6>:');
first;
while not eof do begin
Memo2.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+formatdatetime('YYYY-MM-DD',fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDatetime)+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
next;
end;
Memo2.Lines.Add('---------------------------------------------------------------------------');
end;
end;
finally
freeandnil(aQuery);
end;
end;
procedure Tfrm_op_state_view.getdrstrlist;
var
aQuery:TAdoQuery;
begin
Memo1.Lines.Clear;
if tv_bscard_all.IsEmpty then exit;
if t_op_fee_group.IsEmpty then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
sql.Add('select distinct <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ʽ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_balance where ');
sql.Add('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where <20><><EFBFBD><EFBFBD>=''3'' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('ch_id in (select ch_id from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('<27><><EFBFBD><EFBFBD>״̬='''+t_op_fee_group.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString+''' and <20>ұ<EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ұ<EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''))');
open;
if not IsEmpty then begin
Memo1.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ:');
first;
while not eof do begin
Memo1.Lines.Add('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD>ʽ:'+fieldbyname('<27><><EFBFBD>ʽ').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+formatdatetime('YYYY-MM-DD',fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDatetime));
next;
end;
Memo1.Lines.Add('---------------------------------------------------------------------------');
end;
close;sql.clear;
sql.Add('select distinct <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_dui where ');
sql.Add('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> in (select <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> from t_ch_fee where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>=1 and <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('<27><><EFBFBD><EFBFBD>״̬='''+t_op_fee_group.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString+''' and <20>ұ<EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ұ<EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''')');
open;
if not IsEmpty then begin
Memo1.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ:');
first;
while not eof do begin
Memo1.Lines.Add('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>:'+fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+formatdatetime('YYYY-MM-DD',fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDatetime));
next;
end;
Memo1.Lines.Add('---------------------------------------------------------------------------');
end;
close;sql.clear;
sql.Add('select distinct <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,<2C><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,<2C>Ƶ<EFBFBD><C6B5><EFBFBD>,<2C><>Ʊ̧ͷ from t_ch_invoice where ');
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where <20><><EFBFBD><EFBFBD>=''1'' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('ch_id in (select ch_id from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('<27><><EFBFBD><EFBFBD>״̬='''+t_op_fee_group.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString+''' and <20>ұ<EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ұ<EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''))');
open;
if not IsEmpty then begin
Memo1.Lines.Add('<27><>Ʊ<EFBFBD><C6B1>Ϣ:');
first;
while not eof do begin
Memo1.Lines.Add('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>:'+fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString+' <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>:'+formatdatetime('YYYY-MM-DD',fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsDatetime)+' <20><>Ʊ<EFBFBD><C6B1>:'+fieldbyname('<27>Ƶ<EFBFBD><C6B5><EFBFBD>').AsString+'<27><>Ʊ̧ͷ:'+fieldbyname('<27><>Ʊ̧ͷ').AsString);
next;
end;
Memo1.Lines.Add('---------------------------------------------------------------------------');
end;
close;sql.clear;
sql.Add('select distinct <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_invoice_shen where ');
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee_do where (<28><><EFBFBD><EFBFBD>=''1'' or <20><><EFBFBD><EFBFBD>=''7'') and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('ch_id in (select ch_id from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and ');
sql.Add('<27><><EFBFBD><EFBFBD>״̬='''+t_op_fee_group.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').AsString+''' and <20>ұ<EFBFBD>='''+t_op_fee_group.fieldbyname('<27>ұ<EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD>='''+tv_bscard_all.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''))');
open;
if not IsEmpty then begin
Memo1.Lines.Add('<27><><EFBFBD>뿪Ʊ<EBBFAA><C6B1>Ϣ:');
first;
while not eof do begin
Memo1.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+formatdatetime('YYYY-MM-DD',fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDatetime)+' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
next;
end;
Memo1.Lines.Add('---------------------------------------------------------------------------');
end;
end;
finally
freeandnil(aQuery);
end;
end;
procedure Tfrm_op_state_view.tv_bscard_allBeforeScroll(DataSet: TDataSet);
begin
getstr:=false;
t_op_fee_group.Close;
t_op_fee_groupC.Close;
end;
procedure Tfrm_op_state_view.tv_bscard_allAfterScroll(DataSet: TDataSet);
begin
t_op_fee_group.open;
t_op_fee_groupC.open;
t_op_fee_group.first;
t_op_fee_groupc.first;
getstr:=true;
if isquery then begin
getdrstrlist;
getcrstrlist;
end;
end;
procedure Tfrm_op_state_view.t_op_fee_groupAfterScroll(DataSet: TDataSet);
begin
if getstr and isquery then begin
getdrstrlist;
end;
end;
procedure Tfrm_op_state_view.t_op_fee_groupCAfterScroll(DataSet: TDataSet);
begin
if getstr and isquery then begin
getcrstrlist;
end;
end;
end.