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.
DS6JIEFENG/代码字典/u_code_fee_project_auto - 副...

486 lines
15 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_code_fee_project_auto;
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, ComCtrls, bsSkinTabs;
type
Tfrm_code_fee_project_auto = class(TForm)
t_ch_project_changzhan: TADOQuery;
t_ch_project_changzhan1: TDataSource;
t_ch_project_fee: TADOQuery;
t_ch_project_fee1: TDataSource;
Panel1: TPanel;
Panel2: TPanel;
wwDBGrid1: TwwDBGrid;
Panel4: TPanel;
wwDBGrid2: TwwDBGrid;
bsSkinButton5: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
wwDBComboBox2: TwwDBComboBox;
wwDBLookupCombo2: TwwDBLookupCombo;
wwDBLookupCombo3: TwwDBLookupCombo;
wwDBLookupCombo1: TwwDBLookupCombo;
t_bz_balance: TRxMemoryData;
wwDBLookupCombo4: TwwDBLookupCombo;
t_bz_client: TRxMemoryData;
wwDBLookupCombo5: TwwDBLookupCombo;
wwDBLookupCombo6: TwwDBLookupCombo;
DBEdit1: TDBEdit;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
Panel3: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
wwDBLookupCombo7: TwwDBLookupCombo;
wwDBLookupCombo8: TwwDBLookupCombo;
bsSkinPanel1: TbsSkinPanel;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
t_ch_project_cangdan1: TDataSource;
t_ch_project_cangdan: TADOQuery;
Panel5: TPanel;
wwDBGrid3: TwwDBGrid;
wwDBComboBox1: TwwDBComboBox;
wwDBLookupCombo9: TwwDBLookupCombo;
wwDBLookupCombo10: TwwDBLookupCombo;
Panel6: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
Panel7: TPanel;
Panel8: TPanel;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
wwDBGrid4: TwwDBGrid;
wwDBLookupCombo11: TwwDBLookupCombo;
wwDBLookupCombo12: TwwDBLookupCombo;
wwDBLookupCombo13: TwwDBLookupCombo;
wwDBLookupCombo14: TwwDBLookupCombo;
DBEdit2: TDBEdit;
t_ch_project_fee_cangdan1: TDataSource;
t_ch_project_fee_cangdan: TADOQuery;
wwDBLookupCombo15: 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_project_changzhanAfterInsert(DataSet: TDataSet);
procedure t_ch_project_changzhanBeforePost(DataSet: TDataSet);
procedure t_ch_project_feeBeforePost(DataSet: TDataSet);
procedure t_ch_project_feeBeforeInsert(DataSet: TDataSet);
procedure t_ch_project_standardBeforeInsert(DataSet: TDataSet);
procedure wwDBLookupCombo1Change(Sender: TObject);
procedure t_ch_project_changzhanBeforeEdit(DataSet: TDataSet);
procedure t_ch_project_changzhanPostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure wwDBLookupCombo2Enter(Sender: TObject);
procedure t_ch_project_feeAfterOpen(DataSet: TDataSet);
procedure t_ch_project_cangdanAfterInsert(DataSet: TDataSet);
procedure t_ch_project_cangdanBeforePost(DataSet: TDataSet);
procedure t_ch_project_fee_cangdanAfterOpen(DataSet: TDataSet);
procedure t_ch_project_fee_cangdanBeforeInsert(DataSet: TDataSet);
procedure t_ch_project_fee_cangdanBeforePost(DataSet: TDataSet);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
private
procedure t_ch_feecurrcharge(Sender: TField);
{ Private declarations }
public
{ Public declarations }
end;
var
frm_code_fee_project_auto: Tfrm_code_fee_project_auto;
implementation
uses u_main, u_data_share, my_sys_function, u_code_fee_project_copy;
{$R *.dfm}
procedure Tfrm_code_fee_project_auto.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_code_fee_project_auto.Hide;
frm_code_fee_project_auto.ManualFloat(frm_code_fee_project_auto.BoundsRect );
frm_main.freeTabs('frm_code_fee_project_auto');
action:=cafree;
frm_code_fee_project_auto:=nil;
end;
procedure Tfrm_code_fee_project_auto.FormShow(Sender: TObject);
var
i:integer;
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_ctn.First;
while not frm_data_share.t_code_ctn.eof do begin
t_bz_balance.Append;
t_bz_balance['one']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
t_bz_balance['two']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
t_bz_balance['three']:=0;
t_bz_balance.post;
frm_data_share.t_code_ctn.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;
t_ch_project_changzhan.SQL.clear;
t_ch_project_changzhan.sql.add('select * from t_ch_project_auto ');
t_ch_project_changzhan.SQL.Add(' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>վ'' and Ĭ<>Ϸ<EFBFBD><CFB7><EFBFBD>=1 '+open_data('8005','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_project_changzhan.open;
t_ch_project_fee.open;
t_ch_project_cangdan.SQL.clear;
t_ch_project_cangdan.sql.add('select * from t_ch_project_auto ');
t_ch_project_cangdan.SQL.Add(' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27>յ<EFBFBD>'' and Ĭ<>Ϸ<EFBFBD><CFB7><EFBFBD>=1 '+open_data('8005','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+'order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_ch_project_cangdan.open;
t_ch_project_fee_cangdan.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_auto.Panel3Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel3.width/5);
bsSkinButton1.width:=i;
bsSkinButton2.width:=i;
bsSkinButton4.width:=i;
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton9Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton1Click(Sender: TObject);
begin
t_ch_project_changzhan.insert;
end;
procedure Tfrm_code_fee_project_auto.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_auto.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_ch_project_changzhan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_ch_project_changzhan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_project_changzhan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton5Click(Sender: TObject);
begin
t_ch_project_fee.insert;
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton6Click(Sender: TObject);
begin
table_post(t_ch_project_fee);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton7Click(Sender: TObject);
begin
table_delete(t_ch_project_fee);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton8Click(Sender: TObject);
begin
table_cancel(t_ch_project_fee);
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_changzhanAfterInsert(DataSet: TDataSet);
begin
t_ch_project_changzhan['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_project_changzhan['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_project_changzhan['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>վ';
t_ch_project_changzhan['Ĭ<>Ϸ<EFBFBD><CFB7><EFBFBD>']:=1;
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_changzhanBeforePost(DataSet: TDataSet);
begin
table_before_post(t_ch_project_changzhan,'<27><>վ');
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_feeBeforePost(
DataSet: TDataSet);
begin
table_before_post(t_ch_project_fee,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_project_fee,'<27>ұ<EFBFBD>');
table_before_post(t_ch_project_fee,'<27><><EFBFBD><EFBFBD>');
table_before_post(t_ch_project_fee,'<27><>׼');
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_feeBeforeInsert(
DataSet: TDataSet);
begin
table_before_insert(t_ch_project_changzhan);
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_standardBeforeInsert(
DataSet: TDataSet);
begin
if do_data('8005',t_ch_project_changzhan.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_auto.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_auto.t_ch_project_changzhanBeforeEdit(DataSet: TDataSet);
begin
if do_data('8005', DataSet.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_auto.t_ch_project_changzhanPostError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
begin
table_post_error_primary('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',E);
end;
procedure Tfrm_code_fee_project_auto.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_auto.t_ch_project_feeAfterOpen(
DataSet: TDataSet);
begin
t_ch_project_fee.FieldByName('<27>ұ<EFBFBD>').OnChange:=t_ch_feecurrcharge;
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_cangdanAfterInsert(
DataSet: TDataSet);
begin
t_ch_project_cangdan['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_project_cangdan['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_project_cangdan['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27>յ<EFBFBD>';
t_ch_project_cangdan['Ĭ<>Ϸ<EFBFBD><CFB7><EFBFBD>']:=1;
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_cangdanBeforePost(
DataSet: TDataSet);
begin
// table_before_post(t_ch_project_cangdan,'<27><>վ');
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_fee_cangdanAfterOpen(
DataSet: TDataSet);
begin
t_ch_project_fee_cangdan.FieldByName('<27>ұ<EFBFBD>').OnChange:=t_ch_feecurrcharge;
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_fee_cangdanBeforeInsert(
DataSet: TDataSet);
begin
table_before_insert(t_ch_project_cangdan);
end;
procedure Tfrm_code_fee_project_auto.t_ch_project_fee_cangdanBeforePost(
DataSet: TDataSet);
begin
table_before_post(t_ch_project_fee_cangdan,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_project_fee_cangdan,'<27>ұ<EFBFBD>');
table_before_post(t_ch_project_fee_cangdan,'<27><><EFBFBD><EFBFBD>');
table_before_post(t_ch_project_fee_cangdan,'<27><>׼');
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton10Click(Sender: TObject);
begin
t_ch_project_cangdan.insert;
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton11Click(Sender: TObject);
begin
table_post(t_ch_project_cangdan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton12Click(Sender: TObject);
begin
table_delete(t_ch_project_cangdan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton13Click(Sender: TObject);
begin
table_cancel(t_ch_project_cangdan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton14Click(Sender: TObject);
begin
t_ch_project_fee_cangdan.insert;
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton15Click(Sender: TObject);
begin
table_post(t_ch_project_fee_cangdan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton16Click(Sender: TObject);
begin
table_delete(t_ch_project_fee_cangdan);
end;
procedure Tfrm_code_fee_project_auto.bsSkinButton17Click(Sender: TObject);
begin
table_cancel(t_ch_project_fee_cangdan);
end;
end.