|
|
unit u_op_add_hpctn;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, BusinessSkinForm, StdCtrls, Mask, DBCtrls, bsSkinCtrls, DB,
|
|
|
ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms,
|
|
|
wwdbdatetimepicker,XPMenu, Menus, ExtCtrls,
|
|
|
wwdblook;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_add_hpctn = class(TForm)
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
t_main: TADOQuery;
|
|
|
t_main1: TDataSource;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label2: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label6: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label10: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit2: TDBEdit;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit4: TDBEdit;
|
|
|
DBEdit5: TDBEdit;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit9: TDBEdit;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
Label1: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
Label37: TLabel;
|
|
|
Edit2: TEdit;
|
|
|
Label38: TLabel;
|
|
|
Edit3: TEdit;
|
|
|
t_fen: TADOQuery;
|
|
|
t_fen1: TDataSource;
|
|
|
t_fen_no: TADOQuery;
|
|
|
t_fen_no1: TDataSource;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column10: TdxDBGridColumn;
|
|
|
dxDBGrid2Column11: TdxDBGridColumn;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N2: TMenuItem;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid2Column12: TdxDBGridColumn;
|
|
|
dxDBGrid3Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
dxDBGrid3Column8: TdxDBGridColumn;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Label11: TLabel;
|
|
|
Edit4: TEdit;
|
|
|
Label12: TLabel;
|
|
|
Edit5: TEdit;
|
|
|
Label13: TLabel;
|
|
|
Edit6: TEdit;
|
|
|
Edit7: TEdit;
|
|
|
Label14: TLabel;
|
|
|
Label125: TLabel;
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
Label124: TLabel;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_add_hpctn: Tfrm_op_add_hpctn;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, u_op_seae, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_add_hpctn.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_hpctn.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
t_fen.close;
|
|
|
t_main.close;
|
|
|
t_main.sql.clear;
|
|
|
t_main.sql.add('select * from t_op_seae where װ<>˷<EFBFBD>ʽ='+''''+'<27><>Ʊ<EFBFBD><C6B1>Ʊ'+'''');
|
|
|
if Edit1.text<>''then
|
|
|
t_main.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''');
|
|
|
if Edit2.text<>''then
|
|
|
t_main.sql.add(' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''');
|
|
|
if Edit3.text<>''then
|
|
|
t_main.sql.add(' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''');
|
|
|
t_main.sql.add(default_sort(53,'t_op_seae','','desc'));
|
|
|
t_main.open;
|
|
|
t_fen.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_hpctn.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
if t_main.IsEmpty then
|
|
|
exit;
|
|
|
if t_main.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1>Ʊҵ<C6B1><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC>룡<EFBFBD><EBA3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if dxDBGrid1.SelectedCount>=1 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_fen_no.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
t_fen_no.Edit;
|
|
|
t_fen_no['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_main.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
t_fen_no.post;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_fen_no.Edit;
|
|
|
t_fen_no['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_main.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
t_fen_no.post;
|
|
|
end;
|
|
|
t_fen.Requery();
|
|
|
t_fen_no.requery;
|
|
|
frm_op_seae.t_op_seae.Requery();
|
|
|
//close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_hpctn.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
t_fen_no.close;
|
|
|
t_fen_no.sql.clear;
|
|
|
t_fen_no.sql.add('select * from t_op_seae where װ<>˷<EFBFBD>ʽ='
|
|
|
+''''+'<27><>Ʊ<EFBFBD><C6B1>Ʊ'+''''+' and <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' and '
|
|
|
+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
+default_sort(53,'t_op_seae','','desc'));
|
|
|
t_fen_no.open;
|
|
|
t_main.open;
|
|
|
t_fen.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_hpctn.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
if t_main.IsEmpty then
|
|
|
exit;
|
|
|
if t_main.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊ<EFBFBD><C6B1>Ʊҵ<C6B1><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>룡<EFBFBD><EBA3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_fen.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if dxDBGrid3.SelectedCount>=1 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid3.SelectedCount-1 do
|
|
|
begin
|
|
|
t_fen.GotoBookmark(pointer(dxDBGrid3.selectedrows[i]));
|
|
|
t_fen.edit;
|
|
|
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_fen['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_fen.post;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_fen.edit;
|
|
|
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_fen['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_fen.post;
|
|
|
end;
|
|
|
t_fen.Requery();
|
|
|
t_fen_no.Requery();
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_hpctn.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
Edit4.text:='';
|
|
|
Edit5.text:='';
|
|
|
Edit6.text:='';
|
|
|
Edit7.text:='';
|
|
|
wwDBLookupCombo49.text:='';
|
|
|
wwDBLookupCombo52.text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_hpctn.bsSkinButton3Click(Sender: TObject);
|
|
|
VAR
|
|
|
STR:WIDESTRING;
|
|
|
begin
|
|
|
STR:='select * from t_op_seae where װ<>˷<EFBFBD>ʽ='
|
|
|
+''''+'<27><>Ʊ<EFBFBD><C6B1>Ʊ'+''''+' and <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' and '
|
|
|
+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
IF Edit4.TEXT<>''THEN
|
|
|
STR:=STR+' AND ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit4.TEXT+'%'+'''';
|
|
|
IF Edit5.TEXT<>''THEN
|
|
|
STR:=STR+' AND ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit5.TEXT+'%'+'''';
|
|
|
IF Edit6.TEXT<>''THEN
|
|
|
STR:=STR+' AND <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit6.TEXT+'%'+'''';
|
|
|
IF Edit7.TEXT<>''THEN
|
|
|
STR:=STR+' AND <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.TEXT+'%'+'''';
|
|
|
IF wwDBLookupCombo49.TEXT<>''THEN
|
|
|
STR:=STR+' AND <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.TEXT+'%'+'''';
|
|
|
IF wwDBLookupCombo52.TEXT<>''THEN
|
|
|
STR:=STR+' AND ж<><D0B6><EFBFBD><EFBFBD> like '+''''+'%'+trim(wwDBLookupCombo52.TEXT)+'%'+'''';
|
|
|
STR:=STR+default_sort(53,'t_op_seae','','desc');
|
|
|
|
|
|
t_fen_no.close;
|
|
|
t_fen_no.sql.clear;
|
|
|
t_fen_no.sql.add(str);
|
|
|
t_fen_no.open;
|
|
|
end;
|
|
|
|
|
|
end.
|