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.

1772 lines
57 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_airtruck;
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, bsdbctrls, Grids, DBGridEh, Wwdbigrd, Wwdbgrid, u_op_card,IniFiles;
type
Tfrm_op_airtruck = 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_airtruck: TADOQuery;
t_op_airtruck1: 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;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: 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;
Label10: TLabel;
RxDBLookupCombo7: TRxDBLookupCombo;
Label96: TLabel;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
Label97: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label25: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label6: TLabel;
Label164: TLabel;
RxDBLookupCombo11: TRxDBLookupCombo;
Label23: TLabel;
RxDBLookupCombo8: TRxDBLookupCombo;
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;
dxDBGrid1Column29: TdxDBGridColumn;
bsSkinPanel2: TbsSkinPanel;
bsSkinDBText1: TbsSkinDBText;
N25: TMenuItem;
N26: TMenuItem;
bsSkinTabSheet5: TbsSkinTabSheet;
Label34: TLabel;
RxDBLookupCombo16: TRxDBLookupCombo;
DBMemo3: TDBMemo;
Label35: TLabel;
RxDBLookupCombo17: TRxDBLookupCombo;
DBMemo4: TDBMemo;
Label39: TLabel;
RxDBLookupCombo18: TRxDBLookupCombo;
DBMemo5: TDBMemo;
bsSkinPanel3: TbsSkinPanel;
bsSkinPanel5: TbsSkinPanel;
Label7: TLabel;
Label9: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
RxDBLookupCombo3: TRxDBLookupCombo;
Label11: TLabel;
Label12: TLabel;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
Label14: TLabel;
DBEdit10: TDBEdit;
Label15: TLabel;
t_op_airtruckdetail1: TDataSource;
t_op_airtruckdetail: TADOQuery;
wwDBGrid1: TwwDBGrid;
wwDBLookupCombo2: TwwDBLookupCombo;
bsSkinPanel7: TbsSkinPanel;
t_op_airtruckdetailprn: TADOQuery;
IntegerField1: TIntegerField;
StringField1: TStringField;
StringField2: TStringField;
StringField3: TStringField;
StringField4: TStringField;
StringField5: TStringField;
StringField6: TStringField;
IntegerField2: TIntegerField;
StringField7: TStringField;
BCDField1: TBCDField;
BCDField2: TBCDField;
BCDField3: TBCDField;
IntegerField3: TIntegerField;
StringField8: TStringField;
BooleanField1: TBooleanField;
DateTimeField1: TDateTimeField;
StringField9: TStringField;
IntegerField4: TIntegerField;
StringField10: TStringField;
StringField11: TStringField;
t_op_airtruckdetailprn1: TDataSource;
bsSkinButton12: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
Label16: TLabel;
DBEdit14: TDBEdit;
bsSkinTabSheet6: TbsSkinTabSheet;
bsSkinPanel9: TbsSkinPanel;
bsSkinPanel10: TbsSkinPanel;
wwDBGrid3: TwwDBGrid;
wwDBLookupCombo3: TwwDBLookupCombo;
bsSkinPanel11: TbsSkinPanel;
bsSkinButton23: TbsSkinButton;
bsSkinButton24: TbsSkinButton;
bsSkinButton25: TbsSkinButton;
bsSkinButton26: TbsSkinButton;
bsSkinButton27: TbsSkinButton;
t_op_airtruckdetailhy1: TDataSource;
t_op_airtruckdetailhy: TADOQuery;
IntegerField5: TIntegerField;
StringField12: TStringField;
StringField13: TStringField;
StringField14: TStringField;
StringField15: TStringField;
StringField16: TStringField;
StringField17: TStringField;
IntegerField6: TIntegerField;
StringField18: TStringField;
BCDField4: TBCDField;
BCDField5: TBCDField;
BCDField6: TBCDField;
IntegerField7: TIntegerField;
StringField19: TStringField;
BooleanField2: TBooleanField;
DateTimeField2: TDateTimeField;
StringField20: TStringField;
IntegerField8: TIntegerField;
StringField21: TStringField;
StringField22: TStringField;
bsSkinGroupBox1: TbsSkinGroupBox;
Label33: TLabel;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label40: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label43: TLabel;
wwDBLookupCombo4: TwwDBLookupCombo;
Label44: TLabel;
wwDBLookupCombo5: TwwDBLookupCombo;
Label45: TLabel;
RxDBLookupCombo10: TRxDBLookupCombo;
DBMemo1: TDBMemo;
Label46: TLabel;
RxDBLookupCombo14: TRxDBLookupCombo;
DBMemo2: TDBMemo;
bsSkinSpeedButton1: TbsSkinSpeedButton;
bsSkinTabSheet7: TbsSkinTabSheet;
fra_op_card1: Tfra_op_card;
Label8: TLabel;
Label18: TLabel;
RxDBLookupCombo4: TRxDBLookupCombo;
Label20: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
Label21: TLabel;
DBEdit11: TDBEdit;
Label22: TLabel;
DBEdit12: TDBEdit;
Label24: TLabel;
DBEdit13: TDBEdit;
Label26: TLabel;
Label28: TLabel;
RxDBLookupCombo6: TRxDBLookupCombo;
Label29: TLabel;
RxDBLookupCombo9: TRxDBLookupCombo;
Label30: TLabel;
DBEdit15: TDBEdit;
Label31: TLabel;
DBEdit16: TDBEdit;
Label32: TLabel;
DBEdit17: TDBEdit;
wwDBComboBox1: TwwDBComboBox;
PopupMenu4: TPopupMenu;
SA1: TMenuItem;
N27: TMenuItem;
CA1: TMenuItem;
N28: TMenuItem;
N29: TMenuItem;
N30: TMenuItem;
N32: TMenuItem;
wwDBComboBox2: TwwDBComboBox;
wwDBComboBox4: TwwDBComboBox;
Label47: TLabel;
RxDBLookupCombo15: TRxDBLookupCombo;
Label49: TLabel;
DBEdit19: TDBEdit;
Label50: TLabel;
DBEdit20: TDBEdit;
Label51: TLabel;
DBEdit21: TDBEdit;
Label48: TLabel;
DBEdit22: TDBEdit;
Label52: TLabel;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBComboBox5: TwwDBComboBox;
wwDBComboBox6: TwwDBComboBox;
wwDBLookupCombo6: TwwDBLookupCombo;
wwDBLookupCombo7: TwwDBLookupCombo;
t_op_airtruckdetailhyDSDesigner: TBooleanField;
Label53: TLabel;
wwDBComboBox7: TwwDBComboBox;
bsSkinPanel4: TbsSkinPanel;
Label116: TLabel;
Label130: TLabel;
Label131: TLabel;
Label132: TLabel;
Edit1: TEdit;
Edit4: TEdit;
Edit2: TEdit;
Edit3: TEdit;
bsSkinButton44: TbsSkinButton;
bsSkinButton45: TbsSkinButton;
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 FormShow(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure t_op_airtruckBeforeEdit(DataSet: TDataSet);
procedure t_op_airtruckBeforePost(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 DBEdit5KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit10KeyPress(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 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 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_airtruckBeforeDelete(DataSet: TDataSet);
procedure t_op_airtruckBeforeCancel(DataSet: TDataSet);
procedure N21Click(Sender: TObject);
procedure N24Click(Sender: TObject);
procedure dxDBGrid1Column29CustomDraw(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 N26Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure t_op_airtruckdetailBeforeDelete(DataSet: TDataSet);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure RxDBLookupCombo16Change(Sender: TObject);
procedure RxDBLookupCombo17Change(Sender: TObject);
procedure RxDBLookupCombo18Change(Sender: TObject);
procedure t_op_airtruckdetailAfterInsert(DataSet: TDataSet);
procedure RxDBLookupCombo16KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo17KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo18KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
procedure t_op_airtruckdetailhyAfterInsert(DataSet: TDataSet);
procedure bsSkinButton23Click(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinButton26Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure RxDBLookupCombo12KeyPress(Sender: TObject; var Key: Char);
procedure t_op_airtruckdetailAfterPost(DataSet: TDataSet);
procedure t_op_airtruckdetailhyAfterPost(DataSet: TDataSet);
procedure t_op_airtruckdetailBeforeInsert(DataSet: TDataSet);
procedure t_op_airtruckdetailhyBeforeInsert(DataSet: TDataSet);
procedure RxDBLookupCombo10Change(Sender: TObject);
procedure RxDBLookupCombo14Change(Sender: TObject);
procedure RxDBLookupCombo16Enter(Sender: TObject);
procedure RxDBLookupCombo16Exit(Sender: TObject);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure N32Click(Sender: TObject);
procedure N29Click(Sender: TObject);
procedure CA1Click(Sender: TObject);
procedure SA1Click(Sender: TObject);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure RxDBLookupCombo11Change(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton44Click(Sender: TObject);
private
t_op_airtruckdetailno,t_op_airtruckdetailhyno,t_op_airtruckdetailsano:integer;
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_airtruck: Tfrm_op_airtruck;
airtruckopen:boolean;
implementation
uses u_main, my_sys_function, u_op_airtruck_add, u_data_share, u_sys_progress,
u_ch_piliang_airi, u_op_date_change;
{$R *.dfm}
procedure Tfrm_op_airtruck.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_airtruck);
end;
procedure Tfrm_op_airtruck.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_airtruck);
end;
procedure Tfrm_op_airtruck.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_airtruck);
end;
procedure Tfrm_op_airtruck.bsSkinButton4Click(Sender: TObject);
begin
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=t_op_airtruck.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_airtruck);
end;
procedure Tfrm_op_airtruck.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_airtruck);
end;
procedure Tfrm_op_airtruck.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_airtruck.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
savewwgrid(fra_fee1.wwDBGrid1,'<27><><EFBFBD>ܳ<EFBFBD>Ӧ<EFBFBD><D3A6>');
savewwgrid(fra_fee1.wwDBGrid2,'<27><><EFBFBD>ܳ<EFBFBD>Ӧ<EFBFBD><D3A6>');
airtruckopen:=false;
frm_op_airtruck.Hide;
frm_op_airtruck.ManualFloat(frm_op_airtruck.BoundsRect );
frm_main.freeTabs('frm_op_airtruck');
action:=cafree;
frm_op_airtruck:=nil;
end;
procedure Tfrm_op_airtruck.FormShow(Sender: TObject);
var inifile1:Tinifile;
begin
Notebook1.PageIndex:=0;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
bsSkinPanel4.Visible:=inifile1.Readbool('other','aedisp',false);
inifile1.free;
Notebook1.Align:=alClient;
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;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit8.Width:=110;
bsSkinSpeedButton1.Visible:=false;
if frm_data_share.t_sys_noset.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit8.ReadOnly:=false;
end else begin
DBEdit8.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit8.Width:=90;
bsSkinSpeedButton1.Visible:=true;
if frm_data_share.t_sys_noset.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit8.ReadOnly:=false;
end else begin
DBEdit8.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD><D6B6>༭' then begin
DBEdit8.ReadOnly:=false;
DBEdit8.Width:=110;
bsSkinSpeedButton1.Visible:=false;
end;
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select top 50 * from t_op_airtruck where '
+'(¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''
+' or <20><><EFBFBD><EFBFBD>Ա='+''''+employee+''''
+' or <20>ͷ<EFBFBD>Ա='+''''+employee+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC');
t_op_airtruck.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_op_airtruckdetail.Open;
// t_op_airtruckdetailsa.Open;
t_op_airtruckdetailhy.Open;
fra_op_letter_free1.op_type.Text:='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>';
fra_op_letter_free1.t_op_letter.DataSource:=t_op_airtruck1;
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;
if if_open('353') or if_open('354') then
begin
fra_fee1.edit_type.text:='5';
fra_fee1.edit_data.text:='0005';
fra_fee1.edit_report.text:='<27><><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD><EFBFBD><EFBFBD>';
fra_fee1.t_ch_accept.DataSource:=t_op_airtruck1;
if strtobool(get_parameters_value(150,'false')) then
fra_fee1.bsSkinPanel3.Visible:=true;
fra_fee1.DBEdit48.DataSource:=t_op_airtruck1;
if if_open('353') then
begin
fra_fee1.t_ch_accept.DataSource:=t_op_airtruck1;
if (strtobool(get_parameters_value(153,'false'))=true) then begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=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) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end else begin
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_accept.open;
end else begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=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;
end;
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('354') then
begin
fra_fee1.t_ch_pay.DataSource:=t_op_airtruck1;
if (strtobool(get_parameters_value(153,'false'))=true) then begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=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) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end else 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 '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_pay.open;
end else begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('351')=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;
end;
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
if if_open('352') then begin
fra_fee1.Panel8.Visible:=true;
fra_fee1.Panel8.Height:=20;
end else
fra_fee1.Panel8.Visible:=false;
fra_fee1.t_op_gain.DataSource:=t_op_airtruck1;
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;
loadwwgrid(fra_fee1.wwDBGrid1,'<27><><EFBFBD>ܳ<EFBFBD>Ӧ<EFBFBD><D3A6>');
loadwwgrid(fra_fee1.wwDBGrid2,'<27><><EFBFBD>ܳ<EFBFBD>Ӧ<EFBFBD><D3A6>');
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_airtruck1;
fra_op_state1.t_op_state.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_card1.t_op_card.DataSource:=t_op_airtruck1;
fra_op_card1.t_op_card.open;
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;
bsSkinTabSheet2.TabVisible:=if_open('353') or if_open('354');
airtruckopen:=true;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_airtruck.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_airtruck.State=dsinsert)or(t_op_airtruck.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_airtruck.post;
end;
if answer=mrNo then
begin
t_op_airtruck.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_op_airtruck.bsSkinButton8Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton8.ClientToScreen(Point(0,bsSkinButton8.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_airtruck.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_airtruck.bsSkinButton1Click(Sender: TObject);
begin
if (t_op_airtruck.State=dsinsert)or(t_op_airtruck.State=dsedit) then
t_op_airtruck.post;
try
frm_op_airtruck_add:=tfrm_op_airtruck_add.Create(self);
frm_op_airtruck_add.data1.Enabled:=false;
frm_op_airtruck_add.data1.DataSet:=t_op_airtruck;
frm_op_airtruck_add.data1.Enabled:=true;
frm_op_airtruck_add.ShowModal;
finally
frm_op_airtruck_add.Free;
end;
end;
procedure Tfrm_op_airtruck.t_op_airtruckBeforeEdit(DataSet: TDataSet);
begin
// op_befor_post(t_op_airi,'0004');
end;
procedure Tfrm_op_airtruck.t_op_airtruckBeforePost(DataSet: TDataSet);
begin
table_before_post(t_op_airtruck,'ί<>е<EFBFBD>λ');
table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airtruck,'<27>ͷ<EFBFBD>Ա');
// table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD><E1B5A5>');
// table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD><E1B5A5>');
table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airtruck,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
table_before_post(t_op_airtruck,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
table_before_post(t_op_airtruck,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if op_empty('t_op_airtruck',t_op_airtruck) then
abort;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_op_airtruck.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (trim(t_op_airtruck['ί<>б<EFBFBD><D0B1><EFBFBD>'])='') then
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_airtruck['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_airtruck['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_airtruck['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_airtruck['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
if t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').oldvalue<>t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime then
if (t_op_airtruck.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>'<27><><EFBFBD>ĵ<EFBFBD>') and (Logininfo.endday>=t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime) then begin
showmessage('<27>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ҵ<EFBFBD>񣡣<EFBFBD>');
abort;
end;
if t_op_airtruck.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_airtruck.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_airtruck.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_airtruck.State=dsinsert then
begin
if t_op_airtruck.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_airtruck['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.AirTruckBsNo,'IT'));
t_op_airtruck['<27><><EFBFBD><EFBFBD>']:=get_id;
end;
t_op_airtruck['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_airtruck['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
if strtobool(get_parameters_value(43,'false')) then
begin
if (trim(t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='') or (t_op_airtruck.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(44,'false')) then
begin
if (trim(t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='') or (t_op_airtruck.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_op_airtruck['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if (trim(t_op_airtruck.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='') or (t_op_airtruck.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_airtruck['ί<>б<EFBFBD>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airtruck['ί<>б<EFBFBD>׼']:=t_op_airtruck['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_airtruck['ί<>б<EFBFBD>׼']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
end;
t_op_airtruck['upload']:=1;
end;
procedure Tfrm_op_airtruck.bsSkinButton10Click(Sender: TObject);
begin
query_airtruck(1,'0005');
end;
procedure Tfrm_op_airtruck.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_airtruck.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_airtruck.DBEdit1KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit2);
end;
procedure Tfrm_op_airtruck.DBEdit2KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit3);
end;
procedure Tfrm_op_airtruck.DBEdit3KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_op_airtruck.DBEdit4KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit4);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo31);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo13KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_op_airtruck.DBEdit8KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_op_airtruck.DBEdit9KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit7);
end;
procedure Tfrm_op_airtruck.DBEdit7KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
end;
procedure Tfrm_op_airtruck.wwDBDateTimePicker2KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
end;
procedure Tfrm_op_airtruck.wwDBDateTimePicker1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo7);
end;
procedure Tfrm_op_airtruck.DBEdit5KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_op_airtruck.DBEdit10KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo6KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit30);
end;
procedure Tfrm_op_airtruck.DBEdit30KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit31);
end;
procedure Tfrm_op_airtruck.DBEdit31KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit14);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo11KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo18);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo7KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
end;
procedure Tfrm_op_airtruck.DBEdit18KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_op_airtruck.DBEdit2Change(Sender: TObject);
begin
DBEdit2.Color:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',DBEdit2.text);
end;
procedure Tfrm_op_airtruck.DBEdit3Change(Sender: TObject);
begin
DBEdit3.Color:=dxgrid_color_fee(DBEdit3.text);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo29KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo8);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo8KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo30);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo30KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo18);
// key_wwDBComboBox(Key,wwDBComboBox3);
end;
procedure Tfrm_op_airtruck.wwDBComboBox3KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit30);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo12Change(Sender: TObject);
begin
if (t_op_airtruck.state=dsinsert)or(t_op_airtruck.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_airtruck['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=frm_data_share.t_sys_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo8Change(Sender: TObject);
begin
if (t_op_airtruck.state=dsinsert)or(t_op_airtruck.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_airtruck['<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_airtruck.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_airtruck.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_airtruck.N12Click(Sender: TObject);
begin
// update_grid(dxdbgrid1,59);
end;
procedure Tfrm_op_airtruck.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_airtruck.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_airtruck,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_airtruck.bsSkinButton13Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton13.ClientToScreen(Point(0,bsSkinButton13.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_airtruck.N17Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('0005','¼<><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>״̬'+''''+') '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.N34Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('0005','¼<><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>'+''''+')) '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.N36Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('0005','¼<><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>'+''''+')) '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.N37Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('000','¼<><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) '
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo31KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo13);
end;
procedure Tfrm_op_airtruck.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo16);
end;
procedure Tfrm_op_airtruck.wwDBLookupCombo52KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
end;
procedure Tfrm_op_airtruck.N9Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('0005','¼<><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><>'+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.N20Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('0005','¼<><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><>'+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.t_op_airtruckBeforeDelete(DataSet: TDataSet);
begin
op_befor_post(t_op_airtruck,'0005');
if not t_op_airtruck.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_airtruck['ί<>б<EFBFBD><D0B1><EFBFBD>']);
// delete_add(4,t_op_airi);
end;
procedure Tfrm_op_airtruck.t_op_airtruckBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_airtruck);
if t_op_airtruck.State=dsinsert then
if not t_op_airtruck.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_airtruck['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_airtruck.N21Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('0005','¼<><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 )'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.N24Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.clear;
t_op_airtruck.SQL.Add('select * from t_op_airtruck where '
+open_data('0005','¼<><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>'+''''+')'
+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_airtruck.open;
end;
procedure Tfrm_op_airtruck.dxDBGrid1Column29CustomDraw(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
if Trim(ANode.Strings[dxDBGrid1Column29.Index])='<27><><EFBFBD>ĵ<EFBFBD>' then
AColor:=clred;
AFont.Color:=clblack;
end;
procedure Tfrm_op_airtruck.N26Click(Sender: TObject);
begin
if t_op_airtruck.IsEmpty then
exit;
if not do_data('0005',t_op_airtruck.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_airtruck.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_airtruck.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_airtruck.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,'','') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if t_op_airtruck.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
if t_op_airtruck1=nil then
exit;
if (t_op_airtruck.State=dsinsert)or(t_op_airtruck.State=dsedit) then
t_op_airtruck.post;
try
frm_op_date_change:=tfrm_op_date_change.Create (self);
frm_op_date_change.DataSource1.Enabled:=false;
frm_op_date_change.DataSource1.DataSet:=t_op_airtruck1.DataSet;
frm_op_date_change.DataSource1.Enabled:=true;
frm_op_date_change.ShowModal;
finally
frm_op_date_change.Free;
frm_op_date_change:=nil;
end;
end;
procedure Tfrm_op_airtruck.bsSkinButton12Click(Sender: TObject);
begin
if not t_op_airtruck.Active then exit;
if t_op_airtruck.IsEmpty then exit;
t_op_airtruckdetail.Insert;
end;
procedure Tfrm_op_airtruck.bsSkinButton14Click(Sender: TObject);
begin
if not t_op_airtruck.Active then exit;
if t_op_airtruck.IsEmpty then exit;
if t_op_airtruckdetail.State in [dsedit,dsinsert] then
t_op_airtruckdetail.Post;
end;
procedure Tfrm_op_airtruck.t_op_airtruckdetailBeforeDelete(
DataSet: TDataSet);
begin
if t_op_airtruck.FieldByName('ҵ<><D2B5>״̬').AsString='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
end;
procedure Tfrm_op_airtruck.bsSkinButton15Click(Sender: TObject);
begin
t_op_airtruckdetail.Delete;
end;
procedure Tfrm_op_airtruck.bsSkinButton16Click(Sender: TObject);
begin
t_op_airtruckdetail.Cancel;
end;
procedure Tfrm_op_airtruck.bsSkinButton17Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton17.ClientToScreen(Point(0,bsSkinButton17.Height));
PopupMenu4.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo16Change(Sender: TObject);
begin
if t_op_airtruck1.DataSet=nil then
exit;
if (t_op_airtruck1.DataSet.State=dsinsert)or(t_op_airtruck1.DataSet.State=dsedit)then
begin
if RxDBLookupCombo16.DisplayValue<>'' then
t_op_airtruck1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shiper.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo17Change(Sender: TObject);
begin
if t_op_airtruck1.DataSet=nil then
exit;
if (t_op_airtruck1.DataSet.State=dsinsert)or(t_op_airtruck1.DataSet.State=dsedit)then
begin
if RxDBLookupCombo17.DisplayValue<>'' then
t_op_airtruck1.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shouhuo.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo18Change(Sender: TObject);
begin
if t_op_airtruck1.DataSet=nil then
exit;
if (t_op_airtruck1.DataSet.State=dsinsert)or(t_op_airtruck1.DataSet.State=dsedit)then
begin
if RxDBLookupCombo18.DisplayValue<>'' then
t_op_airtruck1.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_tongzhi.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_airtruck.t_op_airtruckdetailAfterInsert(
DataSet: TDataSet);
begin
t_op_airtruckdetail['<27><><EFBFBD><EFBFBD>']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
t_op_airtruckdetail['<27><><EFBFBD><EFBFBD>']:=t_op_airtruckdetail.RecordCount;
t_op_airtruckdetail['<27><><EFBFBD><EFBFBD>']:='BGS';
t_op_airtruckdetail['<27>Ƿ<EFBFBD>ƴ<EFBFBD><C6B4>']:=0;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo16KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo3);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo17KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo4);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo18KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo5);
end;
procedure Tfrm_op_airtruck.DBEdit14KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo19);
end;
procedure Tfrm_op_airtruck.t_op_airtruckdetailhyAfterInsert(
DataSet: TDataSet);
begin
t_op_airtruckdetailhy['<27><><EFBFBD><EFBFBD>']:=t_op_airtruck['<27><><EFBFBD><EFBFBD>'];
t_op_airtruckdetailhy['<27><><EFBFBD><EFBFBD>']:=t_op_airtruckdetailhy.RecordCount;
t_op_airtruckdetailhy['<27>Ƿ<EFBFBD>ƴ<EFBFBD><C6B4>']:=1;
end;
procedure Tfrm_op_airtruck.bsSkinButton23Click(Sender: TObject);
begin
if not t_op_airtruck.Active then exit;
if t_op_airtruck.IsEmpty then exit;
t_op_airtruckdetailhy.Insert;
end;
procedure Tfrm_op_airtruck.bsSkinButton24Click(Sender: TObject);
begin
if not t_op_airtruck.Active then exit;
if t_op_airtruck.IsEmpty then exit;
if t_op_airtruckdetailhy.State in [dsedit,dsinsert] then
t_op_airtruckdetailhy.Post;
end;
procedure Tfrm_op_airtruck.bsSkinButton25Click(Sender: TObject);
begin
t_op_airtruckdetailhy.Delete;
end;
procedure Tfrm_op_airtruck.bsSkinButton26Click(Sender: TObject);
begin
t_op_airtruckdetailhy.Cancel;
end;
procedure Tfrm_op_airtruck.bsSkinButton27Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>ܳ<EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>',2,t_op_airtruck1,nil,nil,nil,t_op_airtruckdetailhy1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo12KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo29);
end;
procedure Tfrm_op_airtruck.t_op_airtruckdetailAfterPost(DataSet: TDataSet);
var
aQuery:TAdoQuery;
pkgs,kgs,cbm:double;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
sql.Add('select sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from t_op_airtruckdetail where <20><><EFBFBD><EFBFBD>='''+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
open;
pkgs:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
kgs:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
cbm:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
if not IsEmpty then begin
// t_op_airtruck.Edit;
// t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=pkgs;//
// t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=kgs;
// t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=cbm;
// t_op_airtruck.post;
close;sql.clear;
sql.Add('update t_op_airtruck set <20><><EFBFBD><EFBFBD>='+floattostr(pkgs)+',<2C><><EFBFBD><EFBFBD>='+floattostr(kgs)+',<2C><><EFBFBD><EFBFBD>='+floattostr(cbm)+' where <20><><EFBFBD><EFBFBD>='''+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
ExecSQL;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_op_airtruck.t_op_airtruckdetailhyAfterPost(
DataSet: TDataSet);
var
aQuery:TAdoQuery;
pkgs,kgs,cbm:double;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
sql.Add('select sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from t_op_airtruckdetail where <20><><EFBFBD><EFBFBD>='''+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
open;
pkgs:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
kgs:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
cbm:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat;
if not IsEmpty then begin
// t_op_airtruck.Edit;
// t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=pkgs;
// t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=kgs;
// t_op_airtruck.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=cbm;
// t_op_airtruck.post;
close;sql.clear;
sql.Add('update t_op_airtruck set <20><><EFBFBD><EFBFBD>='+floattostr(pkgs)+',<2C><><EFBFBD><EFBFBD>='+floattostr(kgs)+',<2C><><EFBFBD><EFBFBD>='+floattostr(cbm)+' where <20><><EFBFBD><EFBFBD>='''+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
ExecSQL;
// t_op_airtruck.Refresh;
end;
end;
finally
FreeAndNil(aQuery);
end;// t_op_airtruckdetail.Requery;
end;
procedure Tfrm_op_airtruck.t_op_airtruckdetailBeforeInsert(
DataSet: TDataSet);
begin
if t_op_airtruck.FieldByName('ҵ<><D2B5>״̬').AsString='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
if t_op_airtruckdetail.Recordset.RecordCount=0 then
t_op_airtruckdetailno:=1
else
t_op_airtruckdetailno:=t_op_airtruckdetail['<27><><EFBFBD><EFBFBD>']-1;
end;
procedure Tfrm_op_airtruck.t_op_airtruckdetailhyBeforeInsert(
DataSet: TDataSet);
begin
if t_op_airtruck.FieldByName('ҵ<><D2B5>״̬').AsString='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
if t_op_airtruckdetailhy.Recordset.RecordCount=0 then
t_op_airtruckdetailhyno:=1
else
t_op_airtruckdetailhyno:=t_op_airtruckdetailhy['<27><><EFBFBD><EFBFBD>']-1;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo10Change(Sender: TObject);
begin
if t_op_airtruck1.DataSet=nil then
exit;
if (t_op_airtruck1.DataSet.State=dsinsert)or(t_op_airtruck1.DataSet.State=dsedit)then
begin
if RxDBLookupCombo10.DisplayValue<>'' then
t_op_airtruck1.DataSet['<27>س̷<D8B3><CCB7><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shiper.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo14Change(Sender: TObject);
begin
if t_op_airtruck1.DataSet=nil then
exit;
if (t_op_airtruck1.DataSet.State=dsinsert)or(t_op_airtruck1.DataSet.State=dsedit)then
begin
if RxDBLookupCombo14.DisplayValue<>'' then
t_op_airtruck1.DataSet['<27>س<EFBFBD><D8B3>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shouhuo.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
end;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo16Enter(Sender: TObject);
begin
RxLookupComboEnter(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo16Exit(Sender: TObject);
begin
RxLookupComboExit(TRxDBLookupCombo(Sender));
end;
procedure Tfrm_op_airtruck.bsSkinSpeedButton1Click(Sender: TObject);
begin
if t_op_airtruck1.DataSet.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (t_op_airtruck1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']='') then begin
t_op_airtruck1.DataSet.edit;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_airtruck1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_airtruck1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_airtruck1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(5,subComp,department,employee,t_op_airtruck1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
end;
end;
procedure Tfrm_op_airtruck.N32Click(Sender: TObject);
begin
sys_print('BGS<47><53><EFBFBD>ܳ<EFBFBD>ȫ<EFBFBD><C8AB>',2,t_op_airtruck1,nil,nil,nil,t_op_airtruckdetail1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_airtruck.N29Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_op_airtruckdetail.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_op_airtruckdetail.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
str:='('+t_op_airtruckdetail.fieldbyname('TD_ID').asstring
else
str:=str+','+t_op_airtruckdetail.fieldbyname('TD_ID').asstring;
end;
end
else
begin
str:='('+t_op_airtruckdetail.fieldbyname('TD_ID').asstring;
end;
str:=str+')';
t_op_airtruckdetailprn.close;
t_op_airtruckdetailprn.sql.clear;
t_op_airtruckdetailprn.sql.add('select * from t_op_airtruckdetail '
+'where <20>Ƿ<EFBFBD>ƴ<EFBFBD><C6B4><>1 and TD_ID in '+str
+' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
t_op_airtruckdetailprn.open;
sys_print('BGS<47><53><EFBFBD>ܳ<EFBFBD>ѡ<EFBFBD><D1A1>',2,t_op_airtruck1,nil,nil,t_op_airtruckdetail1,t_op_airtruckdetailprn1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_airtruck.CA1Click(Sender: TObject);
begin
if t_op_airtruckdetail.IsEmpty then
exit;
t_op_airtruckdetailprn.close;
t_op_airtruckdetailprn.sql.clear;
t_op_airtruckdetailprn.sql.add('select * from t_op_airtruckdetail '
+'where <20>Ƿ<EFBFBD>ƴ<EFBFBD><C6B4><>1 and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> '
+' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
t_op_airtruckdetailprn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_airtruckdetail.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_op_airtruckdetailprn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_airtruckdetail.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
t_op_airtruckdetailprn.open;
sys_print('BGS<47><53><EFBFBD>ܳ<EFBFBD>ѡ<EFBFBD><D1A1>',2,t_op_airtruck1,nil,nil,t_op_airtruckdetail1,t_op_airtruckdetailprn1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_airtruck.SA1Click(Sender: TObject);
begin
if t_op_airtruckdetail.IsEmpty then
exit;
t_op_airtruckdetailprn.close;
t_op_airtruckdetailprn.sql.clear;
t_op_airtruckdetailprn.sql.add('select * from t_op_airtruckdetail '
+'where <20>Ƿ<EFBFBD>ƴ<EFBFBD><C6B4><>1 and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> '
+' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
t_op_airtruckdetailprn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_airtruckdetail.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
t_op_airtruckdetailprn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_airtruckdetail.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
t_op_airtruckdetailprn.open;
sys_print('BGS<47><53><EFBFBD>ܳ<EFBFBD>ѡ<EFBFBD><D1A1>',2,t_op_airtruck1,nil,nil,t_op_airtruckdetail1,t_op_airtruckdetailprn1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_airtruck.bsSkinPageControl1Change(Sender: TObject);
begin
if not airtruckopen then exit;
if bsSkinPageControl1.ActivePage<>bsSkinTabSheet1 then begin
if t_op_airtruck.State in [dsedit,dsinsert] then
t_op_airtruck.Post;
end else begin
t_op_airtruck.Refresh;
end;
end;
procedure Tfrm_op_airtruck.RxDBLookupCombo11Change(Sender: TObject);
begin
if t_op_airtruck1.DataSet=nil then
exit;
if (t_op_airtruck1.DataSet.state=dsinsert)or(t_op_airtruck1.DataSet.state=dsedit)then
begin
if RxDBLookupCombo11.DisplayValue='' then
exit;
t_op_airtruck1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=t_op_airtruck1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+#13#10+frm_data_share.t_code_goods['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if frm_data_share.t_code_goods.FieldByName('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString<>'' then
t_op_airtruck1.DataSet.fieldbyname('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring:=t_op_airtruck1.DataSet.fieldbyname('<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring+#13#10+frm_data_share.t_code_goods['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'];
// if trim(t_op_seae2.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)=''then
// DBMemo39.Lines.Append(frm_data_share.t_code_goods['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
// TMemoField(t_op_seae2.Fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')).
// :=frm_data_share.t_code_goods['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
procedure Tfrm_op_airtruck.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>ܳ<EFBFBD>ҵ<EFBFBD><D2B5>',2,t_op_airtruck1,nil,nil,nil,t_op_airtruckdetail1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_airtruck.bsSkinButton44Click(Sender: TObject);
var
str,airepsqlstr:widestring;
begin
//<2F><><EFBFBD>ݲ<EFBFBD>ѯ
str:='';
str:=query_tiaojian(1,str,'t_op_airtruck.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit1.text);
str:=query_tiaojian(1,str,'t_op_airtruck.ί<>б<EFBFBD><D0B1><EFBFBD>','ģ<><C4A3>',Edit4.text);
str:=query_tiaojian(1,str,'t_op_airtruck.<2E><><EFBFBD><EFBFBD><E1B5A5>','ģ<><C4A3>',Edit2.text);
str:=query_tiaojian(1,str,'t_op_airtruck.<2E><><EFBFBD><EFBFBD><E1B5A5>','ģ<><C4A3>',Edit3.text);
if trim(str)='' then
begin
str:='where '+open_data('0006','t_op_airtruck.¼<><C2BC><EFBFBD><EFBFBD>',
't_op_airtruck.<2E><><EFBFBD><EFBFBD>Ա','t_op_airtruck.<2E>ͷ<EFBFBD>Ա','no','no');
end
else
begin
str:=str+' and '+open_data('0006','t_op_airtruck.¼<><C2BC><EFBFBD><EFBFBD>',
't_op_airtruck.<2E><><EFBFBD><EFBFBD>Ա','t_op_airtruck.<2E>ͷ<EFBFBD>Ա','no','no');
end;
str:='select * from t_op_airtruck where <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_airtruck '
+str+')';//;+default_sort(55,'t_op_airtruck','','desc');
if (not t_op_airtruck.IsEmpty) and (t_op_airtruck.sql.Text<>'') then
t_op_airtruck.close;
t_op_airtruck.sql.clear;
t_op_airtruck.sql.add(str);
t_op_airtruck.Open;
if t_op_airtruck.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
exit;
end;
end;
end.