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.
DONGSHENG6/代码字典/u_code_fee_project_localair...

1013 lines
35 KiB
Plaintext

11 months ago
unit u_code_fee_project_localair;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, DB, ADODB, bsSkinCtrls, ExtCtrls, Grids,
Wwdbigrd, Wwdbgrid, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
wwdblook, RxMemDS, DBCtrls;
type
Tfrm_code_fee_project_localair = class(TForm)
t_ch_project: TADOQuery;
t_ch_project1: TDataSource;
t_ch_project_fee: TADOQuery;
t_ch_project_fee1: TDataSource;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
wwDBGrid1: TwwDBGrid;
Panel4: TPanel;
wwDBGrid2: TwwDBGrid;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
wwDBComboBox1: TwwDBComboBox;
wwDBComboBox2: TwwDBComboBox;
wwDBLookupCombo2: TwwDBLookupCombo;
t_bz_balance: TRxMemoryData;
wwDBLookupCombo4: TwwDBLookupCombo;
t_bz_client: TRxMemoryData;
wwDBLookupCombo5: TwwDBLookupCombo;
bsSkinButton14: TbsSkinButton;
t_ch_project_old: TADOQuery;
t_ch_project_old1: TDataSource;
t_ch_project_fee_old1: TDataSource;
t_ch_project_fee_old: TADOQuery;
t_ch_project_standard_old: TADOQuery;
t_ch_project_standard_old1: TDataSource;
DBEdit1: TDBEdit;
wwDBLookupCombo6: TwwDBLookupCombo;
wwDBLookupCombo15: TwwDBLookupCombo;
bsSkinButton10: TbsSkinButton;
wwDBLookupCombo1: TwwDBLookupCombo;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure Panel3Resize(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure t_ch_projectAfterInsert(DataSet: TDataSet);
procedure t_ch_projectBeforePost(DataSet: TDataSet);
procedure t_ch_project_feeBeforeInsert(DataSet: TDataSet);
procedure t_ch_project_standardBeforeInsert(DataSet: TDataSet);
procedure t_ch_projectAfterScroll(DataSet: TDataSet);
procedure wwDBLookupCombo1Change(Sender: TObject);
procedure wwDBLookupCombo3Change(Sender: TObject);
procedure t_ch_projectBeforeEdit(DataSet: TDataSet);
procedure t_ch_projectPostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure wwDBLookupCombo2Enter(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure t_ch_project_feeAfterOpen(DataSet: TDataSet);
procedure Panel4Resize(Sender: TObject);
procedure t_ch_project_feeNewRecord(DataSet: TDataSet);
procedure bsSkinButton10Click(Sender: TObject);
procedure wwDBGrid1DblClick(Sender: TObject);
private
procedure t_ch_feecurrcharge(Sender: TField);
procedure InsertProjectFee(projectID:Integer;DC,projectName:string;DataSource1:TDataSource);
{ Private declarations }
public
{ Public declarations }
mbltype:string;
end;
var
frm_code_fee_project_localair: Tfrm_code_fee_project_localair;
implementation
uses u_main, u_data_share, my_sys_function, u_code_fee_project_copy,u_op_Aire,
u_sys_progress;
{$R *.dfm}
procedure Tfrm_code_fee_project_localair.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
{
frm_code_fee_project_localair.Hide;
frm_code_fee_project_localair.ManualFloat(frm_code_fee_project_localair.BoundsRect );
frm_main.freeTabs('frm_code_fee_project_localair');
}
action:=cafree;
frm_code_fee_project_localair:=nil;
end;
procedure Tfrm_code_fee_project_localair.FormShow(Sender: TObject);
begin
t_ch_project.SQL.clear;
t_ch_project.sql.add('select * from t_ch_project_localair ');
t_ch_project.SQL.Add(' where '+open_data('8005','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_project.open;
t_ch_project_fee.open;
frm_data_share.t_code_fee.requery;
frm_data_share.t_crm_client.requery;
frm_data_share.t_code_currency.requery;
frm_data_share.t_code_ctn.requery;
end;
procedure Tfrm_code_fee_project_localair.Panel3Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel3.width/5);
bsSkinButton1.width:=i;
bsSkinButton14.width:=i;
bsSkinButton2.width:=i;
bsSkinButton4.width:=i;
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton9Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton1Click(Sender: TObject);
begin
t_ch_project.insert;
end;
procedure Tfrm_code_fee_project_localair.t_ch_feecurrcharge(Sender: TField);
begin
if (t_ch_project_fee.state=dsedit)or(t_ch_project_fee.state=dsinsert)then
begin
if t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString='RMB' then begin
t_ch_project_fee.FieldByName('<27><><EFBFBD><EFBFBD>').Asfloat:=1;
end else begin
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').AsString,[])then
t_ch_project_fee['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_ch_project);
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_ch_project);
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_project);
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton5Click(Sender: TObject);
begin
t_ch_project_fee.insert;
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton6Click(Sender: TObject);
begin
table_post(t_ch_project_fee);
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton7Click(Sender: TObject);
begin
table_delete(t_ch_project_fee);
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton8Click(Sender: TObject);
begin
table_cancel(t_ch_project_fee);
end;
procedure Tfrm_code_fee_project_localair.t_ch_projectAfterInsert(DataSet: TDataSet);
begin
t_ch_project['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_project['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
end;
procedure Tfrm_code_fee_project_localair.t_ch_projectBeforePost(DataSet: TDataSet);
begin
table_before_post(t_ch_project,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_project,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_project,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_code_fee_project_localair.t_ch_project_feeBeforeInsert(
DataSet: TDataSet);
begin
table_before_insert(t_ch_project);
end;
procedure Tfrm_code_fee_project_localair.t_ch_project_standardBeforeInsert(
DataSet: TDataSet);
begin
if do_data('8005',t_ch_project.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')=false then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
abort;
end;
table_before_insert(t_ch_project_fee);
end;
procedure Tfrm_code_fee_project_localair.t_ch_projectAfterScroll(DataSet: TDataSet);
var
i:integer;
begin
if (copy(t_ch_project.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1,4)='<27><><EFBFBD><EFBFBD>') then
begin
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
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']:='<27><>Ʊ';
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']:='<27><><EFBFBD><EFBFBD>';
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']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D>ƷѶ<C6B7>';
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
t_bz_balance['three']:='<27>ƷѶ<C6B7>';
t_bz_balance.Append;
t_bz_balance['one']:='5-TEU';
t_bz_balance['two']:='TEU';
t_bz_balance['three']:='TEU';
t_bz_balance.Append;
t_bz_balance['one']:='6-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:='<27><><EFBFBD><EFBFBD>';
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
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.post;
t_bz_client.Append;
t_bz_client['one']:='1-<2D><> <20><> ˾';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>˾';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><> վ';
t_bz_client['two']:='<27><>վ';
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.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.post;
t_bz_client.Append;
t_bz_client['one']:='5-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
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.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.post;
t_bz_client.Append;
t_bz_client['one']:='8-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='9-ͨ ֪ <20><>';
t_bz_client['two']:='֪ͨ<CDA8><D6AA>';
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.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
else
if (copy(t_ch_project.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1,4)='<27><><EFBFBD><EFBFBD>') then
begin
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
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']:='<27><>Ʊ';
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']:='<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>';
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']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='5-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='6-ë<><C3AB>';
t_bz_balance['two']:='ë<><C3AB>';
t_bz_balance['three']:='ë<><C3AB>';
t_bz_balance.post;
frm_data_share.t_code_fee_unit.First;
while not frm_data_share.t_code_fee_unit.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'-'+frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['two']:=frm_data_share.t_code_fee_unit.fieldbyname('<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>').asstring;
t_bz_balance['three']:=frm_data_share.t_code_fee_unit.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_bz_balance.post;
frm_data_share.t_code_fee_unit.next;
end;
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.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><><EFBFBD>չ<EFBFBD>˾';
t_bz_client['two']:='<27><><EFBFBD>չ<EFBFBD>˾';
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.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD>';
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.post;
t_bz_client.Append;
t_bz_client['one']:='6-<2D><> <20><> <20><>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='7-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='8-<2D><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>';
t_bz_client.post;
t_bz_client.Append;
t_bz_client['one']:='9-ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['two']:='ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
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 else if (t_ch_project.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>') then begin
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']:='<27><>Ʊ';
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']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance.post;
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.post;
t_bz_client.Append;
t_bz_client['one']:='2-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_bz_client['two']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
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.post;
t_bz_client.Append;
t_bz_client['one']:='4-<2D><> <20><> <20><>';
t_bz_client['two']:='<27>ջ<EFBFBD><D5BB><EFBFBD>';
t_bz_client.post;
frm_data_share.t_code_fee.Filtered:=false;
end;
end;
procedure Tfrm_code_fee_project_localair.wwDBLookupCombo1Change(Sender: TObject);
begin
if (t_ch_project_fee.state=dsinsert)or(t_ch_project_fee.state=dsedit) then
begin
t_ch_project_fee['<27>ұ<EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ĭ<>ϱұ<CFB1>').asstring;
end;
end;
procedure Tfrm_code_fee_project_localair.wwDBLookupCombo3Change(Sender: TObject);
begin
{
if (t_ch_project_fee.state=dsinsert)or(t_ch_project_fee.state=dsedit) then
begin
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.text,[])then
t_ch_project_fee['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
}
end;
procedure Tfrm_code_fee_project_localair.t_ch_projectBeforeEdit(DataSet: TDataSet);
begin
if do_data('8005',t_ch_project.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')=false then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_code_fee_project_localair.t_ch_projectPostError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
begin
table_post_error_primary('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',E);
table_post_error_primary('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',E);
end;
procedure Tfrm_code_fee_project_localair.wwDBLookupCombo2Enter(Sender: TObject);
begin
if t_ch_project_fee.FieldByName('<27><><EFBFBD>㵥λ').asstring<>''then
begin
frm_data_share.t_crm_client.Filtered:=false;
frm_data_share.t_crm_client.Filter:=t_ch_project_fee.FieldByName('<27><><EFBFBD>㵥λ').asstring+'=1';
frm_data_share.t_crm_client.Filtered:=true;
end;
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton14Click(Sender: TObject);
begin
if t_ch_project.IsEmpty then
exit;
table_post(t_ch_project);
t_ch_project_old.Close;
t_ch_project_fee_old.close;
t_ch_project_standard_old.close;
t_ch_project_old.Parameters[0].value:=t_ch_project.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_ch_project_old.open;
t_ch_project_fee_old.open;
t_ch_project_standard_old.open;
try
frm_code_fee_project_copy:=tfrm_code_fee_project_copy.Create (self);
t_ch_project.insert;
t_ch_project['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_project['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_old['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_project['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_project_old['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_code_fee_project_copy.ShowModal;
finally
frm_code_fee_project_copy.Free;
frm_code_fee_project_copy:=nil;
end;
end;
procedure Tfrm_code_fee_project_localair.t_ch_project_feeAfterOpen(
DataSet: TDataSet);
begin
t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').OnChange:=t_ch_feecurrcharge;
end;
procedure Tfrm_code_fee_project_localair.Panel4Resize(Sender: TObject);
var
i:integer;
begin
{
i:=round(Panel3.width/5);
bsSkinButton1.width:=i;
bsSkinButton14.width:=i;
bsSkinButton2.width:=i;
bsSkinButton4.width:=i;
}
end;
procedure Tfrm_code_fee_project_localair.t_ch_project_feeNewRecord(
DataSet: TDataSet);
begin
t_ch_project_fee.FieldByName('˰<><CBB0>').asFloat:=0;
end;
procedure Tfrm_code_fee_project_localair.bsSkinButton10Click(
Sender: TObject);
var i :Integer;
DC:string;
begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
if mbltype<>'<27><><EFBFBD><EFBFBD>' then
frm_sys_progress.bsSkinGauge1.MaxValue:=frm_op_aire.dxDBGrid2.SelectedCount
else frm_sys_progress.bsSkinGauge1.MaxValue:=frm_op_aire.dxDBGrid1.SelectedCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
if t_ch_project.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='<27>շ<EFBFBD>' then
DC:='<27><>'
else DC:='<27><>';
{
if mbltype<>'<27><><EFBFBD><EFBFBD>' then
frm_op_aire.t_op_aire1.DataSet.DisableControls
else frm_op_aire.t_op_aire1.DataSet.DisableControls;
}
if mbltype='<27><><EFBFBD><EFBFBD>' then
begin
if frm_op_aire.dxDBGrid1.SelectedCount>=1 then
for i:=0 to frm_op_aire.dxDBGrid1.SelectedCount-1 do
begin
frm_op_aire.t_op_aire1.DataSet.GotoBookmark(pointer(frm_op_aire.dxDBGrid1.selectedrows[i]));
// showmessage(frm_op_aire.t_op_aire1.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString);
if frm_op_aire.t_op_aire1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
InsertProjectFee(t_ch_project.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger,DC,t_ch_project.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,frm_op_aire.t_op_aire1);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //4
end;
end
else
begin
if frm_op_aire.dxDBGrid2.SelectedCount>=1 then
for i:=0 to frm_op_aire.dxDBGrid2.SelectedCount-1 do
begin
frm_op_aire.t_op_aire_fen1.DataSet.GotoBookmark(pointer(frm_op_aire.dxDBGrid2.selectedrows[i]));
// showmessage(frm_op_aire.t_op_aire1.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString);
if frm_op_aire.t_op_aire_fen1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
InsertProjectFee(t_ch_project.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger,DC,t_ch_project.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,frm_op_aire.t_op_aire_fen1);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1; //4
end;
end;
try
finally
// ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+IntTostr(frm_op_aire.dxDBGrid1.SelectedCount)+'Ʊ '+t_ch_project.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><>Ŀ');
{
if mbltype='<27><><EFBFBD><EFBFBD>' then
frm_op_aire.t_op_aire1.DataSet.EnableControls ;
}
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
procedure Tfrm_code_fee_project_localair.InsertProjectFee(projectID:Integer;DC,projectName:string;DataSource1:TDataSource);
var
t_ch_project_fee:TAdoquery;
t_ch_fee:TAdoquery;
t_op_seaeUpdate:TAdoquery;
Unitprice,priceweight:double;
portName,temps:string;
function fee_get_client(str:string;aAdoquery:TAdoquery):string;
begin
if str='' then
result:=''
else
begin
if 1=1 then
begin
if str='ί<>е<EFBFBD>λ'then
result:=aAdoquery.fieldbyname('ί<>е<EFBFBD>λ').asstring;
if str='<27><><EFBFBD><EFBFBD>˾'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
if str='<27><>վ'then
result:=aAdoquery.fieldbyname('<27><>վ').asstring;
if str='<27><><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
if str='<27><><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
if str='<27><><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
if str='<27>ջ<EFBFBD><D5BB><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
if str='֪ͨ<CDA8><D6AA>'then
result:=aAdoquery.fieldbyname('֪ͨ<CDA8><D6AA>').asstring;
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end
else
begin
if str='ί<>е<EFBFBD>λ'then
result:=aAdoquery.fieldbyname('ί<>е<EFBFBD>λ').asstring;
if str='<27><><EFBFBD>չ<EFBFBD>˾'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
if str='<27><><EFBFBD><EFBFBD>'then
result:=aAdoquery.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
end;
end;
begin
t_ch_project_fee:=CreateAdoQuery;
t_ch_fee:=CreateAdoQuery;
t_op_seaeUpdate:=CreateAdoQuery;
priceweight:=DataSource1.DataSet.FieldByName('<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>').asfloat;
temps:=Trim(DataSource1.DataSet.FieldByName('һ<><D2BB>Ŀ<EFBFBD>ĸ<EFBFBD>').asstring);
if temps<>'' then
begin
portName:=DataSource1.DataSet.FieldByName('һ<><D2BB>Ŀ<EFBFBD>ĸ<EFBFBD>').asstring
end
else
begin
portName:=DataSource1.DataSet.FieldByName('Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>').asstring
end;
frm_main.db.BeginTrans;
try
with t_ch_project_fee do
begin
Close;SQL.Clear;
SQL.Add('select * from t_ch_project_fee_localair');
SQL.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20>ۿ<EFBFBD><DBBF><EFBFBD><EFBFBD><EFBFBD>=:<3A>ۿ<EFBFBD><DBBF><EFBFBD><EFBFBD><EFBFBD>');
SQL.Add('order by ˳<><CBB3>,DE_ID');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=Projectid;
Parameters.ParamByName('<27>ۿ<EFBFBD><DBBF><EFBFBD><EFBFBD><EFBFBD>').Value:=PortName;
Open;First;
end;
with t_ch_fee do
begin
Close;SQL.Clear;
SQL.Add('select * from t_ch_fee');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=DataSource1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asstring;
open;First;
end;
if not t_ch_project_fee.isEmpty then
begin
if priceweight<=45 then
Unitprice:=t_ch_project_fee.fieldByName('С<><D0A1>45').AsFloat
else if (45<priceweight) and (priceweight<=100) then
Unitprice:=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD>45-100').AsFloat
else if (100<priceweight) and (priceweight<=300) then
Unitprice:=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD>100-300').AsFloat
else if (300<priceweight) and (priceweight<=500) then
Unitprice:=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD>300-500').AsFloat
else if (500<priceweight) and (priceweight<=1000) then
Unitprice:=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD>500-100').AsFloat
else if 1000<priceweight then
Unitprice:=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD>1000').AsFloat;
//<2F><><EFBFBD>˷<EFBFBD>
t_ch_fee.Append;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=DataSource1.dataset.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=DC;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>ұ<EFBFBD>']:='RMB';
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['˰<><CBB0>']:=0;
t_ch_fee['˰<><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.dataset.FieldByName('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').AsString;
t_ch_fee['˳<><CBB3>']:=t_ch_fee.RecordCount+1;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˷<EFBFBD>';
t_ch_fee['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
t_ch_fee['<27>ұ<EFBFBD>']:='RMB';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27><>ע']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>ñ<EFBFBD>ע').asstring;
if mbltype='<27>ֵ<EFBFBD>' then
begin
if trim(DataSource1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring,TAdoQuery(DataSource1.dataset));
end
else t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring,TAdoQuery(DataSource1.dataset));
if Unitprice<>0 then
begin
if Unitprice*DataSource1.dataset.FieldByName('<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>').AsFloat>=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>շ<EFBFBD>').AsFloat then
begin
t_ch_fee['<27><>׼']:='<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=DataSource1.dataset.FieldByName('<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=Unitprice;
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
end
else
begin
t_ch_fee['<27><>׼']:='Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>շ<EFBFBD>').AsFloat;
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
end;
end
else
begin
t_ch_fee['<27><>׼']:='Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>շ<EFBFBD>').AsFloat;
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
end;
if t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat<>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=Unitprice;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat*(1+t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat/100);
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee.fieldbyname('˰<><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('˰<><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('˰<><CBB0>').asfloat/100);
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('˰<><CBB0>').asfloat);
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
t_ch_fee.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
end
else
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=Unitprice;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=Unitprice;
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee.post;
///
//ȼ<>ͷ<EFBFBD>
t_ch_fee.Append;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=DataSource1.dataset.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=DC;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>ұ<EFBFBD>']:='RMB';
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['˰<><CBB0>']:=0;
t_ch_fee['˰<><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.dataset.FieldByName('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').AsString;
t_ch_fee['˳<><CBB3>']:=t_ch_fee.RecordCount+1;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='ȼ<>ͷ<EFBFBD>';
t_ch_fee['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
t_ch_fee['<27>ұ<EFBFBD>']:='RMB';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27><>ע']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>ñ<EFBFBD>ע').asstring;
if mbltype='<27>ֵ<EFBFBD>' then
begin
if trim(DataSource1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring,TAdoQuery(DataSource1.dataset));
end
else t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring,TAdoQuery(DataSource1.dataset));
t_ch_fee['<27><>׼']:='Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
if t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat<>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('ȼ<><C8BC>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat*(1+t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat/100);
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee.fieldbyname('˰<><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('˰<><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('˰<><CBB0>').asfloat/100);
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('˰<><CBB0>').asfloat);
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
t_ch_fee.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
end
else
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('ȼ<><C8BC>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('ȼ<><C8BC>').AsFloat;
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee.post;
//<2F><><EFBFBD>շ<EFBFBD>
t_ch_fee.Append;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=DataSource1.dataset.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=DC;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>ұ<EFBFBD>']:='RMB';
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['˰<><CBB0>']:=0;
t_ch_fee['˰<><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=0;
t_ch_fee['<27><><EFBFBD>㵥λ']:='ί<>е<EFBFBD>λ';
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.dataset.FieldByName('<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>').AsString;
t_ch_fee['˳<><CBB3>']:=t_ch_fee.RecordCount+1;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>շ<EFBFBD>';
t_ch_fee['<27><><EFBFBD>㵥λ']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring;
t_ch_fee['<27>ұ<EFBFBD>']:='RMB';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27><>ע']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD>ñ<EFBFBD>ע').asstring;
if mbltype='<27>ֵ<EFBFBD>' then
begin
if trim(DataSource1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
else t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring,TAdoQuery(DataSource1.dataset));
end
else t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_project_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring,TAdoQuery(DataSource1.dataset));
t_ch_fee['<27><>׼']:='Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
if t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat<>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').AsFloat*(1+t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat/100);
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee.fieldbyname('˰<><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('˰<><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('˰<><CBB0>').asfloat/100);
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('˰<><CBB0>').asfloat);
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
t_ch_fee.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat);
end
else
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_project_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
t_ch_fee['˰<><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_project_fee.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee.post;
if trim(DataSource1.DataSet.FieldByName('ҵ<><D2B5>״̬').asstring)<>'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
with t_op_seaeUpdate do
begin
Close;sql.Clear;
SQL.Add('update t_op_aire set ҵ<><D2B5>״̬=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
sql.Add('WHERE <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=DataSource1.dataset.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
ExecSQL;
end;
end;
frm_main.db.CommitTrans;
finally
t_ch_project_fee.Free;
t_ch_fee.Free;
t_op_seaeUpdate.Free;
if frm_main.db.InTransaction then
begin
frm_main.db.RollbackTrans;
end;
end;
end;
procedure Tfrm_code_fee_project_localair.wwDBGrid1DblClick(
Sender: TObject);
begin
close;
end;
end.