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.

315 lines
10 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_rp_no_truck;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Mask, wwdbedit, Wwdotdot, Wwdbcomb, wwdblook, RxLookup,
wwdbdatetimepicker, StdCtrls, bsSkinCtrls, ExtCtrls, dxExEdtr, dxTL,
dxDBCtrl, dxDBGrid, dxCntner, ComCtrls, bsSkinTabs, DB, ADODB, Menus;
type
Tfrm_rp_no_truck = class(TForm)
Panel2: TPanel;
Panel3: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinPanel1: TbsSkinPanel;
Label6: TLabel;
Label3: TLabel;
Label1: TLabel;
Label2: TLabel;
Label10: TLabel;
Label5: TLabel;
Label9: TLabel;
Label8: TLabel;
Label11: TLabel;
Label13: TLabel;
Label4: TLabel;
Label14: TLabel;
Edit1: TEdit;
Edit4: TEdit;
Edit2: TEdit;
Edit3: TEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
RxDBLookupCombo1: TRxDBLookupCombo;
RxDBLookupCombo3: TRxDBLookupCombo;
RxDBLookupCombo6: TRxDBLookupCombo;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
p_accept: TADOStoredProc;
p_accept1: TDataSource;
p_pay: TADOStoredProc;
p_pay1: TDataSource;
p_total_accept: TADOStoredProc;
p_total_accept1: TDataSource;
Memo1: TMemo;
Memo3: TMemo;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column3: TdxDBGridColumn;
dxDBGrid1Column49: TdxDBGridColumn;
dxDBGrid1Column50: TdxDBGridColumn;
dxDBGrid1Column51: TdxDBGridColumn;
dxDBGrid1Column54: TdxDBGridColumn;
dxDBGrid1Column4: TdxDBGridColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridColumn;
dxDBGrid1Column10: TdxDBGridColumn;
dxDBGrid1Column13: TdxDBGridColumn;
dxDBGrid1Column14: TdxDBGridColumn;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridColumn;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column18: TdxDBGridColumn;
dxDBGrid1Column19: TdxDBGridColumn;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
dxDBGrid1Column22: TdxDBGridColumn;
dxDBGrid1Column23: TdxDBGridColumn;
dxDBGrid1Column24: TdxDBGridColumn;
dxDBGrid11: TdxDBGridColumn;
dxDBGrid12: TdxDBGridColumn;
dxDBGrid13: TdxDBGridColumn;
dxDBGrid14: TdxDBGridColumn;
dxDBGrid15: TdxDBGridColumn;
dxDBGrid16: TdxDBGridColumn;
dxDBGrid17: TdxDBGridColumn;
dxDBGrid18: TdxDBGridColumn;
dxDBGrid19: TdxDBGridColumn;
dxDBGrid110: TdxDBGridColumn;
dxDBGrid1Column35: TdxDBGridColumn;
dxDBGrid1TEU: TdxDBGridColumn;
dxDBGrid1Column37: TdxDBGridColumn;
dxDBGrid1Column38: TdxDBGridColumn;
dxDBGrid1Column39: TdxDBGridColumn;
dxDBGrid1Column40: TdxDBGridColumn;
dxDBGrid1Column41: TdxDBGridColumn;
dxDBGrid1Column42: TdxDBGridColumn;
dxDBGrid1Column43: TdxDBGridColumn;
dxDBGrid1Column44: TdxDBGridColumn;
dxDBGrid1Column45: TdxDBGridColumn;
dxDBGrid1Column46: TdxDBGridColumn;
dxDBGrid1Column47: TdxDBGridColumn;
dxDBGrid1Column48: TdxDBGridColumn;
dxDBGrid2: TdxDBGrid;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGrid1Column52: TdxDBGridColumn;
dxDBGrid1Column53: TdxDBGridColumn;
dxDBGridColumn5: TdxDBGridColumn;
dxDBGrid1Column56: TdxDBGridColumn;
dxDBGridColumn6: TdxDBGridColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGridColumn11: TdxDBGridColumn;
dxDBGridColumn12: TdxDBGridColumn;
dxDBGridColumn13: TdxDBGridColumn;
dxDBGridColumn14: TdxDBGridColumn;
dxDBGridColumn15: TdxDBGridColumn;
dxDBGridColumn16: TdxDBGridColumn;
dxDBGridColumn17: TdxDBGridColumn;
dxDBGridColumn18: TdxDBGridColumn;
dxDBGridColumn19: TdxDBGridColumn;
dxDBGridColumn20: TdxDBGridColumn;
dxDBGridColumn21: TdxDBGridColumn;
dxDBGridColumn22: TdxDBGridColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridColumn24: TdxDBGridColumn;
dxDBGridColumn25: TdxDBGridColumn;
dxDBGridColumn26: TdxDBGridColumn;
dxDBGridColumn27: TdxDBGridColumn;
dxDBGridColumn28: TdxDBGridColumn;
dxDBGridColumn29: TdxDBGridColumn;
dxDBGridColumn30: TdxDBGridColumn;
dxDBGridColumn31: TdxDBGridColumn;
dxDBGridColumn32: TdxDBGridColumn;
dxDBGridColumn33: TdxDBGridColumn;
dxDBGridColumn34: TdxDBGridColumn;
dxDBGridColumn35: TdxDBGridColumn;
dxDBGridColumn36: TdxDBGridColumn;
dxDBGridColumn37: TdxDBGridColumn;
dxDBGridColumn38: TdxDBGridColumn;
dxDBGridColumn39: TdxDBGridColumn;
dxDBGridColumn40: TdxDBGridColumn;
dxDBGridColumn41: TdxDBGridColumn;
dxDBGridColumn42: TdxDBGridColumn;
dxDBGridColumn43: TdxDBGridColumn;
dxDBGridColumn44: TdxDBGridColumn;
dxDBGridColumn45: TdxDBGridColumn;
dxDBGridColumn46: TdxDBGridColumn;
dxDBGridColumn47: TdxDBGridColumn;
Memo2: TMemo;
Memo4: TMemo;
p_total_pay: TADOStoredProc;
p_total_pay1: TDataSource;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column1: TdxDBGridMaskColumn;
dxDBGrid3Column2: TdxDBGridColumn;
dxDBGrid3Column3: TdxDBGridColumn;
dxDBGrid3Column4: TdxDBGridColumn;
dxDBGrid4: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
procedure bsSkinButton10Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_rp_no_truck: Tfrm_rp_no_truck;
implementation
uses u_main,my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfrm_rp_no_truck.bsSkinButton10Click(Sender: TObject);
var
str:widestring;
begin
if Edit1.text<>''then
str:=str+' and v_sea.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit4.text<>''then
str:=str+' and v_sea.ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
if Edit2.text<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
if Edit3.text<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
if wwDBDateTimePicker3.text<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
if wwDBDateTimePicker4.text<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
if RxDBLookupCombo2.DisplayValues[1]<>''then
str:=str+' and v_sea.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if RxDBLookupCombo6.DisplayValues[0]<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo6.DisplayValues[0]+'''';
if RxDBLookupCombo1.DisplayValues[0]<>''then
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo1.DisplayValues[0]+'''';
if RxDBLookupCombo3.DisplayValues[1]<>''then
begin
str:=str+' and (t_ch_fee_truck.<2E>շѿͻ<D1BF>='+''''+RxDBLookupCombo3.DisplayValues[1]+'''';
str:=str+' or t_ch_fee_truck.<2E><><EFBFBD>ѿͻ<D1BF>='+''''+RxDBLookupCombo3.DisplayValues[1]+''''+')';
end;
if str<>''then
str:=' where '+copy(str,5,length(str)-4);
p_accept.Close;
p_accept.Parameters.ParamByName('SQLStr').value:=Memo1.text+str
+'order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc';
p_accept.open;
p_pay.Close;
p_pay.Parameters.ParamByName('SQLStr').value:=Memo3.text+str
+'order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc';
p_pay.open;
p_total_accept.Close;
p_total_accept.Parameters.ParamByName('SQLStr').value:=Memo2.text+str
+' GROUP BY t_ch_fee_truck.<2E>շѿͻ<D1BF> order by t_ch_fee_truck.<2E>շѿͻ<D1BF>';
p_total_accept.open;
p_total_pay.Close;
p_total_pay.Parameters.ParamByName('SQLStr').value:=Memo4.text+str
+' GROUP BY t_ch_fee_truck.<2E><><EFBFBD>ѿͻ<D1BF> order by t_ch_fee_truck.<2E><><EFBFBD>ѿͻ<D1BF>';
p_total_pay.open;
end;
procedure Tfrm_rp_no_truck.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption+'1');
savereggrid(dxdbgrid2,caption+'2');
frm_rp_no_truck.Hide;
frm_rp_no_truck.ManualFloat(frm_rp_no_truck.BoundsRect );
frm_main.freeTabs('frm_rp_no_truck');
action:=cafree;
frm_rp_no_truck:=nil;
end;
procedure Tfrm_rp_no_truck.FormShow(Sender: TObject);
begin
loadreggrid(dxdbgrid1,false,caption+'1');
loadreggrid(dxdbgrid1,false,caption+'2');
end;
procedure Tfrm_rp_no_truck.N10Click(Sender: TObject);
begin
if bsSkinTabSheet1.Showing then
update_grid_view_no(dxdbgrid1)
else if bsSkinTabSheet2.Showing then
update_grid_view_no(dxdbgrid2);
end;
procedure Tfrm_rp_no_truck.N14Click(Sender: TObject);
begin
if bsSkinTabSheet1.Showing then
update_grid_view_all(dxdbgrid1)
else if bsSkinTabSheet2.Showing then
update_grid_view_all(dxdbgrid2);
end;
procedure Tfrm_rp_no_truck.N16Click(Sender: TObject);
begin
if bsSkinTabSheet1.Showing then
grid_save_xls(dxdbgrid1)
else if bsSkinTabSheet2.Showing then
grid_save_xls(dxdbgrid2);
end;
procedure Tfrm_rp_no_truck.N12Click(Sender: TObject);
begin
if bsSkinTabSheet1.Showing then
update_grid(dxdbgrid1,110)
else if bsSkinTabSheet2.Showing then
update_grid(dxdbgrid2,111);
end;
procedure Tfrm_rp_no_truck.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>Ƿ<EFBFBD><C7B7>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,p_accept1,
p_pay1,p_total_accept1,p_total_pay1,nil,nil,nil);
end;
procedure Tfrm_rp_no_truck.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
end.