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.

546 lines
16 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;
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;
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;
dxDBGrid1Column72: TdxDBGridColumn;
bsSkinButton2: TbsSkinButton;
dxDBGrid1Column69: TdxDBGridColumn;
lbl1: TLabel;
dbmmo1: TDBMemo;
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 bsSkinButton2Click(Sender: TObject);
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);
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;
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> like ''%'+wwDBLookupCombo49.text+'%''');
if Edit7.text<>''then
add(' and v_op_bscard_detail.<2E><><EFBFBD><EFBFBD> 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.bsSkinButton2Click(Sender: TObject);
begin
Edit16.SetFocus;
end;
end.