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.

1301 lines
39 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_fee_check;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
DB, ADODB, StdCtrls, Mask, bsSkinBoxCtrls, bsdbctrls, bsSkinCtrls,Variants,
ExtCtrls, DBCtrls, Grids, Wwdbigrd, Wwdbgrid, Menus, XPMenu, RxLookup,
wwdblook, RxMemDS;
type
Tfra_fee_check = class(TFrame)
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinPanel4: TbsSkinPanel;
a_bo: TbsSkinGroupBox;
DBMemo1: TDBMemo;
a_delete: TbsSkinGroupBox;
DBMemo2: TDBMemo;
a_modify_old: TbsSkinGroupBox;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
a_modify_new: TbsSkinGroupBox;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBMemo3: TDBMemo;
wwDBGrid1: TwwDBGrid;
DBEdit17: TDBEdit;
bsSkinPanel5: TbsSkinPanel;
bsSkinPanel6: TbsSkinPanel;
p_bo: TbsSkinGroupBox;
DBMemo4: TDBMemo;
p_delete: TbsSkinGroupBox;
DBMemo5: TDBMemo;
p_modify_old: TbsSkinGroupBox;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
DBEdit19: TDBEdit;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
DBEdit23: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
DBEdit26: TDBEdit;
p_modify_new: TbsSkinGroupBox;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label39: TLabel;
Label40: TLabel;
DBEdit27: TDBEdit;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
DBEdit32: TDBEdit;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
wwDBGrid2: TwwDBGrid;
DBEdit18: TDBEdit;
Panel2: TPanel;
bsSkinButton5: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
t_ch_accept: TADOQuery;
t_ch_accept1: TDataSource;
t_ch_pay: TADOQuery;
t_ch_pay1: TDataSource;
t_op_gain: TADOQuery;
t_op_gain1: TDataSource;
a_shen_delete: TADOQuery;
a_shen_modify_old: TADOQuery;
a_shen_modify_new: TADOQuery;
a_shen_modify_new1: TDataSource;
a_shen_modify_old1: TDataSource;
a_shen_delete1: TDataSource;
p_shen_delete: TADOQuery;
p_shen_delete1: TDataSource;
p_shen_modify_old: TADOQuery;
p_shen_modify_old1: TDataSource;
p_shen_modify_new: TADOQuery;
p_shen_modify_new1: TDataSource;
PopupMenu4: TPopupMenu;
N82: TMenuItem;
N83: TMenuItem;
N84: TMenuItem;
N85: TMenuItem;
N86: TMenuItem;
N87: TMenuItem;
N88: TMenuItem;
PopupMenu5: TPopupMenu;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
MenuItem10: TMenuItem;
MenuItem11: TMenuItem;
MenuItem12: TMenuItem;
MenuItem13: TMenuItem;
MenuItem14: TMenuItem;
XPMenu1: TXPMenu;
bsSkinButton10: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
Label1: TLabel;
DBEdit35: TDBEdit;
Label2: TLabel;
DBEdit36: TDBEdit;
DBEdit37: TDBEdit;
DBEdit38: TDBEdit;
Label4: TLabel;
Label3: TLabel;
bsSkinPanel7: TbsSkinPanel;
Label5: TLabel;
Label6: TLabel;
DBEdit39: TDBEdit;
DBEdit40: TDBEdit;
bsSkinPanel8: TbsSkinPanel;
Label7: TLabel;
Label42: TLabel;
DBEdit41: TDBEdit;
DBEdit42: TDBEdit;
Panel3: TPanel;
bsSkinPanel2: TbsSkinPanel;
bsSkinStdLabel1: TbsSkinStdLabel;
bsSkinStdLabel2: TbsSkinStdLabel;
bsSkinStdLabel3: TbsSkinStdLabel;
bsSkinStdLabel4: TbsSkinStdLabel;
bsSkinStdLabel5: TbsSkinStdLabel;
bsSkinStdLabel6: TbsSkinStdLabel;
bsSkinStdLabel7: TbsSkinStdLabel;
bsSkinStdLabel8: TbsSkinStdLabel;
bsSkinStdLabel9: TbsSkinStdLabel;
bsSkinStdLabel10: TbsSkinStdLabel;
bsSkinDBEdit1: TbsSkinDBEdit;
bsSkinDBEdit2: TbsSkinDBEdit;
bsSkinDBEdit3: TbsSkinDBEdit;
bsSkinDBEdit4: TbsSkinDBEdit;
bsSkinDBEdit5: TbsSkinDBEdit;
bsSkinDBEdit6: TbsSkinDBEdit;
bsSkinDBEdit7: TbsSkinDBEdit;
bsSkinDBEdit8: TbsSkinDBEdit;
bsSkinDBEdit9: TbsSkinDBEdit;
bsSkinDBEdit10: TbsSkinDBEdit;
bsSkinPanel9: TbsSkinPanel;
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;
t_op_gain_main: TADOQuery;
t_op_gain_main1: TDataSource;
DBEdit43: TDBEdit;
Label43: TLabel;
DBEdit44: TDBEdit;
Label44: TLabel;
DBEdit45: TDBEdit;
Label45: TLabel;
DBEdit46: TDBEdit;
Label41: TLabel;
DBEdit47: TDBEdit;
Label46: TLabel;
DBMemo6: TDBMemo;
limited_str: TEdit;
chk_accept: TEdit;
chk_pay: TEdit;
ywlb: TEdit;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinPanel10: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Memo1: TMemo;
bsSkinButton15: TbsSkinButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
table_new1: TDataSource;
t_bz_balance: TRxMemoryData;
bsSkinButton17: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
Label47: TLabel;
Label48: TLabel;
DBEdit48: TDBEdit;
DBEdit49: TDBEdit;
Label49: TLabel;
DBEdit50: TDBEdit;
Label50: TLabel;
Label51: TLabel;
DBEdit51: TDBEdit;
DBEdit52: TDBEdit;
Label52: TLabel;
DBEdit53: TDBEdit;
Label53: TLabel;
Label54: TLabel;
DBEdit54: TDBEdit;
DBEdit55: TDBEdit;
Label55: TLabel;
DBEdit56: TDBEdit;
Label56: TLabel;
Label57: TLabel;
DBEdit57: TDBEdit;
DBEdit58: TDBEdit;
Label58: TLabel;
DBEdit59: TDBEdit;
procedure DBEdit17Change(Sender: TObject);
procedure DBEdit18Change(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure wwDBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
procedure wwDBGrid2DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinPanel2Resize(Sender: TObject);
procedure Panel1Resize(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure t_ch_acceptBeforePost(DataSet: TDataSet);
procedure t_ch_payBeforePost(DataSet: TDataSet);
procedure N82Click(Sender: TObject);
procedure N84Click(Sender: TObject);
procedure N86Click(Sender: TObject);
procedure N88Click(Sender: TObject);
procedure MenuItem5Click(Sender: TObject);
procedure MenuItem10Click(Sender: TObject);
procedure MenuItem12Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure DBEdit43Change(Sender: TObject);
procedure bsSkinPanel1Resize(Sender: TObject);
procedure bsSkinPanel9Resize(Sender: TObject);
procedure wwDBGrid1DblClick(Sender: TObject);
procedure wwDBGrid2DblClick(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinDBEdit8Change(Sender: TObject);
procedure bsSkinDBEdit18Change(Sender: TObject);
procedure getsumstr;
procedure t_ch_acceptAfterOpen(DataSet: TDataSet);
procedure t_ch_payAfterOpen(DataSet: TDataSet);
procedure t_ch_payAfterScroll(DataSet: TDataSet);
procedure t_ch_acceptAfterScroll(DataSet: TDataSet);
procedure bsSkinButton15Click(Sender: TObject);
procedure FrameEnter(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
private
{ Private declarations }
procedure showPcmx(mydataset:TADOQUERY);
public
{ Public declarations }
end;
implementation
uses my_sys_function, u_fee_check_shen, u_main,u_lcxunit, u_data_share,
u_Pcd_mx,u_check_modify, u_Amend_FeeList, u_amend_shenhe;
{$R *.dfm}
procedure Tfra_fee_check.getsumstr;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal:double;
begin
if not strtobool(get_parameters_value(150,'false')) then exit;
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memo1.Lines.Clear;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) and (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then exit;
aQuery1:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
armb:=0;
ausd:=0;
aot:=0;
atotal:=0;
prmb:=0;
pusd:=0;
pot:=0;
ptotal:=0;
try
accepteof:=false;
payeof:=false;
if (t_ch_accept.IsEmpty or (not t_ch_accept.Active)) then
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
acceptstr:=new_query(t_ch_accept);
aQuery1.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+acceptstr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery1.DataSource:=t_ch_accept.DataSource;
end;
aQuery1.Open;
aQuery1.first;
if (t_ch_pay.IsEmpty or (not t_ch_pay.Active)) then
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee where 1=2 group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
else begin
paystr:=new_query(t_ch_pay);
aQuery2.SQL.Text:='select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(case <20>ұ<EFBFBD> when ''RMB'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then <20><><EFBFBD><EFBFBD> else 0 end) as <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else <20><><EFBFBD><EFBFBD> end) end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'sum(<28><><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) as <20>ϼƽ<CFBC><C6BD><EFBFBD>'
+' from t_ch_fee '+paystr+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
aQuery2.DataSource:=t_ch_pay.DataSource;
end;
aQuery2.Open;
aQuery2.first;
while (not aQuery1.Eof) or (not aQuery2.Eof) do begin
if aQuery1.Eof then begin
str1:=FixLenStr('',72);
end else begin
str1:=FixLenStr(aQuery1.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
armb:=armb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
ausd:=ausd+aquery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
aot:=aot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
atotal:=atotal+aquery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',72);
end else begin
str2:=FixLenStr(aQuery2.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,20)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
prmb:=prmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>').AsFloat;
pusd:=pusd+aquery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').AsFloat;
pot:=pot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
ptotal:=ptotal+aquery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',72,'-');
str2:=FixLenStr('-',72,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>:',20)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',armb-prmb),12,' ',false)
+' '+FixLenStr('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',ausd-pusd),12,' ',false);
str2:=FixLenStr('',19)+' '+FixLenStr('<27><><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>:',13,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',aot-pot),12,' ',false)
+' '+FixLenStr('<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>:',12,' ',false)+' '+FixLenStr(FormatFloat('#,##0.00',atotal-ptotal),12,' ',false);
// if (edit_type.text='1') and if_open('226') then
memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='2') and if_open('227') then
// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='3') and if_open('228') then
/// memo1.Lines.Add(str1+'|'+str2);
// if (edit_type.text='4') and if_open('229') then
// memo1.Lines.Add(str1+'|'+str2);
finally
freeandnil(aQuery1);
freeandnil(aQuery2);
end;
if memo1.Lines.Count>0 then begin
str1:=FixLenStr('Ӧ<>տͻ<D5BF>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA>',12,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',12,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',12,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee_check.DBEdit17Change(Sender: TObject);
begin
//Ӧ<>ղ<EFBFBD><D5B2><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĵ<DEB8><C4B5><EFBFBD>ʾ
if t_ch_accept.IsEmpty then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
exit;
end;
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ') or
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>')then
begin
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
a_bo.Visible:=true;
a_bo.Align:=alRight;
exit;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
a_delete.Visible:=true;
a_delete.Align:=alRight;
exit;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_new.Visible:=true;
a_modify_new.Align:=alRight;
a_modify_old.Visible:=true;
a_modify_old.Align:=alRight;
exit;
end;
a_bo.Visible:=false;
a_bo.Align:=alNone;
a_delete.Visible:=false;
a_delete.Align:=alNone;
a_modify_old.Visible:=false;
a_modify_old.Align:=alNone;
a_modify_new.Visible:=false;
a_modify_new.Align:=alNone;
end;
procedure Tfra_fee_check.DBEdit18Change(Sender: TObject);
begin
//Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĵ<DEB8><C4B5><EFBFBD>ʾ
if t_ch_pay.IsEmpty then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
exit;
end;
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ') or
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>') then
begin
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
p_bo.Visible:=true;
p_bo.Align:=alRight;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
p_delete.Visible:=true;
p_delete.Align:=alRight;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_new.Visible:=true;
p_modify_new.Align:=alRight;
p_modify_old.Visible:=true;
p_modify_old.Align:=alRight;
exit;
end;
p_bo.Visible:=false;
p_bo.Align:=alNone;
p_delete.Visible:=false;
p_delete.Align:=alNone;
p_modify_old.Visible:=false;
p_modify_old.Align:=alNone;
p_modify_new.Visible:=false;
p_modify_new.Align:=alNone;
end;
procedure Tfra_fee_check.bsSkinButton1Click(Sender: TObject);
var M_field:string ;
i:integer ;
begin
if not if_open('266') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if G_Arrivdate='true' then
begin
M_field:=getfield(ywlb.text);
if Varisnull(t_ch_accept.DataSource.DataSet.FieldByName(M_field).Value) then
begin
showmessage(M_field+'<27><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+M_field);
exit ;
end ;
end ;
if (Trim(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>') then begin
UpdateopseaeStatus(t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27><>˾<EFBFBD><CBBE>');
t_ch_accept.Refresh
end else
fee_check_part(limited_str.text,t_ch_accept,wwDBGrid1,chk_accept.Text,ywlb.text);
end;
procedure Tfra_fee_check.bsSkinButton5Click(Sender: TObject);
var M_field:string ;
i:integer ;
begin
if not if_open('266') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if G_Arrivdate='true' then
begin
M_field:=getfield(ywlb.text);
if Varisnull(t_ch_pay.DataSource.DataSet.FieldByName(M_field).Value) then
begin
showmessage(M_field+'<27><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+M_field);
exit ;
end ;
end ;
if (Trim(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>') then begin
UpdateopseaeStatus(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27><>˾<EFBFBD><CBBE>');
t_ch_pay.Refresh
end else
fee_check_part(limited_str.text,t_ch_pay,wwDBGrid2,chk_pay.Text,ywlb.text);
end;
procedure Tfra_fee_check.bsSkinButton2Click(Sender: TObject);
begin
if not if_open('267') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
fee_back(limited_str.text,t_ch_accept,wwDBGrid1,chk_accept.Text,ywlb.Text);
end;
procedure Tfra_fee_check.bsSkinButton7Click(Sender: TObject);
begin
if not if_open('267') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
fee_back(limited_str.text,t_ch_pay,wwDBGrid2,chk_pay.Text,ywlb.Text);
end;
procedure Tfra_fee_check.wwDBGrid1DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_accept,wwDBGrid1,Rect,Field);
end;
procedure Tfra_fee_check.wwDBGrid2DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_pay,wwDBGrid2,Rect,Field);
end;
procedure Tfra_fee_check.bsSkinButton4Click(Sender: TObject);
begin
if not if_open('268') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
// fee_shen_check_ok(limited_str.text,t_ch_accept,a_shen_delete,a_shen_modify_old,a_shen_modify_new);
fee_shen_check_reok(limited_str.text,t_ch_accept,a_shen_delete,
a_shen_modify_old,a_shen_modify_new,chk_accept.Text,ywlb.text);
if Panel3.Visible then
t_op_gain.Requery();
if bsSkinPanel9.Visible then
t_op_gain_main.Requery();
end;
procedure Tfra_fee_check.bsSkinButton8Click(Sender: TObject);
begin
if not if_open('268') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
// fee_shen_check_ok(limited_str.text,t_ch_pay,p_shen_delete,p_shen_modify_old,p_shen_modify_new);
fee_shen_check_reok(limited_str.text,t_ch_pay,p_shen_delete,p_shen_modify_old,p_shen_modify_new,
chk_pay.Text,ywlb.text);
if Panel3.Visible then
t_op_gain.Requery();
if bsSkinPanel9.Visible then
t_op_gain_main.Requery();
end;
procedure Tfra_fee_check.bsSkinButton3Click(Sender: TObject);
begin
if not if_open('269') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
fee_shen_check_back(limited_str.text,t_ch_accept,a_shen_delete,a_shen_modify_old,a_shen_modify_new);
end;
procedure Tfra_fee_check.bsSkinButton9Click(Sender: TObject);
begin
if not if_open('269') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
fee_shen_check_back(limited_str.text,t_ch_pay,p_shen_delete,p_shen_modify_old,p_shen_modify_new);
end;
procedure Tfra_fee_check.bsSkinButton11Click(Sender: TObject);
begin
try
frm_fee_check_shen:=tfrm_fee_check_shen.Create(self);
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').Value;
frm_fee_check_shen.t_ch_fee.open;
frm_fee_check_shen.t_ch_fee_new.open;
frm_fee_check_shen.ShowModal;
finally
frm_fee_check_shen.Free;
end;
end;
procedure Tfra_fee_check.bsSkinButton6Click(Sender: TObject);
begin
try
frm_fee_check_shen:=tfrm_fee_check_shen.Create(self);
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
frm_fee_check_shen.t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').Value;
frm_fee_check_shen.t_ch_fee.open;
frm_fee_check_shen.t_ch_fee_new.open;
frm_fee_check_shen.ShowModal;
finally
frm_fee_check_shen.Free;
end;
end;
procedure Tfra_fee_check.bsSkinPanel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round((bsSkinPanel2.Width-196)/10);
bsSkinDBEdit1.Width:=i;
bsSkinDBEdit2.Width:=i;
bsSkinDBEdit3.Width:=i;
bsSkinDBEdit4.Width:=i;
bsSkinDBEdit5.Width:=i;
bsSkinDBEdit6.Width:=i;
bsSkinDBEdit7.Width:=i;
bsSkinDBEdit8.Width:=i;
bsSkinDBEdit9.Width:=i;
end;
procedure Tfra_fee_check.Panel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel1.Width/9);
bsSkinButton1.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton13.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton17.Width:=i;
end;
procedure Tfra_fee_check.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/7);
bsSkinButton5.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton16.Width:=i;
end;
procedure Tfra_fee_check.t_ch_acceptBeforePost(DataSet: TDataSet);
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_accept['<27><><EFBFBD><EFBFBD>״̬'];
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_accept['<27><><EFBFBD>뿪Ʊ']:=t_ch_accept['<27><><EFBFBD>뿪Ʊ'];
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfra_fee_check.t_ch_payBeforePost(DataSet: TDataSet);
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:=t_ch_pay['<27><><EFBFBD><EFBFBD>״̬'];
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_pay['<27><><EFBFBD>뿪Ʊ']:=t_ch_pay['<27><><EFBFBD>뿪Ʊ'];
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfra_fee_check.N82Click(Sender: TObject);
begin
fee_balance_view(t_ch_accept);
end;
procedure Tfra_fee_check.N84Click(Sender: TObject);
begin
fee_invoice_view(t_ch_accept);
end;
procedure Tfra_fee_check.N86Click(Sender: TObject);
begin
fee_modify_view(t_ch_accept);
end;
procedure Tfra_fee_check.N88Click(Sender: TObject);
begin
price_person_view;
end;
procedure Tfra_fee_check.MenuItem5Click(Sender: TObject);
begin
fee_balance_view(t_ch_pay);
end;
procedure Tfra_fee_check.MenuItem10Click(Sender: TObject);
begin
fee_check_view(t_ch_pay);
end;
procedure Tfra_fee_check.MenuItem12Click(Sender: TObject);
begin
fee_modify_view(t_ch_pay);
end;
procedure Tfra_fee_check.bsSkinButton10Click(Sender: TObject);
var M_field:string ;
begin
if not if_open('266') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if G_Arrivdate='true' then
begin
M_field:=getfield(ywlb.text);
if Varisnull(t_ch_accept.DataSource.DataSet.FieldByName(M_field).Value) then
begin
showmessage(M_field+'<27><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+M_field);
exit ;
end ;
end ;
if (Trim(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>') then begin
UpdateopseaeStatus(t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27><>˾<EFBFBD><CBBE>');
t_ch_accept.Refresh
end else
fee_check_all(limited_str.text,t_ch_accept,chk_accept.text,ywlb.text);
end;
procedure Tfra_fee_check.bsSkinButton12Click(Sender: TObject);
var M_field:string ;
begin
//ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if not if_open('266') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if G_Arrivdate='true' then
begin
M_field:=getfield(ywlb.text);
if Varisnull(t_ch_pay.DataSource.DataSet.FieldByName(M_field).Value) then
begin
showmessage(M_field+'<27><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+M_field);
exit ;
end ;
end ;
if (Trim(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='<27><><EFBFBD>ĵ<EFBFBD>') then begin
UpdateopseaeStatus(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27><>˾<EFBFBD><CBBE>');
t_ch_pay.Refresh
end else
fee_check_all(limited_str.text,t_ch_pay,chk_pay.text,ywlb.text);
end;
procedure Tfra_fee_check.DBEdit43Change(Sender: TObject);
begin
//<2F><>Ʊ<EFBFBD><C6B1>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ʾ
if Panel3.Visible then
begin
if (DBEdit43.Text='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ') or (DBEdit43.Text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') or (DBEdit43.Text='<27><>·<EFBFBD><C2B7>Ʊ') then
begin
bsSkinPanel9.Visible:=true;
Panel3.Height:=40;
end
else
begin
bsSkinPanel9.Visible:=false;
Panel3.Height:=20;
end;
end;
end;
procedure Tfra_fee_check.bsSkinPanel1Resize(Sender: TObject);
begin
bsSkinPanel3.Height:=round((bsSkinPanel1.height)/2);
end;
procedure Tfra_fee_check.bsSkinPanel9Resize(Sender: TObject);
var
i:integer;
begin
//<2F><>ť<EFBFBD><C5A5><EFBFBD>ȼ<EFBFBD><C8BC><EFBFBD>
i:=round((bsSkinPanel9.Width-196)/10);
bsSkinDBEdit11.Width:=i;
bsSkinDBEdit12.Width:=i;
bsSkinDBEdit13.Width:=i;
bsSkinDBEdit14.Width:=i;
bsSkinDBEdit15.Width:=i;
bsSkinDBEdit16.Width:=i;
bsSkinDBEdit17.Width:=i;
bsSkinDBEdit18.Width:=i;
bsSkinDBEdit19.Width:=i;
end;
procedure Tfra_fee_check.showPcmx(mydataset:TADOQUERY);
begin
//<2F><>ʾ<EFBFBD>ɳ<EFBFBD><C9B3><EFBFBD>ϸ
if mydataset.FieldByName('<27><><EFBFBD>㵥λ').asstring='<27><><EFBFBD><EFBFBD>' then
begin
frm_Pcd_mx:=Tfrm_Pcd_mx.create(self);
with frm_Pcd_mx.t_op_letter do
begin
Close ;
parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=mydataset.fieldbyname('<27><><EFBFBD><EFBFBD>').value ;
open ;
end ;
frm_Pcd_mx.t_op_letter_pc.Open ;
frm_Pcd_mx.showmodal ;
frm_Pcd_mx.free ;
end ;
end;
procedure Tfra_fee_check.wwDBGrid1DblClick(Sender: TObject);
begin
showPcmx(t_ch_accept);
end;
procedure Tfra_fee_check.wwDBGrid2DblClick(Sender: TObject);
begin
showPcmx(t_ch_Pay);
end;
procedure Tfra_fee_check.bsSkinButton13Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('update t_ch_fee set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ=1 where CH_ID='+inttostr(t_ch_accept.FieldbyName('CH_ID').asinteger));
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
t_ch_accept.Requery();
end;
procedure Tfra_fee_check.bsSkinButton14Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
//ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('update t_ch_fee set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ=0 where CH_ID='+inttostr(t_ch_accept.FieldbyName('CH_ID').asinteger));
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
t_ch_accept.Requery();
end;
procedure Tfra_fee_check.bsSkinDBEdit8Change(Sender: TObject);
begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then
bsSkinDBEdit8.font.Color:=clRed
else
bsSkinDBEdit8.font.Color:=clBlue;
end;
procedure Tfra_fee_check.bsSkinDBEdit18Change(Sender: TObject);
begin
if t_op_gain_main.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then
bsSkinDBEdit18.font.Color:=clRed
else
bsSkinDBEdit18.font.Color:=clBlue;
end;
procedure Tfra_fee_check.t_ch_acceptAfterOpen(DataSet: TDataSet);
begin
getsumstr;
end;
procedure Tfra_fee_check.t_ch_payAfterOpen(DataSet: TDataSet);
begin
getsumstr;
end;
procedure Tfra_fee_check.t_ch_payAfterScroll(DataSet: TDataSet);
begin
getsumstr;
end;
procedure Tfra_fee_check.t_ch_acceptAfterScroll(DataSet: TDataSet);
begin
getsumstr;
end;
procedure Tfra_fee_check.bsSkinButton15Click(Sender: TObject);
begin
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
showmessage('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD>');
exit;
end;
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
showmessage('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><E1BDBB><EFBFBD>񣬲<EFBFBD><F1A3ACB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD>');
exit;
end;
try
if not ASSIGNED(frm_check_modify) then
frm_check_modify:=Tfrm_check_modify.Create(application);
frm_check_modify.RxDBLookupCombo1.Value:='<27><><EFBFBD>˷<EFBFBD>';
frm_check_modify.RxDBLookupCombo2.Value:='Ԫ<><D4AA>(<28><><EFBFBD><EFBFBD>)';
{
ShowMessage('000');
frm_check_modify.wwDBLookupCombo3.Value:='USD';
ShowMessage('001');
ShowMessage(IntToStr(frm_data_share.t_code_currency.RecordCount));
ShowMessage('002');
if frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>','USD',[])THEN
frm_check_modify.Edit4.text:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
// frm_check_modify.Edit4.text:=FormatFloat('0.00;-0.00;0', getUsdExRate(FormatDateTime('YYYY-MM-DD',t_ch_Pay1.dataset.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime)));
}
frm_check_modify.table_new1:=t_ch_Pay1;
frm_check_modify.ywlb.Text:=ywlb.Text;
frm_check_modify.chk_pay.Text:=chk_pay.Text;
frm_check_modify.ShowModal;
finally
frm_check_modify.Free;
frm_check_modify:=nil;
end;
end;
procedure Tfra_fee_check.FrameEnter(Sender: TObject);
var
str_list:Tstringlist;
i,k,j:integer;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><E8B4A6>
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if (ywlb.Text='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>')or(ywlb.Text='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>') then
begin
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
try
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000);
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
t_bz_balance.post;
try
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D>ƷѶ<C6B7>';
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
begin
if s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
else
t_bz_balance['three']:=1;
end
else
begin
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
end;
except
;
end;
k:=0;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='5-TEU';
t_bz_balance['two']:='TEU';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>TEU').asinteger;
t_bz_balance.post;
str_list:=Tstringlist.Create();
str_list.Text:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>׼').asstring;
for i:=0 to str_list.Count-1 do
begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i+k+6)+'-'+copy(str_list[i],1,pos('*',str_list[i])-1);
t_bz_balance['two']:=copy(str_list[i],pos('-',str_list[i])+1,length(str_list[i])+1-pos('-',str_list[i]));
t_bz_balance['three']:=strtofloat(copy(str_list[i],pos('*',str_list[i])+1,pos('-',str_list[i])-pos('*',str_list[i])-1));
t_bz_balance.post;
end;
finally
str_list.free;
end;
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
end;
//<2F><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
if (ywlb.Text='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>')or(ywlb.Text='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>') then
begin
try
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>';
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>').asfloat);
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
finally
;
end;
end;
//<2F><><EFBFBD>ܳ<EFBFBD>ҵ<EFBFBD><D2B5>
if (ywlb.Text='<27><><EFBFBD>ܳ<EFBFBD>ҵ<EFBFBD><D2B5>') then
begin
try
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='3-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
finally
;
end;
end;
//<2F><>·ҵ<C2B7><D2B5>
if (ywlb.Text='<27><>·ҵ<C2B7><D2B5>') then
begin
try
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
finally
;
end;
end;
end;
procedure Tfra_fee_check.N3Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring<>employee then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩɾ<C8A8><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>');
Exit;
end;
fee_befor_modify(t_ch_pay);
end;
procedure Tfra_fee_check.bsSkinButton17Click(Sender: TObject);
begin
t_ch_accept.DataSource.DataSet.Edit;
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=True then
t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean:=False
else
t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=True;
t_ch_accept.DataSource.DataSet.post;
end;
procedure Tfra_fee_check.bsSkinButton16Click(Sender: TObject);
begin
t_ch_pay.DataSource.DataSet.Edit;
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean=True then
t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean:=False
else
t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=True;
t_ch_pay.DataSource.DataSet.post;
end;
end.