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.

856 lines
30 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_fee_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,inifiles;
type
Tfrm_op_fee_view = class(TForm)
tv_bscard_all: TADOQuery;
tv_bscard_all1: TDataSource;
t_ch_accept: TADOQuery;
Splitter1: TSplitter;
t_op_gain_main: TADOQuery;
t_op_gain: TADOQuery;
t_ch_pay: TADOQuery;
t_ch_accept1: TDataSource;
t_ch_pay1: TDataSource;
t_op_gain1: TDataSource;
t_op_gain_main1: TDataSource;
Panel3: TPanel;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridDateColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
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;
dxDBGrid1Column42: TdxDBGridMaskColumn;
dxDBGrid1Column43: TdxDBGridMaskColumn;
dxDBGrid1Column44: TdxDBGridMaskColumn;
dxDBGrid1Column45: TdxDBGridMaskColumn;
dxDBGrid1Column46: TdxDBGridMaskColumn;
dxDBGrid1Column47: TdxDBGridMaskColumn;
dxDBGrid1Column48: TdxDBGridCurrencyColumn;
dxDBGrid1Column49: TdxDBGridDateColumn;
dxDBGrid1Column50: TdxDBGridDateColumn;
dxDBGrid1Column51: TdxDBGridMaskColumn;
dxDBGrid1Column52: TdxDBGridDateColumn;
dxDBGrid1Column53: TdxDBGridDateColumn;
dxDBGrid1Column54: TdxDBGridDateColumn;
dxDBGrid1Column55: TdxDBGridDateColumn;
dxDBGrid1Column56: TdxDBGridMaskColumn;
dxDBGrid1Column57: TdxDBGridMaskColumn;
dxDBGrid1Column58: TdxDBGridMaskColumn;
dxDBGrid1Column59: TdxDBGridMaskColumn;
dxDBGrid1Column60: TdxDBGridMaskColumn;
dxDBGrid1Column61: TdxDBGridMaskColumn;
dxDBGrid1Column62: TdxDBGridMaskColumn;
dxDBGrid1Column63: TdxDBGridMaskColumn;
dxDBGrid1Column64: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
DBEdit1: TDBEdit;
DBEdit6: TDBEdit;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N74: TMenuItem;
qrytmp: TADOQuery;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N20: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
t_pin_gain: TADOStoredProc;
t_pin_gain1: TDataSource;
t_pin_pay: TADOStoredProc;
t_pin_pay1: TDataSource;
t_pin_accept: TADOStoredProc;
t_pin_accept1: TDataSource;
dxDBGrid1Column68: TdxDBGridColumn;
dxDBGrid1Column69: TdxDBGridColumn;
dxDBGrid1Column70: TdxDBGridColumn;
N7: TMenuItem;
N8: TMenuItem;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
Panel1: TPanel;
DBGridEh1: TDBGridEh;
DBGridEh2: TDBGridEh;
bsSkinPanel2: TbsSkinPanel;
Label3: TLabel;
bsSkinPanel3: TbsSkinPanel;
Label1: TLabel;
Panel2: TPanel;
bsSkinStdLabel4: TbsSkinStdLabel;
bsSkinStdLabel2: TbsSkinStdLabel;
bsSkinStdLabel3: TbsSkinStdLabel;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinStdLabel5: TbsSkinStdLabel;
bsSkinStdLabel6: TbsSkinStdLabel;
bsSkinStdLabel7: TbsSkinStdLabel;
bsSkinStdLabel8: TbsSkinStdLabel;
bsSkinStdLabel9: TbsSkinStdLabel;
bsSkinStdLabel10: TbsSkinStdLabel;
bsSkinDBEdit6: TbsSkinDBEdit;
bsSkinDBEdit4: TbsSkinDBEdit;
bsSkinDBEdit1: TbsSkinDBEdit;
bsSkinDBEdit3: TbsSkinDBEdit;
bsSkinDBEdit5: TbsSkinDBEdit;
bsSkinDBEdit2: TbsSkinDBEdit;
bsSkinDBEdit8: TbsSkinDBEdit;
bsSkinDBEdit7: TbsSkinDBEdit;
bsSkinDBEdit9: TbsSkinDBEdit;
bsSkinDBEdit10: TbsSkinDBEdit;
Panel9: TPanel;
bsSkinStdLabel11: TbsSkinStdLabel;
bsSkinStdLabel12: TbsSkinStdLabel;
bsSkinStdLabel13: TbsSkinStdLabel;
bsSkinStdLabel14: TbsSkinStdLabel;
bsSkinStdLabel15: TbsSkinStdLabel;
bsSkinStdLabel16: TbsSkinStdLabel;
bsSkinStdLabel17: TbsSkinStdLabel;
bsSkinStdLabel18: TbsSkinStdLabel;
bsSkinStdLabel19: TbsSkinStdLabel;
bsSkinStdLabel20: TbsSkinStdLabel;
bsSkinDBEdit11: TbsSkinDBEdit;
bsSkinDBEdit12: TbsSkinDBEdit;
bsSkinDBEdit13: TbsSkinDBEdit;
bsSkinDBEdit14: TbsSkinDBEdit;
bsSkinDBEdit15: TbsSkinDBEdit;
bsSkinDBEdit16: TbsSkinDBEdit;
bsSkinDBEdit17: TbsSkinDBEdit;
bsSkinDBEdit18: TbsSkinDBEdit;
bsSkinDBEdit19: TbsSkinDBEdit;
bsSkinDBEdit20: TbsSkinDBEdit;
Label125: TLabel;
Label15: TLabel;
Label9: TLabel;
Label124: TLabel;
Label146: TLabel;
Label145: TLabel;
Label32: TLabel;
Label21: TLabel;
Label27: TLabel;
Label30: TLabel;
Label12: TLabel;
Label11: TLabel;
Label13: TLabel;
Label126: TLabel;
Label34: TLabel;
Label39: TLabel;
Label18: TLabel;
Label73: TLabel;
Label22: TLabel;
Label35: TLabel;
Label26: TLabel;
Label10: TLabel;
Label14: TLabel;
Label16: TLabel;
Label17: TLabel;
Label164: TLabel;
Label19: TLabel;
Label20: TLabel;
Label36: TLabel;
Label4: TLabel;
DBEdit5: TDBEdit;
DBEdit81: TDBEdit;
DBEdit82: TDBEdit;
DBEdit83: TDBEdit;
DBEdit55: TDBEdit;
DBEdit56: TDBEdit;
DBEdit53: TDBEdit;
DBEdit54: TDBEdit;
DBEdit10: TDBEdit;
DBEdit17: TDBEdit;
DBEdit57: TDBEdit;
DBEdit58: TDBEdit;
DBEdit25: TDBEdit;
DBEdit59: TDBEdit;
DBEdit60: TDBEdit;
DBEdit61: TDBEdit;
DBEdit70: TDBEdit;
DBEdit71: TDBEdit;
DBEdit72: TDBEdit;
DBEdit73: TDBEdit;
DBEdit74: TDBEdit;
DBEdit66: TDBEdit;
DBEdit67: TDBEdit;
DBEdit68: TDBEdit;
DBEdit69: TDBEdit;
DBEdit64: TDBEdit;
DBEdit65: TDBEdit;
DBEdit63: TDBEdit;
DBEdit11: TDBEdit;
DBEdit13: TDBEdit;
bsSkinPanel5: TbsSkinPanel;
Label37: TLabel;
Label38: TLabel;
Label41: TLabel;
Label43: TLabel;
Label44: TLabel;
Label47: TLabel;
Label48: TLabel;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBEdit46: TDBEdit;
DBEdit47: TDBEdit;
Label23: TLabel;
DBMemo3: TDBMemo;
DBMemo4: TDBMemo;
Label24: TLabel;
Label29: TLabel;
DBMemo5: TDBMemo;
DBMemo6: TDBMemo;
Label33: TLabel;
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;
PopupMenu4: TPopupMenu;
N82: TMenuItem;
N83: TMenuItem;
N84: TMenuItem;
N85: TMenuItem;
N86: TMenuItem;
N87: TMenuItem;
N123: TMenuItem;
PopupMenu5: TPopupMenu;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
MenuItem10: TMenuItem;
MenuItem11: TMenuItem;
MenuItem12: TMenuItem;
N124: TMenuItem;
N125: TMenuItem;
N9: TMenuItem;
N16: TMenuItem;
bsSkinComboBox1: TbsSkinComboBox;
t_ch_acceptCH_ID: TAutoIncField;
t_ch_acceptDSDesigner: TStringField;
t_ch_acceptDSDesigner2: TStringField;
t_ch_acceptDSDesigner3: TStringField;
t_ch_acceptDSDesigner4: TStringField;
t_ch_acceptDSDesigner5: TStringField;
t_ch_acceptDSDesigner6: TStringField;
t_ch_acceptDSDesigner7: TStringField;
t_ch_acceptDSDesigner8: TStringField;
t_ch_acceptDSDesigner9: TBCDField;
t_ch_acceptDSDesigner10: TBCDField;
t_ch_acceptDSDesigner11: TBCDField;
t_ch_acceptDSDesigner12: TStringField;
t_ch_acceptDSDesigner13: TBCDField;
t_ch_acceptDSDesigner14: TStringField;
t_ch_acceptDSDesigner15: TBCDField;
t_ch_acceptDSDesigner16: TBCDField;
t_ch_acceptDSDesigner17: TDateTimeField;
t_ch_acceptDSDesigner18: TStringField;
t_ch_acceptDSDesigner19: TDateTimeField;
t_ch_acceptDSDesigner20: TStringField;
t_ch_acceptDSDesigner21: TDateTimeField;
t_ch_acceptDSDesigner22: TStringField;
t_ch_acceptDSDesigner23: TBooleanField;
t_ch_acceptid: TIntegerField;
t_ch_acceptDSDesigner24: TStringField;
t_ch_acceptDSDesigner25: TIntegerField;
t_ch_acceptDSDesigner26: TBCDField;
t_ch_acceptDSDesigner27: TBooleanField;
t_ch_acceptDSDesigner28: TBooleanField;
t_ch_acceptDSDesigner29: TBooleanField;
t_ch_acceptDSDesigner30: TBCDField;
t_ch_acceptDSDesigner31: TStringField;
t_ch_acceptDSDesigner32: TBooleanField;
t_ch_acceptDSDesigner33: TStringField;
t_ch_acceptDSDesigner34: TBooleanField;
t_ch_acceptDSDesigner35: TIntegerField;
t_ch_acceptDSDesigner36: TStringField;
t_ch_acceptDSDesigner37: TBCDField;
t_ch_acceptDSDesigner38: TBCDField;
t_ch_acceptDSDesigner39: TBooleanField;
t_ch_acceptDSDesigner40: TBCDField;
t_ch_acceptDSDesigner41: TStringField;
t_ch_acceptDSDesigner42: TDateTimeField;
t_ch_acceptDSDesigner43: TBCDField;
t_ch_acceptDSDesigner44: TBCDField;
t_ch_acceptDSDesigner45: TBCDField;
t_ch_acceptDSDesigner46: TBCDField;
t_ch_acceptDSDesigner47: TBCDField;
t_ch_acceptDSDesigner48: TBCDField;
t_ch_acceptDSDesigner49: TBCDField;
t_ch_acceptDSDesigner50: TBooleanField;
t_ch_acceptField: TStringField;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure DBEdit1Change(Sender: TObject);
procedure DBGridEh1GetCellParams(Sender: TObject; Column: TColumnEh;
AFont: TFont; var Background: TColor; State: TGridDrawState);
procedure DBGridEh2GetCellParams(Sender: TObject; Column: TColumnEh;
AFont: TFont; var Background: TColor; State: TGridDrawState);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N74Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton44Click(Sender: TObject);
procedure Edit16KeyPress(Sender: TObject; var Key: Char);
procedure N82Click(Sender: TObject);
procedure MenuItem5Click(Sender: TObject);
procedure N84Click(Sender: TObject);
procedure MenuItem10Click(Sender: TObject);
procedure N86Click(Sender: TObject);
procedure MenuItem12Click(Sender: TObject);
procedure N123Click(Sender: TObject);
procedure N125Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure bsSkinComboBox1Change(Sender: TObject);
procedure t_ch_acceptCalcFields(DataSet: TDataSet);
private
{ Private declarations }
procedure updateprn(V_value:integer);
public
{ Public declarations }
end;
var
frm_op_fee_view: Tfrm_op_fee_view;
implementation
{$R *.dfm}
uses u_main,my_sys_function, u_data_share, u_ch_prnFee_query,u_ch_piliang_prnfee,
u_ch_piliang_zhuprnfee;
procedure Tfrm_op_fee_view.bsSkinButton5Click(Sender: TObject);
begin
close ;
end;
procedure Tfrm_op_fee_view.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption+'1');
frm_op_fee_view.Hide;
frm_op_fee_view.ManualFloat(frm_op_fee_view.BoundsRect );
frm_main.freeTabs('frm_op_fee_view');
action:=cafree;
frm_op_fee_view:=nil;
end;
procedure Tfrm_op_fee_view.FormShow(Sender: TObject);
var
inifile1:Tinifile;
begin
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');
if if_open('293') then
begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
t_ch_accept.close;
t_ch_accept.SQL.Clear;
t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
end;
t_ch_accept.open;
if if_open('294') then
begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
t_ch_pay.close;
t_ch_pay.SQL.Clear;
t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
end;
t_ch_pay.open;
t_op_gain_main.Open ;
t_op_gain.Open ;
Edit16.SetFocus;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
if strtoint(get_parameters_value(197,'0'))<>0 then
bsSkinComboBox1.ItemIndex:=strtoint(get_parameters_value(197,'0'))-1
else bsSkinComboBox1.ItemIndex:=inifile1.ReadInteger('FEE','FEEVAT',0);
inifile1.free;
end;
procedure Tfrm_op_fee_view.DBEdit1Change(Sender: TObject);
begin
if (DBEdit1.Text='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ')then Panel9.Visible:=true
else Panel9.Visible:=false;
end;
procedure Tfrm_op_fee_view.DBGridEh1GetCellParams(Sender: TObject;
Column: TColumnEh; AFont: TFont; var Background: TColor;
State: TGridDrawState);
begin
if frm_data_share.t_code_fee_color.Locate('<27><><EFBFBD><EFBFBD>״̬',t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring,[])then
begin
try
Background:=StringToColor(frm_data_share.t_code_fee_color.fieldbyname('<27><>ɫ').asstring);
except
Background:=clwhite;
end;
end
else
Background:=clwhite;
end;
procedure Tfrm_op_fee_view.DBGridEh2GetCellParams(Sender: TObject;
Column: TColumnEh; AFont: TFont; var Background: TColor;
State: TGridDrawState);
begin
if frm_data_share.t_code_fee_color.Locate('<27><><EFBFBD><EFBFBD>״̬',t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring,[])then
begin
try
Background:=StringToColor(frm_data_share.t_code_fee_color.fieldbyname('<27><>ɫ').asstring);
except
Background:=clwhite;
end;
end
else
Background:=clwhite;
end;
procedure Tfrm_op_fee_view.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_fee_view.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_fee_view.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,112);
end;
procedure Tfrm_op_fee_view.N74Click(Sender: TObject);
begin
update_grid_sort(dxdbgrid1,112);
end;
procedure Tfrm_op_fee_view.bsSkinButton11Click(Sender: TObject);
begin
PopupMenu1.Popup(mouse.CursorPos.X,mouse.CursorPos.Y);
end;
procedure Tfrm_op_fee_view.updateprn(V_value: integer);
begin
end;
procedure Tfrm_op_fee_view.bsSkinButton1Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_fee_view.bsSkinButton44Click(Sender: TObject);
begin
with tv_bscard_all,sql do
begin
close ; clear ;
add('select * from v_op_bscard_detail where '+open_data('0039','¼<><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.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 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> in like ''%'+wwDBLookupCombo49.text+'%''');
if Edit7.text<>''then
add(' and v_op_bscard_detail.<2E><><EFBFBD><EFBFBD> in like ''%'+Edit7.text+'%''');
add(' order by <20><><EFBFBD><EFBFBD> ');
open ;
end ;
end;
procedure Tfrm_op_fee_view.Edit16KeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_op_fee_view.N82Click(Sender: TObject);
begin
fee_balance_view(t_ch_accept);
end;
procedure Tfrm_op_fee_view.MenuItem5Click(Sender: TObject);
begin
fee_balance_view(t_ch_pay);
end;
procedure Tfrm_op_fee_view.N84Click(Sender: TObject);
begin
fee_invoice_view(t_ch_accept);
end;
procedure Tfrm_op_fee_view.MenuItem10Click(Sender: TObject);
begin
fee_check_view(t_ch_pay);
end;
procedure Tfrm_op_fee_view.N86Click(Sender: TObject);
begin
fee_modify_view(t_ch_accept);
end;
procedure Tfrm_op_fee_view.MenuItem12Click(Sender: TObject);
begin
fee_modify_view(t_ch_pay);
end;
procedure Tfrm_op_fee_view.N123Click(Sender: TObject);
begin
fee_dui_view(t_ch_accept);
end;
procedure Tfrm_op_fee_view.N125Click(Sender: TObject);
begin
fee_dui_view(t_ch_pay);
end;
procedure Tfrm_op_fee_view.N16Click(Sender: TObject);
begin
fee_check_view(t_ch_accept);
end;
procedure Tfrm_op_fee_view.bsSkinComboBox1Change(Sender: TObject);
var
inifile1:Tinifile;
begin
case bsSkinComboBox1.ItemIndex of
0:
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
///
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
1:
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
///
bsSkinDBEdit6.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰Ӧ<CBB0><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰ë<CBB0><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end
else
begin
bsSkinDBEdit11.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit11.Text:=bsSkinDBEdit11.DataSource.DataSet.FieldByName(bsSkinDBEdit11.DataField).AsString;
bsSkinDBEdit12.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit12.Text:=bsSkinDBEdit12.DataSource.DataSet.FieldByName(bsSkinDBEdit12.DataField).AsString;
bsSkinDBEdit13.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit13.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit13.DataField).AsString;
bsSkinDBEdit14.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit14.Text:=bsSkinDBEdit14.DataSource.DataSet.FieldByName(bsSkinDBEdit14.DataField).AsString;
bsSkinDBEdit15.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit15.Text:=bsSkinDBEdit15.DataSource.DataSet.FieldByName(bsSkinDBEdit15.DataField).AsString;
bsSkinDBEdit16.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit16.Text:=bsSkinDBEdit16.DataSource.DataSet.FieldByName(bsSkinDBEdit16.DataField).AsString;
bsSkinDBEdit17.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit17.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit17.DataField).AsString;
bsSkinDBEdit18.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit18.Text:=bsSkinDBEdit17.DataSource.DataSet.FieldByName(bsSkinDBEdit18.DataField).AsString;
bsSkinDBEdit19.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit19.Text:=bsSkinDBEdit19.DataSource.DataSet.FieldByName(bsSkinDBEdit19.DataField).AsString;
bsSkinDBEdit20.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit20.Text:=bsSkinDBEdit20.DataSource.DataSet.FieldByName(bsSkinDBEdit20.DataField).AsString;
///
bsSkinDBEdit6.DataField:='<27><><EFBFBD><EFBFBD>USD';
bsSkinDBEdit6.Text:=bsSkinDBEdit6.DataSource.DataSet.FieldByName(bsSkinDBEdit6.DataField).AsString;
bsSkinDBEdit4.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit4.Text:=bsSkinDBEdit4.DataSource.DataSet.FieldByName(bsSkinDBEdit4.DataField).AsString;
bsSkinDBEdit1.DataField:='Ӧ<><D3A6>USD';
bsSkinDBEdit1.Text:=bsSkinDBEdit1.DataSource.DataSet.FieldByName(bsSkinDBEdit1.DataField).AsString;
bsSkinDBEdit3.DataField:='<27><><EFBFBD><EFBFBD>RMB';
bsSkinDBEdit3.Text:=bsSkinDBEdit3.DataSource.DataSet.FieldByName(bsSkinDBEdit3.DataField).AsString;
bsSkinDBEdit5.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit5.Text:=bsSkinDBEdit5.DataSource.DataSet.FieldByName(bsSkinDBEdit5.DataField).AsString;
bsSkinDBEdit2.DataField:='Ӧ<><D3A6>RMB';
bsSkinDBEdit2.Text:=bsSkinDBEdit2.DataSource.DataSet.FieldByName(bsSkinDBEdit2.DataField).AsString;
bsSkinDBEdit8.DataField:='ë<><C3AB><EFBFBD><EFBFBD>';
bsSkinDBEdit8.Text:=bsSkinDBEdit8.DataSource.DataSet.FieldByName(bsSkinDBEdit8.DataField).AsString;
bsSkinDBEdit7.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit7.Text:=bsSkinDBEdit7.DataSource.DataSet.FieldByName(bsSkinDBEdit7.DataField).AsString;
bsSkinDBEdit9.DataField:='<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>';
bsSkinDBEdit9.Text:=bsSkinDBEdit9.DataSource.DataSet.FieldByName(bsSkinDBEdit9.DataField).AsString;
bsSkinDBEdit10.DataField:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
bsSkinDBEdit10.Text:=bsSkinDBEdit10.DataSource.DataSet.FieldByName(bsSkinDBEdit10.DataField).AsString;
end;
end;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
inifile1.WriteInteger('FEE','FEEVAT',bsSkinComboBox1.ItemIndex);
inifile1.free;
end;
procedure Tfrm_op_fee_view.t_ch_acceptCalcFields(DataSet: TDataSet);
var
aQuery:TADOQuery;
s:string;
begin
{
s:='';
aQuery:=CreateAdoQuery;
with aQuery do
try
Close;SQL.Clear;
SQL.Add('Select <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,');
SQL.Add('sum(case when <20>ұ<EFBFBD>=''RMB'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as RMBAMT');
SQL.Add(',sum(case when <20>ұ<EFBFBD><>''RMB'' then ԭʼ<D4AD><CABC><EFBFBD><EFBFBD> else 0 end) as USDAMT');
SQL.Add('from v_fee_invoice_view');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Group by <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
Open;First;
while not Eof do
begin
if (fieldbyname('RMBAMT').AsFloat<>0) and (fieldbyname('USDAMT').AsFloat<>0) then
begin
if s='' then
begin
s:=fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString+' rmb:'+fieldbyname('RMBAMT').AsString;
s:=s+' usd:'+fieldbyname('USDAMT').AsString;
end
else
begin
s:=s+fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString+' rmb:'+fieldbyname('RMBAMT').AsString;
s:=s+' usd:'+fieldbyname('USDAMT').AsString;
end;
end
else
if (fieldbyname('RMBAMT').AsFloat<>0) and (fieldbyname('USDAMT').AsFloat=0) then
begin
if s='' then
begin
s:=fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString+' rmb:'+fieldbyname('RMBAMT').AsString;
end
else
begin
s:=s+fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString+' rmb:'+fieldbyname('RMBAMT').AsString;
end;
end
else
if (fieldbyname('USDAMT').AsFloat<>0) and (fieldbyname('RMBAMT').AsFloat=0) then
begin
if s='' then
begin
s:=fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString+' usd:'+fieldbyname('USDAMT').AsString;;
end
else
begin
s:=s+fieldbyname('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>').AsString+' usd:'+fieldbyname('USDAMT').AsString;;
end;
end;
next;
end;
dataset.FieldByName('<27><>Ʊ<EFBFBD><C6B1>ע').AsString:=s;
finally
free;
end;
}
end;
end.