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.

3226 lines
109 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_op_seae_fenzhang;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, bsSkinCtrls, Grids, Wwdbigrd, Wwdbgrid, StdCtrls,Math,
wwdblook, Mask, wwdbedit, Wwdotdot, Wwdbcomb, bsSkinBoxCtrls, bsdbctrls,DBGridEhImpExp,
RxMemDS, RxLookup, DBCtrls, Menus, ComCtrls, bsSkinTabs, DBGridEh,inifiles,
DBGrids, ToolEdit, CurrEdit;
type
Tfrm_op_seae_fenzhang = class(TForm)
t_ch_fee_fenzhang1: TDataSource;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
wwDBGrid1: TwwDBGrid;
t_ch_fee: TADOQuery;
bsSkinButton5: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
bsSkinDBEdit2: TbsSkinDBEdit;
bsSkinDBEdit3: TbsSkinDBEdit;
t_sum: TRxMemoryData;
t_sum1: TDataSource;
bsSkinDBEdit1: TbsSkinDBEdit;
bsSkinPanel3: TbsSkinPanel;
Label112: TLabel;
RxDBLookupCombo44: TRxDBLookupCombo;
Label1: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
t_op_fenzhang: TADOQuery;
ds_op_fenzhang1: TDataSource;
Label2: TLabel;
Label3: TLabel;
dbedtM: TDBEdit;
dbedtH: TDBEdit;
Label4: TLabel;
Label5: TLabel;
dbedtM1: TDBEdit;
dbedtH1: TDBEdit;
Label6: TLabel;
PopupMenu3: TPopupMenu;
N10: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
N56: TMenuItem;
N57: TMenuItem;
N31: TMenuItem;
N104: TMenuItem;
N12: TMenuItem;
N32: TMenuItem;
N33: TMenuItem;
N58: TMenuItem;
N59: TMenuItem;
N34: TMenuItem;
t_ch_client: TADOQuery;
t_ch_client1: TDataSource;
Label7: TLabel;
dbedtBAFYAS: TDBEdit;
DBEdit3: TDBEdit;
Label8: TLabel;
Label9: TLabel;
t_op_gain: TADOQuery;
t_op_gain1: TDataSource;
t_rp_sum1: TDataSource;
t_rp_sum: TRxMemoryData;
t_ch_noclient: TADOQuery;
t_ch_noclient1: TDataSource;
t_mem_pc: TRxMemoryData;
t_mem_pc1: TDataSource;
t_mem_pcField: TStringField;
t_mem_pcField2: TStringField;
t_mem_pcField3: TStringField;
t_mem_pcField4: TFloatField;
t_mem_pcField5: TFloatField;
t_mem_pcField6: TFloatField;
t_mem_pcPP: TFloatField;
t_mem_pcCC: TFloatField;
t_mem_pcPP2: TFloatField;
t_mem_pcCC2: TFloatField;
t_mem_pcField7: TStringField;
t_mem_pcField8: TFloatField;
t_mem_pcField9: TFloatField;
t_mem_dc: TRxMemoryData;
StringField1: TStringField;
StringField2: TStringField;
StringField3: TStringField;
FloatField1: TFloatField;
FloatField2: TFloatField;
FloatField3: TFloatField;
FloatField4: TFloatField;
FloatField5: TFloatField;
FloatField6: TFloatField;
FloatField7: TFloatField;
StringField4: TStringField;
FloatField8: TFloatField;
FloatField9: TFloatField;
t_mem_dc1: TDataSource;
bsSkinPanel4: TbsSkinPanel;
bsSkinPanel5: TbsSkinPanel;
bsSkinPanel6: TbsSkinPanel;
wwDBGrid2: TwwDBGrid;
t_ch_fee_fenzhangO: TADOQuery;
t_ch_fee_fenzhangO1: TDataSource;
wwDBComboBox2: TwwDBComboBox;
wwDBLookupCombo4: TwwDBLookupCombo;
wwDBLookupCombo5: TwwDBLookupCombo;
wwDBLookupCombo6: TwwDBLookupCombo;
bsSkinButton8: TbsSkinButton;
Label10: TLabel;
Label11: TLabel;
DBComboBox1: TDBComboBox;
DBComboBox2: TDBComboBox;
DBComboBox3: TDBComboBox;
DBComboBox4: TDBComboBox;
t_mem_pcFD_ID: TIntegerField;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
bsSkinPanel7: TbsSkinPanel;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinPanel8: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
bsSkinPanel9: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinGroupBox2: TbsSkinGroupBox;
t_ch_fee_pl_detail: TADOQuery;
t_ch_fee_pl_detail1: TDataSource;
t_ch_fee_pl_detailf: TADOQuery;
t_ch_fee_pl_detailf1: TDataSource;
t_ch_fee_pl: TADOQuery;
t_ch_fee_pl1: TDataSource;
DBEdit1: TDBEdit;
Label12: TLabel;
Label13: TLabel;
DBEdit2: TDBEdit;
Label14: TLabel;
DBEdit4: TDBEdit;
Label15: TLabel;
DBEdit5: TDBEdit;
Label16: TLabel;
DBEdit6: TDBEdit;
Label17: TLabel;
DBMemo1: TDBMemo;
PopupMenu2: TPopupMenu;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
wwDBLookupCombo3: TwwDBLookupCombo;
wwDBLookupCombo2: TwwDBLookupCombo;
wwDBLookupCombo1: TwwDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
wwDBGrid3: TwwDBGrid;
wwDBGrid4: TwwDBGrid;
t_ch_fee_pl_detailfDL_ID: TAutoIncField;
t_ch_fee_pl_detailfPL_ID: TIntegerField;
t_ch_fee_pl_detailfDSDesigner: TStringField;
t_ch_fee_pl_detailfDSDesigner2: TStringField;
t_ch_fee_pl_detailfDSDesigner3: TStringField;
t_ch_fee_pl_detailfDSDesigner4: TStringField;
t_ch_fee_pl_detailfDSDesigner5: TStringField;
t_ch_fee_pl_detailfDSDesigner6: TBCDField;
t_ch_fee_pl_detailfDSDesigner7: TBCDField;
t_ch_fee_pl_detailfDSDesigner8: TBCDField;
t_ch_fee_pl_detailfDSDesigner9: TBCDField;
t_ch_fee_pl_detailfDSDesigner10: TBCDField;
t_ch_fee_pl_detailfDSDesigner11: TBCDField;
t_ch_fee_pl_detailfDSDesigner12: TBCDField;
t_ch_fee_pl_detailfDSDesigner13: TBCDField;
t_ch_fee_pl_detailDL_ID: TAutoIncField;
t_ch_fee_pl_detailPL_ID: TIntegerField;
t_ch_fee_pl_detailDSDesigner: TStringField;
t_ch_fee_pl_detailDSDesigner2: TStringField;
t_ch_fee_pl_detailDSDesigner3: TStringField;
t_ch_fee_pl_detailDSDesigner4: TStringField;
t_ch_fee_pl_detailDSDesigner5: TStringField;
t_ch_fee_pl_detailDSDesigner6: TBCDField;
t_ch_fee_pl_detailDSDesigner7: TBCDField;
t_ch_fee_pl_detailDSDesigner8: TBCDField;
t_ch_fee_pl_detailDSDesigner9: TBCDField;
t_ch_fee_pl_detailDSDesigner10: TBCDField;
t_ch_fee_pl_detailDSDesigner11: TBCDField;
t_ch_fee_pl_detailDSDesigner12: TBCDField;
t_ch_fee_pl_detailDSDesigner13: TBCDField;
t_op_seae_assistant: TADOQuery;
t_op_seae_assistant1: TDataSource;
bsSkinTabSheet3: TbsSkinTabSheet;
bsSkinPanel10: TbsSkinPanel;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton19: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinButton23: TbsSkinButton;
bsSkinButton24: TbsSkinButton;
bsSkinButton25: TbsSkinButton;
bsSkinPanel11: TbsSkinPanel;
DBGrid: TDBGridEh;
t_ch_fee_cm: TADOQuery;
t_ch_fee_cm1: TDataSource;
bsSkinGroupBox3: TbsSkinGroupBox;
DBMemo2: TDBMemo;
bsSkinPanel12: TbsSkinPanel;
PopupMenu4: TPopupMenu;
MenuItem1: TMenuItem;
MenuItem7: TMenuItem;
MenuItem8: TMenuItem;
MenuItem9: TMenuItem;
MenuItem10: TMenuItem;
RxDBLookupCombo19: TRxDBLookupCombo;
Label18: TLabel;
wwDBLookupCombo8: TwwDBLookupCombo;
Label19: TLabel;
Label20: TLabel;
bsSkinButton15: TbsSkinButton;
SaveDialog1: TSaveDialog;
RxDBLookupCombo2: TRxDBLookupCombo;
Label21: TLabel;
wwDBLookupCombo7: TwwDBLookupCombo;
t_ch_fenzhango_sum: TADOQuery;
t_ch_fenzhango_sum1: TDataSource;
t_ch_fenzhang_sum: TADOQuery;
t_ch_fenzhang_sum1: TDataSource;
t_ch_fenzhangot_sum: TADOQuery;
t_ch_fenzhangot_sum1: TDataSource;
t_mem_pd: TRxMemoryData;
IntegerField1: TIntegerField;
StringField5: TStringField;
StringField6: TStringField;
StringField7: TStringField;
FloatField10: TFloatField;
FloatField11: TFloatField;
FloatField12: TFloatField;
FloatField13: TFloatField;
FloatField14: TFloatField;
FloatField15: TFloatField;
FloatField16: TFloatField;
StringField8: TStringField;
FloatField17: TFloatField;
FloatField18: TFloatField;
t_mem_pd1: TDataSource;
t_mem_pdField: TStringField;
bsSkinButton21: TbsSkinButton;
bsSkinTabSheet4: TbsSkinTabSheet;
bsSkinPanel13: TbsSkinPanel;
bsSkinButton22: TbsSkinButton;
bsSkinButton26: TbsSkinButton;
bsSkinButton27: TbsSkinButton;
bsSkinButton28: TbsSkinButton;
bsSkinButton29: TbsSkinButton;
bsSkinButton32: TbsSkinButton;
DBGrid1: TDBGrid;
bsSkinPanel14: TbsSkinPanel;
bsSkinPanel15: TbsSkinPanel;
bsSkinPanel16: TbsSkinPanel;
bsSkinPanel17: TbsSkinPanel;
PopupMenu5: TPopupMenu;
MenuItem11: TMenuItem;
MenuItem12: TMenuItem;
MenuItem13: TMenuItem;
MenuItem14: TMenuItem;
MenuItem15: TMenuItem;
t_ch_fee_agentdc1: TDataSource;
t_ch_fee_agentdc: TADOQuery;
t_ch_fee_agentdc_detail1: TDataSource;
t_ch_fee_agentdc_detail: TADOQuery;
DBEdit7: TDBEdit;
Label22: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
Label23: TLabel;
Label24: TLabel;
DBEdit8: TDBEdit;
Label25: TLabel;
DBEdit9: TDBEdit;
Label26: TLabel;
DBEdit10: TDBEdit;
Label27: TLabel;
DBEdit11: TDBEdit;
Label29: TLabel;
DBMemo3: TDBMemo;
Label30: TLabel;
DBEdit12: TDBEdit;
wwDBLookupCombo9: TwwDBLookupCombo;
wwDBGrid5: TwwDBGrid;
Label31: TLabel;
RxDBLookupCombo4: TRxDBLookupCombo;
Label32: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
Label33: TLabel;
wwDBLookupCombo11: TwwDBLookupCombo;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
bsSkinSpeedButton1: TbsSkinSpeedButton;
bsSkinPanel18: TbsSkinPanel;
bsSkinButton30: TbsSkinButton;
bsSkinButton31: TbsSkinButton;
bsSkinButton33: TbsSkinButton;
bsSkinButton35: TbsSkinButton;
bsSkinButton34: TbsSkinButton;
DBEdit13: TDBEdit;
wwDBLookupCombo12: TwwDBLookupCombo;
wwDBComboBox3: TwwDBComboBox;
bsSkinButton36: TbsSkinButton;
Label28: TLabel;
DBEdit14: TDBEdit;
t_bz_balance: TRxMemoryData;
wwDBLookupCombo10: TwwDBLookupCombo;
t_bz_balance1: TDataSource;
t_ch_fee_fenzhang: TADOQuery;
ADOQuery2: TADOQuery;
ADOQuery3: TADOQuery;
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure t_ch_fee_fenzhangAfterInsert(DataSet: TDataSet);
procedure bsSkinButton7Click(Sender: TObject);
procedure wwDBGrid1ColExit(Sender: TObject);
procedure t_ch_fee_fenzhangBeforePost(DataSet: TDataSet);
procedure wwDBLookupCombo3Change(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure wwDBLookupCombo2Change(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinPanel1Resize(Sender: TObject);
procedure t_ch_fee_fenzhangAfterOpen(DataSet: TDataSet);
procedure t_ch_fee_fenzhangAfterPost(DataSet: TDataSet);
procedure bsSkinButton9Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure t_ch_fee_fenzhangBeforeInsert(DataSet: TDataSet);
procedure t_ch_fee_fenzhangAfterRefresh(DataSet: TDataSet);
procedure N31Click(Sender: TObject);
procedure N29Click(Sender: TObject);
procedure N56Click(Sender: TObject);
procedure N32Click(Sender: TObject);
procedure N58Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure t_op_fenzhangAfterInsert(DataSet: TDataSet);
procedure t_ch_fee_fenzhangOAfterInsert(DataSet: TDataSet);
procedure t_ch_fee_fenzhangOBeforeInsert(DataSet: TDataSet);
procedure t_ch_fee_fenzhangOBeforePost(DataSet: TDataSet);
procedure wwDBLookupCombo4Change(Sender: TObject);
procedure wwDBLookupCombo5Change(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure t_ch_fee_pl_detailAfterInsert(DataSet: TDataSet);
procedure t_ch_fee_plAfterInsert(DataSet: TDataSet);
procedure bsSkinButton10Click(Sender: TObject);
procedure t_ch_fee_pl_detailBeforeInsert(DataSet: TDataSet);
procedure t_ch_fee_plBeforeInsert(DataSet: TDataSet);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure t_ch_fee_pl_detailAfterPost(DataSet: TDataSet);
procedure t_ch_fee_pl_detailfAfterInsert(DataSet: TDataSet);
procedure t_ch_fee_plDSDesigner3Change(Sender: TField);
procedure bsSkinButton13Click(Sender: TObject);
procedure MenuItem2Click(Sender: TObject);
procedure MenuItem4Click(Sender: TObject);
procedure MenuItem6Click(Sender: TObject);
procedure t_ch_fee_plDSDesigner5Change(Sender: TField);
procedure t_ch_fee_pl_detailfDSDesigner6Change(Sender: TField);
procedure t_ch_fee_pl_detailDSDesigner6Change(Sender: TField);
procedure t_ch_fee_cmAfterInsert(DataSet: TDataSet);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure t_ch_fee_cmBeforePost(DataSet: TDataSet);
procedure bsSkinButton19Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem8Click(Sender: TObject);
procedure MenuItem10Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure RxDBLookupCombo19Enter(Sender: TObject);
procedure RxDBLookupCombo19Exit(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton23Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure RxDBLookupCombo2Enter(Sender: TObject);
procedure RxDBLookupCombo2Exit(Sender: TObject);
procedure DBComboBox4DropDown(Sender: TObject);
procedure t_ch_fee_cmAfterPost(DataSet: TDataSet);
procedure bsSkinButton21Click(Sender: TObject);
procedure t_op_fenzhangBeforeEdit(DataSet: TDataSet);
procedure t_ch_fee_fenzhangBeforeEdit(DataSet: TDataSet);
procedure t_ch_fee_fenzhangOBeforeEdit(DataSet: TDataSet);
procedure t_ch_fee_pl_detailBeforeEdit(DataSet: TDataSet);
procedure t_ch_fee_pl_detailfBeforeEdit(DataSet: TDataSet);
procedure t_ch_fee_cmBeforeInsert(DataSet: TDataSet);
procedure t_ch_fee_cmBeforeEdit(DataSet: TDataSet);
procedure t_ch_fee_plAfterOpen(DataSet: TDataSet);
procedure t_op_fenzhangBeforePost(DataSet: TDataSet);
procedure bsSkinButton32Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure bsSkinButton22Click(Sender: TObject);
procedure bsSkinButton26Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure bsSkinButton28Click(Sender: TObject);
procedure t_ch_fee_agentdcBeforeInsert(DataSet: TDataSet);
procedure t_ch_fee_agentdcBeforeEdit(DataSet: TDataSet);
procedure t_ch_fee_agentdc_detailBeforeInsert(DataSet: TDataSet);
procedure t_ch_fee_agentdc_detailBeforeEdit(DataSet: TDataSet);
procedure wwDBLookupCombo10Change(Sender: TObject);
procedure wwDBLookupCombo9Change(Sender: TObject);
procedure t_ch_fee_agentdcAfterInsert(DataSet: TDataSet);
procedure MenuItem11Click(Sender: TObject);
procedure t_ch_fee_agentdc_detailAfterPost(DataSet: TDataSet);
procedure t_ch_fee_agentdc_detailAfterInsert(DataSet: TDataSet);
procedure t_ch_fee_agentdcBeforePost(DataSet: TDataSet);
procedure t_ch_fee_agentdc_detailBeforePost(DataSet: TDataSet);
procedure t_ch_fee_agentdcAfterOpen(DataSet: TDataSet);
procedure RxDBLookupCombo5Enter(Sender: TObject);
procedure RxDBLookupCombo5Exit(Sender: TObject);
procedure bsSkinButton29Click(Sender: TObject);
procedure RxDBLookupCombo4Enter(Sender: TObject);
procedure RxDBLookupCombo4Exit(Sender: TObject);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure bsSkinButton34Click(Sender: TObject);
procedure t_ch_fee_agentdc_detailAfterOpen(DataSet: TDataSet);
procedure bsSkinButton30Click(Sender: TObject);
procedure bsSkinButton31Click(Sender: TObject);
procedure bsSkinButton33Click(Sender: TObject);
procedure bsSkinButton35Click(Sender: TObject);
procedure wwDBLookupCombo12Change(Sender: TObject);
procedure t_ch_fee_agentdcBeforeDelete(DataSet: TDataSet);
procedure t_ch_fee_agentdcBeforeCancel(DataSet: TDataSet);
procedure bsSkinButton36Click(Sender: TObject);
procedure RxDBLookupCombo3Enter(Sender: TObject);
procedure RxDBLookupCombo3Exit(Sender: TObject);
procedure wwDBGrid5KeyPress(Sender: TObject; var Key: Char);
private
absno:string;
procedure GetRptSum;
procedure setGrid;
procedure t_ch_fee_agentdcdebitcharge(Sender:TField);
procedure t_ch_fee_agentdc_detaildebitcharge(Sender:TField);
procedure t_ch_fee_agentdc_detailfeenamecharge(Sender:TField);
procedure DatasetAmtcharge(Sender: TField);//<2F>շѽ<D5B7><D1BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_fenzhang: Tfrm_op_seae_fenzhang;
frm_op_fenzhang_create:boolean;
implementation
uses u_main, u_op_seae, my_sys_function, u_data_share,SmpExprCalc,
u_op_seae_fenzhang_his, u_ch_fee_se, u_code_fee_projectagent_add,
u_code_fee_cargomainfest_add, u_sys_tab_sort;
{$R *.dfm}
procedure Tfrm_op_seae_fenzhang.bsSkinButton1Click(Sender: TObject);
begin
if ActiveControl=wwDBGrid1 then
t_ch_fee_fenzhang.insert;
if ActiveControl=wwDBGrid2 then
t_ch_fee_fenzhango.insert;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_ch_fee_fenzhang);
table_post(t_ch_fee_fenzhango);
table_post(t_op_fenzhang);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_ch_fee_fenzhang);
table_cancel(t_ch_fee_fenzhango);
table_cancel(t_op_fenzhang);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton6Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if ActiveControl=wwDBGrid1 then begin
table_post(t_ch_fee_fenzhang);
if t_ch_fee_fenzhang.IsEmpty then
exit;
afield := vararraycreate([0,t_ch_fee_fenzhang.fieldcount-1],varvariant);
for i := 0 to (t_ch_fee_fenzhang.fieldcount-1) do
begin
afield[i] :=t_ch_fee_fenzhang.fields[i].value ;
end;
t_ch_fee_fenzhang.append;
for i := 0 to (t_ch_fee_fenzhang.fieldcount-1) do
begin
if t_ch_fee_fenzhang.fields[i].FieldName<>'FD_ID' then
t_ch_fee_fenzhang.fields[i].value := afield[i] ;
end;
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
if ActiveControl=wwDBGrid2 then begin
table_post(t_ch_fee_fenzhango);
if t_ch_fee_fenzhango.IsEmpty then
exit;
afield := vararraycreate([0,t_ch_fee_fenzhango.fieldcount-1],varvariant);
for i := 0 to (t_ch_fee_fenzhango.fieldcount-1) do
begin
afield[i] :=t_ch_fee_fenzhango.fields[i].value ;
end;
t_ch_fee_fenzhango.append;
for i := 0 to (t_ch_fee_fenzhango.fieldcount-1) do
begin
if t_ch_fee_fenzhango.fields[i].FieldName<>'FD_ID' then
t_ch_fee_fenzhango.fields[i].value := afield[i] ;
end;
t_ch_fee_fenzhango['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangAfterInsert(
DataSet: TDataSet);
begin
{
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_fenzhang['<27>ұ<EFBFBD>']:='USD';
t_ch_fee_fenzhang['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='<27>ֹ<EFBFBD>';
}
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton7Click(Sender: TObject);
begin
try
if not assigned(frm_op_seae_fenzhang_his) then
frm_op_seae_fenzhang_his:=tfrm_op_seae_fenzhang_his.Create (self);
frm_op_seae_fenzhang_his.ShowModal;
finally
frm_op_seae_fenzhang_his.free;
frm_op_seae_fenzhang_his:=nil;
end;
end;
procedure Tfrm_op_seae_fenzhang.wwDBGrid1ColExit(Sender: TObject);
var
li_pp,li_cc,fen_pp,fen_cc,fen:real;
begin
{
//Ӧ<><D3A6>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (t_ch_fee_fenzhang.state<>dsinsert)and(t_ch_fee_fenzhang.state<>dsedit)then
exit;
IF t_ch_fee_fenzhang.IsEmpty THEN
EXIT;
IF (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING='')
or (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING='<27>ֹ<EFBFBD>')then
exit;
if (wwDBGrid1.GetActiveCol=10)or(wwDBGrid1.GetActiveCol=6)
or (wwDBGrid1.GetActiveCol=7)or(wwDBGrid1.GetActiveCol=8)
or (wwDBGrid1.GetActiveCol=9)then
begin
try
IF (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'')
and (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'<27>ֹ<EFBFBD>')then
begin
li_pp:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat;
fen_pp:=li_pp*strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1));
li_cc:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat;
fen_cc:=li_cc*(1-strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1)));
fen:=fen_pp-fen_cc;
if fen>=0 then
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen);
end
else
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen*-1);
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
end;
except
;
end;
end;
}
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangBeforePost(
DataSet: TDataSet);
var
li_pp,li_cc,fen_pp,fen_cc,fen:real;
begin
{
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27>ұ<EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhang,'<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>');
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_crm_client.fieldbyname('<27>Ƿ<EFBFBD>ͣ<EFBFBD><CDA3>').AsBoolean then begin
MessageDlg('<27>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>',mtWarning,[mbok],0);
abort;
end;
end;
try
IF (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'')
and (t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'<27>ֹ<EFBFBD>')then
begin
li_pp:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>PP').asfloat;
fen_pp:=li_pp*strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1));
li_cc:=t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat-t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6>CC').asfloat;
fen_cc:=li_cc*(1-strtofloat('0.'+copy(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhang.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1)));
fen:=fen_pp-fen_cc;
if fen>=0 then
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen);
end
else
begin
t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen*-1);
t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
end;
except
;
end;
}
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo3Change(Sender: TObject);
begin
if (t_ch_fee_fenzhang.state=dsinsert)or(t_ch_fee_fenzhang.state=dsedit) then
begin
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo3.text,[])then
begin
end;
t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_seae_fenzhang.FormShow(Sender: TObject);
var
fenzhangbandini:Tinifile;
sl:tstringlist;
i,j,n:integer;
str_list:Tstringlist;
i_1,k_1,j_1:integer;
begin
frm_data_share.t_code_fee.REQUERY;
frm_data_share.t_crm_client_daili.REQUERY;
frm_data_share.t_code_currency.REQUERY;
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;
loadwwgrid(wwDBGrid1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
loadwwgrid(wwDBGrid5,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DCNOTE');
//CARGOMIAFEST<53><54><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
if (not t_op_fenzhang.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull) and (t_op_fenzhang.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger<>0) then begin
setGrid;
end;
//<2F>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>
if Trim(frm_data_share.t_AgentDc_no.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit7.Width:=124;
bsSkinSpeedButton1.Visible:=false;
if frm_data_share.t_AgentDc_no.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit7.ReadOnly:=false;
end else begin
DBEdit7.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_AgentDc_no.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit7.Width:=104;
bsSkinSpeedButton1.Visible:=true;
if frm_data_share.t_AgentDc_no.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit7.ReadOnly:=false;
end else begin
DBEdit7.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_AgentDc_no.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD><D6B6>༭' then begin
DBEdit7.ReadOnly:=false;
DBEdit7.Width:=124;
bsSkinSpeedButton1.Visible:=false;
end;
//ҳ<><D2B3>˳<EFBFBD><CBB3>
fenzhangbandini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'fenzhangbandno.ini');
sl:=TStringList.Create;
try
fenzhangbandini.ReadSection('fenzhang',sl);
for j:=0 to sl.Count-1 do begin
n:=fenzhangbandini.Readinteger('fenzhang',sl[j],0);
for i:=0 to bsSkinPageControl1.PageCount-1 do begin
if bsSkinPageControl1.Pages[i].Name=sl[j] then begin
bsSkinPageControl1.Pages[i].PageIndex:=n;
end;
end;
end;
bsSkinPageControl1.ActivePageIndex:=0;
finally
freeandnil(fenzhangbandini);
freeandnil(sl);
end;
// t_op_fenzhang.Open;
///
frm_data_share.t_code_fee_unit.Filtered:=false;
frm_data_share.t_code_fee_unit.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee_unit.Filtered:=true;
t_bz_balance.close;
t_bz_balance.open;
t_bz_balance.Append;
t_bz_balance['one']:='1-<2D><>Ʊ';
t_bz_balance['two']:='<27><>Ʊ';
t_bz_balance['three']:=1;
t_bz_balance.post;
t_bz_balance.Append;
t_bz_balance['one']:='2-<2D><><EFBFBD><EFBFBD>';
t_bz_balance['two']:='<27><><EFBFBD><EFBFBD>';
t_bz_balance['three']:=s_w(4,t_ch_fee_fenzhang.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_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
t_bz_balance.post;
try
t_bz_balance.Append;
t_bz_balance['one']:='4-<2D>ƷѶ<C6B7>';
t_bz_balance['two']:='<27>ƷѶ<C6B7>';
if s_w(4,t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
begin
if s_w(4,t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
t_bz_balance['three']:=s_w(4,t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
else
t_bz_balance['three']:=1;
end
else
begin
if t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
t_bz_balance['three']:=t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
else
t_bz_balance['three']:=1;
end;
except
;
end;
try
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_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><>TEU').asinteger;
t_bz_balance.post;
str_list:=Tstringlist.Create();
str_list.Text:=t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27>Ʒѱ<C6B7>׼').asstring;
for i_1:=0 to str_list.Count-1 do
begin
t_bz_balance.Append;
t_bz_balance['one']:=inttostr(i_1+k_1+6)+'-'+copy(str_list[i_1],1,pos('*',str_list[i_1])-1);
t_bz_balance['two']:=copy(str_list[i_1],pos('-',str_list[i_1])+1,length(str_list[i_1])+1-pos('-',str_list[i_1]));
t_bz_balance['three']:=strtofloat(copy(str_list[i_1],pos('*',str_list[i_1])+1,pos('-',str_list[i_1])-pos('*',str_list[i_1])-1));
t_bz_balance.post;
end;
finally
str_list.free;
end;
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo2Change(Sender: TObject);
begin
if (t_ch_fee_fenzhang.state=dsinsert)or(t_ch_fee_fenzhang.state=dsedit) then
begin
t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton11Click(Sender: TObject);
begin
table_post(t_ch_fee_fenzhang);
if t_ch_fee_fenzhang.IsEmpty then
exit;
t_ch_fee.insert;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
end;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=t_ch_fee_fenzhang['<27>ұ<EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
if strtobool(get_parameters_value(64,'false'))then
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee.post;
t_ch_fee_fenzhang.edit;
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_fenzhang.post;
if assigned(frm_ch_fee_sea) then
begin
if frm_ch_fee_sea.fra_fee1.t_ch_accept.Active then
frm_ch_fee_sea.fra_fee1.t_ch_accept.Requery();
if frm_ch_fee_sea.fra_fee1.t_ch_pay.Active then
frm_ch_fee_sea.fra_fee1.t_ch_pay.Requery();
end;
showmessage('<27><><EFBFBD>ɷ<EFBFBD><C9B7>óɹ<C3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton5Click(Sender: TObject);
begin
table_post(t_ch_fee_fenzhang);
if t_ch_fee_fenzhang.IsEmpty then
exit;
t_ch_fee_fenzhang.first;
while not t_ch_fee_fenzhang.eof do
begin
t_ch_fee.insert;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'];
end;
if t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat>0 then
begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=t_ch_fee_fenzhang['<27>ұ<EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD>뿪Ʊ']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
if strtobool(get_parameters_value(64,'false'))then
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee.post;
t_ch_fee_fenzhang.edit;
t_ch_fee_fenzhang['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_fenzhang.post;
t_ch_fee_fenzhang.next;
end;
if assigned(frm_ch_fee_sea) then
begin
if frm_ch_fee_sea.fra_fee1.t_ch_accept.Active then
frm_ch_fee_sea.fra_fee1.t_ch_accept.Requery();
if frm_ch_fee_sea.fra_fee1.t_ch_pay.Active then
frm_ch_fee_sea.fra_fee1.t_ch_pay.Requery();
end;
showmessage('<27><><EFBFBD>ɷ<EFBFBD><C9B7>óɹ<C3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_fenzhang.bsSkinPanel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel1.width/9);
bsSkinButton1.width:=i;
bsSkinButton6.width:=i;
bsSkinButton7.width:=i;
bsSkinButton2.width:=i;
bsSkinButton4.width:=i;
bsSkinButton3.width:=i;
bsSkinButton11.width:=i;
bsSkinButton5.width:=i;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangAfterOpen(
DataSet: TDataSet);
var
debit,credit:real;
begin
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
debit:=0;
credit:=0;
t_ch_fee_fenzhang.first;
while not t_ch_fee_fenzhang.eof do
begin
debit:=debit+t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
credit:=credit+t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_ch_fee_fenzhang.next;
end;
t_sum.close;
t_sum.open;
t_sum.insert;
debit:=debit-credit;
if debit>=0 then
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='DEBIT'
else
begin
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='CREDIT';
debit:=debit*-1;
end;
t_sum['<27>ϼ<EFBFBD>']:=debit;
t_sum['<27><>д']:='SAY:US DOLLARS '+ntoc(debit,true)+' ONLY.';
t_sum.post;
}
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangAfterPost(
DataSet: TDataSet);
var
debit,credit:real;
book1:Tbookmark;
begin
{ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
debit:=0;
credit:=0;
book1:=t_ch_fee_fenzhang.GetBookmark;
t_ch_fee_fenzhang.first;
while not t_ch_fee_fenzhang.eof do
begin
debit:=debit+t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
credit:=credit+t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_ch_fee_fenzhang.next;
end;
t_ch_fee_fenzhang.GotoBookmark(book1);
t_sum.close;
t_sum.open;
t_sum.insert;
debit:=debit-credit;
if debit>=0 then
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='DEBIT'
else
begin
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='CREDIT';
debit:=debit*-1;
end;
t_sum['<27>ϼ<EFBFBD>']:=debit;
t_sum['<27><>д']:='SAY:US DOLLARS '+ntoc(debit,true)+'ONLY.';
t_sum.post;
}
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_fenzhang.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_op_fenzhang_create:=false;
savewwgrid(wwDBGrid1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
savewwgrid(wwDBGrid5,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DCNOTE');
if t_ch_fee_agentdc_detail.State in [dsedit,dsinsert] then
t_ch_fee_agentdc_detail.post;
if t_ch_fee_agentdc.State in [dsedit,dsinsert] then
t_ch_fee_agentdc.post;
if t_op_fenzhang.State in [dsedit,dsinsert] then t_op_fenzhang.Post;
if t_ch_fee_pl_detail.State in [dsedit,dsinsert] then t_ch_fee_pl_detail.Post;
if t_ch_fee_pl_detailf.State in [dsedit,dsinsert] then t_ch_fee_pl_detailf.Post;
if t_ch_fee_pl.State in [dsedit,dsinsert] then t_ch_fee_pl.Post;
if t_ch_fee_cm.State in [dsedit,dsinsert] then t_ch_fee_cm.Post;
frm_op_seae_fenzhang.Hide;
frm_op_seae_fenzhang.ManualFloat(frm_op_seae_fenzhang.BoundsRect );
action:=cafree;
frm_op_seae_fenzhang:=nil;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangBeforeInsert(
DataSet: TDataSet);
begin
{
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if t_ch_fee_fenzhang.DataSource.DataSet.State=dsinsert then
t_ch_fee_fenzhang.DataSource.DataSet.post;
}
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangAfterRefresh(
DataSet: TDataSet);
var
debit,credit:real;
begin
{
//ˢ<>¸<EFBFBD><C2B8>´<EFBFBD>д
debit:=0;
credit:=0;
t_ch_fee_fenzhang.first;
while not t_ch_fee_fenzhang.eof do
begin
debit:=debit+t_ch_fee_fenzhang.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat;
credit:=credit+t_ch_fee_fenzhang.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
t_ch_fee_fenzhang.next;
end;
t_sum.close;
t_sum.open;
t_sum.insert;
debit:=debit-credit;
if debit>=0 then
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='DEBIT'
else
begin
t_sum['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='CREDIT';
debit:=debit*-1;
end;
t_sum['<27>ϼ<EFBFBD>']:=debit;
t_sum['<27><>д']:='SAY:US DOLLARS '+ntoc(debit,true)+' ONLY.';
t_sum.post;
}
end;
procedure Tfrm_op_seae_fenzhang.N31Click(Sender: TObject);
begin
//<2F><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>
t_mem_dc.Close;
t_mem_dc.Open;
t_mem_pc.Close;
t_mem_pc.Open;
t_ch_fee_fenzhangO.first;
while not t_ch_fee_fenzhangO.eof do begin
if (t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').Asstring<>'') then begin
t_mem_pc.Insert;
t_mem_pc.FieldByName('FD_ID').Asinteger:=t_ch_fee_fenzhangO.FieldByName('FD_ID').Asinteger;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString;
t_mem_pc.FieldByName('<27>ұ<EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27>ұ<EFBFBD>').AsString;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pc.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.Post;
end;
t_ch_fee_fenzhangO.Next;
end;
t_mem_pc.SortOnFields('FD_ID',true,false);
t_mem_pd.Close;
t_mem_pd.Open;
t_ch_fee_fenzhango.First;
while not t_ch_fee_fenzhango.Eof do begin
if (t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').Asstring<>'') then begin
t_mem_pd.Insert;
t_mem_pd.FieldByName('FD_ID').Asinteger:=t_ch_fee_fenzhango.FieldByName('FD_ID').Asinteger;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').AsString;
t_mem_pd.FieldByName('<27>ұ<EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27>ұ<EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pd.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.Post;
end;
t_ch_fee_fenzhango.Next;
end;
t_mem_pd.SortOnFields('FD_ID',true,false);
t_op_gain.Close;
t_op_gain.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_op_gain.Open;
GetRptSum;
if t_op_seae_assistant.Active then
t_op_seae_assistant.Requery();
t_ch_fenzhango_sum.Open;
t_ch_fenzhang_sum.Open;
t_ch_fenzhangot_sum.Open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڷ<EFBFBD><DAB7><EFBFBD>',2,t_ch_fee_fenzhang.DataSource,t_sum1,ds_op_fenzhang1,t_op_gain1,t_ch_fee_fenzhang1,t_mem_pd1,t_mem_pc1,t_mem_dc1,t_op_seae_assistant1,t_ch_fenzhang_sum1,t_rp_sum1,true,'',t_ch_fenzhango_sum1,t_ch_fenzhangot_sum1);
t_ch_fenzhango_sum.close;
t_ch_fenzhangot_sum.close;
t_ch_fenzhang_sum.close;
end;
procedure Tfrm_op_seae_fenzhang.N29Click(Sender: TObject);
begin
//ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>
t_mem_dc.Close;
t_mem_dc.Open;
t_mem_pc.Close;
t_mem_pc.Open;
t_ch_fee_fenzhangO.First;
while not t_ch_fee_fenzhangO.Eof do begin
if (t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').Asstring<>'') then begin
t_mem_pc.Insert;
t_mem_pc.FieldByName('FD_ID').Asinteger:=t_ch_fee_fenzhangO.FieldByName('FD_ID').Asinteger;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString;
t_mem_pc.FieldByName('<27>ұ<EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27>ұ<EFBFBD>').AsString;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pc.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.Post;
end;
t_ch_fee_fenzhangO.Next;
end;
t_mem_pc.SortOnFields('FD_ID',true,false);
t_mem_pd.Close;
t_mem_pd.Open;
t_ch_fee_fenzhango.First;
while not t_ch_fee_fenzhango.Eof do begin
if (t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').Asstring<>'') then begin
t_mem_pd.Insert;
t_mem_pd.FieldByName('FD_ID').Asinteger:=t_ch_fee_fenzhango.FieldByName('FD_ID').Asinteger;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').AsString;
t_mem_pd.FieldByName('<27>ұ<EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27>ұ<EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pd.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.Post;
end;
t_ch_fee_fenzhango.Next;
end;
t_mem_pd.SortOnFields('FD_ID',true,false);
t_op_gain.Close;
t_op_gain.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_op_gain.Open;
GetRptSum;
if t_op_seae_assistant.Active then
t_op_seae_assistant.Requery();
t_ch_fenzhango_sum.Open;
t_ch_fenzhang_sum.Open;
t_ch_fenzhangot_sum.Open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڷ<EFBFBD><DAB7><EFBFBD>',1,t_ch_fee_fenzhang.DataSource,t_sum1,ds_op_fenzhang1,t_op_gain1,t_ch_fee_fenzhang1,t_mem_pd1,t_mem_pc1,t_mem_dc1,t_op_seae_assistant1,t_ch_fenzhang_sum1,t_rp_sum1,true,'',t_ch_fenzhango_sum1,t_ch_fenzhangot_sum1);
t_ch_fenzhangot_sum.close;
t_ch_fenzhango_sum.close;
t_ch_fenzhang_sum.close;
end;
procedure Tfrm_op_seae_fenzhang.N56Click(Sender: TObject);
begin
t_mem_dc.Close;
t_mem_dc.Open;
t_mem_pc.Close;
t_mem_pc.Open;
t_ch_fee_fenzhangO.First;
while not t_ch_fee_fenzhangO.Eof do begin
if (t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').Asstring<>'') then begin
t_mem_pc.Insert;
t_mem_pc.FieldByName('FD_ID').Asinteger:=t_ch_fee_fenzhangO.FieldByName('FD_ID').Asinteger;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString;
t_mem_pc.FieldByName('<27>ұ<EFBFBD>').AsString:=t_ch_fee_fenzhangO.FieldByName('<27>ұ<EFBFBD>').AsString;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pc.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_mem_pc.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhangO.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_mem_pc.Post;
end;
t_ch_fee_fenzhangO.Next;
end;
t_mem_pc.SortOnFields('FD_ID',true,false);
t_mem_pd.Close;
t_mem_pd.Open;
t_ch_fee_fenzhango.First;
while not t_ch_fee_fenzhango.Eof do begin
if (t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').Asstring<>'') then begin
t_mem_pd.Insert;
t_mem_pd.FieldByName('FD_ID').Asinteger:=t_ch_fee_fenzhango.FieldByName('FD_ID').Asinteger;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').AsString:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>').AsString;
t_mem_pd.FieldByName('<27>ұ<EFBFBD>').AsString:=t_ch_fee_fenzhango.FieldByName('<27>ұ<EFBFBD>').AsString;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>PP').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>PP').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6>CC').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6>CC').AsFloat;
t_mem_pd.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_mem_pd.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_fenzhango.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_mem_pd.Post;
end;
t_ch_fee_fenzhango.Next;
end;
t_mem_pd.SortOnFields('FD_ID',true,false);
t_op_gain.Close;
t_op_gain.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_op_gain.Open;
GetRptSum;
if t_op_seae_assistant.Active then
t_op_seae_assistant.Requery();
t_ch_fenzhangot_sum.Open;
t_ch_fenzhango_sum.Open;
t_ch_fenzhang_sum.Open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڷ<EFBFBD><DAB7><EFBFBD>',3,t_ch_fee_fenzhang.DataSource,t_sum1,ds_op_fenzhang1,t_op_gain1,t_ch_fee_fenzhang1,t_mem_pd1,t_mem_pc1,t_mem_dc1,t_op_seae_assistant1,t_ch_fenzhang_sum1,t_rp_sum1,true,'',t_ch_fenzhango_sum1,t_ch_fenzhangot_sum1);
t_ch_fenzhangot_sum.close;
t_ch_fenzhango_sum.close;
t_ch_fenzhang_sum.close;
end;
procedure Tfrm_op_seae_fenzhang.N32Click(Sender: TObject);
begin
//Ӧ<>մ<EFBFBD><D5B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD>ӡ
if t_ch_fee_fenzhang.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee_fenzhang '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' order by FD_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.open;
t_ch_noclient.close;
t_ch_noclient.sql.clear;
t_ch_noclient.sql.add('select * from t_ch_fee_fenzhang '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' order by FD_ID');
t_ch_noclient.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_noclient.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_noclient.open;
t_op_gain.Close;
t_op_gain.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_op_gain.Open;
GetRptSum;
if t_op_seae_assistant.Active then
t_op_seae_assistant.Requery();
t_ch_fenzhango_sum.Open;
t_ch_fenzhang_sum.Open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1,t_ch_fee_fenzhang.DataSource,t_sum1,ds_op_fenzhang1,t_op_gain1,t_ch_fee_fenzhang1,t_ch_fee_fenzhango1,t_ch_client1,t_ch_noclient1,t_op_seae_assistant1,t_ch_fenzhang_sum1,t_rp_sum1,true,'',t_ch_fenzhango_sum1);
t_ch_fenzhango_sum.close;
t_ch_fenzhang_sum.close;
end;
procedure Tfrm_op_seae_fenzhang.N58Click(Sender: TObject);
begin
if t_ch_fee_fenzhang.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee_fenzhang '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' order by FD_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.open;
t_ch_noclient.close;
t_ch_noclient.sql.clear;
t_ch_noclient.sql.add('select * from t_ch_fee_fenzhang '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' order by FD_ID');
t_ch_noclient.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_noclient.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_noclient.open;
t_op_gain.Close;
t_op_gain.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_op_gain.Open;
GetRptSum;
if t_op_seae_assistant.Active then
t_op_seae_assistant.Requery();
t_ch_fenzhango_sum.Open;
t_ch_fenzhang_sum.Open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',3,t_ch_fee_fenzhang.DataSource,t_sum1,ds_op_fenzhang1,t_op_gain1,t_ch_fee_fenzhang1,t_ch_fee_fenzhango1,t_ch_client1,t_ch_noclient1,t_op_seae_assistant1,t_ch_fenzhang_sum1,t_rp_sum1,true,'',t_ch_fenzhango_sum1);
t_ch_fenzhango_sum.close;
t_ch_fenzhang_sum.close;
end;
procedure Tfrm_op_seae_fenzhang.N34Click(Sender: TObject);
begin
if t_ch_fee_fenzhang.IsEmpty then
exit;
t_ch_client.close;
t_ch_client.sql.clear;
t_ch_client.sql.add('select * from t_ch_fee_fenzhang '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' order by FD_ID');
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_client.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_client.open;
t_ch_noclient.close;
t_ch_noclient.sql.clear;
t_ch_noclient.sql.add('select * from t_ch_fee_fenzhang '
+'where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' order by FD_ID');
t_ch_noclient.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_ch_noclient.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
t_ch_noclient.open;
t_op_gain.Close;
t_op_gain.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD>').value;
t_op_gain.Open;
GetRptSum;
if t_op_seae_assistant.Active then
t_op_seae_assistant.Requery();
t_ch_fenzhango_sum.Open;
t_ch_fenzhang_sum.Open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,t_ch_fee_fenzhang.DataSource,t_sum1,ds_op_fenzhang1,t_op_gain1,t_ch_fee_fenzhang1,t_ch_fee_fenzhango1,t_ch_client1,t_ch_noclient1,t_op_seae_assistant1,t_ch_fenzhang_sum1,t_rp_sum1,true,'',t_ch_fenzhango_sum1);
t_ch_fenzhango_sum.close;
t_ch_fenzhang_sum.close;
end;
procedure Tfrm_op_seae_fenzhang.t_op_fenzhangAfterInsert(
DataSet: TDataSet);
begin
t_op_fenzhang.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_fee_fenzhang.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
procedure Tfrm_op_seae_fenzhang.GetRptSum;
begin
//<2F>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
t_rp_sum.Close;
t_rp_sum.Open;
t_ch_fee_fenzhang.First;
while not t_ch_fee_fenzhang.Eof do begin
if t_ch_fee_fenzhang.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat<>0 then begin
t_rp_sum.Edit;
t_rp_sum.FieldByName('DebitLocalOt<4F>ϼ<EFBFBD>').AsFloat:=t_rp_sum.FieldByName('DebitLocalOt<4F>ϼ<EFBFBD>').AsFloat+t_ch_fee_fenzhang.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_rp_sum.FieldByName('DebitOtBafYas<61>ϼ<EFBFBD>').AsFloat:=t_rp_sum.FieldByName('DebitOtBafYas<61>ϼ<EFBFBD>').AsFloat+t_ch_fee_fenzhang.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat;
t_rp_sum.Post;
end;
t_ch_fee_fenzhang.Next;
end;
if t_op_gain.FieldByName('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>USD').AsFloat<>0 then begin
t_rp_sum.Edit;
t_rp_sum.FieldByName('DebitLocalOt<4F>ϼ<EFBFBD>').AsFloat:=t_rp_sum.FieldByName('DebitLocalOt<4F>ϼ<EFBFBD>').AsFloat+t_op_gain.FieldByName('<27>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>USD').AsFloat;
t_rp_sum.Post;
end;
if t_op_fenzhang.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat<>0 then begin
t_rp_sum.Edit;
t_rp_sum.FieldByName('DebitOtBafYas<61>ϼ<EFBFBD>').AsFloat:=t_rp_sum.FieldByName('DebitOtBafYas<61>ϼ<EFBFBD>').AsFloat+t_op_fenzhang.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
t_rp_sum.Post;
end;
if t_op_fenzhang.FieldByName('BAFYAS').AsFloat<>0 then begin
t_rp_sum.Edit;
t_rp_sum.FieldByName('DebitOtBafYas<61>ϼ<EFBFBD>').AsFloat:=t_rp_sum.FieldByName('DebitOtBafYas<61>ϼ<EFBFBD>').AsFloat+t_op_fenzhang.FieldByName('BAFYAS').AsFloat;
t_rp_sum.Post;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangOAfterInsert(
DataSet: TDataSet);
begin
t_ch_fee_fenzhango['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee_fenzhango['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee_fenzhango['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_fenzhang.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_fenzhango['<27>ұ<EFBFBD>']:='USD';
t_ch_fee_fenzhango['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='<27>ֹ<EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangOBeforeInsert(
DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if t_ch_fee_fenzhango.DataSource.DataSet.State=dsinsert then
t_ch_fee_fenzhango.DataSource.DataSet.post;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangOBeforePost(
DataSet: TDataSet);
var
li_pp,li_cc,fen_pp,fen_cc,fen:real;
begin
table_before_post(t_ch_fee_fenzhango,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhango,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhango,'<27>ұ<EFBFBD>');
table_before_post(t_ch_fee_fenzhango,'<27><><EFBFBD><EFBFBD>');
table_before_post(t_ch_fee_fenzhango,'<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>');
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_fee_fenzhango.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_crm_client.fieldbyname('<27>Ƿ<EFBFBD>ͣ<EFBFBD><CDA3>').AsBoolean then begin
MessageDlg('<27>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>',mtWarning,[mbok],0);
abort;
end;
end;
//<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>Ӧ<EFBFBD><D3A6>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
try
IF (t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'')
and (t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'<27>ֹ<EFBFBD>')then
begin
li_pp:=t_ch_fee_fenzhango.fieldbyname('Ӧ<><D3A6>PP').asfloat-t_ch_fee_fenzhango.fieldbyname('Ӧ<><D3A6>PP').asfloat;
fen_pp:=li_pp*strtofloat('0.'+copy(t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1));
li_cc:=t_ch_fee_fenzhango.fieldbyname('Ӧ<><D3A6>CC').asfloat-t_ch_fee_fenzhango.fieldbyname('Ӧ<><D3A6>CC').asfloat;
fen_cc:=li_cc*(1-strtofloat('0.'+copy(t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_fenzhango.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1)));
fen:=fen_pp-fen_cc;
if fen>=0 then
begin
t_ch_fee_fenzhango['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_fee_fenzhango['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen);
end
else
begin
t_ch_fee_fenzhango['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen*-1);
t_ch_fee_fenzhango['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
end;
except
;
end;
{
if (t_ch_fee_fenzhango.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0)and(t_ch_fee_fenzhango.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat<>0)then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>Ӧ<EFBFBD>ա<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EEA3A1>');
abort;
end;
}
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo4Change(Sender: TObject);
begin
if (t_ch_fee_fenzhangO.state=dsinsert)or(t_ch_fee_fenzhangO.state=dsedit) then
begin
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo4.text,[])then
begin
end;
t_ch_fee_fenzhangO['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo5Change(Sender: TObject);
begin
if (t_ch_fee_fenzhangO.state=dsinsert)or(t_ch_fee_fenzhangO.state=dsedit) then
begin
t_ch_fee_fenzhangO['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton8Click(Sender: TObject);
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
try
if not assigned(frm_code_fee_projectagent_add) then
frm_code_fee_projectagent_add:=tfrm_code_fee_projectagent_add.Create (self);
frm_code_fee_projectagent_add.op_type.text:='1';
frm_code_fee_projectagent_add.t_op_bill1.Enabled:=FALSE;
frm_code_fee_projectagent_add.t_op_bill1.DataSet:=ADOQuery3.DataSource.DataSet;
// frm_code_fee_projectagent_add.t_op_bill1.DataSet:=t_ch_fee_fenzhang.DataSource.DataSet;
frm_code_fee_projectagent_add.t_op_bill1.Enabled:=true;
frm_code_fee_projectagent_add.t_ch_fee1.Enabled:=false;
frm_code_fee_projectagent_add.t_ch_fee1.DataSet:=ADOQuery3;
// frm_code_fee_projectagent_add.t_ch_fee1.DataSet:=t_ch_fee_fenzhang;
frm_code_fee_projectagent_add.t_ch_fee1.Enabled:=true;
frm_code_fee_projectagent_add.ShowModal;
finally
frm_code_fee_projectagent_add.free;
frm_code_fee_projectagent_add:=nil;
end;
{
t_ch_fee_fenzhang.Close;
t_ch_fee_fenzhang.Open;
t_ch_fee_fenzhango.Close;
t_ch_fee_fenzhango.Open;
}
end;
procedure Tfrm_op_seae_fenzhang.N1Click(Sender: TObject);
begin
if t_ch_fee_fenzhang.IsEmpty then
exit;
if t_ch_fee_fenzhang.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
if application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_fee_fenzhang.delete;
end
else
begin
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_fee_fenzhang.delete;
end;
end;
procedure Tfrm_op_seae_fenzhang.N3Click(Sender: TObject);
begin
if t_ch_fee_fenzhango.IsEmpty then
exit;
if t_ch_fee_fenzhango.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
if application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_fee_fenzhango.delete;
end
else
begin
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_ch_fee_fenzhango.delete;
end;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton4Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton4.ClientToScreen(Point(0,bsSkinButton4.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailAfterInsert(
DataSet: TDataSet);
begin
//profit and loss <20><><EFBFBD><EFBFBD>
t_ch_fee_pl_detail['PL_ID']:=t_ch_fee_pl['PL_ID'];
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='<27><>';
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_fee_pl.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD>һ').AsFloat:=0;
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detail.FieldByName('֧<><D6A7>һ').AsFloat:=0;
t_ch_fee_pl_detail.FieldByName('֧<><D6A7><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detail.FieldByName('֧<><D6A7><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detail.FieldByName('֧<><D6A7><EFBFBD>ϼ<EFBFBD>').AsFloat:=0;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_plAfterInsert(DataSet: TDataSet);
begin
t_ch_fee_pl.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl.FieldByName('<27>ϼ<EFBFBD>').AsFloat:=0;
t_ch_fee_pl.FieldByName('<27>ֳɱ<D6B3><C9B1><EFBFBD>').AsFloat:=0;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton10Click(Sender: TObject);
var
aQuery:TAdoQuery;
begin
//profit and loss <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_ch_fee_pl.IsEmpty then begin
t_ch_fee_pl.Insert;
t_ch_fee_pl.Post;
end;
t_ch_fee_pl_detail.Insert;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD>˷<EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ұ<EFBFBD><>''RMB'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>˷<EFBFBD>''');
SQL.Add(' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from v_op_bscard where (<28><><EFBFBD><EFBFBD>='''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''')');
SQL.Add(' or (<28><><EFBFBD><EFBFBD><>'''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ҵ<><D2B5><EFBFBD><EFBFBD>Դ=''R/O''))');
Open;
if not IsEmpty then
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD>һ').Asfloat:=fieldbyname('<27><><EFBFBD>˷<EFBFBD>').AsFloat;
Close;SQL.Clear;
SQL.Add('select sum(<28><><EFBFBD><EFBFBD>) as ȼ<>͸<EFBFBD><CDB8>ӷ<EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ұ<EFBFBD><>''RMB'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''ȼ<>ͷ<EFBFBD>''');
SQL.Add(' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from v_op_bscard where (<28><><EFBFBD><EFBFBD>='''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''')');
SQL.Add(' or (<28><><EFBFBD><EFBFBD><>'''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ҵ<><D2B5><EFBFBD><EFBFBD>Դ=''R/O''))');
Open;
if not IsEmpty then
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat:=fieldbyname('ȼ<>͸<EFBFBD><CDB8>ӷ<EFBFBD>').AsFloat;
Close;SQL.Clear;
SQL.Add('select sum(<28><><EFBFBD><EFBFBD>) as ս<><D5BD><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>=''<27><>'' and <20>ұ<EFBFBD><>''RMB'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''ս<><D5BD><EFBFBD><EFBFBD>''');
SQL.Add(' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from v_op_bscard where (<28><><EFBFBD><EFBFBD>='''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''')');
SQL.Add(' or (<28><><EFBFBD><EFBFBD><>'''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_fee_pl.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''' and ҵ<><D2B5><EFBFBD><EFBFBD>Դ=''R/O''))');
Open;
if not IsEmpty then
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asfloat:=fieldbyname('ս<><D5BD><EFBFBD><EFBFBD>').AsFloat;
end;
finally
FreeAndNil(aQuery);
end;
t_ch_fee_pl_detail.post;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailBeforeInsert(
DataSet: TDataSet);
begin
if (t_ch_fee_pl.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if t_ch_fee_pl.IsEmpty then begin
t_ch_fee_pl.Insert;
t_ch_fee_pl.Post;
end;
if t_ch_fee_pl.State in [dsedit,dsinsert] then t_ch_fee_pl.Post;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_plBeforeInsert(DataSet: TDataSet);
begin
if t_ch_fee_pl.DataSource.DataSet.State=dsinsert then
t_ch_fee_pl.DataSource.DataSet.post;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton12Click(Sender: TObject);
begin
if t_ch_fee_pl_detail.State in [dsedit,dsinsert] then t_ch_fee_pl_detail.Post;
if t_ch_fee_pl_detailf.State in [dsedit,dsinsert] then t_ch_fee_pl_detailf.Post;
if t_ch_fee_pl.State in [dsedit,dsinsert] then t_ch_fee_pl.Post;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton18Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton18.ClientToScreen(Point(0,bsSkinButton18.Height));
PopupMenu2.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailAfterPost(
DataSet: TDataSet);
var
aQuery:TAdoQuery;
begin
//<2F>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;sql.Clear;
SQL.Add('Select sum(<28><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(֧<><D6A7><EFBFBD>ϼ<EFBFBD>) as ֧<><D6A7> from t_ch_fee_pl_detail where <20><><EFBFBD><EFBFBD>='''+t_ch_fee_pl.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'''');
Open;
if not IsEmpty then begin
t_ch_fee_pl.Edit;
t_ch_fee_pl.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_ch_fee_pl.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=FieldByName('֧<><D6A7>').AsFloat;
t_ch_fee_pl.Post;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailfAfterInsert(
DataSet: TDataSet);
begin
t_ch_fee_pl_detailf.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='<27><>';
t_ch_fee_pl_detailf.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_fee_pl.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_ch_fee_pl_detailf.FieldByName('<27><><EFBFBD><EFBFBD>һ').AsFloat:=0;
t_ch_fee_pl_detailf.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detailf.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detailf.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detailf.FieldByName('֧<><D6A7>һ').AsFloat:=0;
t_ch_fee_pl_detailf.FieldByName('֧<><D6A7><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detailf.FieldByName('֧<><D6A7><EFBFBD><EFBFBD>').AsFloat:=0;
t_ch_fee_pl_detailf.FieldByName('֧<><D6A7><EFBFBD>ϼ<EFBFBD>').AsFloat:=0;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_plDSDesigner3Change(
Sender: TField);
begin
t_ch_fee_pl.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_ch_fee_pl.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat-t_ch_fee_pl.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton13Click(Sender: TObject);
begin
if MessageDlg('ȷʵҪɾ<D2AA><C9BE><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1>P&L<><4C>?',mtWarning,[mbYes,mbNo],0)=mrYes then begin
t_ch_fee_pl_detail.First;
while not t_ch_fee_pl_detail.eof do begin
t_ch_fee_pl_detail.Delete;
end;
t_ch_fee_pl_detailf.First;
while not t_ch_fee_pl_detailf.eof do begin
t_ch_fee_pl_detailf.Delete;
end;
t_ch_fee_pl.Delete;
end;
end;
procedure Tfrm_op_seae_fenzhang.MenuItem2Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD>PL',1,t_ch_fee_pl.DataSource,t_ch_fee_pl1,nil,nil,t_ch_fee_pl_detail1,t_ch_fee_pl_detailf1,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.MenuItem4Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD>PL',3,t_ch_fee_pl.DataSource,t_ch_fee_pl1,nil,nil,t_ch_fee_pl_detail1,t_ch_fee_pl_detailf1,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.MenuItem6Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD>PL',2,t_ch_fee_pl.DataSource,t_ch_fee_pl1,nil,nil,t_ch_fee_pl_detail1,t_ch_fee_pl_detailf1,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_plDSDesigner5Change(
Sender: TField);
begin
t_ch_fee_pl.FieldByName('<27>ϼ<EFBFBD>').AsFloat:=t_ch_fee_pl.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_ch_fee_pl.FieldByName('<27>ֳɱ<D6B3><C9B1><EFBFBD>').AsFloat/100;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailfDSDesigner6Change(
Sender: TField);
begin
t_ch_fee_pl_detailf.FieldByName('֧<><D6A7><EFBFBD>ϼ<EFBFBD>').AsFloat:=t_ch_fee_pl_detailf.FieldByName('֧<><D6A7>һ').AsFloat+t_ch_fee_pl_detailf.FieldByName('֧<><D6A7><EFBFBD><EFBFBD>').AsFloat+t_ch_fee_pl_detailf.FieldByName('֧<><D6A7><EFBFBD><EFBFBD>').AsFloat;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailDSDesigner6Change(
Sender: TField);
begin
t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>').AsFloat:=t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD>һ').AsFloat+t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat+t_ch_fee_pl_detail.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_cmAfterInsert(DataSet: TDataSet);
begin
t_ch_fee_cm.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_ch_fee_cm.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton25Click(Sender: TObject);
begin
// cargomainfest<73><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
try
if not assigned(frm_code_fee_cargomainfest_add) then
frm_code_fee_cargomainfest_add:=tfrm_code_fee_cargomainfest_add.Create (self);
frm_code_fee_cargomainfest_add.op_type.text:='1';
frm_code_fee_cargomainfest_add.t_op_bill1.Enabled:=FALSE;
frm_code_fee_cargomainfest_add.t_op_bill1.DataSet:=t_ch_fee_cm.DataSource.DataSet;
frm_code_fee_cargomainfest_add.t_op_bill1.Enabled:=true;
frm_code_fee_cargomainfest_add.t_ch_fee1.Enabled:=false;
frm_code_fee_cargomainfest_add.t_ch_fee1.DataSet:=t_ch_fee_cm;
frm_code_fee_cargomainfest_add.t_ch_fee1.Enabled:=true;
frm_code_fee_cargomainfest_add.t_op_fenzhang1.Enabled:=FALSE;
frm_code_fee_cargomainfest_add.t_op_fenzhang1.DataSet:=t_op_fenzhang;
frm_code_fee_cargomainfest_add.t_op_fenzhang1.Enabled:=true;
frm_code_fee_cargomainfest_add.ShowModal;
finally
frm_code_fee_cargomainfest_add.free;
frm_code_fee_cargomainfest_add:=nil;
end;
t_ch_fee_cm.Close;
t_ch_fee_cm.Open;
setGrid;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton16Click(Sender: TObject);
begin
table_post(t_ch_fee_cm);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton17Click(Sender: TObject);
begin
if MessageDlg('ȷʵҪɾ<D2AA><C9BE><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1>mainfast<73><74>?',mtWarning,[mbYes,mbNo],0)=mrYes then begin
t_ch_fee_cm.Delete;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_cmBeforePost(DataSet: TDataSet);
var
aQuery:TAdoQuery;
s:String;
i:integer;
calc: TSmpExprCalc;
begin
//<2F><><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>ֵ
if t_ch_fee_cm.FieldByName('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select * from t_ch_project_cargomainfest_detail where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_ch_fee_cm.FieldByName('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and <20>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD>'' order by <20><><EFBFBD><EFBFBD>');
Open;
if IsEmpty then begin
end else begin
first;
while not eof do begin
if fieldbyname('<27><>ʽ').AsString<>'' then begin
S:=FieldByName('<27><>ʽ').AsString;
for i:=0 to t_ch_fee_cm.FieldCount-1 do begin
S:=StringReplace(S,'['+t_ch_fee_cm.Fields[I].FieldName+']',t_ch_fee_cm.Fields[I].AsString,[]);
end;
calc := TSmpExprCalc.Create(TRUE);
try
try
if copy(S,1,1)='-' then S:='0'+S;
calc.Expression := S;
t_ch_fee_cm.fieldbyname(trim(FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD>').AsString)).value:=strtofloat(calc.AsString);
except
t_ch_fee_cm.fieldbyname(trim(FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD>').AsString)).value:=0;
end;
finally
calc.Free;
end;
end;
Next;
end;
end;
end;
finally
FreeAndNil(aQuery);
end;
absno:=t_ch_fee_cm.fieldbyname('CM_ID').AsString;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton19Click(Sender: TObject);
begin
table_cancel(t_ch_fee_cm);
end;
procedure Tfrm_op_seae_fenzhang.MenuItem1Click(Sender: TObject);
begin
if t_op_fenzhang.State in [dsedit,dsinsert] then t_op_fenzhang.Post;
if t_ch_fee_cm.State in [dsedit,dsinsert] then t_ch_fee_cm.Post;
sys_print('<27><><EFBFBD><EFBFBD>CM',1,t_ch_fee_cm.DataSource,ds_op_fenzhang1,nil,nil,t_ch_fee_cm1,NIL,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.MenuItem8Click(Sender: TObject);
begin
if t_op_fenzhang.State in [dsedit,dsinsert] then t_op_fenzhang.Post;
if t_ch_fee_cm.State in [dsedit,dsinsert] then t_ch_fee_cm.Post;
sys_print('<27><><EFBFBD><EFBFBD>CM',3,t_ch_fee_cm.DataSource,ds_op_fenzhang1,nil,nil,t_ch_fee_cm1,NIL,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.MenuItem10Click(Sender: TObject);
begin
if t_op_fenzhang.State in [dsedit,dsinsert] then t_op_fenzhang.Post;
if t_ch_fee_cm.State in [dsedit,dsinsert] then t_ch_fee_cm.Post;
sys_print('<27><><EFBFBD><EFBFBD>CM',2,t_ch_fee_cm.DataSource,ds_op_fenzhang1,nil,nil,t_ch_fee_cm1,NIL,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton20Click(Sender: TObject);
var
sumttl,sumttlot:double;
function getfeeename(cname:string):string;
var
aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
sql.Add('select Ӣ<><D3A2><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+cname+'''');
open;
if not IsEmpty then
result:=fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
begin
//cargomainfest<73><74><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>
if RxDBLookupCombo19.DisplayValue='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbok],0);
exit;
end;
if RxDBLookupCombo2.DisplayValue='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>',mtWarning,[mbok],0);
exit;
end;
if wwDBLookupCombo8.text='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD>',mtWarning,[mbok],0);
exit;
end;
table_post(t_ch_fee_cm);
if t_ch_fee_cm.IsEmpty then
exit;
sumttl:=0;
sumttlot:=0;
t_ch_fee_cm.first;
while not t_ch_fee_cm.eof do begin
if t_ch_fee_cm.fieldbyname('<27>ϼ<EFBFBD>').asfloat<>0 then
begin
sumttl:=t_ch_fee_cm.fieldbyname('<27>ϼ<EFBFBD>').asfloat;
if sumttl<>0 then begin
t_ch_fee.insert;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttl;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttl;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_cm['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo2.DisplayValue;
t_ch_fee['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:= getfeeename(RxDBLookupCombo2.DisplayValue);
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo19.DisplayValue;
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=wwDBLookupCombo8.text;
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',trim(wwDBLookupCombo8.text),[])THEN
begin
if trim(wwDBLookupCombo8.text)='USD' then begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee_cm.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,trim(wwDBLookupCombo8.text));
end else
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><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['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee.post;
end;
{
t_ch_fee_cm.edit;
t_ch_fee_cm['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_cm.post;
}
end;
if wwDBLookupCombo7.text<>'' then begin
if t_ch_fee_cm.fieldbyname('OT<4F>ϼ<EFBFBD>').asfloat<>0 then
begin
sumttlot:=t_ch_fee_cm.fieldbyname('OT<4F>ϼ<EFBFBD>').asfloat;
if sumttlot<>0 then begin
t_ch_fee.insert;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttlot;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttlot;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_cm['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo2.DisplayValue;
t_ch_fee['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:= getfeeename(RxDBLookupCombo2.DisplayValue);
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo19.DisplayValue;
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=wwDBLookupCombo7.text;
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',trim(wwDBLookupCombo7.text),[])THEN
begin
if trim(wwDBLookupCombo7.text)='USD' then begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee_cm.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,trim(wwDBLookupCombo7.text));
end else
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><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['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee.post;
end;
end;
end;
t_ch_fee_cm.Next;
end;
if t_op_fenzhang.State in [dsedit,dsinsert] then
t_op_fenzhang.Post;
if assigned(frm_ch_fee_sea) then
begin
if frm_ch_fee_sea.fra_fee1.t_ch_accept.Active then
frm_ch_fee_sea.fra_fee1.t_ch_accept.Requery();
if frm_ch_fee_sea.fra_fee1.t_ch_pay.Active then
frm_ch_fee_sea.fra_fee1.t_ch_pay.Requery();
end;
showmessage('<27><><EFBFBD>ɷ<EFBFBD><C9B7>óɹ<C3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo19Enter(Sender: TObject);
begin
RxDBLookupCombo19.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo19Exit(Sender: TObject);
begin
RxDBLookupCombo19.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton24Click(Sender: TObject);
var
sumttl,sumttlot:double;
function getfeeename(cname:string):string;
var
aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
sql.Add('select Ӣ<><D3A2><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+cname+'''');
open;
if not IsEmpty then
result:=fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
begin
//cargomainfest<73><74><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
if RxDBLookupCombo19.DisplayValue='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbok],0);
exit;
end;
if RxDBLookupCombo2.DisplayValue='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>',mtWarning,[mbok],0);
exit;
end;
if wwDBLookupCombo8.text='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD>',mtWarning,[mbok],0);
exit;
end;
table_post(t_ch_fee_cm);
if t_ch_fee_cm.IsEmpty then
exit;
sumttl:=0;
sumttlot:=0;
t_ch_fee_cm.first;
while not t_ch_fee_cm.eof do begin
if t_ch_fee_cm.fieldbyname('<27>ϼ<EFBFBD>').asfloat<>0 then
begin
sumttl:=sumttl+t_ch_fee_cm.fieldbyname('<27>ϼ<EFBFBD>').asfloat;
t_ch_fee_cm.edit;
t_ch_fee_cm['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_cm.post;
end;
if wwDBLookupCombo7.text<>'' then begin
if t_ch_fee_cm.fieldbyname('OT<4F>ϼ<EFBFBD>').asfloat<>0 then
begin
sumttlot:=sumttlot+t_ch_fee_cm.fieldbyname('OT<4F>ϼ<EFBFBD>').asfloat;
end;
end;
t_ch_fee_cm.Next;
end;
if sumttl<>0 then begin
t_ch_fee.insert;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttl;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttl;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_cm['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo2.DisplayValue;
t_ch_fee['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:= getfeeename(RxDBLookupCombo2.DisplayValue);
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo19.DisplayValue;
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=wwDBLookupCombo8.text;
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo8.text,[])THEN
begin
if wwDBLookupCombo8.text='USD' then begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee_cm.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo8.text);
end else
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><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['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee.post;
end;
if sumttlot<>0 then begin
t_ch_fee.insert;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttlot;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttlot;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_cm['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo2.DisplayValue;
t_ch_fee['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:= getfeeename(RxDBLookupCombo2.DisplayValue);
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo19.DisplayValue;
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=wwDBLookupCombo7.text;
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',wwDBLookupCombo8.text,[])THEN
begin
if wwDBLookupCombo8.text='USD' then begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee_cm.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,wwDBLookupCombo8.text);
end else
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><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['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee.post;
end;
if t_op_fenzhang.State in [dsedit,dsinsert] then
t_op_fenzhang.Post;
if assigned(frm_ch_fee_sea) then
begin
if frm_ch_fee_sea.fra_fee1.t_ch_accept.Active then
frm_ch_fee_sea.fra_fee1.t_ch_accept.Requery();
if frm_ch_fee_sea.fra_fee1.t_ch_pay.Active then
frm_ch_fee_sea.fra_fee1.t_ch_pay.Requery();
end;
showmessage('<27><><EFBFBD>ɷ<EFBFBD><C9B7>óɹ<C3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton23Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton23.ClientToScreen(Point(0,bsSkinButton23.Height));
PopupMenu4.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton15Click(Sender: TObject);
var ExpClass:TDBGridEhExportClass;
Ext:String;
begin
DBGrid.Selection.SelectAll;
SaveDialog1.FileName := 'file1';
if SaveDialog1.Execute then
begin
case SaveDialog1.FilterIndex of
1: begin ExpClass := TDBGridEhExportAsXLS; Ext := 'xls'; end;
2: begin ExpClass := TDBGridEhExportAsCSV; Ext := 'csv'; end;
3: begin ExpClass := TDBGridEhExportAsHTML; Ext := 'htm'; end;
4: begin ExpClass := TDBGridEhExportAsRTF; Ext := 'rtf'; end;
5: begin ExpClass := TDBGridEhExportAsText; Ext := 'txt'; end;
else
ExpClass := nil; Ext := '';
end;
if ExpClass <> nil then
begin
if UpperCase(Copy(SaveDialog1.FileName,Length(SaveDialog1.FileName)-2,3)) <>
UpperCase(Ext) then
SaveDialog1.FileName := SaveDialog1.FileName + '.' + Ext;
SaveDBGridEhToExportFile(ExpClass,DBGrid,
SaveDialog1.FileName,False);
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo2Enter(Sender: TObject);
begin
RxDBLookupCombo2.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo2Exit(Sender: TObject);
begin
RxDBLookupCombo2.LookupDisplay:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.setGrid;
var
aQuery:TADOQuery;
S:String;
l:integer;
begin
//<2F><><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
if t_op_fenzhang.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull OR (t_op_fenzhang.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger=0) then exit;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;SQL.Clear;
SQL.Add('Select * from t_ch_project_cargomainfest_detail where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+t_op_fenzhang.fieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' order by <20><><EFBFBD><EFBFBD>');
Open;
if Recordset.RecordCount>0 then begin
first;
DBGrid.FrozenCols:=0;
DBGrid.FooterRowCount:=0;
DBGrid.SumList.Active:=false;
DBGrid.Columns.Clear;
DBGrid.RowHeight:=18;
while not Eof do begin
with DBGrid.Columns.Add do begin
AutoDropDown:=false;
// ButtonStyle:=cbsNone;
WordWrap:=true;
ToolTips:=true;
FieldName:=FieldByName('<27>ֶ<EFBFBD><D6B6><EFBFBD>').AsString;
Title.Caption:=FieldByName('<27><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>').AsString;
S:='';
L:=Max(FieldByName('<27>ֶο<D6B6><CEBF><EFBFBD>').AsInteger, Length(Title.Caption));
while Length(S)<L do
S:=S+' ';
Width:=DBGrid.Canvas.TextWidth(S)+2;
if FieldByName('<27>Ƿ<EFBFBD><C7B7>ϼ<EFBFBD>').AsBoolean then
Footer.ValueType:=fvtSum;
end;
Next;
end;
DBGrid.FooterRowCount:=1;
DBGrid.SumList.Active:=trUE;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_op_seae_fenzhang.DBComboBox4DropDown(Sender: TObject);
var
aQuery:TAdoQuery;
begin
DBComboBox4.Items.Clear;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.clear;
SQL.Add('select distinct <20><>ע from t_op_fenzhang');
Open;
first;
while not eof do begin
DBComboBox4.Items.Add(FieldByName('<27><>ע').AsString);
Next;
end;
end;
finally
FreeAndNIL(aQuery);
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_cmAfterPost(DataSet: TDataSet);
begin
DBGrid.SumList.Active:=false;
DBGrid.SumList.Active:=true;
t_ch_fee_cm.Locate('CM_ID',aBSNO,[]);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton21Click(Sender: TObject);
var
j:integer;
fa:string;
begin
if t_ch_fee_cm.IsEmpty then exit;
t_ch_fee_cm.Last;
j:=t_ch_fee_cm['<27><><EFBFBD><EFBFBD>'];
j:=j+1;
fa:=t_ch_fee_cm.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_ch_fee_cm.Append;
t_ch_fee_cm['<27><><EFBFBD><EFBFBD>']:=j;
t_ch_fee_cm['ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=fa;
t_ch_fee_cm['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_cm.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_ch_fee_cm['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=t_ch_fee_cm.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_ch_fee_cm['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee_cm['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_ch_fee_cm['<27>ջ<EFBFBD><D5BB><EFBFBD>']:='';
t_ch_fee_cm['<27><><EFBFBD><EFBFBD><E1B5A5>']:='';
t_ch_fee_cm['<27><><EFBFBD><EFBFBD><E1B5A5>']:='';
t_ch_fee_cm['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:='';
t_ch_fee_cm['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee_cm['<27><>װ']:='';
t_ch_fee_cm['<27><>ͷ']:='';
t_ch_fee_cm['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee_cm['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee_cm['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee_cm['<27>ƷѶ<C6B7>']:=0;
t_ch_fee_cm['CFSCHARGE']:=0;
t_ch_fee_cm['CHC']:=0;
t_ch_fee_cm['DOFEE']:=0;
t_ch_fee_cm['YASEBS']:=0;
t_ch_fee_cm['SYSTEMCHARGE']:=0;
t_ch_fee_cm['OCEANHT']:=0;
t_ch_fee_cm['RECFSCHARGE']:=0;
t_ch_fee_cm['RECHC']:=0;
t_ch_fee_cm['REDOFEE']:=0;
t_ch_fee_cm['REYASEBS']:=0;
t_ch_fee_cm['RESYSTEMCHARGE']:=0;
t_ch_fee_cm['REOCEANHT']:=0;
t_ch_fee_cm['REFUNDCBM']:=0;
t_ch_fee_cm['REFUNDBL']:=0;
t_ch_fee_cm['<27>ϼ<EFBFBD>']:=0;
t_ch_fee_cm['OT<4F>ϼ<EFBFBD>']:=0;
t_ch_fee_cm['OTFEE1']:=0;
t_ch_fee_cm['OTFEE2']:=0;
t_ch_fee_cm['OTFEE3']:=0;
t_ch_fee_cm['OTFEE4']:=0;
t_ch_fee_cm['OTFEE5']:=0;
t_ch_fee_cm['OTFEE6']:=0;
t_ch_fee_cm['OTFEE7']:=0;
t_ch_fee_cm['OTFEE8']:=0;
t_ch_fee_cm.post;
end;
procedure Tfrm_op_seae_fenzhang.t_op_fenzhangBeforeEdit(DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangBeforeEdit(
DataSet: TDataSet);
begin
{
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
}
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_fenzhangOBeforeEdit(
DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailBeforeEdit(
DataSet: TDataSet);
begin
if (t_ch_fee_pl.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_pl_detailfBeforeEdit(
DataSet: TDataSet);
begin
if (t_ch_fee_pl.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_cmBeforeInsert(DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_cmBeforeEdit(DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_plAfterOpen(DataSet: TDataSet);
begin
t_ch_fee_pl.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').OnChange:=t_ch_fee_plDSDesigner3Change;
t_ch_fee_pl.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_fee_plDSDesigner3Change;
t_ch_fee_pl.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=t_ch_fee_plDSDesigner5Change;
t_ch_fee_pl.FieldByName('<27>ֳɱ<D6B3><C9B1><EFBFBD>').OnChange:=t_ch_fee_plDSDesigner5Change;
end;
procedure Tfrm_op_seae_fenzhang.t_op_fenzhangBeforePost(DataSet: TDataSet);
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_crm_client.fieldbyname('<27>Ƿ<EFBFBD>ͣ<EFBFBD><CDA3>').AsBoolean then begin
MessageDlg('<27>˿ͻ<CBBF><CDBB><EFBFBD>ͣ<EFBFBD><CDA3>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>',mtWarning,[mbok],0);
abort;
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton32Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton32.ClientToScreen(Point(0,bsSkinButton32.Height));
PopupMenu5.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_fenzhang.FormCreate(Sender: TObject);
begin
frm_op_fenzhang_create:=true;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton22Click(Sender: TObject);
begin
t_ch_fee_agentdc.Insert;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton26Click(Sender: TObject);
begin
if t_ch_fee_agentdc_detail.State in [dsedit,dsinsert] then
t_ch_fee_agentdc_detail.post;
if t_ch_fee_agentdc.State in [dsedit,dsinsert] then
t_ch_fee_agentdc.post;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton27Click(Sender: TObject);
begin
if t_ch_fee_agentdc.IsEmpty then exit;
t_ch_fee_agentdc_detail.first;
while not t_ch_fee_agentdc_detail.Eof do
t_ch_fee_agentdc_detail.Delete;
t_ch_fee_agentdc.Delete;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton28Click(Sender: TObject);
begin
if t_ch_fee_agentdc_detail.State in [dsedit,dsinsert] then t_ch_fee_agentdc_detail.cancel;
if t_ch_fee_agentdc.State in [dsedit,dsinsert] then t_ch_fee_agentdc.Cancel;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcBeforeInsert(
DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcBeforeEdit(
DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detailBeforeInsert(
DataSet: TDataSet);
begin
if (t_ch_fee_agentdc.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if t_ch_fee_agentdc.IsEmpty then begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
if t_ch_fee_agentdc.State in [dsedit,dsinsert] then t_ch_fee_agentdc.Post;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detailBeforeEdit(
DataSet: TDataSet);
begin
if (t_ch_fee_agentdc.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo10Change(Sender: TObject);
begin
{
if (t_ch_fee_agentdc_detail.state=dsinsert)or(t_ch_fee_agentdc_detail.state=dsedit) then
begin
t_ch_fee_agentdc_detail['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
}
if (t_ch_fee_agentdc_detail.state=dsinsert)or(t_ch_fee_agentdc_detail.state=dsedit) then
begin
if not t_bz_balance.IsEmpty then
if t_bz_balance.Locate('one',wwDBLookupCombo10.text,[])then
begin
t_ch_fee_agentdc_detail['<27><><EFBFBD><EFBFBD>']:=t_bz_balance.fieldbyname('three').asfloat;
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo9Change(Sender: TObject);
begin
if (t_ch_fee_agentdc_detail.state=dsinsert)or(t_ch_fee_agentdc_detail.state=dsedit) then
begin
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBLookupCombo9.text,[])then
begin
t_ch_fee_agentdc_detail['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcAfterInsert(
DataSet: TDataSet);
begin
//D/C NOTE <20><><EFBFBD><EFBFBD>
t_ch_fee_agentdc['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee_agentdc['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee_agentdc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_agentdc.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee_agentdc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_agentdc.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
// t_ch_fee_agentdc['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='<27>ֹ<EFBFBD>';
t_ch_fee_agentdc['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_ch_fee_agentdc.FieldByName('<27>ұ<EFBFBD>').AsString:='USD';
if Trim(frm_data_share.t_AgentDc_no.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_ch_fee_agentdc.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').isnull or (t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']='') then begin
t_ch_fee_agentdc.Edit;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=getDCno(1,subComp,department,employee,t_ch_fee_agentdc.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=getDCno(1,subComp,department,employee,t_ch_fee_agentdc['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
end;
end;
procedure Tfrm_op_seae_fenzhang.MenuItem11Click(Sender: TObject);
begin
if t_ch_fee_agentdc_detail.State in [dsedit,dsinsert] then t_ch_fee_agentdc_detail.Post;
if t_ch_fee_agentdc.State in [dsedit,dsinsert] then t_ch_fee_agentdc.Post;
sys_print('<27><><EFBFBD><EFBFBD>DCNOTE',TMenuItem(sender).tag,t_ch_fee_agentdc.DataSource,t_ch_fee_agentdc1,nil,nil,t_ch_fee_agentdc_detail1,NIL,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detailAfterPost(
DataSet: TDataSet);
var
aQuery:TAdoQuery;
begin
//D/C NOTE <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;sql.Clear;
SQL.Add('Select sum(Ӧ<>ս<EFBFBD><D5BD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as ֧<><D6A7> from t_ch_fee_agentdc_detail where AD_ID='+t_ch_fee_agentdc.FieldByName('AD_ID').AsString);
Open;
if not IsEmpty then begin
t_ch_fee_agentdc.Edit;
t_ch_fee_agentdc.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_ch_fee_agentdc.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=FieldByName('֧<><D6A7>').AsFloat;
t_ch_fee_agentdc.Post;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detailAfterInsert(
DataSet: TDataSet);
begin
t_ch_fee_agentdc_detail['AD_ID']:=t_ch_fee_agentdc['AD_ID'];
t_ch_fee_agentdc_detail['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='0%';
t_ch_fee_agentdc_detail.FieldByName('<27>ұ<EFBFBD>').AsString:=t_ch_fee_agentdc['<27>ұ<EFBFBD>'];
if t_ch_fee_agentdc['<27>ұ<EFBFBD>']='USD' then
t_ch_fee_agentdc_detail['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee_agentdc.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,t_ch_fee_agentdc['<27>ұ<EFBFBD>']);
// wwDBLookupCombo10.OnChange(nil);
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcBeforePost(
DataSet: TDataSet);
begin
table_before_post(t_ch_fee_agentdc,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
// table_before_post(t_ch_fee_agentdc,'<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>');
table_before_post(t_ch_fee_agentdc,'<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_ch_fee_fenzhang.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then begin
if frm_data_share.t_crm_client.fieldbyname('<27>Ƿ<EFBFBD>ͣ<EFBFBD><CDA3>').AsBoolean then begin
MessageDlg('<27>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3>,<2C><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>',mtWarning,[mbok],0);
abort;
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detailBeforePost(
DataSet: TDataSet);
begin
table_before_post(t_ch_fee_agentdc_detail,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
// table_before_post(t_ch_fee_agentdc_detail,'<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>');
// table_before_post(t_ch_fee_agentdc_detail,'<27>ұ<EFBFBD>');
// table_before_post(t_ch_fee_agentdc_detail,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcdebitcharge(
Sender: TField);
var
debit:double;
begin
//D/C NOTE <20><>д<EFBFBD><D0B4><EFBFBD><EFBFBD>
if sender.DataSet.State in [dsedit,dsinsert] then begin
debit:=sender.DataSet.fieldbyname('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat-sender.DataSet.fieldbyname('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
sender.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=debit;
if debit>=0 then
sender.DataSet['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='DEBIT'
else
begin
sender.DataSet['<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>']:='CREDIT';
debit:=debit*-1;
end;
sender.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='SAY:US DOLLARS '+ntoc(debit,true)+'ONLY.';
end;
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo5Enter(Sender: TObject);
begin
RxDBLookupCombo5.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo5Exit(Sender: TObject);
begin
RxDBLookupCombo5.LookupDisplay:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton29Click(Sender: TObject);
var
sumttl:double;
function getfeeename(cname:string):string;
var
aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
sql.Add('select Ӣ<><D3A2><EFBFBD><EFBFBD> from t_code_fee where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+cname+'''');
open;
if not IsEmpty then
result:=fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
begin
//D/C NOTE <20><><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
if (t_ch_fee_agentdc.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if t_ch_fee_agentdc.State in [dsedit,dsinsert] then t_ch_fee_agentdc.Post;
if t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbok],0);
exit;
end;
if t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>',mtWarning,[mbok],0);
exit;
end;
if t_ch_fee_agentdc.FieldByName('<27>ұ<EFBFBD>').AsString='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>ұ<EFBFBD><D2B1><EFBFBD>',mtWarning,[mbok],0);
exit;
end;
if t_ch_fee_agentdc.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat<>0 then
begin
sumttl:=t_ch_fee_agentdc.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asfloat;
if sumttl<>0 then begin
t_ch_fee.insert;
if sumttl>0 then begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttl*t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD>').value;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=sumttl*t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD>').value;
end else begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:='<27><>';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=-sumttl*t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD>').value;;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=-sumttl*t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD>').value;;
end;
t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=t_ch_fee_agentdc['<27><><EFBFBD><EFBFBD>'];
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_ch_fee['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:= getfeeename(t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_ch_fee_agentdc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_ch_fee['<27><><EFBFBD>㵥λ']:='<27><><EFBFBD><EFBFBD>';
t_ch_fee['<27><>׼']:='<27><>Ʊ';
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=1;
t_ch_fee['<27>ұ<EFBFBD>']:=t_ch_fee_agentdc.FieldByName('<27>ұ<EFBFBD>').AsString;
t_ch_fee['<27><>ע']:=t_ch_fee_agentdc.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').AsString;
if frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',trim(t_ch_fee_agentdc.FieldByName('<27>ұ<EFBFBD>').AsString),[])THEN
begin
if trim(wwDBLookupCombo8.text)='USD' then begin
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_ch_fee_agentdc.datasource.dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,trim(wwDBLookupCombo8.text));
end else
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
t_ch_fee['˰<><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=frm_data_share.t_sys_company.fieldbyname('˰<><CBB0>').AsFloat;
t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=t_ch_fee.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+t_ch_fee.fieldbyname('˰<><CBB0>').asfloat/100);
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);
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><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['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
t_ch_fee.post;
end;
t_ch_fee_agentdc.edit;
t_ch_fee_agentdc['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
t_ch_fee_agentdc.post;
end;
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo4Enter(Sender: TObject);
begin
RxDBLookupCombo4.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo4Exit(Sender: TObject);
begin
RxDBLookupCombo4.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcAfterOpen(
DataSet: TDataSet);
begin
dataset.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').OnChange:=t_ch_fee_agentdcdebitcharge;
dataset.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_fee_agentdcdebitcharge;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinSpeedButton1Click(Sender: TObject);
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>
if t_ch_fee_agentdc.fieldbyname('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').isnull or (t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']='') then begin
t_ch_fee_agentdc.Edit;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=getDCno(1,subComp,department,employee,t_ch_fee_agentdc.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']:=getDCno(1,subComp,department,employee,t_ch_fee_agentdc['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
end;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton34Click(Sender: TObject);
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
try
if not assigned(frm_code_fee_projectagent_add) then
frm_code_fee_projectagent_add:=tfrm_code_fee_projectagent_add.Create (self);
frm_code_fee_projectagent_add.op_type.text:='1';
frm_code_fee_projectagent_add.EditDc.text:='1';
frm_code_fee_projectagent_add.t_op_bill1.Enabled:=FALSE;
frm_code_fee_projectagent_add.t_op_bill1.DataSet:=t_ch_fee_agentdc.DataSource.DataSet;
frm_code_fee_projectagent_add.t_op_bill1.Enabled:=true;
frm_code_fee_projectagent_add.t_ch_fee1.Enabled:=false;
frm_code_fee_projectagent_add.t_ch_fee1.DataSet:=t_ch_fee_agentdc_detail;
frm_code_fee_projectagent_add.t_ch_fee1.Enabled:=true;
frm_code_fee_projectagent_add.ShowModal;
finally
frm_code_fee_projectagent_add.free;
frm_code_fee_projectagent_add:=nil;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detaildebitcharge(
Sender: TField);
var
li_pp,li_cc,fen_pp,fen_cc,fen:real;
begin
try
IF (t_ch_fee_agentdc_detail.State in [dsedit,dsinsert]) and (t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'')
and (t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING<>'<27>ֹ<EFBFBD>')then
begin
li_pp:=t_ch_fee_agentdc_detail.fieldbyname('Ӧ<><D3A6>PP').asfloat-t_ch_fee_agentdc_detail.fieldbyname('Ӧ<><D3A6>PP').asfloat;
fen_pp:=li_pp*strtofloat('0.'+copy(t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1));
li_cc:=t_ch_fee_agentdc_detail.fieldbyname('Ӧ<><D3A6>CC').asfloat-t_ch_fee_agentdc_detail.fieldbyname('Ӧ<><D3A6>CC').asfloat;
fen_cc:=li_cc*(1-strtofloat('0.'+copy(t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING,1,length(t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').ASSTRING)-1)));
fen:=fen_pp-fen_cc;
if fen>=0 then
begin
t_ch_fee_agentdc_detail['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=0;
t_ch_fee_agentdc_detail['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen);
end
else
begin
t_ch_fee_agentdc_detail['Ӧ<>ս<EFBFBD><D5BD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),fen*-1);
t_ch_fee_agentdc_detail['Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
end;
end;
except
;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detailfeenamecharge(
Sender: TField);
begin
if (t_ch_fee_agentdc_detail.state=dsinsert)or(t_ch_fee_agentdc_detail.state=dsedit) then
begin
if frm_data_share.t_code_fee.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_ch_fee_agentdc_detail.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[])then
begin
t_ch_fee_agentdc_detail['<27><><EFBFBD><EFBFBD>Ӣ<EFBFBD><D3A2><EFBFBD><EFBFBD>']:=frm_data_share.t_code_fee.fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').asstring;
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.DatasetAmtcharge(Sender: TField);
begin
if not Sender.DataSet.IsEmpty then
if (Sender.DataSet.state=dsedit)or(Sender.DataSet.state=dsinsert)then
begin
try
if (Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat<>0) and (Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat<>0) then
Sender.DataSet.FieldByName('Ӧ<>ս<EFBFBD><D5BD><EFBFBD>').asfloat:=Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat*Sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
finally
end;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdc_detailAfterOpen(
DataSet: TDataSet);
begin
dataset.FieldByName('Ӧ<><D3A6>PP').OnChange:=t_ch_fee_agentdc_detaildebitcharge;
dataset.FieldByName('Ӧ<><D3A6>CC').OnChange:=t_ch_fee_agentdc_detaildebitcharge;
dataset.FieldByName('Ӧ<><D3A6>PP').OnChange:=t_ch_fee_agentdc_detaildebitcharge;
dataset.FieldByName('Ӧ<><D3A6>CC').OnChange:=t_ch_fee_agentdc_detaildebitcharge;
dataset.FieldByName('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').OnChange:=t_ch_fee_agentdc_detaildebitcharge;
dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OnChange:=t_ch_fee_agentdc_detailfeenamecharge;
dataset.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
dataset.FieldByName('<27><><EFBFBD><EFBFBD>').OnChange:=DatasetAmtcharge;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton30Click(Sender: TObject);
begin
t_ch_fee_agentdc_detail.Insert;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton31Click(Sender: TObject);
begin
if t_ch_fee_agentdc_detail.State in [dsedit,dsinsert] then
t_ch_fee_agentdc_detail.post;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton33Click(Sender: TObject);
begin
if t_ch_fee_agentdc_detail.IsEmpty then exit;
t_ch_fee_agentdc_detail.Delete;
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton35Click(Sender: TObject);
begin
if t_ch_fee_agentdc_detail.State in [dsedit,dsinsert] then t_ch_fee_agentdc_detail.cancel;
end;
procedure Tfrm_op_seae_fenzhang.wwDBLookupCombo12Change(Sender: TObject);
begin
if (t_ch_fee_agentdc_detail.state=dsinsert)or(t_ch_fee_agentdc_detail.state=dsedit) then
begin
t_ch_fee_agentdc_detail['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcBeforeDelete(
DataSet: TDataSet);
begin
if (DataSet.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8><C4B7>ã<EFBFBD><C3A3><EFBFBD>');
abort;
end;
if not t_ch_fee_agentdc.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').IsNull then
delDCno(t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']);
end;
procedure Tfrm_op_seae_fenzhang.t_ch_fee_agentdcBeforeCancel(
DataSet: TDataSet);
begin
if not (t_ch_fee_agentdc.State in [dsinsert]) then exit;
if not t_ch_fee_agentdc.FieldByName('<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>').IsNull then
delDCno(t_ch_fee_agentdc['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>']);
end;
procedure Tfrm_op_seae_fenzhang.bsSkinButton36Click(Sender: TObject);
var
i,j,l:integer;
s:string;
fenzhangbandini:tinifile ;
begin
//<2F><><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>˳<EFBFBD><CBB3>
fenzhangbandini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'fenzhangbandno.ini');
frm_sys_tab_sort:=tfrm_sys_tab_sort.create(self);
try
frm_sys_tab_sort.ListBox2.Clear;
for i:=0 to bsSkinPageControl1.PageCount-1 do begin
frm_sys_tab_sort.ListBox2.Items.Add(bsSkinPageControl1.Pages[i].Caption+':'+bsSkinPageControl1.Pages[i].Name);
end;
frm_sys_tab_sort.ShowModal;
if frm_sys_tab_sort.ModalResult=mrOk then begin
for j:=0 to frm_sys_tab_sort.ListBox2.Items.Count-1 do begin
s:=frm_sys_tab_sort.ListBox2.Items[j];
l:=pos(':',s)+1;
for i:=0 to bsSkinPageControl1.PageCount-1 do begin
if bsSkinPageControl1.Pages[i].Name=copy(s,l,length(s)-l+1) then begin
bsSkinPageControl1.Pages[i].PageIndex:=j;
fenzhangbandini.Writeinteger('fenzhang',copy(s,l,length(s)-l+1),j);
end;
end;
end;
end;
finally
FreeAndNil(frm_sys_tab_sort);
freeandnil(fenzhangbandini);
end;
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo3Enter(Sender: TObject);
begin
RxDBLookupCombo3.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.RxDBLookupCombo3Exit(Sender: TObject);
begin
RxDBLookupCombo3.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_fenzhang.wwDBGrid5KeyPress(Sender: TObject;
var Key: Char);
begin
if (trim(wwDBGrid5.SelectedField.FieldName)='Ӧ<><D3A6>PP')
or (trim(wwDBGrid5.SelectedField.FieldName)='Ӧ<><D3A6>CC')
or (trim(wwDBGrid5.SelectedField.FieldName)='Ӧ<><D3A6>PP')
or (trim(wwDBGrid5.SelectedField.FieldName)='Ӧ<><D3A6>CC')
then
begin
if key='=' then
begin
if (t_ch_fee_agentdc_detail.State=dsinsert)or(t_ch_fee_agentdc_detail.State=dsedit)then
begin
t_ch_fee_agentdc_detail.FieldByName(trim(wwDBGrid5.SelectedField.FieldName)).Value:=t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD><EFBFBD>').Value*t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD><EFBFBD>').Value
end
else
begin
t_ch_fee_agentdc_detail.Edit;
t_ch_fee_agentdc_detail.FieldByName(trim(wwDBGrid5.SelectedField.FieldName)).Value:=t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD><EFBFBD>').Value*t_ch_fee_agentdc_detail.FieldByName('<27><><EFBFBD><EFBFBD>').Value;
t_ch_fee_agentdc_detail.post;
end;
end;
end;
end;
end.