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.

1124 lines
34 KiB
Plaintext

11 months ago
unit u_op_airi;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, XPMenu, Menus, DB, ADODB, dxExEdtr,
dxDBGrid, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl, dxCntner, RxLookup,
StdCtrls, Mask, DBCtrls, ComCtrls, bsSkinTabs, u_op_sate, u_fee,
wwdbdatetimepicker, wwdbedit, Wwdotdot, Wwdbcomb, u_op_letter_free,
wwdblook;
type
Tfrm_op_airi = class(TForm)
Panel2: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Notebook1: TNotebook;
t_op_airi: TADOQuery;
t_op_airi1: TDataSource;
PopupMenu1: TPopupMenu;
N31: TMenuItem;
t_ch_fee: TADOQuery;
XPMenu1: TXPMenu;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column5: TdxDBGridDateColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridDateColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridColumn;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
Label2: TLabel;
Label17: TLabel;
Label3: TLabel;
Label37: TLabel;
Label5: TLabel;
Label38: TLabel;
Label4: TLabel;
Label36: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
RxDBLookupCombo13: TRxDBLookupCombo;
DBEdit3: TDBEdit;
DBEdit8: TDBEdit;
DBEdit4: TDBEdit;
DBEdit9: TDBEdit;
RxDBLookupCombo1: TRxDBLookupCombo;
DBEdit7: TDBEdit;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
fra_fee1: Tfra_fee;
fra_op_state1: Tfra_op_state;
Label85: TLabel;
Label86: TLabel;
Label9: TLabel;
RxDBLookupCombo6: TRxDBLookupCombo;
Label10: TLabel;
RxDBLookupCombo7: TRxDBLookupCombo;
Label96: TLabel;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
Label97: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label25: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label6: TLabel;
Label7: TLabel;
DBEdit5: TDBEdit;
Label8: TLabel;
DBEdit6: TDBEdit;
Label11: TLabel;
DBEdit10: TDBEdit;
Label12: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label164: TLabel;
RxDBLookupCombo11: TRxDBLookupCombo;
Label23: TLabel;
RxDBLookupCombo8: TRxDBLookupCombo;
DBMemo17: TDBMemo;
Label109: TLabel;
Label110: TLabel;
DBMemo18: TDBMemo;
Label111: TLabel;
DBMemo19: TDBMemo;
dxDBGrid1Column27: TdxDBGridColumn;
Label13: TLabel;
wwDBComboBox3: TwwDBComboBox;
Label65: TLabel;
DBEdit18: TDBEdit;
dxDBGrid1Column28: TdxDBGridColumn;
bsSkinButton13: TbsSkinButton;
Label19: TLabel;
RxDBLookupCombo12: TRxDBLookupCombo;
Label41: TLabel;
Label27: TLabel;
RxDBLookupCombo29: TRxDBLookupCombo;
RxDBLookupCombo30: TRxDBLookupCombo;
Label42: TLabel;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
RxDBLookupCombo31: TRxDBLookupCombo;
bsSkinTabSheet4: TbsSkinTabSheet;
fra_op_letter_free1: Tfra_op_letter_free;
wwDBLookupCombo52: TwwDBLookupCombo;
wwDBLookupCombo1: TwwDBLookupCombo;
N8: TMenuItem;
N9: TMenuItem;
N19: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
N24: TMenuItem;
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton9Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure t_op_airiBeforeEdit(DataSet: TDataSet);
procedure t_op_airiBeforePost(DataSet: TDataSet);
procedure bsSkinButton10Click(Sender: TObject);
procedure dxDBGrid1Column3CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid1Column2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo13KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo6KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit30KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit31KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo11KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo7KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit2Change(Sender: TObject);
procedure DBEdit3Change(Sender: TObject);
procedure RxDBLookupCombo12KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo29KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo8KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo30KeyPress(Sender: TObject; var Key: Char);
procedure wwDBComboBox3KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo12Change(Sender: TObject);
procedure RxDBLookupCombo8Change(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure bsSkinButton13Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure N37Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure RxDBLookupCombo31KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo52KeyPress(Sender: TObject; var Key: Char);
procedure N9Click(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure t_op_airiBeforeDelete(DataSet: TDataSet);
procedure t_op_airiPostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure t_op_airiBeforeCancel(DataSet: TDataSet);
procedure N21Click(Sender: TObject);
procedure N24Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_airi: Tfrm_op_airi;
implementation
uses u_main, my_sys_function, u_op_airi_add, u_data_share, u_sys_progress,
u_ch_piliang_airi;
{$R *.dfm}
procedure Tfrm_op_airi.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_airi);
end;
procedure Tfrm_op_airi.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_airi);
end;
procedure Tfrm_op_airi.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_airi);
end;
procedure Tfrm_op_airi.bsSkinButton4Click(Sender: TObject);
begin
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee.open;
if not t_ch_fee.IsEmpty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
table_delete(t_op_airi);
end;
procedure Tfrm_op_airi.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_airi);
end;
procedure Tfrm_op_airi.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_airi.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
savewwgrid(fra_fee1.wwDBGrid1);
savewwgrid(fra_fee1.wwDBGrid2);
frm_op_airi.Hide;
frm_op_airi.ManualFloat(frm_op_airi.BoundsRect );
frm_main.freeTabs('frm_op_airi');
action:=cafree;
frm_op_airi:=nil;
end;
procedure Tfrm_op_airi.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˽<EFBFBD><CBBD>ڵ<EFBFBD>֤',2,t_op_airi1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_airi.FormShow(Sender: TObject);
begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=20;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select top 50 * from t_op_airi where '
+'(¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''
+' or <20><><EFBFBD><EFBFBD>Ա='+''''+employee+''''
+' or <20>ͷ<EFBFBD>Ա='+''''+employee+''''+')'
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_letter_free1.op_type.Text:='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>';
fra_op_letter_free1.t_op_letter.DataSource:=t_op_airi1;
fra_op_letter_free1.t_op_letter.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_letter_free1.t_op_letter_free_detail.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadreggrid(dxdbgrid1,false,caption);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadwwgrid(fra_fee1.wwDBGrid1);
loadwwgrid(fra_fee1.wwDBGrid2);
if if_open('222') or if_open('223') then
begin
fra_fee1.edit_type.text:='4';
fra_fee1.edit_data.text:='0004';
fra_fee1.edit_report.text:='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>';
fra_fee1.t_ch_accept.DataSource:=t_op_airi1;
fra_fee1.DBEdit50.DataSource:=t_op_airi1;
if if_open('222') then
begin
fra_fee1.t_ch_accept.DataSource:=t_op_airi1;
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('209')=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 (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><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
fra_fee1.Panel3.visible:=false;
if if_open('223') then
begin
fra_fee1.t_ch_pay.DataSource:=t_op_airi1;
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('209')=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 (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><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.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.Panel8.Height:=20;
fra_fee1.t_op_gain.DataSource:=t_op_airi1;
fra_fee1.t_op_gain.open;
fra_fee1.Panel9.Visible:=false;
end
else
begin
fra_fee1.Panel8.Visible:=false;
end;
end
else
begin
fra_fee1.Visible:=false;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_state1.edit_state.text:='4';
fra_op_state1.t_op_state.DataSource:=t_op_airi1;
fra_op_state1.t_op_state.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_hangkong.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_baoguan.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_weituo.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_daili.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_shiper.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_shouhuo.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_crm_client_tongzhi.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_source.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_sys_employee.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_code.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_fee.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_currency.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_data_share.t_code_port_air.requery;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_airi.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
Notebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end
else
begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_airi.post;
end;
if answer=mrNo then
begin
t_op_airi.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_op_airi.bsSkinButton8Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton8.ClientToScreen(Point(0,bsSkinButton8.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_airi.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/11);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton10.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton13.Left:=Panel2.Width-bsSkinButton13.Width-20;
end;
procedure Tfrm_op_airi.bsSkinButton1Click(Sender: TObject);
begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
try
frm_op_airi_add:=tfrm_op_airi_add.Create(self);
frm_op_airi_add.data1.Enabled:=false;
frm_op_airi_add.data1.DataSet:=t_op_airi;
frm_op_airi_add.data1.Enabled:=true;
frm_op_airi_add.ShowModal;
finally
frm_op_airi_add.Free;
end;
end;
procedure Tfrm_op_airi.t_op_airiBeforeEdit(DataSet: TDataSet);
begin
op_befor_post(t_op_airi,'0004');
end;
procedure Tfrm_op_airi.t_op_airiBeforePost(DataSet: TDataSet);
begin
table_before_post(t_op_airi,'ί<>е<EFBFBD>λ');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airi,'<27>ͷ<EFBFBD>Ա');
table_before_post(t_op_airi,'<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airi,'ʼ<><CABC><EFBFBD><EFBFBD>');
table_before_post(t_op_airi,'Ŀ<>ĸ<EFBFBD>');
table_before_post(t_op_airi,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
table_before_post(t_op_airi,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
op_empty('t_op_airi',t_op_airi);
if t_op_airi.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_airi.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_airi.FieldByName('ί<>е<EFBFBD>λ').asstring,[])then
begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>'then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>ί<EFBFBD>е<EFBFBD>λ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>лָ<D0BB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
if t_op_airi.State=dsinsert then
begin
if t_op_airi.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_airi['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,'AI');
t_op_airi['<27><><EFBFBD><EFBFBD>']:=get_id;
end;
t_op_airi['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_airi['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
if strtobool(get_parameters_value(43,'false')) then
begin
if trim(t_op_airi.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(44,'false')) then
begin
if trim(t_op_airi.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if trim(t_op_airi.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='' then
begin
t_op_airi['ί<>б<EFBFBD>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airi['ί<>б<EFBFBD>׼']:=t_op_airi['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_airi['ί<>б<EFBFBD>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_airi.bsSkinButton10Click(Sender: TObject);
begin
query_airi(1,'0004');
end;
procedure Tfrm_op_airi.dxDBGrid1Column3CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid1Column3.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_airi.dxDBGrid1Column2CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color('<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>',ANode.Strings[dxDBGrid1Column2.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_airi.DBEdit1KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit2);
end;
procedure Tfrm_op_airi.DBEdit2KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit3);
end;
procedure Tfrm_op_airi.DBEdit3KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_op_airi.DBEdit4KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_op_airi.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo31);
end;
procedure Tfrm_op_airi.RxDBLookupCombo13KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_op_airi.DBEdit8KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_op_airi.DBEdit9KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit7);
end;
procedure Tfrm_op_airi.DBEdit7KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
end;
procedure Tfrm_op_airi.wwDBDateTimePicker2KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
end;
procedure Tfrm_op_airi.wwDBDateTimePicker1KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit6);
end;
procedure Tfrm_op_airi.DBEdit6KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
end;
procedure Tfrm_op_airi.DBEdit5KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_op_airi.DBEdit10KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_op_airi.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo6);
end;
procedure Tfrm_op_airi.RxDBLookupCombo6KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit30);
end;
procedure Tfrm_op_airi.DBEdit30KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit31);
end;
procedure Tfrm_op_airi.DBEdit31KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo11);
end;
procedure Tfrm_op_airi.RxDBLookupCombo11KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo7);
end;
procedure Tfrm_op_airi.RxDBLookupCombo7KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo12);
end;
procedure Tfrm_op_airi.DBEdit18KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_op_airi.DBEdit2Change(Sender: TObject);
begin
DBEdit2.Color:=dxgrid_color('<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>',DBEdit2.text);
end;
procedure Tfrm_op_airi.DBEdit3Change(Sender: TObject);
begin
DBEdit3.Color:=dxgrid_color_fee(DBEdit3.text);
end;
procedure Tfrm_op_airi.RxDBLookupCombo12KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo17);
end;
procedure Tfrm_op_airi.RxDBLookupCombo29KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo8);
end;
procedure Tfrm_op_airi.RxDBLookupCombo8KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo30);
end;
procedure Tfrm_op_airi.RxDBLookupCombo30KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox3);
end;
procedure Tfrm_op_airi.wwDBComboBox3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo19);
end;
procedure Tfrm_op_airi.RxDBLookupCombo12Change(Sender: TObject);
begin
if (t_op_airi.state=dsinsert)or(t_op_airi.state=dsedit)then
begin
if RxDBLookupCombo12.DisplayValue='' then
exit;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo12.DisplayValue,[]) then
t_op_airi['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_airi.RxDBLookupCombo8Change(Sender: TObject);
begin
if (t_op_airi.state=dsinsert)or(t_op_airi.state=dsedit)then
begin
if RxDBLookupCombo8.DisplayValue='' then
exit;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo8.DisplayValue,[]) then
t_op_airi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_airi.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_airi.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_airi.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,59);
end;
procedure Tfrm_op_airi.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_airi.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_airi,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_airi.bsSkinButton13Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton13.ClientToScreen(Point(0,bsSkinButton13.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_airi.N17Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬='
+''''+'¼<><C2BC>״̬'+''''+') '
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
procedure Tfrm_op_airi.N34Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬ in ('
+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>ύ'+''''+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''+')) '
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
procedure Tfrm_op_airi.N36Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬ in ('
+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'+''''+')) '
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
procedure Tfrm_op_airi.N37Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_op_state where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><>1) '
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
procedure Tfrm_op_airi.N7Click(Sender: TObject);
var
str:widestring;
begin
if t_op_airi.IsEmpty then
exit;
if if_open('222') and if_open('223') then
begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
try
frm_ch_piliang_airi:=tfrm_ch_piliang_airi.Create (self);
t_op_airi.DisableControls;
t_op_airi.first;
while not t_op_airi.eof do
begin
if str='' then
str:=''''+t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''''
else
str:=str+','+''''+t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_airi.next;
end;
str:='('+str+')';
str:='select * from t_op_airi where <20><><EFBFBD><EFBFBD> in '+str+default_sort(56,'t_op_airi','','desc');
frm_ch_piliang_airi.t_op_airi.Parameters.ParamByName('SQLStr').value:=str;
frm_ch_piliang_airi.t_op_airi.open;
frm_ch_piliang_airi.ShowModal;
finally
t_op_airi.EnableControls;
frm_ch_piliang_airi.Free;
frm_ch_piliang_airi:=nil;
end;
end
else
begin
showmessage('<27><><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_op_airi.N5Click(Sender: TObject);
var
str:widestring;
i:integer;
begin
if t_op_airi.IsEmpty then
exit;
if dxDBGrid1.SelectedCount<1 then
begin
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD><D2AA>ӡ<EFBFBD><D3A1>ҵ<EFBFBD><D2B5><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if if_open('222') and if_open('223') then
begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
try
frm_ch_piliang_airi:=tfrm_ch_piliang_airi.Create (self);
t_op_airi.DisableControls;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_airi.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if str='' then
str:=''''+t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''''
else
str:=str+','+''''+t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
end;
str:='('+str+')';
str:='select * from t_op_airi where <20><><EFBFBD><EFBFBD> in '+str+default_sort(56,'t_op_airi','','desc');
frm_ch_piliang_airi.t_op_airi.Parameters.ParamByName('SQLStr').value:=str;
frm_ch_piliang_airi.t_op_airi.open;
frm_ch_piliang_airi.ShowModal;
finally
t_op_airi.EnableControls;
frm_ch_piliang_airi.Free;
frm_ch_piliang_airi:=nil;
end;
end
else
begin
showmessage('<27><><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_op_airi.N3Click(Sender: TObject);
var
str:widestring;
begin
if t_op_airi.IsEmpty then
exit;
if if_open('222') and if_open('223') then
begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
try
frm_ch_piliang_airi:=tfrm_ch_piliang_airi.Create (self);
str:='select * from t_op_airi where <20><><EFBFBD><EFBFBD>='
+''''+t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
frm_ch_piliang_airi.t_op_airi.Parameters.ParamByName('SQLStr').value:=str;
frm_ch_piliang_airi.t_op_airi.open;
frm_ch_piliang_airi.ShowModal;
finally
frm_ch_piliang_airi.Free;
frm_ch_piliang_airi:=nil;
end;
end
else
begin
showmessage('<27><><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_op_airi.RxDBLookupCombo31KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo13);
end;
procedure Tfrm_op_airi.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit5);
end;
procedure Tfrm_op_airi.wwDBLookupCombo52KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
end;
procedure Tfrm_op_airi.N9Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+')'
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
procedure Tfrm_op_airi.N20Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+')'
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
procedure Tfrm_op_airi.t_op_airiBeforeDelete(DataSet: TDataSet);
begin
op_befor_post(t_op_airi,'0004');
delete_add(4,t_op_airi);
end;
procedure Tfrm_op_airi.t_op_airiPostError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
var
str:widestring;
begin
if pos('SOME VALUES MAY HAVE BEEN CHANGED',UpperCase(E.Message))<>0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>޸ģ<DEB8><C4A3><EFBFBD>ǰ<EFBFBD>޸IJ<DEB8><C4B2>ܱ<EFBFBD><DCB1><EFBFBD>'+#13#10+'<27><>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>');
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_airi where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_airi(str,1);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_airi where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_airi(str,2);
abort;
end;
if pos('ί<>б<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_airi where ί<>б<EFBFBD>׼='+''''+t_op_airi['ί<>б<EFBFBD>׼']+'''';
double_airi(str,3);
abort;
end;
end;
procedure Tfrm_op_airi.t_op_airiBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_airi);
end;
procedure Tfrm_op_airi.N21Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee )'
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
procedure Tfrm_op_airi.N24Click(Sender: TObject);
begin
t_op_airi.Close;
t_op_airi.SQL.clear;
t_op_airi.SQL.Add('select * from t_op_airi where '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+')'
+default_sort(56,'t_op_airi','','desc'));
t_op_airi.open;
end;
end.