|
|
unit u_rp_truck_no;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, dxExEdtr, dxDBTLCl, dxGrClms, dxDBGrid, dxTL,
|
|
|
dxDBCtrl, dxCntner, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
|
|
|
RxLookup, wwdbdatetimepicker, bsSkinCtrls, Menus, XPMenu;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_truck_no = class(TForm)
|
|
|
qrymast: TADOQuery;
|
|
|
dsrmast: TDataSource;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
Label10: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label14: TLabel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
dxDBGrid1LE_ID: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridCurrencyColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
t_crm_client_cd: TADOQuery;
|
|
|
dsr_crm_client_cd1: TDataSource;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
N73: TMenuItem;
|
|
|
N48: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_truck_no: Tfrm_rp_truck_no;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
{$R *.dfm}
|
|
|
uses u_main,my_sys_function ;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
frm_rp_truck_no.Hide;
|
|
|
frm_rp_truck_no.ManualFloat(frm_rp_truck_no.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_truck_no');
|
|
|
action:=cafree;
|
|
|
frm_rp_truck_no:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
wwDBDateTimePicker1.Clear ;
|
|
|
wwDBDateTimePicker2.Clear ;
|
|
|
RxDBLookupCombo2.ClearValue ;
|
|
|
RxDBLookupCombo3.ClearValue ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
with qrymast,sql do
|
|
|
begin
|
|
|
close ; clear ;
|
|
|
add('SELECT t_op_letter_pc.LE_ID, t_op_letter_pc.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, t_op_letter_pc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ');
|
|
|
add('t_op_letter_pc.<2E><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>, t_op_letter_pc.<2E><><EFBFBD>䳡վ, t_op_letter_pc.<2E><>վ<EFBFBD>绰, ');
|
|
|
add(' t_op_letter_pc.Ҫ<><EFBFBD>ʱ<EFBFBD><CAB1>, t_op_letter_pc.<2E><><EFBFBD>ҵ<EFBFBD>ַ, t_op_letter_pc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>, ');
|
|
|
add(' t_op_letter_pc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ, t_op_letter_pc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>, t_op_letter_pc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰, ');
|
|
|
add('t_op_letter_pc.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰, t_op_letter_pc.<2E><>ע, t_op_letter_pc.½<>˷<EFBFBD>, ');
|
|
|
add('t_op_letter_pc.<2E><><EFBFBD>㷽ʽ, t_op_letter.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_letter.<2E><><EFBFBD><EFBFBD>,t_op_letter.ǩ<><C7A9><EFBFBD><EFBFBD> ');
|
|
|
add('FROM t_op_letter_pc INNER JOIN ');
|
|
|
add(' t_op_letter ON t_op_letter_pc.LE_ID = t_op_letter.LE_ID ');
|
|
|
add('where (1=1) ');
|
|
|
if wwDBDateTimePicker1.TEXT<>''then
|
|
|
begin
|
|
|
add(' and t_op_letter.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.TEXT+'''');
|
|
|
end;
|
|
|
if wwDBDateTimePicker2.TEXT<>''then
|
|
|
begin
|
|
|
add(' and t_op_letter.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.TEXT+'''');
|
|
|
end;
|
|
|
if RxDBLookupCombo2.DisplayValues[1]<>''then
|
|
|
begin
|
|
|
add(' and t_op_letter_pc.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>='+''''+RxDBLookupCombo2.DisplayValues[1]+'''');
|
|
|
end;
|
|
|
if RxDBLookupCombo3.DisplayValues[0]<>''then
|
|
|
begin
|
|
|
add(' and t_op_letter.ǩ<><C7A9><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValues[0]+'''');
|
|
|
end;
|
|
|
open ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,true,caption+'1');
|
|
|
t_crm_client_cd.Open ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27>ɳ<EFBFBD><C9B3><EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,nil,dsrmast,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,117);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_truck_no.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
end.
|