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.

430 lines
13 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_qiandan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, XPMenu, Menus, dxDBTLCl, dxGrClms, dxDBCtrl, dxDBGrid,
dxTL, dxCntner, DB, ADODB, Mask, wwdbedit, Wwdotdot, Wwdbcomb, wwdblook,
RxLookup, wwdbdatetimepicker, StdCtrls, bsSkinCtrls, ExtCtrls;
type
Tfrm_op_seae_qiandan = class(TForm)
Panel2: TPanel;
Panel3: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton6: 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;
Label30: TLabel;
Label125: TLabel;
Label124: TLabel;
Label16: TLabel;
Label7: TLabel;
Label4: TLabel;
Label12: TLabel;
Edit1: TEdit;
Edit4: TEdit;
Edit2: TEdit;
Edit3: TEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Edit7: TEdit;
wwDBLookupCombo49: TwwDBLookupCombo;
wwDBLookupCombo52: TwwDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBDateTimePicker6: TwwDBDateTimePicker;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column84: TdxDBGridCheckColumn;
dxDBGrid1Column85: TdxDBGridColumn;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column78: TdxDBGridColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridDateColumn;
dxDBGrid1Column18: TdxDBGridDateColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridDateColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridMaskColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column27: TdxDBGridMaskColumn;
dxDBGrid1Column28: TdxDBGridMaskColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column31: TdxDBGridDateColumn;
dxDBGrid1Column32: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
dxDBGrid1Column34: TdxDBGridMaskColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column36: TdxDBGridMaskColumn;
dxDBGrid1Column37: TdxDBGridMaskColumn;
dxDBGrid1Column38: TdxDBGridMaskColumn;
dxDBGrid1Column39: TdxDBGridColumn;
dxDBGrid1Column40: TdxDBGridColumn;
dxDBGrid11: TdxDBGridMaskColumn;
dxDBGrid12: TdxDBGridMaskColumn;
dxDBGrid13: TdxDBGridMaskColumn;
dxDBGrid14: TdxDBGridMaskColumn;
dxDBGrid15: TdxDBGridMaskColumn;
dxDBGrid16: TdxDBGridMaskColumn;
dxDBGrid17: TdxDBGridMaskColumn;
dxDBGrid18: TdxDBGridMaskColumn;
dxDBGrid19: TdxDBGridMaskColumn;
dxDBGrid110: TdxDBGridMaskColumn;
dxDBGrid111: TdxDBGridMaskColumn;
dxDBGrid112: TdxDBGridMaskColumn;
dxDBGrid113: TdxDBGridMaskColumn;
dxDBGrid114: TdxDBGridMaskColumn;
dxDBGrid115: TdxDBGridMaskColumn;
dxDBGrid116: TdxDBGridMaskColumn;
dxDBGrid117: TdxDBGridMaskColumn;
dxDBGrid118: TdxDBGridMaskColumn;
dxDBGrid119: TdxDBGridMaskColumn;
dxDBGrid120: TdxDBGridMaskColumn;
dxDBGrid1Column61: TdxDBGridMaskColumn;
dxDBGrid1TEU: TdxDBGridMaskColumn;
dxDBGrid1Column63: TdxDBGridMaskColumn;
dxDBGrid1Column64: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
dxDBGrid1Column66: TdxDBGridMaskColumn;
dxDBGrid1Column67: TdxDBGridMaskColumn;
dxDBGrid1Column72: TdxDBGridMaskColumn;
dxDBGrid1Column68: TdxDBGridMaskColumn;
dxDBGrid1Column69: TdxDBGridMaskColumn;
dxDBGrid1Column70: TdxDBGridMaskColumn;
dxDBGrid1Column74: TdxDBGridMaskColumn;
dxDBGrid1Column75: TdxDBGridMaskColumn;
dxDBGrid1Column73: TdxDBGridColumn;
dxDBGrid1Column76: TdxDBGridColumn;
dxDBGrid1Column77: TdxDBGridCheckColumn;
dxDBGrid1Column79: TdxDBGridColumn;
dxDBGrid1Column80: TdxDBGridColumn;
dxDBGrid1Column81: TdxDBGridColumn;
dxDBGrid1Column82: TdxDBGridCheckColumn;
dxDBGrid1Column83: TdxDBGridColumn;
dxDBGrid1Column86: TdxDBGridCheckColumn;
dxDBGrid1Column87: TdxDBGridCheckColumn;
dxDBGrid1Column88: TdxDBGridColumn;
bsSkinButton13: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
XPMenu1: TXPMenu;
t_op_seaesel: TADOQuery;
ds_op_seaesel1: TDataSource;
pm1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
RxDBLookupCombo12: TRxDBLookupCombo;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure RxDBLookupCombo12Enter(Sender: TObject);
procedure RxDBLookupCombo12Exit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_qiandan: Tfrm_op_seae_qiandan;
implementation
uses my_sys_function, u_main;
{$R *.dfm}
procedure Tfrm_op_seae_qiandan.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_seae_qiandan.Hide;
frm_op_seae_qiandan.ManualFloat(frm_op_seae_qiandan.BoundsRect );
frm_main.freeTabs('frm_op_seae_qiandan');
action:=cafree;
frm_op_seae_qiandan:=nil;
end;
procedure Tfrm_op_seae_qiandan.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_qiandan.bsSkinButton10Click(Sender: TObject);
var
str:widestring;
begin
if (wwDBDateTimePicker5.text<>'')or(wwDBDateTimePicker6.text<>'') then
begin
str:='where <20>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>=1';
if wwDBDateTimePicker5.text<>'' then
str:=str+' and ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
if wwDBDateTimePicker6.text<>'' then
str:=str+' and ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+'''';
end
else
begin
if wwDBComboBox1.text='' then
str:='where <20>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>=0';
if wwDBComboBox1.text='û<><C3BB>ǩ<EFBFBD><C7A9>' then
str:='where <20>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>=0';
if wwDBComboBox1.text='<27>Ѿ<EFBFBD>ǩ<EFBFBD><C7A9>' then
str:='where <20>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>=1';
end;
if Edit1.text<>''then
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit4.text<>''then
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
if Edit2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
if Edit3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
if wwDBDateTimePicker3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
if wwDBDateTimePicker4.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
if RxDBLookupCombo2.DisplayValues[1]<>''then
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if RxDBLookupCombo12.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo12.DisplayValue+'''';
if wwDBLookupCombo49.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.text+'%'+'''';
if Edit7.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
if wwDBLookupCombo52.text<>''then
str:=str+' and ж<><D0B6><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo52.text+'%'+'''';
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add('select * from t_op_seae '+str+default_sort(53,'t_op_seae','','desc'));
t_op_seae.open;
end;
procedure Tfrm_op_seae_qiandan.bsSkinButton6Click(Sender: TObject);
begin
Edit1.text:='';
Edit4.text:='';
Edit2.text:='';
Edit3.text:='';
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker2.text:='';
RxDBLookupCombo2.ClearValue;
wwDBDateTimePicker3.text:='';
wwDBDateTimePicker4.text:='';
wwDBLookupCombo49.text:='';
Edit7.text:='';
wwDBLookupCombo52.text:='';
RxDBLookupCombo12.ClearValue;
wwDBComboBox1.text:='';
wwDBDateTimePicker5.text:='';
wwDBDateTimePicker6.text:='';
end;
procedure Tfrm_op_seae_qiandan.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_qiandan.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_seae_qiandan.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_seae_qiandan.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,99);
end;
procedure Tfrm_op_seae_qiandan.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_seae_qiandan.FormShow(Sender: TObject);
begin
loadreggrid(dxdbgrid1,true,caption);
end;
procedure Tfrm_op_seae_qiandan.Edit1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_op_seae_qiandan.bsSkinButton10Click(Sender);
end;
end;
procedure Tfrm_op_seae_qiandan.bsSkinButton13Click(Sender: TObject);
begin
if t_op_seae.IsEmpty then
exit;
if t_op_seae.FieldByName('<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>').asboolean then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Ѿ<EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
{ if t_op_seae.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>');
exit;
end; }
t_op_seae.Edit;
t_op_seae['<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>']:=1;
t_op_seae['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_op_seae.post;
Send_op_do('<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ȷ<EFBFBD><C8B7><><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString
+',<2C><><EFBFBD><EFBFBD><E1B5A5>:'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString,'39',
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>Ա').AsString,
t_op_seae.fieldbyname('<27>ͷ<EFBFBD>Ա').AsString,
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
showmessage('ȷ<><C8B7>ǩ<EFBFBD><C7A9><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_qiandan.bsSkinButton1Click(Sender: TObject);
begin
if t_op_seae.IsEmpty then
exit;
if not t_op_seae.FieldByName('<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>').asboolean then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
{if t_op_seae.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>');
exit;
end; }
t_op_seae.Edit;
t_op_seae['<27>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>']:=0;
t_op_seae['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
t_op_seae.post;
showmessage('ȡ<><C8A1>ǩ<EFBFBD><C7A9><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_qiandan.N3Click(Sender: TObject);
var
i:integer;
str:widestring;
begin
if t_op_seae.IsEmpty then
exit;
if dxDBGrid1.SelectedCount>=0 then
begin
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if i=0 then
str:='('+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+''''
else
str:=str+','+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
end;
end else begin
str:='('+''''+t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''';
end;
str:=str+')';
t_op_seaesel.close;
t_op_seaesel.sql.clear;
t_op_seaesel.sql.add('select * from t_op_seae '
+'where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in '+str
+default_sort(53,'t_op_seae','','desc'));
t_op_seaesel.open;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>ǩ<EFBFBD><C7A9>',2,nil,nil,nil,nil,ds_op_seaesel1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_qiandan.N1Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>ǩ<EFBFBD><C7A9>',2,nil,nil,nil,nil,t_op_seae1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_qiandan.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
pm1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_qiandan.RxDBLookupCombo12Enter(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_qiandan.RxDBLookupCombo12Exit(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>';
end;
end.