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.
DONGSHENG6/费用模块/u_ch_fee_check_sealocal.pas

401 lines
13 KiB
Plaintext

11 months ago
unit u_ch_fee_check_sealocal;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, DB, ADODB, dxDBTLCl, dxGrClms, StdCtrls, DBCtrls,
RxLookup, wwdbdatetimepicker, bsSkinCtrls, Mask, u_fee_check, ComCtrls,
bsSkinTabs, dxDBGrid, dxTL, dxDBCtrl, dxCntner, XPMenu, Menus, wwdblook,
wwdbedit, Wwdotdot, Wwdbcomb;
type
Tfrm_ch_fee_check_sealocal = class(TForm)
bsSkinPanel1: TbsSkinPanel;
t_op_state: TADOQuery;
t_op_state1: TDataSource;
t_op_airtruck1: TDataSource;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
fra_fee_check1: Tfra_fee_check;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
XPMenu1: TXPMenu;
PopupMenu3: TPopupMenu;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridColumn;
dxDBGrid1Column2: TdxDBGridColumn;
dxDBGrid1Column3: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridColumn;
dxDBGrid1Column10: TdxDBGridColumn;
dxDBGrid1Column11: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
dxDBGrid1Column26: TdxDBGridColumn;
t_op_airtruck: TADOQuery;
bsSkinPanel3: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
t_code_ctn_status: TADOQuery;
t_code_ctn_status1: TDataSource;
bsSkinButton7: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Label47: TLabel;
Edit3: TEdit;
Label81: TLabel;
Edit2: TEdit;
Label80: TLabel;
Edit1: TEdit;
Label213: TLabel;
RxDBLookupCombo57: TRxDBLookupCombo;
Label51: TLabel;
wwDBDateTimePicker11: TwwDBDateTimePicker;
Label53: TLabel;
wwDBDateTimePicker13: TwwDBDateTimePicker;
Label217: TLabel;
Label218: TLabel;
Label14: TLabel;
Label19: TLabel;
wwDBLookupCombo26: TwwDBLookupCombo;
Edit8: TEdit;
Edit9: TEdit;
Edit11: TEdit;
Label1: TLabel;
Edit4: TEdit;
dxDBGrid1Column12: TdxDBGridColumn;
procedure FormShow(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton10Click(Sender: TObject);
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 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 bsSkinButton7Click(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 bsSkinButton1Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure dxDBGrid1Column25CustomDraw(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 fra_fee_check1bsSkinButton4Click(Sender: TObject);
procedure fra_fee_check1bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_ch_fee_check_sealocal: Tfrm_ch_fee_check_sealocal;
implementation
uses u_main, my_sys_function;
{$R *.dfm}
procedure Tfrm_ch_fee_check_sealocal.FormShow(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.sql.Text:='select * from t_op_sealocal where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> '
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_sealocal where <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 ί<>б<EFBFBD><D0B1><EFBFBD>';
t_op_airtruck.open;
loadreggrid(dxdbgrid1,false,caption);
loadwwgrid(fra_fee_check1.wwDBGrid1,'<27><>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
loadwwgrid(fra_fee_check1.wwDBGrid2,'<27><>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
bsSkinPageControl1.Align:=alClient;
fra_fee_check1.limited_str.text:='0009';
fra_fee_check1.chk_accept.Text:='FALSE';
fra_fee_check1.chk_pay.text:='FALSE';
fra_fee_check1.ywlb.Text:='<27><>ó' ;
fra_fee_check1.t_ch_accept.DataSource:=t_op_airtruck1;
fra_fee_check1.t_ch_accept.open;
fra_fee_check1.a_shen_delete.open;
fra_fee_check1.a_shen_modify_old.open;
fra_fee_check1.a_shen_modify_new.open;
fra_fee_check1.bsSkinPanel3.visible:=true;
fra_fee_check1.t_ch_pay.DataSource:=t_op_airtruck1;
fra_fee_check1.t_ch_pay.open;
fra_fee_check1.p_shen_delete.open;
fra_fee_check1.p_shen_modify_old.open;
fra_fee_check1.p_shen_modify_new.open;
fra_fee_check1.bsSkinPanel5.visible:=true;
if fra_fee_check1.bsSkinPanel3.visible and
fra_fee_check1.bsSkinPanel5.visible then
begin
fra_fee_check1.Panel3.Visible:=true;
fra_fee_check1.t_op_gain.DataSource:=t_op_airtruck1;
fra_fee_check1.t_op_gain.open;
fra_fee_check1.bsSkinPanel9.Visible:=false;
fra_fee_check1.Panel3.Height:=20;
end
else
begin
fra_fee_check1.Panel3.Visible:=false;
end;
if strtobool(get_parameters_value(150,'false')) then
fra_fee_check1.bsSkinPanel10.Visible:=true
else fra_fee_check1.bsSkinPanel10.Visible:=False;
end;
procedure Tfrm_ch_fee_check_sealocal.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_fee_check_sealocal.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
savewwgrid(fra_fee_check1.wwDBGrid1,'<27><>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
savewwgrid(fra_fee_check1.wwDBGrid2,'<27><>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>');
frm_ch_fee_check_sealocal.Hide;
frm_ch_fee_check_sealocal.ManualFloat(frm_ch_fee_check_sealocal.BoundsRect );
frm_main.freeTabs('frm_ch_fee_check_sealocal');
action:=cafree;
frm_ch_fee_check_sealocal:=nil;
end;
procedure Tfrm_ch_fee_check_sealocal.bsSkinButton10Click(Sender: TObject);
VAR
str:widestring;
begin
str:='where 1=1';
if Edit3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker11.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker13.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',wwDBLookupCombo26.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit8.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>˾','ģ<><C4A3>',Edit9.text);
str:=query_tiaojian(1,str,'Ŀ<>ĸ<EFBFBD>','ģ<><C4A3>',Edit11.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit2.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit1.text);
str:=query_tiaojian(1,str,'ί<>б<EFBFBD><D0B1><EFBFBD>','ģ<><C4A3>',Edit4.text);
str:=query_tiaojian(1,str,'ί<>е<EFBFBD>λ','<27><><EFBFBD><EFBFBD>',RxDBLookupCombo57.DisplayValues[1]);
t_op_airtruck.close;
t_op_airtruck.sql.clear;
t_op_airtruck.sql.add('select * from t_op_sealocal '+str+' order by ί<>б<EFBFBD><D0B1><EFBFBD>');
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.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_ch_fee_check_sealocal.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_ch_fee_check_sealocal.bsSkinButton7Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.sql.Text:='select * from t_op_sealocal where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> '
+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_sealocal where <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 ί<>б<EFBFBD><D0B1><EFBFBD>';
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_ch_fee_check_sealocal.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_ch_fee_check_sealocal.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,61);
end;
procedure Tfrm_ch_fee_check_sealocal.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_ch_fee_check_sealocal.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
// Column_sort_pro(Column,t_op_airtruck,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_fee_check_sealocal.bsSkinButton1Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_ch_fee_check_sealocal.N17Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.text:='select * from t_op_ctnmg_detail where 1=1 '
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬='
+''''+'¼<><C2BC>״̬'+''''+') ';
t_op_airtruck.open
end;
procedure Tfrm_ch_fee_check_sealocal.N34Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.text:='select * from t_op_ctnmg_detail where 1=1'
+' 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>'+''''+')) ';
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.N36Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.text:='select * from t_op_ctnmg_detail where 1=1'
+' 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>'+''''+')) ';
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.N2Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.text:='select * from t_op_ctnmg_detail where 1=1'
+' 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><>'+''''+')';
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.N4Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.text:='select * from t_op_ctnmg_detail where 1=1'
+' 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><>'+''''+')';
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.N5Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.text:='select * from t_op_ctnmg_detail where 1=1'
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee )';
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.N8Click(Sender: TObject);
begin
t_op_airtruck.Close;
t_op_airtruck.SQL.text:='select * from t_op_ctnmg_detail where 1=1'
+' 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>'+''''+')';
t_op_airtruck.open;
end;
procedure Tfrm_ch_fee_check_sealocal.dxDBGrid1Column25CustomDraw(
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[dxDBGrid1Column25.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_ch_fee_check_sealocal.fra_fee_check1bsSkinButton4Click(
Sender: TObject);
begin
fra_fee_check1.bsSkinButton4Click(Sender);
end;
procedure Tfrm_ch_fee_check_sealocal.fra_fee_check1bsSkinButton1Click(
Sender: TObject);
begin
fra_fee_check1.bsSkinButton1Click(Sender);
end;
end.