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.

111 lines
3.2 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_seae_vesselline;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, DB, ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl,
dxDBGrid, dxDBTLCl, dxGrClms, StdCtrls, Mask, DBCtrls, bsSkinCtrls,
Wwkeycb, wwdbdatetimepicker, wwdblook, RxLookup, wwdbedit, Wwdotdot,
Wwdbcomb;
type
Tfrm_op_seae_vesselline = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
t_vessel_plan: TADOQuery;
v_vessel_voyage1: TDataSource;
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton2: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Label2: TLabel;
wwDBComboBox20: TwwDBComboBox;
Label3: TLabel;
Edit1: TEdit;
Label8: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
Label10: TLabel;
RxDBLookupCombo4: TRxDBLookupCombo;
Edit7: TEdit;
Label30: TLabel;
wwDBLookupCombo5: TwwDBLookupCombo;
Label12: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label4: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label1: TLabel;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column62: TdxDBGridColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column56: TdxDBGridColumn;
dxDBGrid1Column55: TdxDBGridColumn;
dxDBGrid1Column39: TdxDBGridColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column61: TdxDBGridColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column58: TdxDBGridColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
private
{ Private declarations }
public
GetDate:TDateTime;
{ Public declarations }
end;
var
frm_op_seae_vesselline: Tfrm_op_seae_vesselline;
implementation
uses u_main, u_op_seae,my_sys_function;
{$R *.dfm}
procedure Tfrm_op_seae_vesselline.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_vesselline.FormShow(Sender: TObject);
begin
wwDBComboBox20.Items.IndexOf(FormatDateTime('YYYY',GetDate));
wwDBComboBox20.Text:=FormatDateTime('YYYY',GetDate);
Edit1.Text:=IntToStr(WeekofYear(GetDate));
bsSkinButton2.OnClick(nil);
end;
procedure Tfrm_op_seae_vesselline.bsSkinButton2Click(Sender: TObject);
var
str:widestring;
begin
str:='SELECT * FROM t_vessel_plan where 1=1 ';
if RxDBLookupCombo3.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo3.DisplayValues[1]+'''';
if RxDBLookupCombo4.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo4.DisplayValues[1]+'''';
if wwDBLookupCombo5.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo5.DisplayValue+'''';
if Edit7.Text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+'''%'+Edit7.Text+'%''';
if wwDBComboBox20.Text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text;
if Edit1.Text<>''then
str:=str+' and <20>ܴ<EFBFBD>='+Edit1.Text;
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker1.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker2.text);
t_vessel_plan.close;
t_vessel_plan.sql.Clear;
t_vessel_plan.sql.add(str);
t_vessel_plan.sql.add(' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
t_vessel_plan.open;
end;
end.