|
|
|
|
unit u_ch_fee_se;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, u_fee, Menus;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_ch_fee_sea = class(TForm)
|
|
|
|
|
fra_fee1: Tfra_fee;
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure fra_fee1bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_ch_fee_sea: Tfrm_ch_fee_sea;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses my_sys_function, u_op_seae, u_data_share, u_main;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_fee_sea.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
savewwgrid(fra_fee1.wwDBGrid1);
|
|
|
|
|
savewwgrid(fra_fee1.wwDBGrid2);
|
|
|
|
|
frm_ch_fee_sea.Hide;
|
|
|
|
|
frm_ch_fee_sea.ManualFloat(frm_ch_fee_sea.BoundsRect );
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_ch_fee_sea:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_fee_sea.FormShow(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
yjstr:string;
|
|
|
|
|
begin
|
|
|
|
|
loadwwgrid(fra_fee1.wwDBGrid1);
|
|
|
|
|
loadwwgrid(fra_fee1.wwDBGrid2);
|
|
|
|
|
|
|
|
|
|
fra_fee1.DBEdit50.DataSource:=frm_op_seae.t_op_seae2;
|
|
|
|
|
fra_fee1.edit_type.text:='1';
|
|
|
|
|
fra_fee1.edit_data.text:='0001';
|
|
|
|
|
fra_fee1.edit_report.text:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
|
|
|
|
|
fra_fee1.t_ch_accept.DataSource:=frm_op_seae.t_op_seae2;
|
|
|
|
|
if if_open('216') then
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.t_ch_accept.DataSource:=frm_op_seae.t_op_seae2;
|
|
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.t_ch_accept.close;
|
|
|
|
|
fra_fee1.t_ch_accept.SQL.Clear;
|
|
|
|
|
fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and (t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
|
|
+''''+employee+''''+' or (t_ch_fee.¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) '
|
|
|
|
|
+' order by (select top 1 ˳<><CBB3> FROM t_code_fee WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=T_CH_FEE.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),˳<><CBB3>,CH_ID');
|
|
|
|
|
end ELSE begin
|
|
|
|
|
fra_fee1.t_ch_accept.close;
|
|
|
|
|
fra_fee1.t_ch_accept.SQL.Clear;
|
|
|
|
|
fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
|
|
+''''+'<27><>'+''''
|
|
|
|
|
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by (select top 1 ˳<><CBB3> FROM t_code_fee WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=T_CH_FEE.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),˳<><CBB3>,CH_ID');
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
fra_fee1.t_ch_accept.open;
|
|
|
|
|
fra_fee1.a_shen_delete.open;
|
|
|
|
|
fra_fee1.a_shen_modify_old.open;
|
|
|
|
|
fra_fee1.a_shen_modify_new.open;
|
|
|
|
|
|
|
|
|
|
fra_fee1.Panel3.visible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
frm_ch_fee_sea.fra_fee1.Panel3.visible:=false;
|
|
|
|
|
if if_open('217') then
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
yjstr:=getyjstr;
|
|
|
|
|
if (yjstr='') then yjstr:=' 1=1 ';
|
|
|
|
|
fra_fee1.t_ch_pay.DataSource:=frm_op_seae.t_op_seae2;
|
|
|
|
|
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.t_ch_pay.close;
|
|
|
|
|
fra_fee1.t_ch_pay.SQL.Clear;
|
|
|
|
|
fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
|
|
|
|
|
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and (¼<><C2BC><EFBFBD><EFBFBD>='
|
|
|
|
|
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
|
|
|
|
|
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+yjstr);
|
|
|
|
|
fra_fee1.t_ch_pay.SQL.Add(' order by (select top 1 ˳<><CBB3> FROM t_code_fee WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=T_CH_FEE.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),˳<><CBB3>,CH_ID');
|
|
|
|
|
end
|
|
|
|
|
else if (yjstr<>'') then begin
|
|
|
|
|
|
|
|
|
|
fra_fee1.t_ch_pay.close;
|
|
|
|
|
fra_fee1.t_ch_pay.SQL.Clear;
|
|
|
|
|
fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee '
|
|
|
|
|
+'where <20><><EFBFBD><EFBFBD>='
|
|
|
|
|
+''''+'<27><>'+''''+' and '+yjstr
|
|
|
|
|
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by (select top 1 ˳<><CBB3> FROM t_code_fee WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=T_CH_FEE.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),˳<><CBB3>,CH_ID');
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
fra_fee1.t_ch_pay.open;
|
|
|
|
|
fra_fee1.p_shen_delete.open;
|
|
|
|
|
fra_fee1.p_shen_modify_old.open;
|
|
|
|
|
fra_fee1.p_shen_modify_new.open;
|
|
|
|
|
fra_fee1.a_price_view.close;
|
|
|
|
|
fra_fee1.a_price_view.SQL.Clear;
|
|
|
|
|
fra_fee1.a_price_view.SQL.text:='select * from t_price_prerson where <20>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>='
|
|
|
|
|
+''''+'<27><><EFBFBD><EFBFBD>'+''''+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and '
|
|
|
|
|
+open_data('3008','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
|
|
|
|
|
+' order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC';
|
|
|
|
|
fra_fee1.a_price_view.Open;
|
|
|
|
|
|
|
|
|
|
fra_fee1.Panel1.visible:=true;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
fra_fee1.Panel1.visible:=false;
|
|
|
|
|
|
|
|
|
|
if fra_fee1.Panel1.visible and
|
|
|
|
|
fra_fee1.Panel3.visible then
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.Panel8.Visible:=true;
|
|
|
|
|
fra_fee1.t_op_gain.DataSource:=frm_op_seae.t_op_seae2;
|
|
|
|
|
fra_fee1.t_op_gain.open;
|
|
|
|
|
|
|
|
|
|
fra_fee1.DBEdit43.DataSource:=frm_op_seae.t_op_seae2;
|
|
|
|
|
fra_fee1.t_op_gain_main.DataSource:=frm_op_seae.t_op_seae2;
|
|
|
|
|
fra_fee1.t_op_gain_main.open;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.Panel8.Visible:=false;
|
|
|
|
|
end;
|
|
|
|
|
frm_data_share.t_crm_client.requery;
|
|
|
|
|
frm_data_share.t_code_currency.requery;
|
|
|
|
|
|
|
|
|
|
if not if_open('267') then begin
|
|
|
|
|
fra_fee1.wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD>״̬',true);
|
|
|
|
|
fra_fee1.wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',true);
|
|
|
|
|
fra_fee1.wwDBGrid1.RemoveField('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>',true);
|
|
|
|
|
fra_fee1.wwDBGrid1.RemoveField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',true);
|
|
|
|
|
fra_fee1.wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD>״̬',true);
|
|
|
|
|
fra_fee1.wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',true);
|
|
|
|
|
fra_fee1.wwDBGrid2.RemoveField('<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>',true);
|
|
|
|
|
fra_fee1.wwDBGrid2.RemoveField('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',true);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_fee_sea.fra_fee1bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.bsSkinButton9Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_fee_sea.fra_fee1bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.bsSkinButton6Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ch_fee_sea.fra_fee1bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
fra_fee1.bsSkinButton1Click(Sender);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|