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.

306 lines
9.1 KiB
Plaintext

unit u_info_render_manager;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, DB, ADODB, bsSkinCtrls, ExtCtrls, StdCtrls, ComCtrls,
DBCtrls, bsdbctrls, Mask, dxDBTLCl, dxGrClms, dxDBCtrl, dxDBGrid, dxTL,
dxCntner, bsSkinTabs, RxLookup, wwdbdatetimepicker, wwdbedit, Wwdotdot,
Wwdbcomb;
type
Tfrm_info_render_manager = class(TForm)
bsSkinPanel1: TbsSkinPanel;
Panel1: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
t_info_render: TADOQuery;
t_info_render1: TDataSource;
bsSkinButton1: TbsSkinButton;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridDateColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridDateColumn;
bsSkinPanel2: TbsSkinPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
bsSkinButton3: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinGroupBox2: TbsSkinGroupBox;
DBRichEdit1: TDBRichEdit;
bsSkinGroupBox3: TbsSkinGroupBox;
DBRichEdit3: TDBRichEdit;
bsSkinGroupBox1: TbsSkinGroupBox;
DBRichEdit2: TDBRichEdit;
t_crm_client_link: TADOQuery;
t_crm_client_link1: TDataSource;
bsSkinPanel3: TbsSkinPanel;
Label55: TLabel;
Label54: TLabel;
Label56: TLabel;
Label57: TLabel;
Label60: TLabel;
Label58: TLabel;
Label61: TLabel;
Label59: TLabel;
Label18: TLabel;
DBEdit46: TDBEdit;
wwDBComboBox3: TwwDBComboBox;
DBEdit47: TDBEdit;
wwDBDateTimePicker5: TwwDBDateTimePicker;
RxDBLookupCombo8: TRxDBLookupCombo;
DBEdit49: TDBEdit;
wwDBComboBox4: TwwDBComboBox;
DBMemo3: TDBMemo;
RxDBLookupCombo2: TRxDBLookupCombo;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column1: TdxDBGridMaskColumn;
dxDBGrid3Column7: TdxDBGridMaskColumn;
dxDBGrid3Column2: TdxDBGridMaskColumn;
dxDBGrid3Column3: TdxDBGridMaskColumn;
dxDBGrid3Column4: TdxDBGridMaskColumn;
dxDBGrid3Column5: TdxDBGridDateColumn;
dxDBGrid3Column6: TdxDBGridCurrencyColumn;
dxDBGrid3Column8: TdxDBGridMaskColumn;
dxDBGrid3Column9: TdxDBGridDateColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure dxDBGrid1Column1CustomDraw(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 bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_render_manager: Tfrm_info_render_manager;
implementation
uses u_main, u_info_render_query, my_sys_function, u_info_render_check;
{$R *.dfm}
procedure Tfrm_info_render_manager.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_info_render_manager.Hide;
frm_info_render_manager.ManualFloat(frm_info_render_manager.BoundsRect );
frm_main.freeTabs('frm_info_render_manager');
action:=cafree;
frm_info_render_manager:=nil;
end;
procedure Tfrm_info_render_manager.FormShow(Sender: TObject);
begin
t_info_render.Close;
t_info_render.sql.clear;
t_info_render.sql.add('select * from t_info_render where '
+open_data('9002','<27><EFBFBD><E3B1A8>','no','no','no','no')
+' order by <20><EFBFBD><E3B1A8><EFBFBD><EFBFBD>');
t_info_render.open;
t_crm_client_link.Open;
{
t_info_render.Close;
t_info_render.sql.clear;
t_info_render.sql.add('select * from t_info_render where '
+open_data('9002','<27><EFBFBD><E3B1A8>','no','no','no','no')
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+')'
+' order by <20><EFBFBD><E3B1A8><EFBFBD><EFBFBD>');
t_info_render.open;
t_crm_client_link.Open;
}
end;
procedure Tfrm_info_render_manager.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_render_manager.bsSkinButton2Click(Sender: TObject);
begin
if (not if_open('020')) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if t_info_render.IsEmpty then
exit;
if t_info_render.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>浱ǰ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!');
exit;
end;
try
frm_info_render_check:=tfrm_info_render_check.Create (self);
frm_info_render_check.Hint:='1';
frm_info_render_check.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_info_render_check.bsSkinGroupBox1.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_info_render_check.ShowModal;
finally
frm_info_render_check.Free;
frm_info_render_check:=nil;
end;
end;
procedure Tfrm_info_render_manager.bsSkinButton4Click(Sender: TObject);
begin
if t_info_render.IsEmpty then
exit;
if not t_info_render.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
begin
exit;
end;
t_info_render.Edit;
t_info_render['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_info_render.post;
end;
procedure Tfrm_info_render_manager.bsSkinButton10Click(Sender: TObject);
begin
try
frm_info_render_query:=tfrm_info_render_query.Create (self);
frm_info_render_query.Hint:='2';
frm_info_render_query.ShowModal;
finally
frm_info_render_query.Free;
end;
end;
procedure Tfrm_info_render_manager.FormResize(Sender: TObject);
var
i:integer;
begin
i:=round(panel1.Width/7);
bsSkinButton10.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton1.Width:=i;
end;
procedure Tfrm_info_render_manager.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_info_render,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ');
end;
procedure Tfrm_info_render_manager.dxDBGrid1Column1CustomDraw(
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 ANode.Strings[dxDBGrid1Column1.Index]='¼<><C2BC>״̬' then
AColor:=clWhite;
if ANode.Strings[dxDBGrid1Column1.Index]='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
AColor:=$0080FFFF;
if ANode.Strings[dxDBGrid1Column1.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
AColor:=$0000FF80;
if ANode.Strings[dxDBGrid1Column1.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
AColor:=clAqua;
AFont.Color:=clblack;
end;
procedure Tfrm_info_render_manager.bsSkinButton1Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ',2,t_info_render1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_info_render_manager.bsSkinButton3Click(Sender: TObject);
begin
if (t_info_render.State=dsinsert)or(t_info_render.State=dsedit) then
t_info_render.post;
{
if (not if_open('214')) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if t_info_render.IsEmpty then
exit;
if (t_info_render.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>')
and(t_info_render.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>浱ǰ״̬<D7B4><CCAC><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD>!!');
exit;
end;
try
frm_info_render_check:=tfrm_info_render_check.Create (self);
frm_info_render_check.Hint:='2';
frm_info_render_check.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B8B4>';
frm_info_render_check.bsSkinGroupBox1.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_info_render_check.ShowModal;
finally
frm_info_render_check.Free;
frm_info_render_check:=nil;
end;
}
end;
procedure Tfrm_info_render_manager.bsSkinButton7Click(Sender: TObject);
begin
t_info_render.close;
t_info_render.sql.clear;
t_info_render.SQL.add('select * from t_info_render where '
+open_data('9002','<27><EFBFBD><E3B1A8>','no','no','no','no')+
' and <20><><EFBFBD><EFBFBD>״̬='+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''
+' order by <20><EFBFBD><E3B1A8><EFBFBD><EFBFBD>');
t_info_render.open;
end;
procedure Tfrm_info_render_manager.bsSkinButton8Click(Sender: TObject);
begin
t_info_render.close;
t_info_render.sql.clear;
t_info_render.SQL.add('select * from t_info_render where '
+open_data('9002','<27><EFBFBD><E3B1A8>','no','no','no','no')+
' and <20><><EFBFBD><EFBFBD>״̬ in('+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''
+','+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+')'+' order by <20><EFBFBD><E3B1A8><EFBFBD><EFBFBD>');
t_info_render.open;
end;
end.