|
|
unit u_op_railway_shencode;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, BusinessSkinForm, bsSkinCtrls, dxExEdtr, dxCntner, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, RxLookup, StdCtrls,
|
|
|
wwdbdatetimepicker, Mask, wwdbedit, Wwdotdot, Wwdbcomb, Menus;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_railwayctn_shencode = class(TForm)
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinNotebook1: TbsSkinNotebook;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
t_op_railway1: TDataSource;
|
|
|
t_op_railway: TADOQuery;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Edit1: TEdit;
|
|
|
Edit2: TEdit;
|
|
|
Label6: TLabel;
|
|
|
Label1: TLabel;
|
|
|
Label9: TLabel;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
Label3: TLabel;
|
|
|
Edit4: TEdit;
|
|
|
Edit3: TEdit;
|
|
|
Label2: TLabel;
|
|
|
Label10: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column63: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column64: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column65: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column66: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column67: TdxDBGridMaskColumn;
|
|
|
op_type: TEdit;
|
|
|
fee_type: TEdit;
|
|
|
Label5: TLabel;
|
|
|
Label7: TLabel;
|
|
|
dxDBGrid2Column21: TdxDBGridColumn;
|
|
|
bsSkinButton45: TbsSkinButton;
|
|
|
bsSkinButton44: TbsSkinButton;
|
|
|
Label4: TLabel;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
Label8: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
t_ch_fee: TADOQuery;
|
|
|
dxDBGrid2Column22: TdxDBGridColumn;
|
|
|
dxDBGrid2Column23: TdxDBGridColumn;
|
|
|
dxDBGrid2Column24: TdxDBGridColumn;
|
|
|
dxDBGrid2Column25: TdxDBGridColumn;
|
|
|
dxDBGrid2Column26: TdxDBGridColumn;
|
|
|
dxDBGrid2Column27: TdxDBGridColumn;
|
|
|
dxDBGrid2Column28: TdxDBGridColumn;
|
|
|
dxDBGrid2Column29: TdxDBGridColumn;
|
|
|
dxDBGrid2Column30: TdxDBGridColumn;
|
|
|
dxDBGrid2Column31: TdxDBGridColumn;
|
|
|
dxDBGrid2Column32: TdxDBGridColumn;
|
|
|
dxDBGrid2Column33: TdxDBGridColumn;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
dxDBGrid2Column34: TdxDBGridColumn;
|
|
|
dxDBGrid2Column35: TdxDBGridColumn;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
RxDBLookupCombo18: TRxDBLookupCombo;
|
|
|
Edit5: TEdit;
|
|
|
dxDBGrid2Column36: TdxDBGridColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N16: TMenuItem;
|
|
|
p_op_gain: TADOQuery;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton44Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton45Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure dxDBGrid2DblClick(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
private
|
|
|
function fee_get_client(str:string):string;
|
|
|
function fee_get_num(Str: String): Double;
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_railwayctn_shencode: Tfrm_op_railwayctn_shencode;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_data_share,
|
|
|
u_op_shendate, u_op_givedate, u_op_railway_piliangfee, u_op_acceptcode;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
CLOSE;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_op_railwayctn_shencode.fee_get_client(str:string):string;
|
|
|
begin
|
|
|
end;
|
|
|
function Tfrm_op_railwayctn_shencode.fee_get_num(Str: String): Double;
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton44Click(Sender: TObject);
|
|
|
var
|
|
|
str:string;
|
|
|
begin
|
|
|
if Edit1.text<>''then
|
|
|
str:=' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
if Edit4.text<>''then
|
|
|
begin
|
|
|
str:=str+' and ( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_railway where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''))';
|
|
|
end;
|
|
|
if Edit2.text<>''then
|
|
|
begin
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit3.text<>''then
|
|
|
begin
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit3.text+'%'+'''';
|
|
|
end;
|
|
|
|
|
|
if Edit5.text<>''then
|
|
|
begin
|
|
|
str:=str+' and <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD> like '+''''+'%'+Edit5.text+'%'+'''';
|
|
|
end;
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo2.DisplayValue<>''then
|
|
|
begin
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
|
|
|
if RxDBLookupCombo18.DisplayValue<>''then
|
|
|
begin
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo18.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
|
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
begin
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
end;
|
|
|
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
begin
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
end;
|
|
|
|
|
|
if wwDBComboBox1.text<>''then
|
|
|
begin
|
|
|
if wwDBComboBox1.text='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>״̬='''' '
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>״̬= '+''''+wwDBComboBox1.text+'''';
|
|
|
end;
|
|
|
str:=str+' and '+open_data('0006','t_op_railway.¼<><C2BC><EFBFBD><EFBFBD>','t_op_railway.<2E><><EFBFBD><EFBFBD>Ա','t_op_railway.<2E>ͷ<EFBFBD>Ա','t_op_railway.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no');
|
|
|
|
|
|
str:='select * from t_op_railway where װ<>˷<EFBFBD>ʽ<>''<27><>·<EFBFBD><C2B7>Ʊ'' '+str+' order by <20><><EFBFBD><EFBFBD>';
|
|
|
t_op_railway.close;
|
|
|
t_op_railway.sql.clear;
|
|
|
t_op_railway.sql.add(str);
|
|
|
t_op_railway.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
query_railway(5,'0006');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton45Click(Sender: TObject);
|
|
|
begin
|
|
|
Edit1.text:='';
|
|
|
Edit2.text:='';
|
|
|
Edit3.text:='';
|
|
|
Edit4.text:='';
|
|
|
Edit5.text:='';
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
wwDBDateTimePicker1.Text:='';
|
|
|
wwDBDateTimePicker2.Text:='';
|
|
|
wwDBComboBox1.text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
frm_op_railwayctn_shencode.Hide;
|
|
|
frm_op_railwayctn_shencode.ManualFloat(frm_op_railwayctn_shencode.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_railwayctn_shencode');
|
|
|
action:=cafree;
|
|
|
frm_op_railwayctn_shencode:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_op_railway_piliangfee:=tfrm_op_railway_piliangfee.Create (self);
|
|
|
frm_op_railway_piliangfee.ShowModal;
|
|
|
finally
|
|
|
frm_op_railway_piliangfee.Free;
|
|
|
frm_op_railway_piliangfee:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
frm_op_acceptcode:=tfrm_op_acceptcode.Create (self);
|
|
|
|
|
|
frm_op_acceptcode.ShowModal;
|
|
|
finally
|
|
|
frm_op_acceptcode.Free;
|
|
|
frm_op_acceptcode:=nil;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_op_shendate:=tfrm_op_shendate.Create (self);
|
|
|
|
|
|
frm_op_shendate.ShowModal;
|
|
|
finally
|
|
|
frm_op_shendate.Free;
|
|
|
frm_op_shendate:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_op_givedate:=tfrm_op_givedate.Create (self);
|
|
|
|
|
|
frm_op_givedate.ShowModal;
|
|
|
finally
|
|
|
frm_op_givedate.Free;
|
|
|
frm_op_givedate:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinButton10.Enabled:=if_open('386');
|
|
|
bsSkinButton3.Enabled:=if_open('387');
|
|
|
bsSkinButton1.Enabled:=if_open('388');
|
|
|
bsSkinButton4.Enabled:=if_open('389');
|
|
|
bsSkinButton7.Enabled:=if_open('404');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.bsSkinButton7Click(Sender: TObject);
|
|
|
var
|
|
|
i:Integer;
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
t_op_railway.DisableControls;
|
|
|
|
|
|
for i:=0 to dxDBGrid2.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_railway.GotoBookmark(pointer(frm_op_railwayctn_shencode.dxDBGrid2.selectedrows[i]));
|
|
|
if t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>ṩ<EFBFBD><E1B9A9><EFBFBD><EFBFBD>' then begin
|
|
|
t_op_railway.edit;
|
|
|
t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring:='<27><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD>';
|
|
|
t_op_railway.post;
|
|
|
end else if t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD>' then begin
|
|
|
if MessageDlg('<27><>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD> <20><><EFBFBD>Ŵ<EFBFBD><C5B4>룬<EFBFBD><EBA3AC>Ҫȡ<D2AA><C8A1><EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD><EFBFBD><EFBFBD>?',mtWarning,mbYesNoCancel,0)=mryes then begin
|
|
|
t_op_railway.edit;
|
|
|
t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring:='<27>ṩ<EFBFBD><E1B9A9><EFBFBD><EFBFBD>';
|
|
|
t_op_railway.post;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_railway.EnableControls;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.dxDBGrid2DblClick(Sender: TObject);
|
|
|
begin
|
|
|
fee_view(t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railwayctn_shencode.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid2);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|