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.

1386 lines
42 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_aire;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms, RxLookup, StdCtrls, Mask, DBCtrls,
ComCtrls, bsSkinTabs, wwdblook, wwdbedit, Wwdotdot, Wwdbcomb,
wwdbdatetimepicker, u_fee, u_op_sate, Menus, XPMenu, u_op_letter_free;
type
Tfrm_op_aire = 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_aire: TADOQuery;
t_op_aire1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridMaskColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column27: TdxDBGridMaskColumn;
dxDBGrid1Column28: TdxDBGridMaskColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column30: TdxDBGridDateColumn;
dxDBGrid1Column31: TdxDBGridColumn;
dxDBGrid1Column19: TdxDBGridColumn;
dxDBGrid1Column23: TdxDBGridColumn;
dxDBGrid1Column22: TdxDBGridColumn;
dxDBGrid1Column24: 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;
Label122: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
bsSkinButton26: TbsSkinButton;
DBMemo33: TDBMemo;
Label121: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
bsSkinButton25: TbsSkinButton;
DBMemo34: TDBMemo;
DBMemo35: TDBMemo;
bsSkinButton24: TbsSkinButton;
RxDBLookupCombo4: TRxDBLookupCombo;
Label123: TLabel;
Label6: TLabel;
bsSkinButton23: TbsSkinButton;
DBMemo1: TDBMemo;
RxDBLookupCombo5: TRxDBLookupCombo;
Label25: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label26: TLabel;
DBEdit13: TDBEdit;
wwDBComboBox7: TwwDBComboBox;
Label29: TLabel;
Label30: TLabel;
wwDBComboBox8: TwwDBComboBox;
Label31: TLabel;
wwDBComboBox9: TwwDBComboBox;
DBEdit15: TDBEdit;
Label33: TLabel;
DBEdit14: TDBEdit;
Label32: TLabel;
Label7: TLabel;
RxDBLookupCombo15: TRxDBLookupCombo;
Label9: TLabel;
RxDBLookupCombo6: TRxDBLookupCombo;
Label10: TLabel;
RxDBLookupCombo7: TRxDBLookupCombo;
Label85: TLabel;
Label86: TLabel;
bsSkinGroupBox1: TbsSkinGroupBox;
Label87: TLabel;
Label88: TLabel;
DBEdit22: TDBEdit;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label8: TLabel;
bsSkinGroupBox2: TbsSkinGroupBox;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
DBEdit6: TDBEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsSkinGroupBox3: TbsSkinGroupBox;
Label14: TLabel;
Label15: TLabel;
Label18: TLabel;
DBEdit11: TDBEdit;
wwDBDateTimePicker4: TwwDBDateTimePicker;
bsSkinGroupBox4: TbsSkinGroupBox;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
DBEdit16: TDBEdit;
wwDBDateTimePicker5: TwwDBDateTimePicker;
Label23: TLabel;
RxDBLookupCombo8: TRxDBLookupCombo;
Label164: TLabel;
RxDBLookupCombo11: TRxDBLookupCombo;
Label24: TLabel;
DBEdit17: TDBEdit;
Label96: TLabel;
DBEdit30: TDBEdit;
Label97: TLabel;
DBEdit31: TDBEdit;
Label98: TLabel;
DBEdit56: TDBEdit;
Label99: TLabel;
DBEdit57: TDBEdit;
Label100: TLabel;
DBEdit63: TDBEdit;
Label101: TLabel;
DBEdit70: TDBEdit;
Label102: TLabel;
DBEdit71: TDBEdit;
Label103: TLabel;
DBEdit72: TDBEdit;
Label104: TLabel;
DBEdit73: TDBEdit;
Label105: TLabel;
DBEdit74: TDBEdit;
Label106: TLabel;
DBEdit75: TDBEdit;
Label107: TLabel;
DBEdit76: TDBEdit;
Label108: TLabel;
DBEdit77: TDBEdit;
Label109: TLabel;
DBMemo17: TDBMemo;
Label110: TLabel;
DBMemo18: TDBMemo;
Label111: TLabel;
DBMemo19: TDBMemo;
fra_fee1: Tfra_fee;
t_ch_fee: TADOQuery;
PopupMenu1: TPopupMenu;
N31: TMenuItem;
XPMenu1: TXPMenu;
fra_op_state1: Tfra_op_state;
dxDBGrid1Column32: TdxDBGridColumn;
Label16: TLabel;
wwDBComboBox3: TwwDBComboBox;
Label65: TLabel;
DBEdit18: TDBEdit;
dxDBGrid1Column33: 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;
wwDBLookupCombo2: TwwDBLookupCombo;
wwDBLookupCombo3: TwwDBLookupCombo;
wwDBLookupCombo4: TwwDBLookupCombo;
wwDBLookupCombo5: 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_aireBeforeDelete(DataSet: TDataSet);
procedure t_op_aireBeforePost(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 RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo4KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo5KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit22KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit16KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker5KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit11KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker4KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit13KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo15KeyPress(Sender: TObject; var Key: Char);
procedure wwDBComboBox7KeyPress(Sender: TObject; var Key: Char);
procedure wwDBComboBox8KeyPress(Sender: TObject; var Key: Char);
procedure wwDBComboBox9KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo11KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit15KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo6KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo7KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit72KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit73KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit74KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit75KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit76KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit77KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit30KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit31KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit56KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit57KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit63KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit70KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit71KeyPress(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 RxDBLookupCombo30KeyPress(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 N3Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure RxDBLookupCombo31KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo52KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo4KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo5KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker3KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
procedure N9Click(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure t_op_aireBeforeEdit(DataSet: TDataSet);
procedure t_op_airePostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure t_op_aireBeforeCancel(DataSet: TDataSet);
procedure N21Click(Sender: TObject);
procedure N24Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_aire: Tfrm_op_aire;
implementation
uses u_main, my_sys_function, u_op_aire_add, u_data_share, u_sys_progress,
u_ch_piliang_aire;
{$R *.dfm}
procedure Tfrm_op_aire.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_aire);
end;
procedure Tfrm_op_aire.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_aire);
end;
procedure Tfrm_op_aire.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_aire);
end;
procedure Tfrm_op_aire.bsSkinButton4Click(Sender: TObject);
begin
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_aire.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_aire);
end;
procedure Tfrm_op_aire.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_aire);
end;
procedure Tfrm_op_aire.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_aire.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
savewwgrid(fra_fee1.wwDBGrid1);
savewwgrid(fra_fee1.wwDBGrid2);
frm_op_aire.Hide;
frm_op_aire.ManualFloat(frm_op_aire.BoundsRect );
frm_main.freeTabs('frm_op_aire');
action:=cafree;
frm_op_aire:=nil;
end;
procedure Tfrm_op_aire.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤',2,t_op_aire1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_aire.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_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select top 50 * from t_op_aire where '
+'(¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''
+' or <20><><EFBFBD><EFBFBD>Ա='+''''+employee+''''
+' or <20>ͷ<EFBFBD>Ա='+''''+employee+''''+')'
+default_sort(55,'t_op_aire','','desc'));
t_op_aire.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_letter_free1.op_type.Text:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
fra_op_letter_free1.t_op_letter.DataSource:=t_op_aire1;
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('220') or if_open('221') then
begin
fra_fee1.edit_type.text:='3';
fra_fee1.edit_data.text:='0003';
fra_fee1.edit_report.text:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
fra_fee1.t_ch_accept.DataSource:=t_op_aire1;
fra_fee1.DBEdit50.DataSource:=t_op_aire1;
if if_open('220') then
begin
fra_fee1.t_ch_accept.DataSource:=t_op_aire1;
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('208')=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('221') then
begin
fra_fee1.t_ch_pay.DataSource:=t_op_aire1;
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('208')=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_aire1;
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:='3';
fra_op_state1.t_op_state.DataSource:=t_op_aire1;
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_aire.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_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_aire.post;
end;
if answer=mrNo then
begin
t_op_aire.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_op_aire.bsSkinButton8Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton8.ClientToScreen(Point(0,bsSkinButton8.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_aire.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_aire.bsSkinButton1Click(Sender: TObject);
begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
try
frm_op_aire_add:=tfrm_op_aire_add.Create(self);
frm_op_aire_add.data1.Enabled:=false;
frm_op_aire_add.data1.DataSet:=t_op_aire;
frm_op_aire_add.data1.Enabled:=true;
frm_op_aire_add.ShowModal;
finally
frm_op_aire_add.Free;
end;
end;
procedure Tfrm_op_aire.t_op_aireBeforeDelete(DataSet: TDataSet);
begin
op_befor_post(t_op_aire,'0003');
delete_add(3,t_op_aire);
end;
procedure Tfrm_op_aire.t_op_aireBeforePost(DataSet: TDataSet);
begin
table_before_post(t_op_aire,'ί<>е<EFBFBD>λ');
table_before_post(t_op_aire,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_aire,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_aire,'<27>ͷ<EFBFBD>Ա');
table_before_post(t_op_aire,'һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_aire,'һ<>̺<EFBFBD><CCBA><EFBFBD>');
table_before_post(t_op_aire,'ʼ<><CABC><EFBFBD><EFBFBD>');
table_before_post(t_op_aire,'Ŀ<>ĸ<EFBFBD>');
table_before_post(t_op_aire,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
table_before_post(t_op_aire,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
table_before_post(t_op_aire,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
op_empty('t_op_aire',t_op_aire);
if t_op_aire.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_aire.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_aire.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_aire.State=dsinsert then
begin
if t_op_aire.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_aire['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,'AE');
t_op_aire['<27><><EFBFBD><EFBFBD>']:=get_id;
end;
t_op_aire['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_aire['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
t_op_aire['Ӣ<>ĺ<EFBFBD><C4BA><EFBFBD>']:=date_eng(t_op_aire.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
if strtobool(get_parameters_value(40,'false')) then
begin
if trim(t_op_aire.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(41,'false')) then
begin
if trim(t_op_aire.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(42,'false')) then
begin
if trim(t_op_aire.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='' then
begin
t_op_aire['ί<>б<EFBFBD>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_aire['ί<>б<EFBFBD>׼']:=t_op_aire['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_aire['ί<>б<EFBFBD>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_aire.bsSkinButton10Click(Sender: TObject);
begin
query_aire(1,'0003');
end;
procedure Tfrm_op_aire.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_aire.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><CBB3><EFBFBD>',ANode.Strings[dxDBGrid1Column2.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_aire.DBEdit1KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit2);
end;
procedure Tfrm_op_aire.DBEdit2KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit3);
end;
procedure Tfrm_op_aire.DBEdit3KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_op_aire.DBEdit4KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit18);
end;
procedure Tfrm_op_aire.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo31);
end;
procedure Tfrm_op_aire.RxDBLookupCombo13KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_op_aire.DBEdit8KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_op_aire.DBEdit9KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit7);
end;
procedure Tfrm_op_aire.DBEdit7KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_op_aire.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo33);
end;
procedure Tfrm_op_aire.RxDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo34);
end;
procedure Tfrm_op_aire.RxDBLookupCombo4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo35);
end;
procedure Tfrm_op_aire.RxDBLookupCombo5KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo1);
end;
procedure Tfrm_op_aire.DBEdit22KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker3);
end;
procedure Tfrm_op_aire.DBEdit6KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
end;
procedure Tfrm_op_aire.DBEdit16KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker5);
end;
procedure Tfrm_op_aire.wwDBDateTimePicker5KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo4);
end;
procedure Tfrm_op_aire.DBEdit11KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker4);
end;
procedure Tfrm_op_aire.wwDBDateTimePicker4KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo5);
end;
procedure Tfrm_op_aire.DBEdit13KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
end;
procedure Tfrm_op_aire.wwDBDateTimePicker2KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo15);
end;
procedure Tfrm_op_aire.RxDBLookupCombo15KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox7);
end;
procedure Tfrm_op_aire.wwDBComboBox7KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox8);
end;
procedure Tfrm_op_aire.wwDBComboBox8KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox9);
end;
procedure Tfrm_op_aire.wwDBComboBox9KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo12);
end;
procedure Tfrm_op_aire.RxDBLookupCombo11KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo8);
end;
procedure Tfrm_op_aire.RxDBLookupCombo8KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo30);
end;
procedure Tfrm_op_aire.DBEdit14KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit15);
end;
procedure Tfrm_op_aire.DBEdit15KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo11);
end;
procedure Tfrm_op_aire.RxDBLookupCombo6KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo17);
end;
procedure Tfrm_op_aire.RxDBLookupCombo7KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBComboBox(Key,wwDBComboBox3);
end;
procedure Tfrm_op_aire.DBEdit72KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit73);
end;
procedure Tfrm_op_aire.DBEdit73KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit74);
end;
procedure Tfrm_op_aire.DBEdit74KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit75);
end;
procedure Tfrm_op_aire.DBEdit75KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit76);
end;
procedure Tfrm_op_aire.DBEdit76KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit77);
end;
procedure Tfrm_op_aire.DBEdit77KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit17);
end;
procedure Tfrm_op_aire.DBEdit17KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit30);
end;
procedure Tfrm_op_aire.DBEdit30KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit31);
end;
procedure Tfrm_op_aire.DBEdit31KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit56);
end;
procedure Tfrm_op_aire.DBEdit56KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit57);
end;
procedure Tfrm_op_aire.DBEdit57KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit63);
end;
procedure Tfrm_op_aire.DBEdit63KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit70);
end;
procedure Tfrm_op_aire.DBEdit70KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit71);
end;
procedure Tfrm_op_aire.DBEdit71KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo6);
end;
procedure Tfrm_op_aire.DBEdit18KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_op_aire.DBEdit2Change(Sender: TObject);
begin
DBEdit2.Color:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',DBEdit2.text);
end;
procedure Tfrm_op_aire.DBEdit3Change(Sender: TObject);
begin
DBEdit3.Color:=dxgrid_color_fee(DBEdit3.text);
end;
procedure Tfrm_op_aire.RxDBLookupCombo12KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo29);
end;
procedure Tfrm_op_aire.RxDBLookupCombo29KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit14);
end;
procedure Tfrm_op_aire.RxDBLookupCombo30KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit31);
end;
procedure Tfrm_op_aire.RxDBLookupCombo12Change(Sender: TObject);
begin
if (t_op_aire.state=dsinsert)or(t_op_aire.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_aire['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_aire.RxDBLookupCombo8Change(Sender: TObject);
begin
if (t_op_aire.state=dsinsert)or(t_op_aire.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_aire['<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_aire.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_aire.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_aire.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,55);
end;
procedure Tfrm_op_aire.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_aire.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_aire,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_aire.bsSkinButton13Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton13.ClientToScreen(Point(0,bsSkinButton13.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_aire.N17Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
procedure Tfrm_op_aire.N34Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
procedure Tfrm_op_aire.N36Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
procedure Tfrm_op_aire.N37Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
procedure Tfrm_op_aire.N7Click(Sender: TObject);
var
str:widestring;
begin
if t_op_aire.IsEmpty then
exit;
if if_open('220') and if_open('221') then
begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
try
frm_ch_piliang_aire:=tfrm_ch_piliang_aire.Create (self);
t_op_aire.DisableControls;
t_op_aire.first;
while not t_op_aire.eof do
begin
if str='' then
str:=''''+t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''''
else
str:=str+','+''''+t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_aire.next;
end;
str:='('+str+')';
str:='select * from t_op_aire where <20><><EFBFBD><EFBFBD> in '+str+default_sort(55,'t_op_aire','','desc');
frm_ch_piliang_aire.t_op_aire.Parameters.ParamByName('SQLStr').value:=str;
frm_ch_piliang_aire.t_op_aire.open;
frm_ch_piliang_aire.ShowModal;
finally
t_op_aire.EnableControls;
frm_ch_piliang_aire.Free;
frm_ch_piliang_aire:=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_aire.N3Click(Sender: TObject);
var
str:widestring;
begin
if t_op_aire.IsEmpty then
exit;
if if_open('220') and if_open('221') then
begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
try
frm_ch_piliang_aire:=tfrm_ch_piliang_aire.Create (self);
str:='select * from t_op_aire where <20><><EFBFBD><EFBFBD>='
+''''+t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
frm_ch_piliang_aire.t_op_aire.Parameters.ParamByName('SQLStr').value:=str;
frm_ch_piliang_aire.t_op_aire.open;
frm_ch_piliang_aire.ShowModal;
finally
frm_ch_piliang_aire.Free;
frm_ch_piliang_aire:=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_aire.N5Click(Sender: TObject);
var
str:widestring;
i:integer;
begin
if t_op_aire.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('220') and if_open('221') then
begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
try
frm_ch_piliang_aire:=tfrm_ch_piliang_aire.Create (self);
t_op_aire.DisableControls;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_aire.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if str='' then
str:=''''+t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''''
else
str:=str+','+''''+t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
end;
str:='('+str+')';
str:='select * from t_op_aire where <20><><EFBFBD><EFBFBD> in '+str+default_sort(55,'t_op_aire','','desc');
frm_ch_piliang_aire.t_op_aire.Parameters.ParamByName('SQLStr').value:=str;
frm_ch_piliang_aire.t_op_aire.open;
frm_ch_piliang_aire.ShowModal;
finally
t_op_aire.EnableControls;
frm_ch_piliang_aire.Free;
frm_ch_piliang_aire:=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_aire.RxDBLookupCombo31KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo13);
end;
procedure Tfrm_op_aire.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit22);
end;
procedure Tfrm_op_aire.wwDBLookupCombo52KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
end;
procedure Tfrm_op_aire.wwDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit6);
end;
procedure Tfrm_op_aire.wwDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit16);
end;
procedure Tfrm_op_aire.wwDBLookupCombo4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit11);
end;
procedure Tfrm_op_aire.wwDBLookupCombo5KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit13);
end;
procedure Tfrm_op_aire.wwDBDateTimePicker3KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo2);
end;
procedure Tfrm_op_aire.wwDBDateTimePicker1KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo3);
end;
procedure Tfrm_op_aire.N9Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
procedure Tfrm_op_aire.N20Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
procedure Tfrm_op_aire.t_op_aireBeforeEdit(DataSet: TDataSet);
begin
op_befor_post(t_op_aire,'0003');
end;
procedure Tfrm_op_aire.t_op_airePostError(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_aire where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_aire(str,1);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_aire where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_aire(str,2);
abort;
end;
if pos('ί<>б<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_aire where ί<>б<EFBFBD>׼='+''''+t_op_aire['ί<>б<EFBFBD>׼']+'''';
double_aire(str,3);
abort;
end;
end;
procedure Tfrm_op_aire.t_op_aireBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_aire);
end;
procedure Tfrm_op_aire.N21Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
procedure Tfrm_op_aire.N24Click(Sender: TObject);
begin
t_op_aire.Close;
t_op_aire.SQL.clear;
t_op_aire.SQL.Add('select * from t_op_aire where '
+open_data('0003','¼<><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(55,'t_op_aire','','desc'));
t_op_aire.open;
end;
end.