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.

5359 lines
179 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;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
RxMemDS, Menus, DB, ADODB, wwdblook, StdCtrls, bsSkinCtrls, ExtCtrls,
DBCtrls, Mask, bsSkinBoxCtrls, Grids, Wwdbigrd, Wwdbgrid, Variants,
bsdbctrls,ComObj,XPMenu, Psock, NMsmtp, IdComponent, IdTCPConnection,
IdTCPClient, IdMessageClient, IdSMTP, IdBaseComponent, IdMessage,
IdExplicitTLSClientServerBase, IdSMTPBase, wwcheckbox;
type
Tfra_fee = class(TFrame)
Panel11: TPanel;
t_ch_accept: TADOQuery;
t_ch_accept1: TDataSource;
t_ch_pay: TADOQuery;
t_ch_pay1: TDataSource;
PopupMenu1: TPopupMenu;
N2: TMenuItem;
N3: TMenuItem;
N1: TMenuItem;
N4: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N9: TMenuItem;
t_bz_balance: TRxMemoryData;
t_bz_client: TRxMemoryData;
a_shen_delete: TADOQuery;
a_shen_delete1: TDataSource;
a_shen_modify_old: TADOQuery;
a_shen_modify_old1: TDataSource;
a_shen_modify_new1: TDataSource;
a_shen_modify_new: TADOQuery;
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;
PopupMenu2: TPopupMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
MenuItem7: TMenuItem;
MenuItem8: TMenuItem;
MenuItem9: TMenuItem;
PopupMenu3: TPopupMenu;
N10: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
N31: TMenuItem;
N11: TMenuItem;
N12: TMenuItem;
N32: TMenuItem;
N33: TMenuItem;
N34: TMenuItem;
N19: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N37: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
N38: TMenuItem;
N39: TMenuItem;
N40: TMenuItem;
N13: TMenuItem;
N14: TMenuItem;
N41: TMenuItem;
N42: TMenuItem;
N43: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N44: TMenuItem;
N45: TMenuItem;
N46: TMenuItem;
N24: TMenuItem;
N25: TMenuItem;
N28: TMenuItem;
N47: TMenuItem;
N48: TMenuItem;
N49: TMenuItem;
N27: TMenuItem;
N26: TMenuItem;
N50: TMenuItem;
N51: TMenuItem;
N52: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N53: TMenuItem;
N54: TMenuItem;
N55: TMenuItem;
t_ch_client: TADOQuery;
t_ch_client1: TDataSource;
t_op_gain: TADOQuery;
t_op_gain1: TDataSource;
Panel3: TPanel;
Panel4: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
Panel5: TPanel;
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;
wwDBLookupCombo1: TwwDBLookupCombo;
wwDBLookupCombo5: TwwDBLookupCombo;
wwDBLookupCombo2: TwwDBLookupCombo;
wwDBLookupCombo4: TwwDBLookupCombo;
wwDBLookupCombo3: TwwDBLookupCombo;
edit_type: TEdit;
DBEdit17: TDBEdit;
Panel1: TPanel;
Panel6: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Panel7: TPanel;
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;
DBEdit18: TDBEdit;
wwDBLookupCombo6: TwwDBLookupCombo;
wwDBLookupCombo7: TwwDBLookupCombo;
wwDBLookupCombo8: TwwDBLookupCombo;
wwDBLookupCombo9: TwwDBLookupCombo;
wwDBLookupCombo10: TwwDBLookupCombo;
wwDBGrid2: TwwDBGrid;
edit_report: TEdit;
N56: TMenuItem;
N57: TMenuItem;
N58: TMenuItem;
N59: TMenuItem;
N60: TMenuItem;
N61: TMenuItem;
N62: TMenuItem;
N63: TMenuItem;
N64: TMenuItem;
N65: TMenuItem;
N66: TMenuItem;
N67: TMenuItem;
N68: TMenuItem;
N69: TMenuItem;
N70: TMenuItem;
N71: TMenuItem;
N72: TMenuItem;
N73: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N74: TMenuItem;
N75: TMenuItem;
N76: TMenuItem;
N77: TMenuItem;
N78: TMenuItem;
N79: TMenuItem;
N80: TMenuItem;
N81: TMenuItem;
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;
PopupMenu6: TPopupMenu;
N89: TMenuItem;
N90: TMenuItem;
N91: TMenuItem;
PopupMenu7: TPopupMenu;
MenuItem15: TMenuItem;
MenuItem16: TMenuItem;
MenuItem17: TMenuItem;
XPMenu1: TXPMenu;
N92: TMenuItem;
N93: TMenuItem;
N94: TMenuItem;
N95: TMenuItem;
N96: TMenuItem;
N97: TMenuItem;
N98: TMenuItem;
N99: TMenuItem;
N100: TMenuItem;
N101: TMenuItem;
N102: TMenuItem;
N103: TMenuItem;
Label1: TLabel;
DBEdit35: TDBEdit;
Label2: TLabel;
DBEdit36: TDBEdit;
Label3: TLabel;
DBEdit37: TDBEdit;
Label4: TLabel;
DBEdit38: TDBEdit;
bsSkinPanel1: TbsSkinPanel;
Label5: TLabel;
DBEdit39: TDBEdit;
Label6: TLabel;
DBEdit40: TDBEdit;
bsSkinPanel2: TbsSkinPanel;
Label7: TLabel;
Label42: TLabel;
DBEdit41: TDBEdit;
DBEdit42: TDBEdit;
N104: TMenuItem;
N105: TMenuItem;
N106: TMenuItem;
N107: TMenuItem;
N108: TMenuItem;
N109: TMenuItem;
N110: TMenuItem;
N111: TMenuItem;
N112: TMenuItem;
N113: TMenuItem;
N114: TMenuItem;
N115: TMenuItem;
N116: TMenuItem;
N117: TMenuItem;
edit_data: TEdit;
N118: TMenuItem;
N119: TMenuItem;
N120: TMenuItem;
N121: TMenuItem;
t_ch_fee_truck: TADOQuery;
t_ch_fee_truck1: TDataSource;
Panel8: TPanel;
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;
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;
t_op_gain_main: TADOQuery;
t_op_gain_main1: TDataSource;
DBEdit43: TDBEdit;
t_ch_client_sum: TADOQuery;
t_ch_client_sum1: TDataSource;
Label43: TLabel;
DBEdit44: TDBEdit;
Label44: TLabel;
DBEdit45: TDBEdit;
Label45: TLabel;
DBEdit46: TDBEdit;
Label41: TLabel;
DBEdit47: TDBEdit;
DBMemo7: TDBMemo;
Label46: TLabel;
baoguan: TEdit;
N122: TMenuItem;
INVOICEEXCEL1: TMenuItem;
wwDBLookupCombo11: TwwDBLookupCombo;
wwDBLookupCombo12: TwwDBLookupCombo;
N123: TMenuItem;
N124: TMenuItem;
a_price_view: TADOQuery;
dsa_price_view: TDataSource;
ap_price_view: TbsSkinGroupBox;
Label48: TLabel;
DBEdit49: TDBEdit;
DBEdit48: TDBEdit;
IdMsg: TIdMessage;
SMTP1: TIdSMTP;
bsSkinPanel3: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Memo1: TMemo;
DBEdit50: TDBEdit;
Label47: TLabel;
DBEdit51: TDBEdit;
Label49: TLabel;
DBEdit52: TDBEdit;
Label50: TLabel;
DBEdit53: TDBEdit;
Label51: TLabel;
DBEdit54: TDBEdit;
Label52: TLabel;
Label53: TLabel;
DBEdit55: TDBEdit;
DBEdit56: TDBEdit;
Label54: TLabel;
Label55: TLabel;
DBEdit57: TDBEdit;
DBEdit58: TDBEdit;
N125: TMenuItem;
N126: TMenuItem;
procedure FrameEnter(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure t_ch_acceptAfterInsert(DataSet: TDataSet);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure t_ch_acceptBeforePost(DataSet: TDataSet);
procedure t_ch_acceptBeforeEdit(DataSet: TDataSet);
procedure wwDBLookupCombo5Change(Sender: TObject);
procedure wwDBLookupCombo4Change(Sender: TObject);
procedure wwDBLookupCombo3Change(Sender: TObject);
procedure wwDBLookupCombo7Change(Sender: TObject);
procedure wwDBLookupCombo9Change(Sender: TObject);
procedure wwDBLookupCombo10Change(Sender: TObject);
procedure t_ch_payAfterInsert(DataSet: TDataSet);
procedure t_ch_payBeforeEdit(DataSet: TDataSet);
procedure t_ch_payBeforePost(DataSet: TDataSet);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton16Click(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 bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure DBEdit17Change(Sender: TObject);
procedure DBEdit18Change(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem7Click(Sender: TObject);
procedure wwDBGrid1ColExit(Sender: TObject);
procedure wwDBGrid2ColExit(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure N29Click(Sender: TObject);
procedure N31Click(Sender: TObject);
procedure N41Click(Sender: TObject);
procedure N43Click(Sender: TObject);
procedure N53Click(Sender: TObject);
procedure N55Click(Sender: TObject);
procedure N35Click(Sender: TObject);
procedure N37Click(Sender: TObject);
procedure N47Click(Sender: TObject);
procedure N49Click(Sender: TObject);
procedure N38Click(Sender: TObject);
procedure N40Click(Sender: TObject);
procedure N50Click(Sender: TObject);
procedure N52Click(Sender: TObject);
procedure N32Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N44Click(Sender: TObject);
procedure N46Click(Sender: TObject);
procedure t_ch_acceptAfterPost(DataSet: TDataSet);
procedure t_ch_acceptBeforeInsert(DataSet: TDataSet);
procedure t_ch_payBeforeInsert(DataSet: TDataSet);
procedure Panel11Resize(Sender: TObject);
procedure Panel3Resize(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure N56Click(Sender: TObject);
procedure N58Click(Sender: TObject);
procedure N60Click(Sender: TObject);
procedure N62Click(Sender: TObject);
procedure N64Click(Sender: TObject);
procedure N66Click(Sender: TObject);
procedure N68Click(Sender: TObject);
procedure N70Click(Sender: TObject);
procedure N72Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure MenuItem3Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N77Click(Sender: TObject);
procedure N74Click(Sender: TObject);
procedure N75Click(Sender: TObject);
procedure N79Click(Sender: TObject);
procedure N81Click(Sender: TObject);
procedure MenuItem5Click(Sender: TObject);
procedure N82Click(Sender: TObject);
procedure N84Click(Sender: TObject);
procedure MenuItem10Click(Sender: TObject);
procedure N86Click(Sender: TObject);
procedure MenuItem12Click(Sender: TObject);
procedure N88Click(Sender: TObject);
procedure N89Click(Sender: TObject);
procedure MenuItem15Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure N91Click(Sender: TObject);
procedure MenuItem17Click(Sender: TObject);
procedure N93Click(Sender: TObject);
procedure N95Click(Sender: TObject);
procedure N97Click(Sender: TObject);
procedure N101Click(Sender: TObject);
procedure N103Click(Sender: TObject);
procedure t_ch_acceptAfterDelete(DataSet: TDataSet);
procedure t_ch_payAfterPost(DataSet: TDataSet);
procedure N108Click(Sender: TObject);
procedure N113Click(Sender: TObject);
procedure N110Click(Sender: TObject);
procedure N112Click(Sender: TObject);
procedure N115Click(Sender: TObject);
procedure N117Click(Sender: TObject);
procedure N119Click(Sender: TObject);
procedure N121Click(Sender: TObject);
procedure DBEdit43Change(Sender: TObject);
procedure Panel9Resize(Sender: TObject);
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo6KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo5Exit(Sender: TObject);
procedure wwDBLookupCombo7Exit(Sender: TObject);
procedure a_shen_modify_newBeforePost(DataSet: TDataSet);
procedure p_shen_modify_newBeforePost(DataSet: TDataSet);
procedure INVOICEEXCEL1Click(Sender: TObject);
procedure t_ch_acceptDSDesigner5Change(Sender: TField);
procedure t_ch_payDSDesigner5Change(Sender: TField);
procedure N124Click(Sender: TObject);
procedure DBEdit48Change(Sender: TObject);
procedure t_ch_acceptAfterOpen(DataSet: TDataSet);
procedure t_ch_payAfterOpen(DataSet: TDataSet);
procedure NMSMTP1Connect(Sender: TObject);
procedure DBEdit50Change(Sender: TObject);
procedure N126Click(Sender: TObject);
private
procedure iszeroprofit;
procedure t_ch_acceptdjoncharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure t_ch_paydjoncharge(Sender: TField); //<2F><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure DatasetNOPricecharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure t_ch_acceptcrmcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure DatasetAmtcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ Private declarations }
public
procedure getsumstr;//<2F>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>
{ Public declarations }
end;
implementation
uses u_main, my_sys_function, u_data_share, u_code_fee_project_add,
u_fee_history, u_fee_list, u_ch_fee_truck, u_zeroprofit, u_fee_baoganadd;
{$R *.dfm}
procedure Tfra_fee.FrameEnter(Sender: TObject);
var
str_list:Tstringlist;
i,k:integer;
aQuery:TADOQuery;
begin
if (edit_type.text='1')or(edit_type.text='2') then
begin
if strtobool(get_parameters_value(30,'false'))then
begin
N118.Visible:=true;
N119.Visible:=true;
N120.Visible:=true;
N121.Visible:=true;
end
else
begin
N118.Visible:=false;
N119.Visible:=false;
N120.Visible:=false;
N121.Visible:=false;
end;
end;
wwDBGrid1.AddField('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>');
wwDBGrid1.AddField('<27><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>');
wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>״̬').ReadOnly:=True;
wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>״̬').ReadOnly:=True;
if strtobool(get_parameters_value(64,'false'))then
begin
if wwDBGrid1.ColumnByName('<27><><EFBFBD><EFBFBD>').FieldName='' then
begin
wwDBGrid1.AddField('<27><><EFBFBD><EFBFBD>');
wwDBGrid1.SetControlType('<27><><EFBFBD><EFBFBD>',fctCheckBox, 'TRUE;FALSE');
wwDBGrid1.Invalidate;
wwDBGrid1.Fields[wwDBGrid1.FieldCount-1].Index:=1;
end;
if wwDBGrid2.ColumnByName('<27><><EFBFBD><EFBFBD>').FieldName='' then
begin
wwDBGrid2.AddField('<27><><EFBFBD><EFBFBD>');
wwDBGrid2.SetControlType('<27><><EFBFBD><EFBFBD>',fctCheckBox, 'TRUE;FALSE');
wwDBGrid2.Invalidate;
wwDBGrid2.Fields[wwDBGrid2.FieldCount-1].Index:=1;
end;
end;
if not if_open('267') then begin
N82.Visible:=false;
N83.Visible:=false;
N84.Visible:=false;
N85.Visible:=false;
MenuItem5.Visible:=false;
MenuItem6.Visible:=false;
MenuItem10.Visible:=false;
MenuItem11.Visible:=false;
end;
if (edit_type.text='1')or(edit_type.text='2') 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/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;
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D>ƷѶ<C6B7>';
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
if (t_ch_accept.DataSource.DataSet.FieldByName('ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='<27><>Ʊ<EFBFBD><C6B1>Ʊ') then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from t_op_seae where <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>='''+t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']+'''');
Open;
if s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
begin
if s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
t_bz_balance['three']:=s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
else
t_bz_balance['three']:=1;
end
else
begin
if fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
end;
end;
finally
FreeAndNil(aQuery);
end;
end else begin
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;
end;
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;
k:=0;
if baoguan.text='1'then
begin
t_bz_balance.Append;
t_bz_balance['one']:='6-<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;
k:=k+1;
try
strtofloat(t_ch_accept.DataSource.DataSet.fieldbyname('<27>ܼ<EFBFBD>').asstring);
t_bz_balance.Append;
t_bz_balance['one']:='7-<2D>ܼ<EFBFBD>';
t_bz_balance['two']:='<27>ܼ<EFBFBD>';
t_bz_balance['three']:=strtofloat(t_ch_accept.DataSource.DataSet.fieldbyname('<27>ܼ<EFBFBD>').asstring);
t_bz_balance.post;
k:=k+1;
except
;
end;
end;
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;
t_bz_client.close;
t_bz_client.open;
t_bz_client.Append;
t_bz_client['one']:='0-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='1-<2D><> <20><> ˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> վ';
t_bz_client['two']:='<27><>վ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><>վ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='8-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='9-ͨ ֪ <20><>';
t_bz_client['two']:='֪ͨ<CDA8><D6AA>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('֪ͨ<CDA8><D6AA>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='10-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='11-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
if edit_type.text='1' then
begin
t_bz_client.Append;
t_bz_client['one']:='12-<2D><><EFBFBD><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
end;
frm_data_share.t_code_fee.Filtered:=false;
frm_data_share.t_code_fee.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee.Filtered:=true;
end;
if (edit_type.text='3')or(edit_type.text='4') 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><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;
finally
;
end;
t_bz_client.close;
t_bz_client.open;
t_bz_client.Append;
t_bz_client['one']:='1-ί<>е<EFBFBD>λ';
t_bz_client['two']:='ί<>е<EFBFBD>λ';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><><EFBFBD>չ<EFBFBD>˾';
t_bz_client['two']:='<27><><EFBFBD>չ<EFBFBD>˾';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='3-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_client['three']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
t_bz_client['three']:='';
t_bz_client.post;
frm_data_share.t_code_fee.Filtered:=false;
frm_data_share.t_code_fee.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee.Filtered:=true;
end;
if t_ch_accept.Active then
begin
t_ch_accept.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_accept.FieldByName('˰<><CBB0>').OnChange:=t_ch_acceptdjoncharge;
// t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
// TNumericField(t_ch_accept.FieldByName('˰<><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
// TNumericField(t_ch_accept.FieldByName('˰<><CBB0>')).EditFormat:=';;';
end;
if t_ch_pay.Active then
begin
t_ch_pay.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptcrmcharge;
t_ch_pay.FieldByName('˰<><CBB0>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
// t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
// TNumericField(t_ch_pay.FieldByName('˰<><CBB0>')).DisplayFormat:='#.####"%";#.####"%";0';
// TNumericField(t_ch_pay.FieldByName('˰<><CBB0>')).EditFormat:=';;';
end;
end;
procedure Tfra_fee.bsSkinButton1Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
if Panel1.Visible then
begin
N8.Visible:=true;
N9.Visible:=true;
end
else
begin
N8.Visible:=false;
N9.Visible:=false;
end;
end;
procedure Tfra_fee.bsSkinButton2Click(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
exit;
table_post(t_ch_accept);
end;
procedure Tfra_fee.t_ch_acceptAfterInsert(DataSet: TDataSet);
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27>ұ<EFBFBD>']:='RMB';
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
t_ch_accept['˰<><CBB0>']:=aRateNum;
t_ch_accept['˰<><CBB0>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=1;
if (t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']<>'') then
t_ch_accept['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else
t_ch_accept['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>'];
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
end;
procedure Tfra_fee.bsSkinButton4Click(Sender: TObject);
var
i:integer;
str_list:Tstringlist;
begin
if t_ch_accept.isempty then
exit;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
try
if wwDBGrid1.SelectedList.Count>1 then
begin
try
str_list:=Tstringlist.create;
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
str_list.Add(t_ch_accept.fieldbyname('CH_ID').asstring);
end;
for i:=0 to str_list.Count-1 do
begin
if t_ch_accept.locate('CH_ID',str_list[i],[]) then
t_ch_accept.Delete;
end;
finally
str_list.free;
end;
end
else
begin
t_ch_accept.delete;
end;
t_ch_accept.Refresh;
except
t_ch_accept.Close;
t_ch_accept.open;
end;
end;
procedure Tfra_fee.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_accept);
end;
procedure Tfra_fee.t_ch_acceptBeforePost(DataSet: TDataSet);
var
client:tclient;
function GetCorpFullName(Corp:string):Tclient;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
sql.Add('sELECT <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,<2C><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+Corp+'''');
Open;
Result.FullName:=FieldByName('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString;
Result.Codename:=FieldByName('<27><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
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><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring='')or
(t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0)then
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1>棡');
abort;
end;
end;
{
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=
s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
}
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
try
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept['<27><><EFBFBD><EFBFBD>']);
finally
// t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
end;
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end;
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString ,[]) then
begin
t_ch_accept['˳<><CBB3>']:=frm_data_share.t_code_fee.fieldbyname('˳<><CBB3>').asInteger;
if (frm_data_share.t_code_fee.fieldbyname('<27><>ֹ<EFBFBD><D6B9>Ʊ').AsBoolean=True) then
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean:=true;
end;
client:=GetCorpFullName(t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
t_ch_accept.FieldByName('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring:=client.FullName;
t_ch_accept.FieldByName('<27><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>').asstring:=client.Codename;
// t_ch_accept.FieldByName('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring:=GetCorpFullName(t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
//table_before_post(t_ch_accept,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
if t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring='USD' then begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end else
if t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=1;
{
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end
else
begin
if not strtobool(get_parameters_value(38,'true')) then
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
}
end else begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬱ұ<F0A3ACB1><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
abort;
end;
if ( t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat<>0) AND ((t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˷Ѵ<CBB7><D1B4><EFBFBD><EFBFBD><EFBFBD>') or (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD><EFBFBD><EFBFBD>')) then begin
if (t_ch_accept.fieldbyname('<27><>ע').asstring='') then begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ɷ<EFBFBD><C9B7>ñ<EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
abort;
end;
end;
// if ( t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat<>0) AND ((t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˷Ѵ<CBB7><D1B4><EFBFBD><EFBFBD><EFBFBD>') or (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD><EFBFBD><EFBFBD>')) then begin
if ( t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat<>0) AND ((t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˷Ѵ<CBB7><D1B4><EFBFBD><EFBFBD><EFBFBD>44444444') ) then begin
try
frm_fee_baoganadd:=tfrm_fee_baoganadd.Create(application);
frm_fee_baoganadd.table1.Enabled:=false;
frm_fee_baoganadd.table1.DataSet:=t_ch_accept;
frm_fee_baoganadd.table1.Enabled:=true;
frm_fee_baoganadd.CFFeeName:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
frm_fee_baoganadd.CFCURR:=t_ch_accept.FieldByName('<27>ұ<EFBFBD>').asstring;
frm_fee_baoganadd.CFAMOUNT:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
frm_fee_baoganadd.CFEXCHANGE:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˷Ѵ<CBB7><D1B4><EFBFBD><EFBFBD><EFBFBD>') then begin
frm_fee_baoganadd.wwDBLookupCombo1.Text:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɺ<EFBFBD><C9BA>˷<EFBFBD>';
frm_fee_baoganadd.wwDBLookupCombo4.Text:='USD';
frm_fee_baoganadd.Edit1.Text:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_fee_baoganadd.Edit2.Text:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_fee_baoganadd.wwDBLookupCombo2.Text:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_fee_baoganadd.Edit3.Text:='0';
end else begin
frm_fee_baoganadd.wwDBLookupCombo1.Text:='<27><><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD><EFBFBD>ɺ<EFBFBD><C9BA>˷<EFBFBD>';
frm_fee_baoganadd.wwDBLookupCombo4.Text:='USD';
frm_fee_baoganadd.Edit1.Text:='0';
if edit_type.text='1' then
frm_fee_baoganadd.Edit2.Text:=FloatToStr(getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring))
else if edit_type.text='2' then
frm_fee_baoganadd.Edit2.Text:=FloatToStr(getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring))
else if edit_type.text='3' then
frm_fee_baoganadd.Edit2.Text:=FloatToStr(getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring))
else if edit_type.text='4' then
frm_fee_baoganadd.Edit2.Text:=FloatToStr(getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring));
frm_fee_baoganadd.wwDBLookupCombo2.Text:='<27><><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_fee_baoganadd.Edit3.Text:=t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
frm_fee_baoganadd.ShowModal;
finally
frm_fee_baoganadd.Free;
frm_fee_baoganadd:=nil;
end;
abort;
end;
end;
procedure Tfra_fee.t_ch_acceptBeforeEdit(DataSet: TDataSet);
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
if not do_data('7000',t_ch_accept.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
fee_befor_modify(t_ch_accept);
end;
procedure Tfra_fee.wwDBLookupCombo5Change(Sender: TObject);
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if not t_bz_client.IsEmpty then
if t_bz_client.Locate('one',wwDBLookupCombo5.text,[])then
begin
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo4Change(Sender: TObject);
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if not t_bz_balance.IsEmpty then
if t_bz_balance.Locate('one',wwDBLookupCombo4.text,[])then
begin
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=t_bz_balance.fieldbyname('three').asfloat;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo3Change(Sender: TObject);
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if wwDBLookupCombo3.text='USD' then begin
if edit_type.text='1' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='2' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='3' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='4' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end else
if t_ch_accept.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=1;
end;
end;
procedure Tfra_fee.wwDBLookupCombo7Change(Sender: TObject);
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if not t_bz_client.IsEmpty then
if t_bz_client.Locate('one',wwDBLookupCombo7.text,[])then
begin
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo9Change(Sender: TObject);
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if not t_bz_balance.IsEmpty then
if t_bz_balance.Locate('one',wwDBLookupCombo9.text,[])then
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=t_bz_balance.fieldbyname('three').asfloat;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo10Change(Sender: TObject);
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if wwDBLookupCombo10.text='USD' then begin
if edit_type.text='1' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='2' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='3' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='4' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end else
if t_ch_PAY.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=1;
end;
end;
procedure Tfra_fee.t_ch_payAfterInsert(DataSet: TDataSet);
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27>ұ<EFBFBD>']:='RMB';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
t_ch_pay['˰<><CBB0>']:=aRateNum;
t_ch_pay['˰<><CBB0>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>'];
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=1;
end;
procedure Tfra_fee.t_ch_payBeforeEdit(DataSet: TDataSet);
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
if not do_data('7000',t_ch_pay.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
fee_befor_modify(t_ch_pay);
end;
procedure Tfra_fee.t_ch_payBeforePost(DataSet: TDataSet);
var
aQuery:TADOQuery;
var client:Tclient;
function getprice(DataSet:TDataSet;ctn:string):Double;
begin
result:=0;
DataSet.First;
while not DataSet.Eof do begin
if Trim(DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString)=ctn then begin
if (Trim(DataSet.FieldByName(Trim(DataSet.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)).AsString)<>'') and (not DataSet.FieldByName(Trim(DataSet.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)).IsNull) then begin
Result:=StrToFloatDef(DataSet.FieldByName(Trim(DataSet.FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').AsString)).AsString,0);
end;
Exit;
end;
DataSet.Next;
end;
end;
function GetCorpFullName(Corp:string):Tclient;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
sql.Add('sELECT <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,<2C><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+Corp+'''');
Open;
Result.FullName:=FieldByName('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString;
Result.Codename:=FieldByName('<27><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
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><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
if (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring='')or
(t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring='')or
(t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat=0)then
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1>棡');
abort;
end;
end;
if t_ch_pay['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>'] AND (t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') AND (t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>') then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from v_price_detail where ID='+t_ch_pay.fieldbyName('<27>˼۱<CBBC><DBB1><EFBFBD>').AsString);
Open;
if not IsEmpty then begin
if (t_ch_pay['<27><><EFBFBD><EFBFBD>']<>aQuery['<27>˼<EFBFBD>']) then begin
if t_ch_pay.fieldbyname('<27><>ע').asstring='' then begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>,<2C><>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><>ֹ<EFBFBD><EFBFBD><E1BDBB>');
Abort;
end;
end;
end;
end;
finally
FreeAndNil(aQuery)
end;
end;
{
if (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
}
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
try
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_pay['<27><><EFBFBD><EFBFBD>']);
finally
// t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
end;
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end;
client:=GetCorpFullName(t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
t_ch_pay.FieldByName('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring:=client.FullName;
t_ch_pay.FieldByName('<27><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>').asstring:=client.Codename;
//table_before_post(t_ch_pay,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
if t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring='USD' then begin
if edit_type.text='1' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='2' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='3' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='4' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end else
if t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring='RMB' then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=1;
{
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_pay.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end
else
begin
if not strtobool(get_parameters_value(38,'true')) then
begin
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
}
end;
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString ,[]) then
begin
t_ch_pay['˳<><CBB3>']:=frm_data_share.t_code_fee.fieldbyname('˳<><CBB3>').asInteger;
end;
end;
procedure Tfra_fee.bsSkinButton10Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton10.ClientToScreen(Point(0,bsSkinButton10.Height));
PopupMenu2.Popup(Pnt.x,Pnt.y);
if Panel3.Visible then
begin
MenuItem8.Visible:=true;
MenuItem9.Visible:=true;
end
else
begin
MenuItem8.Visible:=false;
MenuItem9.Visible:=false;
end;
end;
procedure Tfra_fee.bsSkinButton14Click(Sender: TObject);
begin
table_post(t_ch_pay);
end;
procedure Tfra_fee.bsSkinButton15Click(Sender: TObject);
var
i:integer;
str_list:Tstringlist;
begin
if t_ch_pay.isempty then
exit;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
if wwDBGrid2.SelectedList.Count>1 then
begin
try
str_list:=Tstringlist.create;
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
str_list.Add(t_ch_pay.fieldbyname('CH_ID').asstring);
end;
for i:=0 to str_list.Count-1 do
begin
if t_ch_pay.locate('CH_ID',str_list[i],[]) then
t_ch_pay.Delete;
end;
finally
str_list.free;
end;
end
else
begin
t_ch_pay.delete;
end;
t_ch_pay.Refresh;
end;
procedure Tfra_fee.bsSkinButton16Click(Sender: TObject);
begin
table_cancel(t_ch_pay);
end;
procedure Tfra_fee.wwDBGrid1DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_accept,wwDBGrid1,Rect,Field);
end;
procedure Tfra_fee.wwDBGrid2DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
fee_color(t_ch_pay,wwDBGrid2,Rect,Field);
end;
procedure Tfra_fee.bsSkinButton7Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_ch_accept.GetBookmark;
t_ch_accept.Requery;
t_ch_accept.GotoBookmark(book1);
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_shen_delete(edit_type.text,'<27><>',t_ch_accept,a_shen_delete);
end;
procedure Tfra_fee.bsSkinButton18Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_ch_pay.GetBookmark;
t_ch_pay.Requery;
t_ch_pay.GotoBookmark(book1);
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_shen_delete(edit_type.text,'<27><>',t_ch_pay,p_shen_delete);
end;
procedure Tfra_fee.DBEdit17Change(Sender: TObject);
begin
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>ύ'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.DBEdit18Change(Sender: TObject);
begin
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>ύ'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.bsSkinButton8Click(Sender: TObject);
var
book1:Tbookmark;
aAdoQuery :TADOQuery;
begin
book1:=t_ch_accept.GetBookmark;
t_ch_accept.Requery;
t_ch_accept.GotoBookmark(book1);
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
try
aAdoQuery :=CreateAdoQuery;
frm_main.db.BeginTrans;
modify_all:=true;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
t_ch_accept.Edit;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_accept.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_accept.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
//a_shen_delete.Delete;
end;
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
t_ch_accept.Edit;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_accept.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_accept.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_accept.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
//a_shen_modify_old.Delete;
//a_shen_modify_new.delete;
end;
modify_all:=false;
frm_main.db.CommitTrans;
finally
FreeAndNil(aAdoQuery);
if frm_main.db.InTransaction then
begin
modify_all:=false;
frm_main.db.RollbackTrans;
showmessage('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
end;
procedure Tfra_fee.bsSkinButton13Click(Sender: TObject);
var
book1:Tbookmark;
aAdoQuery :TADOQuery;
begin
book1:=t_ch_pay.GetBookmark;
t_ch_pay.Requery;
t_ch_pay.GotoBookmark(book1);
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
try
aAdoQuery :=CreateAdoQuery;
frm_main.db.BeginTrans;
modify_all:=true;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'then
begin
t_ch_pay.Edit;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_pay.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_pay.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
// p_shen_delete.Delete;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'then
begin
t_ch_pay.Edit;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_ch_pay.post;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_pay.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
with aAdoQuery do
begin
Close;SQL.Clear;
SQL.Add('Delete from t_ch_fee_modify');
SQL.Add('where CH_ID=:CH_ID and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ'' and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>''');
Parameters.ParamByName('CH_ID').Value:=t_ch_pay.FieldByName('CH_ID').AsInteger;
ExecSQL;
end;
// p_shen_modify_old.Delete;
// p_shen_modify_new.delete;
end;
modify_all:=false;
frm_main.db.CommitTrans;
finally
FreeAndNil(aAdoQuery);
if frm_main.db.InTransaction then
begin
modify_all:=false;
frm_main.db.RollbackTrans;
showmessage('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
end;
end;
end;
procedure Tfra_fee.bsSkinButton6Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_ch_accept.GetBookmark;
t_ch_accept.Requery;
t_ch_accept.GotoBookmark(book1);
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
frm_main.db.BeginTrans;
try
fee_shen_modify(edit_type.text,'<27><>',t_ch_accept,a_shen_modify_new,a_shen_modify_old,t_bz_client,t_bz_balance);
frm_main.db.CommitTrans;
except
frm_main.db.RollbackTrans;
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbOK],0);
end;
end;
procedure Tfra_fee.bsSkinButton17Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_ch_pay.GetBookmark;
t_ch_pay.Requery;
t_ch_pay.GotoBookmark(book1);
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
frm_main.db.BeginTrans;
try
fee_shen_modify(edit_type.text,'<27><>',t_ch_pay,p_shen_modify_new,p_shen_modify_old,t_bz_client,t_bz_balance);
frm_main.db.CommitTrans;
except
frm_main.db.RollbackTrans;
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbOK],0);
end;
end;
procedure Tfra_fee.N2Click(Sender: TObject);
begin
t_ch_accept.Append;
end;
procedure Tfra_fee.N7Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if t_ch_accept.IsEmpty then
exit;
afield := vararraycreate([0,t_ch_accept.fieldcount-1],varvariant);
for i := 0 to (t_ch_accept.fieldcount-1) do
begin
afield[i] :=t_ch_accept.fields[i].value ;
end;
t_ch_accept.append;
for i := 1 to (t_ch_accept.fieldcount-1) do
begin
if t_ch_accept.fields[i].FieldName<>'CH_ID' then
t_ch_accept.fields[i].value := afield[i] ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
end;
procedure Tfra_fee.MenuItem1Click(Sender: TObject);
var
aQuery,aQuery2:TADOQuery;
Cntrstr:String;
begin
if edit_type.text='1' then begin
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_op_ctn where <20><><EFBFBD><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asString+'''');
Open;
if not IsEmpty then begin
while not eof do begin
cntrstr:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from t_ch_fee where ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>=1 and <20><><EFBFBD><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asString+'''');
aQuery2.Open;
if aQuery2.IsEmpty then begin
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from v_price_detail ');
aQuery2.sql.add(' WHERE Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>˾='''+GetCorpID(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString)+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='+formatDatetime('yyyy',t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']));
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then
aQuery2.sql.add(' and Ʒ<><C6B7>='''+Trim(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'''');
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
aQuery2.sql.add(' and <20><>'+getZweek(DayOfWeek(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime))+'=1');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='''+CntrStr+'''');
aQuery2.Open;
if aQuery2.IsEmpty then begin
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from v_price_detail ');
aQuery2.sql.add(' WHERE Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>˾='''+GetCorpID(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString)+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='+formatDatetime('yyyy',t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']));
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then
aQuery2.sql.add(' and Ʒ<><C6B7>='''+Trim(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'''');
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
aQuery2.sql.add(' and <20><>һ=0 and <20>ܶ<EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 ');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='''+CntrStr+'''');
aQuery2.Open;
end;
if aQuery2.IsEmpty then begin
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from v_price_detail ');
aQuery2.sql.add(' WHERE Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>˾='''+GetCorpID(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString)+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='+formatDatetime('yyyy',t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']));
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
aQuery2.sql.add(' and (Ʒ<><C6B7>='''' or Ʒ<><C6B7> is null)');
aQuery2.sql.add(' and <20><>'+getZweek(DayOfWeek(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime))+'=1');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='''+CntrStr+'''');
aQuery2.Open;
end;
if aQuery2.IsEmpty then begin
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from v_price_detail ');
aQuery2.sql.add(' WHERE Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>˾='''+GetCorpID(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString)+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='+formatDatetime('yyyy',t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']));
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
aQuery2.sql.add(' and (Ʒ<><C6B7>='''' or Ʒ<><C6B7> is null)');
aQuery2.sql.add(' and <20><>һ=0 and <20>ܶ<EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 and <20><><EFBFBD><EFBFBD>=0 ');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='''+CntrStr+'''');
aQuery2.Open;
end;
if not aQuery2.IsEmpty then begin
if aQuery2['<27>˼<EFBFBD>']>0 then begin
t_ch_pay.Append;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˷<EFBFBD>';
if (t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾']<>'') and (not t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').isnull) then
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>'
else
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>˾';
t_ch_pay['<27>ұ<EFBFBD>']:='USD';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.DataSource.DataSet.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
if (t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾']<>'') and (not t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').isnull) then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾']
else
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD>˾'];
t_ch_pay['<27><>׼']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=aQuery2['<27>˼<EFBFBD>'];
t_ch_pay['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=1;
t_ch_pay['˳<><CBB3>']:=1;
t_ch_pay['<27>˼۱<CBBC><DBB1><EFBFBD>']:=aQuery2['ID'];
t_ch_pay.post;
end;
if aQuery2['<27>˼<EFBFBD>']=0 then begin
t_ch_pay.Append;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˷<EFBFBD>';
if (t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾']<>'') and (not t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').isnull) then
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>'
else
t_ch_pay['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>˾';
t_ch_pay['<27>ұ<EFBFBD>']:='USD';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.DataSource.DataSet.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
if (t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾']<>'') and (not t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').isnull) then
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾']
else
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD>˾'];
t_ch_pay['<27><>׼']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>ע']:='<27><><EFBFBD><EFBFBD><EFBFBD>˼<EFBFBD>,<2C>˼<EFBFBD><CBBC><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>';
t_ch_pay['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=1;
t_ch_pay['˳<><CBB3>']:=1;
t_ch_pay['<27>˼۱<CBBC><DBB1><EFBFBD>']:=aQuery2['ID'];
t_ch_pay.post;
end;
end;
end;
Next;
end;
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
t_ch_pay.Append;
end;
procedure Tfra_fee.MenuItem7Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if t_ch_pay.IsEmpty then
exit;
afield := vararraycreate([0,t_ch_pay.fieldcount-1],varvariant);
for i := 0 to (t_ch_pay.fieldcount-1) do
begin
afield[i] :=t_ch_pay.fields[i].value ;
end;
t_ch_pay.append;
for i := 1 to (t_ch_pay.fieldcount-1) do
begin
if t_ch_pay.fields[i].FieldName<>'CH_ID' then
t_ch_pay.fields[i].value := afield[i] ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
end;
procedure Tfra_fee.wwDBGrid1ColExit(Sender: TObject);
begin
{
if (wwDBGrid1.GetActiveCol=7)or(wwDBGrid1.GetActiveCol=6)or(wwDBGrid1.GetActiveCol=8)then
begin
if (t_ch_accept.state=dsedit)or(t_ch_accept.state=dsinsert)then
begin
if (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
end;
}
end;
procedure Tfra_fee.wwDBGrid2ColExit(Sender: TObject);
begin
{
if (wwDBGrid2.GetActiveCol=7)or(wwDBGrid2.GetActiveCol=6)or(wwDBGrid2.GetActiveCol=8)then
begin
if (t_ch_pay.state=dsedit)or(t_ch_pay.state=dsinsert)then
begin
if (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
end;
}
end;
procedure Tfra_fee.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
N10.Visible:=true;
N104.Visible:=true;
N105.Visible:=true;
N11.Visible:=true;
N12.Visible:=true;
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>')
or (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>') then
begin
N19.Visible:=true;
N20.Visible:=true;
end
else
begin
N19.Visible:=false;
N20.Visible:=false;
end;
N13.Visible:=false;
N14.Visible:=false;
N106.Visible:=false;
N107.Visible:=false;
N15.Visible:=false;
N16.Visible:=false;
N24.Visible:=false;
N25.Visible:=false;
if Panel2.Visible then
begin
N17.Visible:=true;
N18.Visible:=true;
end
else
begin
N17.Visible:=false;
N18.Visible:=false;
end;
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.bsSkinButton5Click(Sender: TObject);
var
Pnt:Tpoint;
begin
N10.Visible:=false;
N104.Visible:=false;
N105.Visible:=false;
N11.Visible:=false;
N12.Visible:=false;
N19.Visible:=false;
N20.Visible:=false;
N13.Visible:=false;
N14.Visible:=true;
N106.Visible:=true;
N107.Visible:=true;
N15.Visible:=true;
N16.Visible:=true;
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>')
or (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>') then
begin
N24.Visible:=true;
N25.Visible:=true;
end
else
begin
N24.Visible:=false;
N25.Visible:=false;
end;
if Panel2.Visible then
begin
N17.Visible:=true;
N18.Visible:=true;
end
else
begin
N17.Visible:=false;
N18.Visible:=false;
end;
Pnt:=bsSkinButton5.ClientToScreen(Point(0,bsSkinButton5.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.N29Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<>շ<EFBFBD><D5B7><EFBFBD>',1,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N31Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<>շ<EFBFBD><D5B7><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N41Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_pay.DataSource,t_op_gain1,nil,nil,t_ch_pay1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N43Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_pay.DataSource,t_op_gain1,nil,nil,t_ch_pay1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N53Click(Sender: TObject);
var
book1:Tbookmark;
dsstr,PostUrl,str:string;
begin
if not strtobool(get_parameters_value(39,'true'))then
begin
if t_ch_accept.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><D3A1><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
end;
if strtobool(get_parameters_value(2,'false'))then
begin
try
book1:=t_ch_accept.GetBookmark;
t_ch_accept.DisableControls;
t_ch_accept.first;
while not t_ch_accept.eof do
begin
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
exit;
end;
t_ch_accept.next;
end;
finally
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
end;
try
book1:=t_ch_pay.GetBookmark;
t_ch_pay.DisableControls;
t_ch_pay.first;
while not t_ch_pay.eof do
begin
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
exit;
end;
t_ch_pay.next;
end;
finally
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
end;
end;
if strtobool(get_parameters_value(63,'false'))then
begin
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
t_ch_accept.DataSource.DataSet.edit;
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
t_ch_accept.DataSource.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept.DataSource.DataSet.post;
dsstr:=dsstr+'{';
dsstr:=dsstr+'"bookingId":'+ t_ch_accept.DataSource.DataSet.FieldByName('DJYID').asstring;
dsstr:=dsstr+',"lockStatus":true';
dsstr:=dsstr+'}';
str:=str+'[';
str:=str+dsstr;
str:=str+']';
PostUrl:='http://47.104.85.216:12345/DataSync/SaveBookingOrderLock';
TDsDjyThread.create(PostUrl,str,'','1bccf850845542f89057007e51f78f13','2af5ed1f0cc124bcfc4ba05e4a24eac77f2f582c25737477633a1c0303ac3b8ed647e810880dac58');
InsertSysLog('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>',t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
end;
if ((edit_type.text='1')OR(edit_type.text='2'))and strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_ch_pay1,t_ch_fee_truck1,nil,nil,nil,nil);
end
else
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_ch_pay1,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N55Click(Sender: TObject);
var
book1:Tbookmark;
dsstr,PostUrl,str:string;
begin
if not strtobool(get_parameters_value(39,'true'))then
begin
if t_ch_accept.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><D3A1><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
end;
if strtobool(get_parameters_value(2,'false'))then
begin
try
book1:=t_ch_accept.GetBookmark;
t_ch_accept.DisableControls;
t_ch_accept.first;
while not t_ch_accept.eof do
begin
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
exit;
end;
t_ch_accept.next;
end;
finally
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
end;
try
book1:=t_ch_pay.GetBookmark;
t_ch_pay.DisableControls;
t_ch_pay.first;
while not t_ch_pay.eof do
begin
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
exit;
end;
t_ch_pay.next;
end;
finally
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
end;
end;
if strtobool(get_parameters_value(63,'false'))then
begin
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
t_ch_accept.DataSource.DataSet.edit;
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
t_ch_accept.DataSource.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept.DataSource.DataSet.post;
dsstr:=dsstr+'{';
dsstr:=dsstr+'"bookingId":'+ t_ch_accept.DataSource.DataSet.FieldByName('DJYID').asstring;
dsstr:=dsstr+',"lockStatus":true';
dsstr:=dsstr+'}';
str:=str+'[';
str:=str+dsstr;
str:=str+']';
PostUrl:='http://47.104.85.216:12345/DataSync/SaveBookingOrderLock';
TDsDjyThread.create(PostUrl,str,'','1bccf850845542f89057007e51f78f13','2af5ed1f0cc124bcfc4ba05e4a24eac77f2f582c25737477633a1c0303ac3b8ed647e810880dac58');
InsertSysLog('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>',t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
end;
if ((edit_type.text='1')OR(edit_type.text='2'))and strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_ch_pay1,t_ch_fee_truck1,nil,nil,nil,nil);
end
else
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_ch_pay1,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N35Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',1,t_ch_accept.DataSource,a_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N37Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',2,t_ch_accept.DataSource,a_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N47Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',1,t_ch_pay.DataSource,p_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N49Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',2,t_ch_pay.DataSource,p_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N38Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',1,t_ch_accept.DataSource,a_shen_modify_old1,a_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N40Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',2,t_ch_accept.DataSource,a_shen_modify_old1,a_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N50Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',1,t_ch_pay.DataSource,p_shen_modify_old1,p_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N52Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',2,t_ch_pay.DataSource,p_shen_modify_old1,p_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N32Click(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>,<2C>ұ<EFBFBD>,CH_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N34Click(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>,<2C>ұ<EFBFBD>,CH_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N44Click(Sender: TObject);
var
yjstr:string;
begin
if t_ch_pay.IsEmpty then
exit;
yjstr:=getyjstr;
if (yjstr='') then yjstr:=' 1=1 ';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and '+yjstr
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and '+yjstr);
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_pay.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N46Click(Sender: TObject);
begin
if t_ch_pay.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_pay.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.t_ch_acceptAfterPost(DataSet: TDataSet);
begin
if t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'then
begin
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
end;
getsumstr;
end;
procedure Tfra_fee.t_ch_acceptBeforeInsert(DataSet: TDataSet);
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
if t_ch_accept.DataSource.DataSet.State=dsinsert then
t_ch_accept.DataSource.DataSet.post;
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'then
begin
if (not t_ch_accept.DataSource.DataSet.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>').AsBoolean) then begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
if copy(t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1,1)='A'then
begin
if not do_data(edit_data.text,t_ch_accept.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring,'','') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if not do_data(edit_data.text,t_ch_accept.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
{
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(28,'false'))then
begin
if not t_ch_accept.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if copy(t_ch_accept.DataSource.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString,1,4)<>'ƴ<><C6B4>'then
begin
if (date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(29,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if (date-t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(37,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
end;
end;
end;
}
end;
procedure Tfra_fee.t_ch_payBeforeInsert(DataSet: TDataSet);
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
if t_ch_pay.DataSource.DataSet.State=dsinsert then
t_ch_pay.DataSource.DataSet.post;
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'then
begin
if (not t_ch_accept.DataSource.DataSet.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>').AsBoolean) then begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
if copy(t_ch_pay.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1,1)='A'then
begin
if not do_data(edit_data.text,t_ch_pay.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring,'','') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if not do_data(edit_data.text,t_ch_pay.DataSource.DataSet.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>ӷ<EFBFBD><D3B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
{
if edit_type.text='1'then
begin
if strtobool(get_parameters_value(28,'false'))then
begin
if not t_ch_pay.DataSource.DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
if copy(t_ch_pay.DataSource.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString,1,4)<>'ƴ<><C6B4>'then
begin
if (date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(29,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end
else
begin
if (date-t_ch_pay.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)>strtoint(get_parameters_value(37,'3')) then
begin
showmessage('ҵ<><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
end;
end;
end;
}
end;
procedure Tfra_fee.Panel11Resize(Sender: TObject);
begin
if bsSkinPanel3.Visible then
Panel3.Height:=round((Panel11.height-bsSkinPanel3.height)/2)
else
Panel3.Height:=round((Panel11.height)/2);
end;
procedure Tfra_fee.Panel3Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel3.Width/9);
bsSkinButton1.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton12.Width:=i;
bsSkinButton13.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton15.Width:=i;
bsSkinButton16.Width:=i;
bsSkinButton17.Width:=i;
bsSkinButton18.Width:=i;
end;
procedure Tfra_fee.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round((Panel2.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.N56Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<>շ<EFBFBD><D5B7><EFBFBD>',3,t_ch_accept.DataSource,nil,nil,nil,t_ch_accept1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N58Click(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by ˳<><CBB3>,<2C>ұ<EFBFBD>,CH_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<>տͻ<D5BF><CDBB><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N60Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',3,t_ch_accept.DataSource,a_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N62Click(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',3,t_ch_accept.DataSource,a_shen_modify_old1,a_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N64Click(Sender: TObject);
begin
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_pay.DataSource,nil,nil,nil,t_ch_pay1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N66Click(Sender: TObject);
begin
if t_ch_pay.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_pay.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_pay.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N68Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>',3,t_ch_pay.DataSource,p_shen_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N70Click(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>' then
begin
showmessage('<27><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8><C4A3><EFBFBD>');
exit;
end;
sys_print(edit_report.text+'Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>',3,t_ch_pay.DataSource,p_shen_modify_old1,p_shen_modify_new1,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N72Click(Sender: TObject);
var
book1:Tbookmark;
dsstr,PostUrl,str:string;
begin
if not strtobool(get_parameters_value(39,'true'))then
begin
if t_ch_accept.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><D3A1><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
end;
if strtobool(get_parameters_value(2,'false'))then
begin
try
book1:=t_ch_accept.GetBookmark;
t_ch_accept.DisableControls;
t_ch_accept.first;
while not t_ch_accept.eof do
begin
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
exit;
end;
t_ch_accept.next;
end;
finally
t_ch_accept.GotoBookmark(book1);
t_ch_accept.EnableControls;
end;
try
book1:=t_ch_pay.GetBookmark;
t_ch_pay.DisableControls;
t_ch_pay.first;
while not t_ch_pay.eof do
begin
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='¼<><C2BC>״̬')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ύ')
or(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>') then
begin
showmessage('<27><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>󷽿<EFBFBD><F3B7BDBF>Դ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>󵥣<EFBFBD><F3B5A5A3><EFBFBD>');
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
exit;
end;
t_ch_pay.next;
end;
finally
t_ch_pay.GotoBookmark(book1);
t_ch_pay.EnableControls;
end;
end;
if strtobool(get_parameters_value(63,'false'))then
begin
if t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
t_ch_accept.DataSource.DataSet.edit;
t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
t_ch_accept.DataSource.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept.DataSource.DataSet.post;
dsstr:=dsstr+'{';
dsstr:=dsstr+'"bookingId":'+ t_ch_accept.DataSource.DataSet.FieldByName('DJYID').asstring;
dsstr:=dsstr+',"lockStatus":true';
dsstr:=dsstr+'}';
str:=str+'[';
str:=str+dsstr;
str:=str+']';
PostUrl:='http://47.104.85.216:12345/DataSync/SaveBookingOrderLock';
TDsDjyThread.create(PostUrl,str,'','1bccf850845542f89057007e51f78f13','2af5ed1f0cc124bcfc4ba05e4a24eac77f2f582c25737477633a1c0303ac3b8ed647e810880dac58');
InsertSysLog('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>',t_ch_accept.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end;
end;
if ((edit_type.text='1')OR(edit_type.text='2'))and strtobool(get_parameters_value(30,'false')) then
begin
t_ch_fee_truck.close;
t_ch_fee_truck.Parameters[0].value:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_truck.open;
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_ch_pay1,t_ch_fee_truck1,nil,nil,nil,nil);
end
else
sys_print(edit_report.text+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_op_gain1,nil,nil,t_ch_accept1,t_ch_pay1,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N1Click(Sender: TObject);
begin
try
if not assigned(frm_code_fee_project_add) then
frm_code_fee_project_add:=tfrm_code_fee_project_add.Create (self);
frm_code_fee_project_add.op_type.text:=edit_type.text;
frm_code_fee_project_add.fee_type.text:='<27>շ<EFBFBD>';
frm_code_fee_project_add.t_op_bill1.Enabled:=FALSE;
frm_code_fee_project_add.t_op_bill1.DataSet:=t_ch_accept.DataSource.DataSet;
frm_code_fee_project_add.t_op_bill1.Enabled:=true;
frm_code_fee_project_add.t_ch_fee1.Enabled:=false;
frm_code_fee_project_add.t_ch_fee1.DataSet:=t_ch_accept;
frm_code_fee_project_add.t_ch_fee1.Enabled:=true;
frm_code_fee_project_add.ShowModal;
finally
frm_code_fee_project_add.free;
frm_code_fee_project_add:=nil;
end;
end;
procedure Tfra_fee.MenuItem3Click(Sender: TObject);
begin
try
if not assigned(frm_code_fee_project_add) then
frm_code_fee_project_add:=tfrm_code_fee_project_add.Create (self);
frm_code_fee_project_add.op_type.text:=edit_type.text;
frm_code_fee_project_add.fee_type.text:='<27><><EFBFBD><EFBFBD>';
frm_code_fee_project_add.t_op_bill1.Enabled:=false;
frm_code_fee_project_add.t_op_bill1.DataSet:=t_ch_pay.DataSource.DataSet;
frm_code_fee_project_add.t_op_bill1.Enabled:=true;
frm_code_fee_project_add.t_ch_fee1.Enabled:=false;
frm_code_fee_project_add.t_ch_fee1.DataSet:=t_ch_pay;
frm_code_fee_project_add.t_ch_fee1.Enabled:=true;
frm_code_fee_project_add.ShowModal;
finally
frm_code_fee_project_add.free;
frm_code_fee_project_add:=nil;
end;
end;
procedure Tfra_fee.N5Click(Sender: TObject);
var
i,k:integer;
begin
if t_ch_accept.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
t_ch_pay.append;
for k := 0 to (t_ch_accept.fieldcount-1) do
begin
if t_ch_pay.FindField(t_ch_accept.fields[k].FieldName)<>nil then
if t_ch_accept.fields[k].FieldName<>'CH_ID' then
t_ch_pay.FindField(t_ch_accept.fields[k].FieldName).value:=t_ch_accept.fields[k].value ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_ch_pay.post;
end;
end
else
begin
t_ch_pay.append;
for k:= 0 to (t_ch_accept.fieldcount-1) do
begin
if t_ch_pay.FindField(t_ch_accept.fields[k].FieldName)<>nil then
if t_ch_accept.fields[k].FieldName<>'CH_ID' then
t_ch_pay.FindField(t_ch_accept.fields[k].FieldName).value:=t_ch_accept.fields[k].value ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_ch_pay.post;
end;
end;
procedure Tfra_fee.N77Click(Sender: TObject);
var
k:integer;
begin
if t_ch_pay.IsEmpty then
exit;
t_ch_pay.first;
while not t_ch_pay.eof do
begin
t_ch_accept.append;
for k:= 0 to (t_ch_pay.fieldcount-1) do
begin
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
if t_ch_pay.fields[k].FieldName<>'CH_ID' then
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept.post;
t_ch_pay.next;
end;
end;
procedure Tfra_fee.N74Click(Sender: TObject);
var
k:integer;
begin
if t_ch_accept.IsEmpty then
exit;
t_ch_accept.first;
while not t_ch_accept.eof do
begin
t_ch_pay.append;
for k := 0 to (t_ch_accept.fieldcount-1) do
begin
if t_ch_pay.FindField(t_ch_accept.fields[k].FieldName)<>nil then
if t_ch_accept.fields[k].FieldName<>'CH_ID' then
t_ch_pay.FindField(t_ch_accept.fields[k].FieldName).value:=t_ch_accept.fields[k].value ;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_pay['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_pay['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_pay['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_pay['˳<><CBB3>']:=t_ch_pay.RecordCount+1;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_pay['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_pay.post;
t_ch_accept.next;
end;
end;
procedure Tfra_fee.N75Click(Sender: TObject);
var
i,k:integer;
begin
if t_ch_pay.IsEmpty then
exit;
if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
t_ch_accept.append;
for k:= 0 to (t_ch_pay.fieldcount-1) do
begin
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
if t_ch_pay.fields[k].FieldName<>'CH_ID' then
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept.post;
end;
end
else
begin
t_ch_accept.append;
for k:= 0 to (t_ch_pay.fieldcount-1) do
begin
if t_ch_accept.FindField(t_ch_pay.fields[k].FieldName)<>nil then
if t_ch_pay.fields[k].FieldName<>'CH_ID' then
t_ch_accept.FindField(t_ch_pay.fields[k].FieldName).value:=t_ch_pay.fields[k].value ;
end;
t_ch_accept['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_accept['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_accept['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_accept['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_ch_accept['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
t_ch_accept['˳<><CBB3>']:=t_ch_accept.RecordCount+1;
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_accept['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_ch_accept['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_accept.post;
end;
end;
procedure Tfra_fee.N79Click(Sender: TObject);
begin
try
if not assigned(frm_fee_history) then
frm_fee_history:=tfrm_fee_history.Create (self);
frm_fee_history.op_type.text:=edit_type.text;
frm_fee_history.fee_type.text:='<27><>';
frm_fee_history.t_do_fee.Enabled:=false;
frm_fee_history.t_do_fee.DataSet:=t_ch_accept;
frm_fee_history.t_do_fee.Enabled:=true;
frm_fee_history.t_bz_balance1.Enabled:=false;
frm_fee_history.t_bz_balance1.DataSet:=t_bz_balance;
frm_fee_history.t_bz_balance1.Enabled:=true;
frm_fee_history.ShowModal;
finally
frm_fee_history.free;
frm_fee_history:=nil;
end;
end;
procedure Tfra_fee.N81Click(Sender: TObject);
begin
try
if not assigned(frm_fee_history) then
frm_fee_history:=tfrm_fee_history.Create (self);
frm_fee_history.op_type.text:=edit_type.text;
frm_fee_history.fee_type.text:='<27><>';
frm_fee_history.t_do_fee.Enabled:=false;
frm_fee_history.t_do_fee.DataSet:=t_ch_pay;
frm_fee_history.t_do_fee.Enabled:=true;
frm_fee_history.t_bz_balance1.Enabled:=false;
frm_fee_history.t_bz_balance1.DataSet:=t_bz_balance;
frm_fee_history.t_bz_balance1.Enabled:=true;
frm_fee_history.ShowModal;
finally
frm_fee_history.free;
frm_fee_history:=nil;
end;
end;
procedure Tfra_fee.N82Click(Sender: TObject);
begin
fee_balance_view(t_ch_accept);
end;
procedure Tfra_fee.MenuItem5Click(Sender: TObject);
begin
fee_balance_view(t_ch_pay);
end;
procedure Tfra_fee.N84Click(Sender: TObject);
begin
fee_invoice_view(t_ch_accept);
end;
procedure Tfra_fee.MenuItem10Click(Sender: TObject);
begin
fee_check_view(t_ch_pay);
end;
procedure Tfra_fee.N86Click(Sender: TObject);
begin
fee_modify_view(t_ch_accept);
end;
procedure Tfra_fee.MenuItem12Click(Sender: TObject);
begin
fee_modify_view(t_ch_pay);
end;
procedure Tfra_fee.N88Click(Sender: TObject);
begin
price_person_view;
end;
procedure Tfra_fee.N89Click(Sender: TObject);
var
aQuery:TAdoQuery;
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_update_part(edit_type.text,'<27><>',t_ch_accept,wwDBGrid1);
if pos('ƴ<><C6B4>',t_ch_accept.DataSource.DataSet.fieldbyname('װ<>˷<EFBFBD>ʽ').AsString)>0 then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
SQL.Add('Select count(*) as Ʊ<><C6B1> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC>״̬'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept['<27><><EFBFBD><EFBFBD>']+'''');
Open;
if not IsEmpty then begin
if FieldByName('Ʊ<><C6B1>').AsInteger=0 then begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then begin
iszeroprofit;
end;
end;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfra_fee.MenuItem15Click(Sender: TObject);
var
aQuery,aQuery2:TADOQuery;
Cntrstr:String;
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
{
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_op_ctn where <20><><EFBFBD><EFBFBD>='+t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']);
Open;
if not IsEmpty then begin
while not eof do begin
cntrstr:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
CntrStr:=StringReplace(CntrStr,'''','''''',[rfReplaceAll]);
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from t_ch_fee where ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>=1 and <20><><EFBFBD><EFBFBD>='+t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']);
aQuery2.Open;
if aQuery2.IsEmpty then begin
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from v_price_detail ');
aQuery2.sql.add(' WHERE Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>˾='''+GetCorpID(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString)+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='+formatDatetime('yyyy',t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']));
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
if t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then
aQuery2.sql.add(' and Ʒ<><C6B7>='''+Trim(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'''');
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
aQuery2.sql.add(' and <20><>'+getZweek(DayOfWeek(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime))+'=1');
aQuery2.sql.add(' and Ʒ<><C6B7>='''+CntrStr+'''');
aQuery2.Open;
if aQuery2.IsEmpty then begin
aQuery2.Close;
aQuery2.SQL.clear;
aQuery2.sql.add('select * from v_price_detail ');
aQuery2.sql.add(' WHERE Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>='''+t_ch_pay.DataSource.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>˾='''+GetCorpID(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString)+'''');
aQuery2.sql.add(' and <20><><EFBFBD><EFBFBD>='+formatDatetime('yyyy',t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']));
aQuery2.sql.add(' and <20>ܴ<EFBFBD>='+IntToStr(WeekofYear(t_ch_pay.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])));
aQuery2.sql.add(' and <20><>'+getZweek(DayOfWeek(t_ch_pay.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime))+'=1');
aQuery2.sql.add(' and Ʒ<><C6B7>='''+CntrStr+'''');
aQuery2.Open;
end;
if not aQuery2.IsEmpty then begin
if aQuery2['<27><><EFBFBD><EFBFBD><EBB7A2><EFBFBD>˼<EFBFBD>'] then begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>,<2C><>Ʊҵ<C6B1><D2B5>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>˼ۣ<CBBC><DBA3><EFBFBD><EFBFBD>˷ѱ<CBB7><D1B1><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>˼ۣ<CBBC>');
abort;
end;
end;
end;
Next;
end;
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
}
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_update_part(edit_type.text,'<27><>',t_ch_pay,wwDBGrid2);
if pos('ƴ<><C6B4>',t_ch_pay.DataSource.DataSet.fieldbyname('װ<>˷<EFBFBD>ʽ').AsString)>0 then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
SQL.Add('Select count(*) as Ʊ<><C6B1> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC>״̬'' and <20><><EFBFBD><EFBFBD>='''+t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
Open;
if not IsEmpty then begin
if FieldByName('Ʊ<><C6B1>').AsInteger=0 then begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then begin
iszeroprofit;
end;
end;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfra_fee.bsSkinButton11Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton11.ClientToScreen(Point(0,bsSkinButton11.Height));
PopupMenu6.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.bsSkinButton12Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton12.ClientToScreen(Point(0,bsSkinButton12.Height));
PopupMenu7.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_fee.N91Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_update_all(edit_type.text,'<27><>',t_ch_accept);
if pos('ƴ<><C6B4>',t_ch_accept.DataSource.DataSet.fieldbyname('װ<>˷<EFBFBD>ʽ').AsString)>0 then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
SQL.Add('Select count(*) as Ʊ<><C6B1> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC>״̬'' and <20><><EFBFBD><EFBFBD>='''+t_ch_accept['<27><><EFBFBD><EFBFBD>']+'''');
Open;
if not IsEmpty then begin
if FieldByName('Ʊ<><C6B1>').AsInteger=0 then begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then begin
iszeroprofit;
end;
end;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfra_fee.MenuItem17Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_update_all(edit_type.text,'<27><>',t_ch_pay);
if pos('ƴ<><C6B4>',t_ch_pay.DataSource.DataSet.fieldbyname('װ<>˷<EFBFBD>ʽ').AsString)>0 then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
SQL.Add('Select count(*) as Ʊ<><C6B1> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬=''¼<><C2BC>״̬'' and <20><><EFBFBD><EFBFBD>='''+t_ch_pay['<27><><EFBFBD><EFBFBD>']+'''');
Open;
if not IsEmpty then begin
if FieldByName('Ʊ<><C6B1>').AsInteger=0 then begin
if t_op_gain.FieldByName('ë<><C3AB><EFBFBD><EFBFBD>').AsFloat<=0 then begin
iszeroprofit;
end;
end;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfra_fee.N93Click(Sender: TObject);
begin
if t_ch_accept.IsEmpty then
exit;
table_post(t_ch_accept);
try
frm_fee_list:=tfrm_fee_list.Create (self);
frm_fee_list.DataSource1.Enabled:=false;
frm_fee_list.DataSource1.DataSet:=t_ch_accept;
frm_fee_list.DataSource1.Enabled:=true;
frm_fee_list.ShowModal;
finally
frm_fee_list.Free;
frm_fee_list:=nil;
t_ch_accept.Requery();
end;
end;
procedure Tfra_fee.N95Click(Sender: TObject);
begin
if t_ch_pay.IsEmpty then
exit;
table_post(t_ch_pay);
try
frm_fee_list:=tfrm_fee_list.Create (self);
frm_fee_list.DataSource1.Enabled:=false;
frm_fee_list.DataSource1.DataSet:=t_ch_pay;
frm_fee_list.DataSource1.Enabled:=true;
frm_fee_list.ShowModal;
finally
frm_fee_list.Free;
frm_fee_list:=nil;
t_ch_pay.Requery();
end;
end;
procedure Tfra_fee.N97Click(Sender: TObject);
begin
open_code_edit('006');
end;
procedure Tfra_fee.N101Click(Sender: TObject);
begin
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_update_part_no(t_ch_accept,wwDBGrid1);
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
end;
procedure Tfra_fee.N103Click(Sender: TObject);
begin
if edit_type.text='1' then begin
if not if_open('023') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('056') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('074') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('082') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
fee_update_part_no(t_ch_pay,wwDBGrid2);
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
end;
procedure Tfra_fee.t_ch_acceptAfterDelete(DataSet: TDataSet);
begin
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
getsumstr;
end;
procedure Tfra_fee.t_ch_payAfterPost(DataSet: TDataSet);
begin
if t_ch_pay.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'then
begin
if Panel8.Visible then
t_op_gain.Requery();
if Panel9.Visible then
t_op_gain_main.Requery();
end;
getsumstr;
end;
procedure Tfra_fee.N108Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_accept.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N113Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_pay.IsEmpty then
exit;
if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
if i=0 then
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N110Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_accept.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N112Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_accept.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_ch_accept.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_accept.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N115Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_pay.IsEmpty then
exit;
if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
if i=0 then
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N117Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_ch_pay.IsEmpty then
exit;
if wwDBGrid2.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid2.SelectedList.Count-1 do
begin
t_ch_pay.GotoBookmark(pointer(wwDBGrid2.SelectedList[i]));
if i=0 then
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring
else
str:=str+','+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
end
else
begin
str:='('+t_ch_pay.fieldbyname('CH_ID').asstring;
end;
str:=str+')';
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee '
+'where CH_ID in '+str
+' order by <20>ұ<EFBFBD>,CH_ID');
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where CH_ID in '+str);
t_ch_client_sum.open;
sys_print(edit_report.text+'Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_accept.DataSource,t_ch_client_sum1,nil,nil,t_ch_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfra_fee.N119Click(Sender: TObject);
begin
try
frm_ch_fee_truck:=tfrm_ch_fee_truck.Create (self);
frm_ch_fee_truck.t_ch_fee_truck.DataSource:=t_ch_accept.DataSource;
frm_ch_fee_truck.ShowModal;
finally
frm_ch_fee_truck.Free;
frm_ch_fee_truck:=nil;
end;
end;
procedure Tfra_fee.N121Click(Sender: TObject);
begin
try
frm_ch_fee_truck:=tfrm_ch_fee_truck.Create (self);
frm_ch_fee_truck.t_ch_fee_truck.DataSource:=t_ch_pay.DataSource;
frm_ch_fee_truck.ShowModal;
finally
frm_ch_fee_truck.Free;
frm_ch_fee_truck:=nil;
end;
end;
procedure Tfra_fee.DBEdit43Change(Sender: TObject);
begin
if Panel8.Visible then
begin
if (DBEdit43.Text='ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ')then
begin
Panel9.Visible:=true;
Panel8.Height:=40;
end
else
begin
Panel9.Visible:=false;
Panel8.Height:=20;
end;
end;
end;
procedure Tfra_fee.Panel9Resize(Sender: TObject);
var
i:integer;
begin
i:=round((Panel9.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.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
begin
t_ch_accept['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
t_ch_accept['˳<><CBB3>']:=frm_data_share.t_code_fee.fieldbyname('˳<><CBB3>').asInteger;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean:=frm_data_share.t_code_fee.fieldbyname('<27><>ֹ<EFBFBD><D6B9>Ʊ').AsBoolean;
if frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring,[])then
begin
t_ch_accept['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring;
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
// if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˷Ѵ<CBB7><D1B4><EFBFBD><EFBFBD><EFBFBD>') or (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD><EFBFBD><EFBFBD>') then begin
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˷Ѵ<CBB7><D1B4><EFBFBD><EFBFBD><EFBFBD>444444444444') then begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo6KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
begin
t_ch_pay['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
t_ch_pay['˳<><CBB3>']:=frm_data_share.t_code_fee.fieldbyname('˳<><CBB3>').asInteger;
if frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring,[])then
begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
end;
end;
end;
end;
procedure Tfra_fee.wwDBLookupCombo5Exit(Sender: TObject);
begin
if t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring<>''then
begin
frm_data_share.t_crm_client.Filtered:=false;
if t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
frm_data_share.t_crm_client.Filter:='ί<>е<EFBFBD>λ=1';
end else begin
frm_data_share.t_crm_client.Filter:=t_ch_accept.FieldByName('<27><><EFBFBD>㵥λ').asstring+'=1';
end;
frm_data_share.t_crm_client.Filtered:=true;
end
else
begin
frm_data_share.t_crm_client.Filtered:=false;
end;
end;
procedure Tfra_fee.wwDBLookupCombo7Exit(Sender: TObject);
begin
if t_ch_pay.FieldByName('<27><><EFBFBD>㵥λ').asstring<>''then
begin
frm_data_share.t_crm_client.Filtered:=false;
if t_ch_pay.FieldByName('<27><><EFBFBD>㵥λ').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
frm_data_share.t_crm_client.Filter:='ί<>е<EFBFBD>λ=1';
end else begin
frm_data_share.t_crm_client.Filter:=t_ch_pay.FieldByName('<27><><EFBFBD>㵥λ').asstring+'=1';
end;
frm_data_share.t_crm_client.Filtered:=true;
end
else
begin
frm_data_share.t_crm_client.Filtered:=false;
end;
end;
procedure Tfra_fee.a_shen_modify_newBeforePost(DataSet: TDataSet);
begin
{
if (a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*a_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),a_shen_modify_new['<27><><EFBFBD><EFBFBD>']);
}
if a_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
if a_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring='USD' then begin
if edit_type.text='1' then
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='2' then
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='3' then
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='4' then
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end else
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',a_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end
else
begin
if not strtobool(get_parameters_value(38,'true')) then
begin
a_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end else begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬱ұ<F0A3ACB1><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
abort;
end;
end;
procedure Tfra_fee.p_shen_modify_newBeforePost(DataSet: TDataSet);
begin
{
if (p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*p_shen_modify_new.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),p_shen_modify_new['<27><><EFBFBD><EFBFBD>']);
}
if p_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring<>'' then
begin
if p_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring='USD' then begin
if edit_type.text='1' then
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='2' then
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='3' then
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else if edit_type.text='4' then
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_accept.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
end else
IF not frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',p_shen_modify_new.fieldbyname('<27>ұ<EFBFBD>').asstring,[])THEN
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬷<EFBFBD><F0A3ACB7>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
abort;
end
else
begin
if not strtobool(get_parameters_value(38,'true')) then
begin
p_shen_modify_new['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end else begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬱ұ<F0A3ACB1><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
abort;
end;
end;
procedure Tfra_fee.INVOICEEXCEL1Click(Sender: TObject);
var
ExcelTemplet:Variant;
begin
if t_ch_accept.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,SUM(<28><><EFBFBD><EFBFBD>) AS <20><><EFBFBD><EFBFBD> from t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>'
+' Group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client.open;
t_ch_client_sum.close;
t_ch_client_sum.sql.clear;
t_ch_client_sum.sql.add('select isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN ISNULL(<28><><EFBFBD><EFBFBD>,0) ELSE 0 END) ,0) AS <20>ϼ<EFBFBD>USD,'
+'isnull(SUM(CASE <20>ұ<EFBFBD> WHEN '+''''+'USD'+''''
+' THEN 0 ELSE ISNULL(<28><><EFBFBD><EFBFBD>,0)*ISNULL(<28><><EFBFBD><EFBFBD>,0) END) ,0) AS <20>ϼ<EFBFBD>RMB FROM t_ch_fee '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_accept.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client_sum.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:='<27><>';
t_ch_client_sum.open;
try
ExcelTemplet:= CreateOleObject('Excel.Application');
ExcelTemplet.Visible := true;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ
ExcelTemplet.Workbooks.Open(ExtractFileDir(ParamStr(0))+'\HIGHTRANS.xls');
ExcelTemplet.WorkSheets[1].Cells[5,7].value:=t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
ExcelTemplet.WorkSheets[1].Cells[6,7].value:=FormatDateTime('YYYY-MM-DD',Now);
ExcelTemplet.WorkSheets[1].Cells[9,2].value:=t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'/'+t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
ExcelTemplet.WorkSheets[1].Cells[10,2].value:=t_ch_accept.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
ExcelTemplet.WorkSheets[1].Cells[11,2].value:=FormatDateTime('YYYY-MM-DD',t_ch_accept.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
t_ch_client.First;
while not t_ch_client.eof do begin
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD>˷<EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[13,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[14,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') or (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
ExcelTemplet.WorkSheets[1].Cells[15,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><>֤<EFBFBD><D6A4>' then
ExcelTemplet.WorkSheets[1].Cells[16,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27>ļ<EFBFBD><C4BC><EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[17,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='ǩ<><C7A9><EFBFBD><EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[18,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD>ŷ<EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[19,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27>ĵ<EFBFBD><C4B5><EFBFBD>') or (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD>ķ<EFBFBD>') then
ExcelTemplet.WorkSheets[1].Cells[20,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='THC' then
ExcelTemplet.WorkSheets[1].Cells[21,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='AMS' then
ExcelTemplet.WorkSheets[1].Cells[22,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><>վ<EFBFBD><D5BE>' then
ExcelTemplet.WorkSheets[1].Cells[23,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD>ӷ<EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[24,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD>ط<EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[25,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><>ʹ<EFBFBD><CAB9>' then
ExcelTemplet.WorkSheets[1].Cells[26,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') OR (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27>ۿڰ<DBBF>ȫ<EFBFBD><C8AB>') then
ExcelTemplet.WorkSheets[1].Cells[27,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>') OR (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><>Ϣ<EFBFBD><CFA2>') then
ExcelTemplet.WorkSheets[1].Cells[28,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='Ǧ<><C7A6><EFBFBD><EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[29,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') or (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><EFBFBD><E8B1B8><EFBFBD><EFBFBD>') then
ExcelTemplet.WorkSheets[1].Cells[30,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD>ŷ<EFBFBD>') or (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then
ExcelTemplet.WorkSheets[1].Cells[31,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') or (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD>') then
ExcelTemplet.WorkSheets[1].Cells[32,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='Ѭ<><D1AC><EFBFBD><EFBFBD><EFBFBD>ط<EFBFBD>') or (t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='Ѭ<><D1AC><EFBFBD><EFBFBD>') then
ExcelTemplet.WorkSheets[1].Cells[33,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='װж<D7B0><D0B6>' then
ExcelTemplet.WorkSheets[1].Cells[34,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[35,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><EFBFBD><E1B5B9>' then
ExcelTemplet.WorkSheets[1].Cells[36,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27>յ<EFBFBD><D5B5><EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[37,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
if t_ch_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27>Ӽ<EFBFBD><D3BC><EFBFBD>' then
ExcelTemplet.WorkSheets[1].Cells[38,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client['<27><><EFBFBD><EFBFBD>']);
t_ch_client.Next;
end;
ExcelTemplet.WorkSheets[1].Cells[40,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client_sum['<27>ϼ<EFBFBD>RMB']);
ExcelTemplet.WorkSheets[1].Cells[41,2].value:=FormatFloat('#,##0.00;-#,##0.00',t_ch_client_sum['<27>ϼ<EFBFBD>USD']);
except
Showmessage('<27><>ȷ<EFBFBD><C8B7>HIGHTRANS.xls<6C>ļ<EFBFBD><C4BC>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԡ<EFBFBD>');
ExcelTemplet.DisplayAlerts := false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
ExcelTemplet.Quit;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
end;
end;
procedure Tfra_fee.t_ch_acceptDSDesigner5Change(Sender: TField);
begin
if (t_ch_accept.state=dsinsert)or(t_ch_accept.state=dsedit) then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo1.text,[]) then
begin
t_ch_accept['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring,[])then
begin
t_ch_accept['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27>շѿͻ<D1BF>').asstring;
t_ch_accept['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
end;
end;
procedure Tfra_fee.t_ch_payDSDesigner5Change(Sender: TField);
begin
if (t_ch_pay.state=dsinsert)or(t_ch_pay.state=dsedit) then
begin
if not frm_data_share.t_code_fee.IsEmpty then
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo6.text,[]) then
begin
t_ch_pay['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
if frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring<>''then
begin
if t_bz_client.Locate('two',frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring,[])then
begin
t_ch_pay['<27><><EFBFBD>㵥λ']:=frm_data_share.t_code_fee.fieldbyname('<27><><EFBFBD>ѿͻ<D1BF>').asstring;
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_bz_client.fieldbyname('three').asstring;
end;
end;
end;
end;
end;
procedure Tfra_fee.N124Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.Add('select <20><>Ӷ<EFBFBD><D3B6>׼ from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_pay.DataSource.DataSet['ί<>е<EFBFBD>λ']+'''');
aQuery.Open;
if (not aQuery.FieldByName('<27><>Ӷ<EFBFBD><D3B6>׼').IsNull) and (aQuery.FieldByName('<27><>Ӷ<EFBFBD><D3B6>׼').AsFloat<>0) then begin
t_ch_pay.Append;
t_ch_pay['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>Ӷ';
t_ch_pay['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_pay['<27>ұ<EFBFBD>']:='USD';
t_ch_pay['<27><>׼']:='<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_ch_pay['<27><><EFBFBD><EFBFBD>']:=s_w(4,t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
else
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=1;
end
else
begin
if t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=t_ch_accept.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=1;
end;
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_pay.DataSource.DataSet.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
t_ch_pay['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_pay.DataSource.DataSet['ί<>е<EFBFBD>λ'];
t_ch_pay['<27><><EFBFBD><EFBFBD>']:=aQuery.FieldByName('<27><>Ӷ<EFBFBD><D3B6>׼').AsFloat;
t_ch_pay.post;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfra_fee.DBEdit48Change(Sender: TObject);
begin
if t_ch_pay.IsEmpty then
begin
ap_price_view.Visible:=false;
ap_price_view.Align:=alNone;
exit;
end;
if t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='Ӷ<><D3B6>'then
begin
ap_price_view.Visible:=true;
ap_price_view.Align:=alRight;
exit;
end else begin
ap_price_view.Visible:=false;
ap_price_view.Align:=alNone;
end;
end;
procedure Tfra_fee.t_ch_acceptAfterOpen(DataSet: TDataSet);
begin
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptDSDesigner5Change;
getsumstr;
end;
procedure Tfra_fee.t_ch_payAfterOpen(DataSet: TDataSet);
begin
t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_payDSDesigner5Change;
getsumstr;
end;
procedure Tfra_fee.iszeroprofit;
var
aQuery,aQuery2:TAdoQuery;
str,emp,mail:String;
function isquanxian(empl:String):Boolean;
var
aQuery3:TAdoQuery;
begin
result:=false;
aQuery3:=CreateAdoQuery;
try
with aQuery3 do begin
Close;SQL.Clear;
SQL.Add('Select * from t_sys_code_data where <20><><EFBFBD><EFBFBD>=''0001'' and ְԱ='''+employee+''' and <20><>Ա='''+empl+'''');
Open;
if not IsEmpty then begin
Result:=aQuery3['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
finally
FreeAndNil(aQuery3);
end;
end;
begin
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
frmzeroprofit:=Tfrmzeroprofit.Create(self);
try
frmzeroprofit.ShowModal;
if frmzeroprofit.ModalResult=mrOk then begin
str:=frmzeroprofit.Memo1.Lines.CommaText;
end;
finally
FreeAndNil(frmzeroprofit);
end;
try
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.Add('Select * from t_sys_awoke where <20><><EFBFBD><EFBFBD>״̬=''׼<><D7BC>ִ<EFBFBD><D6B4>'' AND <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' AND <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><='''+FormatDateTime('YYYY-MM-DD',NOW)+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='''+FormatDateTime('YYYY-MM-DD',NOW)+'''');
aQuery.Open;
if not aQuery.IsEmpty then begin
SMTP1.AuthType := satDefault; //(satNone, satDefault, satSASL);
// SMTP1.AuthenticationType := atLogin;
SMTP1.username:= frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>').AsString;
SMTP1.Password :=frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>').AsString;
SMTP1.Host :=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ').AsString;
SMTP1.Port :=Strtointdef(Trim(frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>').AsString),25);
try
SMTP1.Connect;
except
Showmessage('<27><><EFBFBD><EFBFBD>SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!');
Exit;
end;
try
with IdMsg do
begin
From.address :=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
aQuery2.Close;
aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select * from t_sys_awoke_emp where AWOKE_ID='+aQuery.FieldByName('AWOKE_ID').AsString);
aQuery2.Open;
aQuery2.first;
while not aQuery2.eof do begin
if aQuery2.FieldByName('<27><><EFBFBD>ݷ<EFBFBD>Χ').AsString='<27><>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>' then begin
emp:=aQuery2.FieldByName('<27><>Ա').AsString;
if mail='' then
mail:=GetEmail(emp)
else
mail:=mail+','+GetEmail(emp);
end else if aQuery2.FieldByName('<27><><EFBFBD>ݷ<EFBFBD>Χ').AsString='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
if GetDeptName(aQuery2.FieldByName('<27><>Ա').AsString)=department then begin
emp:=aQuery2.FieldByName('<27><>Ա').AsString;
if mail='' then
mail:=GetEmail(emp)
else
mail:=mail+','+GetEmail(emp);
end;
end else if aQuery2.FieldByName('<27><><EFBFBD>ݷ<EFBFBD>Χ').AsString='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
if aQuery2.FieldByName('<27><>Ա').AsString=employee then begin
emp:=aQuery2.FieldByName('<27><>Ա').AsString;
if mail='' then
mail:=GetEmail(emp)
else
mail:=mail+','+GetEmail(emp);
end;
end else if aQuery2.FieldByName('<27><><EFBFBD>ݷ<EFBFBD>Χ').AsString='Ȩ<><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
if isquanxian(aQuery2.FieldByName('<27><>Ա').AsString) then begin
emp:=aQuery2.FieldByName('<27><>Ա').AsString;
if mail='' then
mail:=GetEmail(emp)
else
mail:=mail+','+GetEmail(emp);
end;
end;
aQuery2.Next;
end;
Recipients.EMailAddresses:=mail;
Body.Clear;
Body.Add('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_ch_accept.DataSource.DataSet.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' Ϊ<><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:');
Body.Add(Str);
Subject :=aQuery.fieldByName('<27><><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD>').AsString;
end;
SMTP1.Send(IdMsg);
finally
// showmessage(mail);
SMTP1.Disconnect;
end;
{
NMSMTP1.Host:=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ').AsString;
NMSMTP1.Port:=Strtointdef(Trim(frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>').AsString),25);
if NMSMTP1.Connected then
begin
NMSMTP1.Disconnect;
end;
NMSMTP1.Connect;
NMSMTP1.PostMessage.FromAddress :=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
NMSMTP1.PostMessage.FromName :='<27>ʼ<EFBFBD><CABC>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>';
NMSMTP1.PostMessage.ToAddress.Clear;
aQuery2.Close;
aQuery2.SQL.Clear;
aQuery2.SQL.Add('Select * from t_sys_awoke_emp where AWOKE_ID='+aQuery.FieldByName('AWOKE_ID').AsString);
aQuery2.Open;
while not aQuery2.eof do begin
emp:=aQuery2.FieldByName('<27><>Ա').AsString;
mail:=GetEmail(emp);
NMSMTP1.PostMessage.ToAddress.Add(mail);
aQuery2.Next;
end;
NMSMTP1.PostMessage.Body.Clear;
NMSMTP1.PostMessage.Body.Add('ί<>б<EFBFBD><D0B1><EFBFBD>:'+t_ch_accept.DataSource.DataSet.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString+' Ϊ<><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:');
NMSMTP1.PostMessage.Body.Add(Str);
NMSMTP1.PostMessage.Subject :=aQuery.fieldByName('<27><><EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD>').AsString;
NMSMTP1.SendMail;
}
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
procedure Tfra_fee.t_ch_acceptdjoncharge(Sender: TField);
begin
//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat)
else
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat/100*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat+Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
finally
// Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end;
end;
end;
procedure Tfra_fee.t_ch_paydjoncharge(Sender: TField);
begin
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0)then
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat)
else
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100);
Sender.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat+Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat);
finally
// Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
end;
end;
end;
{
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
wwDBGrid2.Refresh
else wwDBGrid1.Refresh;
}
procedure Tfra_fee.DatasetAmtcharge(Sender: TField);
begin
if not Sender.DataSet.IsEmpty then
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
if Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat<>0 then begin
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+Sender.DataSet.fieldbyname('˰<><CBB0>').asfloat/100));
Sender.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat);
end else begin
Sender.DataSet['˰<><CBB0>']:=0;
Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
try
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=nil;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=nil;
if Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0 then
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat/Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
finally
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
begin
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=t_ch_acceptdjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_acceptdjoncharge;
end
else
begin
Sender.DataSet.FieldByName('˰<><CBB0>').OnChange:=t_ch_paydjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_paydjoncharge;
end;
end;
{
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
wwDBGrid2.Refresh
else wwDBGrid1.Refresh;
}
end;
end;
procedure Tfra_fee.t_ch_acceptcrmcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
begin
if not Sender.DataSet.IsEmpty then
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
case StrToInt(edit_type.text) of
1,2:
begin
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('Ĭ<><C4AC>˰<EFBFBD><CBB0>').AsFloat;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('Ĭ<><C4AC>˰<EFBFBD><CBB0>').AsFloat;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
begin
Sender.DataSet['˰<><CBB0>']:=aRateNum;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end
else
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('Ĭ<><C4AC>˰<EFBFBD><CBB0>').AsFloat;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
begin
Sender.DataSet['˰<><CBB0>']:=aRateNum;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end;
end;
3,4:
begin
if UpperCase(Sender.DataSet.Name)='T_CH_ACCEPT' then
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('Ĭ<><C4AC>˰<EFBFBD><CBB0>').AsFloat;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('Ĭ<><C4AC>˰<EFBFBD><CBB0>').AsFloat;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
begin
Sender.DataSet['˰<><CBB0>']:=aRateNum;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end
else
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',Sender.DataSet.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
begin
Sender.DataSet['˰<><CBB0>']:=frm_data_share.t_crm_client.fieldbyname('Ĭ<><C4AC>˰<EFBFBD><CBB0>').AsFloat;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end
else
begin
Sender.DataSet['˰<><CBB0>']:=aRateNum;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end;
end
else
begin
Sender.DataSet['˰<><CBB0>']:=aRateNum;
// Sender.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
end;
end;
{
if UpperCase(Sender.DataSet.Name)='T_CH_PAY' then
wwDBGrid2.Refresh
else wwDBGrid1.Refresh;
}
end;
end;
procedure Tfra_fee.DatasetNOPricecharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
begin
end;
procedure Tfra_fee.getsumstr;
var
aQuery1,aQuery2:TAdoQuery;
str1,str2:string;
acceptstr,paystr:widestring;
accepteof,payeof:boolean;
armb,ausd,aot,atotal,prmb,pusd,pot,ptotal,rarmb,rausd,raot,ratotal,rprmb,rpusd,rpot,rptotal:double;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2>ϼ<EFBFBD><CFBC>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if not bsSkinPanel3.Visible then exit;
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;
rarmb:=0;
rausd:=0;
raot:=0;
ratotal:=0;
rprmb:=0;
rpusd:=0;
rpot:=0;
rptotal:=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>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then ˰<><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then ˰<><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else ˰<><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(˰<><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' 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>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then ˰<><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then ˰<><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else ˰<><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(˰<><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' 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>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then ˰<><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then ˰<><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else ˰<><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(˰<><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' 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>'
+',sum(case <20>ұ<EFBFBD> when ''RMB'' then ˰<><CBB0> else 0 end) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then ˰<><CBB0> else 0 end) as <20><>Ԫ˰<D4AA><CBB0>,'
+'sum(case <20>ұ<EFBFBD> when ''USD'' then 0 else (case <20>ұ<EFBFBD> when ''RMB'' then 0 else ˰<><CBB0> end) end) as <20><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>,'
+'sum(˰<><CBB0>*<2A><><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD>˰<EFBFBD><CBB0>'
+' 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('',120);
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);
if aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'
else
str1:=str1+' ';
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;
rarmb:=rarmb+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rausd:=rausd+aquery1.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').AsFloat;
raot:=raot+aquery1.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
ratotal:=ratotal+aquery1.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
aQuery1.Next;
end;
if aQuery2.Eof then begin
str2:=FixLenStr('',120);
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);
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼƽ<CFBC><C6BD><EFBFBD>').Asfloat),12,' ',false);
if aQuery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',aQuery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').Asfloat),8,' ',false)+')'
else
str2:=str2+' ';
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;
rprmb:=rprmb+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rpusd:=rpusd+aquery2.fieldbyname('<27><>Ԫ˰<D4AA><CBB0>').AsFloat;
rpot:=rpot+aquery2.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
rptotal:=rptotal+aquery2.fieldbyname('<27>ϼ<EFBFBD>˰<EFBFBD><CBB0>').AsFloat;
aQuery2.Next;
end;
memo1.Lines.Add(str1+'|'+str2);
end;
str1:=FixLenStr('-',120,'-');
str2:=FixLenStr('-',120,'-');
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('Ӧ<>պϼ<D5BA>',20)+' '+FixLenStr(FormatFloat('#,##0.00',armb),12,' ',false);
if rarmb<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',rarmb),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',ausd),12,' ',false);
if rausd<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',rausd),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',aot),12,' ',false);
if raot<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',raot),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false)
else
str1:=str1+' '+' '+FixLenStr(FormatFloat('#,##0.00',atotal),12,' ',false);
if ratotal<>0 then
str1:=str1+'(˰'+FixLenStr(FormatFloat('#,##0.00',ratotal),8,' ',false)+')'
else
str1:=str1+' ';
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>',20)+' '+FixLenStr(FormatFloat('#,##0.00',prmb),12,' ',false);
if rprmb<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rprmb),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',pusd),12,' ',false);
if rpusd<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rpusd),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',pot),12,' ',false);
if rpot<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rpot),8,' ',false)+')'+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false)
else
str2:=str2+' '+' '+FixLenStr(FormatFloat('#,##0.00',ptotal),12,' ',false);
if rptotal<>0 then
str2:=str2+'(˰'+FixLenStr(FormatFloat('#,##0.00',rptotal),8,' ',false)+')'
else
str2:=str2+' ';
memo1.Lines.Add(str1+'|'+str2);
str1:=FixLenStr('-',120,'-');
str2:=FixLenStr('-',120,'-');
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)+FixLenStr('',48);
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);
if (edit_type.text='6') and if_open('229') then
memo1.Lines.Add(str1+'|'+str2);
if (edit_type.text='7') 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> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<>պϼ<D5BA> ',24,' ',false);
str2:=FixLenStr('Ӧ<><D3A6><EFBFBD>ͻ<EFBFBD>',20)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD>Ԫ ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ',24,' ',false)+' '+FixLenStr('Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD> ',24,' ',false);
Memo1.Lines.Insert(0,str1+'|'+str2);
end;
end;
procedure Tfra_fee.NMSMTP1Connect(Sender: TObject);
var
StrUserName,strPassword:String;
begin
{
strUserName:=EncodeString(frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>').AsString);
strPassword:=EncodeString(frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>').AsString);
nmsmtp1.Transaction('EHLO') ;
nmsmtp1.Transaction('AUTH LOGIN');
nmsmtp1.Transaction(strUserName);
nmsmtp1.Transaction(strPassword);
}
end;
procedure Tfra_fee.DBEdit50Change(Sender: TObject);
begin
getsumstr;
end;
procedure Tfra_fee.N126Click(Sender: TObject);
begin
fee_invoicecr_view(t_ch_pay);
{
if edit_type.text='1' then begin
if not if_open('022') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='2' then begin
if not if_open('055') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='3' then begin
if not if_open('073') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end else if edit_type.text='4' then begin
if not if_open('081') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
end;
t_ch_accept.Edit;
t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean:=True;
t_ch_accept.Post;
}
end;
end.