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.

500 lines
17 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_railway_batchfee;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, StdCtrls, Mask, wwdbedit,
Wwdotdot, Wwdbcomb, wwdbdatetimepicker, RxLookup, wwdblook, ComCtrls,
bsSkinTabs, ExtCtrls, DB, ADODB;
type
Tfrm_op_railway_batchfee = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinButton3: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinRadioGroup1: TbsSkinRadioGroup;
Label38: TLabel;
RxDBLookupCombo16: TRxDBLookupCombo;
Label25: TLabel;
wwDBComboBox31: TwwDBComboBox;
Label13: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
wwDBComboBox13: TwwDBComboBox;
Label1: TLabel;
Edit7: TEdit;
Edit1: TEdit;
Edit2: TEdit;
Label37: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit3: TEdit;
bsSkinBevel1: TbsSkinBevel;
Label6: TLabel;
Edit4: TEdit;
Label7: TLabel;
wwDBComboBox1: TwwDBComboBox;
bsSkinBevel2: TbsSkinBevel;
Label8: TLabel;
Edit5: TEdit;
Label9: TLabel;
Edit6: TEdit;
Label10: TLabel;
Edit8: TEdit;
Label11: TLabel;
Edit9: TEdit;
Label12: TLabel;
Edit10: TEdit;
Edit11: TEdit;
Edit12: TEdit;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
procedure bsSkinButton2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Edit7Change(Sender: TObject);
procedure RxDBLookupCombo1Change(Sender: TObject);
procedure Edit5Change(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
yelx:string;
procedure MasterFee;
procedure HblFee;
end;
var
frm_op_railway_batchfee: Tfrm_op_railway_batchfee;
implementation
uses u_main, u_data_share, my_sys_function, u_op_railway;
{$R *.dfm}
procedure Tfrm_op_railway_batchfee.bsSkinButton2Click(
Sender: TObject);
begin
close;
end;
procedure Tfrm_op_railway_batchfee.MasterFee;
var
i:integer;
yjid:array of string ;
val,fenbsno:string ;
procedure edidataset;
begin
frm_op_railway.t_ch_fee.Insert;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=frm_op_railway.t_ch_fee.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=wwDBComboBox31.Text;
if bsSkinCheckRadioBox1.checked then begin
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
frm_op_railway.t_ch_fee['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=now;
end else if bsSkinCheckRadioBox2.checked then
begin
frm_op_railway.t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
frm_op_railway.t_ch_fee['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=now;
end else
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
frm_op_railway.t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo16.DisplayValues[1];
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit5.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToIntDef(Edit1.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit8.Text,0);
frm_op_railway.t_ch_fee['<27>ұ<EFBFBD>']:=RxDBLookupCombo1.DisplayValues[0];
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit3.Text,0);
frm_op_railway.t_ch_fee['<27><>׼']:=wwDBComboBox13.Text;
frm_op_railway.t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD>뿪Ʊ']:=0;
frm_op_railway.t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
frm_op_railway.t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
frm_op_railway.t_ch_fee['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit7.Text,0);
frm_op_railway.t_ch_fee['˰<><CBB0>']:=StrToFloatdef(Edit6.Text,0);
frm_op_railway.t_ch_fee['˰<><CBB0>']:=StrToFloatdef(Edit10.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit2.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit9.Text,0);;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit11.Text,0);;
frm_op_railway.t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit12.Text,0);;
if wwDBComboBox1.Text<>'' then
frm_op_railway.t_ch_fee['<27><><EFBFBD>㵥λ']:=wwDBComboBox1.Text;
frm_op_railway.t_ch_fee['˳<><CBB3>']:=1;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
if RxDBLookupCombo5.DisplayValue<>'' then
frm_op_railway.t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo5.DisplayValues[1]
else
frm_op_railway.t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=frm_op_railway.t_op_railway.fieldbyname(wwDBComboBox1.Text).AsString;
frm_op_railway.t_ch_fee['<27><>ע']:=trim(Edit4.Text);
frm_op_railway.t_ch_fee.Post;
frm_op_railway.p_op_gain.Close;
frm_op_railway.p_op_gain.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_op_railway.t_ch_fee.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
frm_op_railway.p_op_gain.ExecSQL;
end;
begin
if frm_op_railway.t_op_railway.IsEmpty then
exit;
if wwDBComboBox31.Text='' then begin
ShowMessage('<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if RxDBLookupCombo16.DisplayValue='' then begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if (wwDBComboBox1.Text='') and (RxDBLookupCombo5.DisplayValue='') then begin
ShowMessage('<27><><EFBFBD>㵥λ<E3B5A5>Ϳͻ<CDBF><CDBB><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>ͬʱΪ<CAB1>գ<EFBFBD>');
exit;
end;
if wwDBComboBox13.Text='' then begin
ShowMessage('<27><><EFBFBD>ñ<EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit7.Text='' then begin
ShowMessage('<27><><EFBFBD>õ<EFBFBD><C3B5>۲<EFBFBD><DBB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit1.Text='' then begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit2.Text='' then begin
ShowMessage('<27><><EFBFBD>ý<EFBFBD><C3BD><EFBFBD><EEB2BB>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit3.Text='' then begin
ShowMessage('<27><><EFBFBD>û<EFBFBD><C3BB>ʲ<EFBFBD><CAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if RxDBLookupCombo1.DisplayValue='' then begin
ShowMessage('<27><><EFBFBD>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
frm_op_railway.t_ch_fee.close;
frm_op_railway.t_ch_fee.DataSource:=frm_op_railway.t_op_railway1;
frm_op_railway.t_ch_fee.open;
frm_op_railway.cxGrid1DBTableView1.BeginUpdate ;
setlength(yjid,frm_op_railway.cxGrid1DBTableView1.Controller.SelectedRowCount);
if bsSkinRadioGroup1.ItemIndex=0 then
begin
if frm_op_railway.cxGrid1DBTableView1.Controller.SelectedRowCount<=0 then
begin
edidataset;
end
else
try
frm_op_railway.t_op_railway.DisableControls;
try
for i:=0 to frm_op_railway.cxGrid1DBTableView1.Controller.SelectedRowCount-1 do
begin //<2F><><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
val:=frm_op_railway.cxGrid1DBTableView1.DataController.GetDisplayText(frm_op_railway.cxGrid1DBTableView1.Controller.SelectedRows[I].RecordIndex,0) ;
yjid[i]:=val ;
end; //<2F>õ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>е<EFBFBD>ֵ
for i:=0 to high(yjid) do
begin
if frm_op_railway.t_op_railway.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',yjid[i],[]) then
begin
if frm_op_railway.t_op_railway.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
ShowMessage('<27><><EFBFBD>ţ<EFBFBD>'+frm_op_railway.t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+',<2C>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>!');
end
else edidataset;
end ;
end ;
finally
frm_op_railway.cxGrid1DBTableView1.EndUpdate ;
end;
finally
frm_op_railway.t_op_railway.EnableControls;
end;
{
frm_op_railway.cxGrid1DBTableView3.BeginUpdate ;
// frm_op_railway.cxGrid1DBTableView3.Controller.SelectedRowCount;
setlength(yjid,frm_op_railway.cxGrid1DBTableView3.Controller.SelectedRowCount);
if frm_op_railway.cxGrid1DBTableView3.Controller.SelectedRowCount<=0 then
begin
edidataset;
end
else
try
frm_op_railway.t_op_railway_fen.DisableControls;
try
for i:=0 to frm_op_railway.cxGrid1DBTableView3.Controller.SelectedRowCount-1 do
begin //<2F><><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
val:=frm_op_railway.cxGrid1DBTableView3.DataController.GetDisplayText(frm_op_railway.cxGrid1DBTableView3.Controller.SelectedRows[I].RecordIndex,0) ;
yjid[i]:=val ;
end; //<2F>õ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>е<EFBFBD>ֵ
for i:=0 to high(yjid) do
begin
if frm_op_railway.t_op_railway_fen.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',yjid[i],[]) then
begin
if frm_op_railway.t_op_railway_fen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then begin
ShowMessage('<27><><EFBFBD>ţ<EFBFBD>'+frm_op_railway.t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+',<2C>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>!');
end else edidataset;
end ;
end ;
finally
frm_op_railway.cxGrid1DBTableView3.EndUpdate ;
end;
finally
frm_op_railway.t_op_railway_fen.EnableControls;
end;
}
end
else
if bsSkinRadioGroup1.itemindex=1 then begin
frm_op_railway.t_op_railway.First;
while not frm_op_railway.t_op_railway.Eof do begin
if frm_op_railway.t_op_railway.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then begin
ShowMessage('<27><><EFBFBD>ţ<EFBFBD>'+frm_op_railway.t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+',<2C>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>!');
end else edidataset;
frm_op_railway.t_op_railway.next;
end;
end;
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>');
end;
procedure Tfrm_op_railway_batchfee.HBLFee;
var
i:integer;
procedure edidataset;
begin
frm_op_railway.t_ch_fee.Insert;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=frm_op_railway.t_op_railway_fen['<27><><EFBFBD><EFBFBD>'];
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=wwDBComboBox31.Text;
if bsSkinCheckRadioBox1.checked then
begin
frm_op_railway.t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
frm_op_railway.t_ch_fee['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=now;
end else if bsSkinCheckRadioBox2.checked then
begin
frm_op_railway.t_ch_fee.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
frm_op_railway.t_ch_fee['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=now;
end
else
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
frm_op_railway.t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo16.DisplayValues[1];
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit5.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToIntDef(Edit1.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit8.Text,0);
frm_op_railway.t_ch_fee['<27>ұ<EFBFBD>']:=RxDBLookupCombo1.DisplayValues[0];
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit3.Text,0);
frm_op_railway.t_ch_fee['<27><>׼']:=wwDBComboBox13.Text;
frm_op_railway.t_ch_fee['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD>뿪Ʊ']:=0;
frm_op_railway.t_ch_fee['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
frm_op_railway.t_ch_fee['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27>Ƿ<EFBFBD><C7B7>渶']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
frm_op_railway.t_ch_fee['Ԥ<><D4A4><EFBFBD>ɱ<EFBFBD>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD>ֳɱ<D6B3>']:=0;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit7.Text,0);
frm_op_railway.t_ch_fee['˰<><CBB0>']:=StrToFloatdef(Edit6.Text,0);
frm_op_railway.t_ch_fee['˰<><CBB0>']:=StrToFloatdef(Edit10.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=StrToFloatdef(Edit2.Text,0);
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit9.Text,0);;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit11.Text,0);;
frm_op_railway.t_ch_fee['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=StrToFloatdef(Edit12.Text,0);;
if wwDBComboBox1.Text<>'' then
frm_op_railway.t_ch_fee['<27><><EFBFBD>㵥λ']:=wwDBComboBox1.Text;
frm_op_railway.t_ch_fee['˳<><CBB3>']:=1;
frm_op_railway.t_ch_fee['<27><><EFBFBD><EFBFBD>']:=0;
if RxDBLookupCombo5.DisplayValue<>'' then
frm_op_railway.t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo5.DisplayValues[1]
else
frm_op_railway.t_ch_fee['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=frm_op_railway.t_op_railway_fen.fieldbyname(wwDBComboBox1.Text).AsString;
frm_op_railway.t_ch_fee['<27><>ע']:=trim(Edit4.Text);
frm_op_railway.t_ch_fee.Post;
end;
begin
if wwDBComboBox31.Text='' then begin
ShowMessage('<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if RxDBLookupCombo16.DisplayValue='' then begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if (wwDBComboBox1.Text='') and (RxDBLookupCombo5.DisplayValue='') then begin
ShowMessage('<27><><EFBFBD>㵥λ<E3B5A5>Ϳͻ<CDBF><CDBB><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>ͬʱΪ<CAB1>գ<EFBFBD>');
exit;
end;
if wwDBComboBox13.Text='' then begin
ShowMessage('<27><><EFBFBD>ñ<EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit7.Text='' then begin
ShowMessage('<27><><EFBFBD>õ<EFBFBD><C3B5>۲<EFBFBD><DBB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit1.Text='' then begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit2.Text='' then begin
ShowMessage('<27><><EFBFBD>ý<EFBFBD><C3BD><EFBFBD><EEB2BB>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if Edit3.Text='' then begin
ShowMessage('<27><><EFBFBD>û<EFBFBD><C3BB>ʲ<EFBFBD><CAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
if RxDBLookupCombo1.DisplayValue='' then begin
ShowMessage('<27><><EFBFBD>ñұ<C3B1><D2B1><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
exit;
end;
frm_op_railway.t_ch_fee.close;
frm_op_railway.t_ch_fee.DataSource:=frm_op_railway.t_op_railway_fen1;
frm_op_railway.t_ch_fee.open;
if bsSkinRadioGroup1.ItemIndex=0 then begin
if frm_op_railway.dxDBGrid2.SelectedCount<1 then
begin
edidataset;
end else
try
frm_op_railway.t_op_railway_fen.DisableControls;
for i:=0 to frm_op_railway.dxDBGrid2.SelectedCount-1 do
begin
frm_op_railway.t_op_railway_fen.GotoBookmark(pointer(frm_op_railway.dxDBGrid2.selectedrows[i]));
if frm_op_railway.t_op_railway_fen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
begin
ShowMessage('<27><><EFBFBD>ţ<EFBFBD>'+frm_op_railway.t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+',<2C>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>!');
end
else
edidataset;
end;
finally
frm_op_railway.t_op_railway_fen.EnableControls;
end;
end else if bsSkinRadioGroup1.itemindex=1 then begin
frm_op_railway.t_op_railway_fen.First;
while not frm_op_railway.t_op_railway_fen.Eof do begin
if frm_op_railway.t_op_railway_fen.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then begin
ShowMessage('<27><><EFBFBD>ţ<EFBFBD>'+frm_op_railway.t_op_railway_fen.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+',<2C>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>!');
end else edidataset;
frm_op_railway.t_op_railway_fen.next;
end;
end;
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>');
close;
end;
procedure Tfrm_op_railway_batchfee.FormShow(Sender: TObject);
begin
RxDBLookupCombo1.Value:='RMB';
end;
procedure Tfrm_op_railway_batchfee.Edit7Change(Sender: TObject);
begin
if (StrToFloatDef(Trim(Edit7.Text),0)<>0) and (StrToFloatDef(Trim(Edit1.Text),0)<>0) then begin
Edit2.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit7.Text),0)*StrToFloatDef(Trim(Edit1.Text),0));
if (StrToFloatDef(Trim(Edit6.Text),0)<>0) then begin
Edit5.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit7.Text),0)*(1+StrToFloatDef(Trim(Edit6.Text),0)/100));
Edit8.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit5.Text),0)*StrToFloatDef(Trim(Edit1.Text),0));
Edit10.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit8.Text),0)-StrToFloatDef(Trim(Edit2.Text),0));
if (StrToFloatDef(Trim(Edit9.Text),0)<>0) then begin
Edit11.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit8.Text),0)/(1+(StrToFloatDef(Trim(Edit9.Text),0)/100))*(StrToFloatDef(Trim(Edit9.Text),0)/100));
Edit12.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit8.Text),0)-StrToFloatDef(Trim(Edit11.Text),0));
end;
end;
end;
end;
procedure Tfrm_op_railway_batchfee.RxDBLookupCombo1Change(
Sender: TObject);
begin
if RxDBLookupCombo1.DisplayValues[0]<>'' then begin
IF frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',RxDBLookupCombo1.DisplayValues[0],[])THEN
begin
if RxDBLookupCombo1.DisplayValues[0]='USD' then begin
Edit3.Text:=FloatToStr(getUsdExRate(DateToStr(Date),'USD'));
end else
Edit3.Text:=FloatToStr(frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat);
end;
end;
end;
procedure Tfrm_op_railway_batchfee.Edit5Change(Sender: TObject);
begin
if (StrToFloatDef(Trim(Edit5.Text),0)<>0) and (StrToFloatDef(Trim(Edit1.Text),0)<>0) then begin
Edit8.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit5.Text),0)*StrToFloatDef(Trim(Edit1.Text),0));
// if (StrToFloatDef(Trim(Edit6.Text),0)<>0) then begin
// end;
Edit7.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit5.Text),0)/(1+(StrToFloatDef(Trim(Edit6.Text),0)/100)));
Edit2.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit7.Text),0)*StrToFloatDef(Trim(Edit1.Text),0));
Edit10.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit8.Text),0)-StrToFloatDef(Trim(Edit2.Text),0));
if (StrToFloatDef(Trim(Edit9.Text),0)<>0) then begin
Edit11.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit8.Text),0)/(1+(StrToFloatDef(Trim(Edit9.Text),0)/100))*(StrToFloatDef(Trim(Edit9.Text),0)/100));
Edit12.Text:=FormatFloat('0.00;-0.00;0.0',StrToFloatDef(Trim(Edit8.Text),0)-StrToFloatDef(Trim(Edit11.Text),0));
end;
end;
end;
procedure Tfrm_op_railway_batchfee.bsSkinButton3Click(Sender: TObject);
begin
if yelx='M' then
MasterFee
else HblFee;
end;
end.