|
|
unit u_op_ctn_close;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, DB, ADODB, dxExEdtr, dxDBTLCl, dxGrClms, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, dxCntner, ComCtrls, bsSkinTabs, RxLookup, StdCtrls,
|
|
|
Mask, DBCtrls, Grids, Wwdbigrd, Wwdbgrid, XPMenu, Menus, bsSkinBoxCtrls,
|
|
|
bsdbctrls, ExtCtrls, wwdbdatetimepicker, wwdblook;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_ctn_close = class(TForm)
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
t_op_seae1: TDataSource;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
Label3: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label37: TLabel;
|
|
|
Label17: TLabel;
|
|
|
DBEdit3: TDBEdit;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
DBEdit4: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
RxDBLookupCombo13: TRxDBLookupCombo;
|
|
|
t_ch_accept: TADOQuery;
|
|
|
t_ch_accept1: TDataSource;
|
|
|
t_ch_pay: TADOQuery;
|
|
|
t_ch_pay1: TDataSource;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
wwDBGrid2: TwwDBGrid;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
t_op_gain: TADOQuery;
|
|
|
t_op_gain1: TDataSource;
|
|
|
Panel2: TPanel;
|
|
|
bsSkinStdLabel4: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel2: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel3: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel1: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel5: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel6: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel7: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel8: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel9: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel10: TbsSkinStdLabel;
|
|
|
bsSkinDBEdit6: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit4: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit1: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit3: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit5: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit2: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit8: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit7: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit9: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit10: TbsSkinDBEdit;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
N37: TMenuItem;
|
|
|
N38: TMenuItem;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N34: TMenuItem;
|
|
|
N35: TMenuItem;
|
|
|
N36: TMenuItem;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
N5: TMenuItem;
|
|
|
N6: TMenuItem;
|
|
|
N7: TMenuItem;
|
|
|
N8: TMenuItem;
|
|
|
N9: TMenuItem;
|
|
|
N19: TMenuItem;
|
|
|
bsSkinPanel9: TbsSkinPanel;
|
|
|
bsSkinButton44: TbsSkinButton;
|
|
|
t_op_seae: TADOQuery;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
Label116: TLabel;
|
|
|
Label130: TLabel;
|
|
|
Label131: TLabel;
|
|
|
Label45: TLabel;
|
|
|
Label46: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
Edit4: TEdit;
|
|
|
Edit2: TEdit;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormResize(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
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 bsSkinButton10Click(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure wwDBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
|
|
|
Field: TField; State: TGridDrawState);
|
|
|
procedure wwDBGrid2DrawDataCell(Sender: TObject; const Rect: TRect;
|
|
|
Field: TField; State: TGridDrawState);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(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 bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(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 Panel2Resize(Sender: TObject);
|
|
|
procedure N37Click(Sender: TObject);
|
|
|
procedure N17Click(Sender: TObject);
|
|
|
procedure N34Click(Sender: TObject);
|
|
|
procedure N36Click(Sender: TObject);
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
procedure N4Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure N6Click(Sender: TObject);
|
|
|
procedure N7Click(Sender: TObject);
|
|
|
procedure N19Click(Sender: TObject);
|
|
|
procedure bsSkinButton44Click(Sender: TObject);
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
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);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_ctn_close: Tfrm_op_ctn_close;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_op_close_select, u_op_close_all,
|
|
|
u_op_open_select, u_op_open_all;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_op_ctn_close.Hide;
|
|
|
frm_op_ctn_close.ManualFloat(frm_op_ctn_close.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_ctn_close');
|
|
|
action:=cafree;
|
|
|
frm_op_ctn_close:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.FormResize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(bsSkinPanel2.Width/9);
|
|
|
bsSkinButton7.Width:=i;
|
|
|
bsSkinButton6.Width:=i;
|
|
|
bsSkinButton3.Width:=i;
|
|
|
bsSkinButton1.Width:=i;
|
|
|
bsSkinButton4.Width:=i;
|
|
|
bsSkinButton8.Width:=i;
|
|
|
bsSkinButton2.Width:=i;
|
|
|
|
|
|
wwDBGrid1.Height:=round((bsSkinTabSheet2.Height-bsSkinPanel5.Height-Panel2.Height)/2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
{ t_op_seae.Close;
|
|
|
t_op_seae.Parameters.ParamByName('SQLStr').value:='select * from t_op_seae where ҵ<><D2B5>״̬<>'+''''+'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''
|
|
|
+' or <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
|
|
|
+default_sort(53,'t_op_seae','','desc');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN; }
|
|
|
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
if if_open('383') then begin
|
|
|
bsSkinButton3.Enabled:=true;
|
|
|
bsSkinButton1.Enabled:=true;
|
|
|
end;
|
|
|
if if_open('384') then begin
|
|
|
bsSkinButton4.Enabled:=true;
|
|
|
bsSkinButton8.Enabled:=true;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.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_op_ctn_close.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
query_seae(4,'0011');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinTabSheet2.show;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.wwDBGrid1DrawDataCell(Sender: TObject;
|
|
|
const Rect: TRect; Field: TField; State: TGridDrawState);
|
|
|
begin
|
|
|
fee_color(t_ch_accept,wwDBGrid1,Rect,Field);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.wwDBGrid2DrawDataCell(Sender: TObject;
|
|
|
const Rect: TRect; Field: TField; State: TGridDrawState);
|
|
|
begin
|
|
|
fee_color(t_ch_pay,wwDBGrid2,Rect,Field);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
bookmark:Tbookmark;
|
|
|
rc,i:integer;
|
|
|
can_do:Boolean;
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if (t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>')then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD>ķ<EFBFBD><C4B7>ö<EFBFBD><C3B6>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
try
|
|
|
if (dxdbgrid1.SelectedCount>=1) and (bsSkinPageControl1.TabIndex=0) then
|
|
|
begin
|
|
|
bookmark:=t_op_seae.GetBookmark;
|
|
|
try
|
|
|
for i:=0 to dxdbgrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_seae.GotoBookmark(pointer(dxdbgrid1.selectedrows[i]));
|
|
|
if t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
|
|
|
begin
|
|
|
can_do:=true;
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_accept.first;
|
|
|
while not t_ch_accept.eof do
|
|
|
begin
|
|
|
if can_do then
|
|
|
begin
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
can_do:=false;
|
|
|
end;
|
|
|
end;
|
|
|
t_ch_accept.next;
|
|
|
end;
|
|
|
if can_do then
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.open;
|
|
|
t_ch_pay.first;
|
|
|
while not t_ch_pay.eof do
|
|
|
begin
|
|
|
if can_do then
|
|
|
begin
|
|
|
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
can_do:=false;
|
|
|
end;
|
|
|
end;
|
|
|
t_ch_pay.next;
|
|
|
end;
|
|
|
end;
|
|
|
if can_do then
|
|
|
begin
|
|
|
t_op_seae.edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
|
|
|
t_op_seae['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
|
|
|
t_op_seae.post;
|
|
|
|
|
|
end else rc:=rc+1;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_seae.requery;
|
|
|
t_op_seae.GotoBookmark(bookmark);
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
|
|
|
begin
|
|
|
can_do:=true;
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_accept.first;
|
|
|
while not t_ch_accept.eof do
|
|
|
begin
|
|
|
if can_do then
|
|
|
begin
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
can_do:=false;
|
|
|
end;
|
|
|
end;
|
|
|
t_ch_accept.next;
|
|
|
end;
|
|
|
if can_do then
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.open;
|
|
|
t_ch_pay.first;
|
|
|
while not t_ch_pay.eof do
|
|
|
begin
|
|
|
if can_do then
|
|
|
begin
|
|
|
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
can_do:=false;
|
|
|
end;
|
|
|
end;
|
|
|
t_ch_pay.next;
|
|
|
end;
|
|
|
end;
|
|
|
if can_do then
|
|
|
begin
|
|
|
t_op_seae.edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
|
|
|
t_op_seae['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
|
|
|
t_op_seae.post;
|
|
|
|
|
|
end else rc:=1;
|
|
|
end;
|
|
|
t_op_seae.Refresh;
|
|
|
end;
|
|
|
if rc<>0 then
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+inttostr(rc)+'Ʊҵ<C6B1><D2B5>û<EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>,<2C><>ע<EFBFBD>⣡',mtWarning,[mbyes],0);
|
|
|
|
|
|
finally
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
bookmark:Tbookmark;
|
|
|
rc,i:integer;
|
|
|
can_do:Boolean;
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if (t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>')then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD>ķ<EFBFBD><C4B7>ö<EFBFBD><C3B6>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
bookmark:=t_op_seae.GetBookmark;
|
|
|
// accept.DataSet.DisableControls;
|
|
|
// pay.DataSet.DisableControls;
|
|
|
t_op_seae.DisableControls;
|
|
|
rc:=0;
|
|
|
try
|
|
|
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.eof do
|
|
|
begin
|
|
|
if t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>' then
|
|
|
begin
|
|
|
can_do:=true;
|
|
|
t_ch_accept.close;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_accept.first;
|
|
|
while not t_ch_accept.eof do
|
|
|
begin
|
|
|
if can_do then
|
|
|
begin
|
|
|
if (t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
|
|
|
(t_ch_accept.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
can_do:=false;
|
|
|
end;
|
|
|
end;
|
|
|
t_ch_accept.next;
|
|
|
end;
|
|
|
if can_do then
|
|
|
begin
|
|
|
t_ch_pay.close;
|
|
|
t_ch_pay.open;
|
|
|
t_ch_pay.first;
|
|
|
while not t_ch_pay.eof do
|
|
|
begin
|
|
|
if can_do then
|
|
|
begin
|
|
|
if (t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹɾ<D6B9><C9BE>') and
|
|
|
(t_ch_pay.FieldByName('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><>ֹ<EFBFBD><EFBFBD>')then
|
|
|
begin
|
|
|
can_do:=false;
|
|
|
end;
|
|
|
end;
|
|
|
t_ch_pay.next;
|
|
|
end;
|
|
|
end;
|
|
|
if can_do then
|
|
|
begin
|
|
|
t_op_seae.edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
|
|
|
t_op_seae['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
|
|
|
|
|
|
t_op_seae.post;
|
|
|
end else rc:=rc+1;
|
|
|
end;
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
finally
|
|
|
// accept.DataSet.EnableControls;
|
|
|
// pay.DataSet.EnableControls;
|
|
|
t_op_seae.EnableControls;
|
|
|
t_op_seae.requery;
|
|
|
t_op_seae.GotoBookmark(bookmark);
|
|
|
end;
|
|
|
if rc<>0 then
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+inttostr(rc)+'Ʊҵ<C6B1><D2B5>û<EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>,<2C><>ע<EFBFBD>⣡',mtWarning,[mbyes],0);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton4Click(Sender: TObject);
|
|
|
var
|
|
|
bookmark:Tbookmark;
|
|
|
i:integer;
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if (t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>')then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD>ķ<EFBFBD><C4B7>ö<EFBFBD>û<EFBFBD>з<EFBFBD><D0B7>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if (dxdbgrid1.SelectedCount>=1) and (bsSkinPageControl1.TabIndex=0) then
|
|
|
begin
|
|
|
bookmark:=t_op_seae.GetBookmark;
|
|
|
try
|
|
|
for i:=0 to dxdbgrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_seae.GotoBookmark(pointer(dxdbgrid1.selectedrows[i]));
|
|
|
if (t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>') then
|
|
|
begin
|
|
|
if t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime<=Logininfo.endday then begin
|
|
|
MessageDlg('<27>˻<EFBFBD><CBBB><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC>Ѿ<EFBFBD><D1BE><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD>ܽ<EFBFBD><DCBD>⣡',mtWarning,[mbok],0);
|
|
|
end else begin
|
|
|
t_op_seae.edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_op_seae.post;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_seae.requery;
|
|
|
t_op_seae.GotoBookmark(bookmark);
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>')
|
|
|
then
|
|
|
begin
|
|
|
if t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime<=Logininfo.endday then begin
|
|
|
MessageDlg('<27>˻<EFBFBD><CBBB><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC>Ѿ<EFBFBD><D1BE><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD>ܽ<EFBFBD><DCBD>⣡',mtWarning,[mbok],0);
|
|
|
end else begin
|
|
|
t_op_seae.edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_op_seae.post;
|
|
|
end;
|
|
|
end;
|
|
|
t_op_seae.Refresh;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton8Click(Sender: TObject);
|
|
|
var
|
|
|
bookmark:TBookmark;
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if (t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring<>'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>')then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD>ķ<EFBFBD><C4B7>ö<EFBFBD>û<EFBFBD>з<EFBFBD><D0B7>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
bookmark:=t_op_seae.GetBookmark;
|
|
|
try
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.eof do
|
|
|
begin
|
|
|
if (t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>')
|
|
|
then
|
|
|
begin
|
|
|
if t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime<=Logininfo.endday then begin
|
|
|
MessageDlg('<27>˻<EFBFBD><CBBB><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC>Ѿ<EFBFBD><D1BE><EFBFBD>ĩ<EFBFBD><C4A9><EFBFBD><EFBFBD>,<2C><><EFBFBD>ܽ<EFBFBD><DCBD>⣡',mtWarning,[mbok],0);
|
|
|
end else begin
|
|
|
t_op_seae.edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_op_seae.post;
|
|
|
end;
|
|
|
end;
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
finally
|
|
|
t_op_seae.requery;
|
|
|
t_op_seae.GotoBookmark(bookmark);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.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_op_ctn_close.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
if not t_op_seae.Bof then
|
|
|
t_op_seae.Prior;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
if not t_op_seae.eof then
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,15);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
// Column_sort_pro(Column,t_op_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round((Panel2.Width-196)/10);
|
|
|
bsSkinDBEdit1.Width:=i;
|
|
|
bsSkinDBEdit2.Width:=i;
|
|
|
bsSkinDBEdit3.Width:=i;
|
|
|
bsSkinDBEdit4.Width:=i;
|
|
|
bsSkinDBEdit5.Width:=i;
|
|
|
bsSkinDBEdit6.Width:=i;
|
|
|
bsSkinDBEdit7.Width:=i;
|
|
|
bsSkinDBEdit8.Width:=i;
|
|
|
bsSkinDBEdit9.Width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N37Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
{
|
|
|
t_op_seae.Parameters.ParamByName('SQLStr').value:='select * from t_op_seae where '
|
|
|
+'<27><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_op_state where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><>1) and'
|
|
|
+open_data('0011','¼<><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_op_seae.sql.text:='select * from v_op_ctnmg_detail where '
|
|
|
+'<27><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_op_state where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><>1) and'
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N17Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.sql.text:='select * from v_op_ctnmg_detail where '
|
|
|
+'<27><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬='
|
|
|
+''''+'¼<><C2BC>״̬'+''''+') and'
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N34Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.sql.text:='select * from v_op_ctnmg_detail where '
|
|
|
+' <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>'+''''+')) and '
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N36Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.Parameters.ParamByName('SQLStr').value:='select * from v_op_ctnmg_detail 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>'+''''+')) and '
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.sql.text:='select * from v_op_ctnmg_detail where'
|
|
|
+' <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><>'+''''+') and '
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N4Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.sql.Text:='select * from v_op_ctnmg_detail '
|
|
|
+' where <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><>'+''''+') and '
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton2.ClientToScreen(Point(0,bsSkinButton2.Height));
|
|
|
PopupMenu3.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N6Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.sql.text:='select * from v_op_ctnmg_detail '
|
|
|
+' where <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>״̬ in ('
|
|
|
+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><>ֹ<EFBFBD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
|
|
|
+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+')) '
|
|
|
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬ not in ('
|
|
|
+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><>ֹ<EFBFBD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
|
|
|
+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+')) and '
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N7Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.sql.text:='select * from v_op_ctnmg_detail where'
|
|
|
+' <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
|
|
|
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee ) and '
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.N19Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.sql.text:='select * from v_op_ctnmg_detail where'
|
|
|
+' <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>'+''''+') and '
|
|
|
+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
t_op_seae.open;
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.bsSkinButton44Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
|
|
|
t_ch_accept.close;
|
|
|
t_ch_pay.close;
|
|
|
t_op_gain.close;
|
|
|
|
|
|
str:='';
|
|
|
str:=query_tiaojian(1,str,'v_op_ctnmg_detail.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker1.text);
|
|
|
str:=query_tiaojian(1,str,'v_op_ctnmg_detail.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>','С<><D0A1>',wwDBDateTimePicker2.text);
|
|
|
str:=query_tiaojian(1,str,'v_op_ctnmg_detail.<2E><><EFBFBD><EFBFBD><EFBFBD>䵥<EFBFBD><E4B5A5>','ģ<><C4A3>',Edit1.text);
|
|
|
str:=query_tiaojian(1,str,'v_op_ctnmg_detail.<2E><><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit4.text);
|
|
|
str:=query_tiaojian(1,str,'v_op_ctnmg_detail.<2E><>ǰ<EFBFBD>ᵥ<EFBFBD><E1B5A5>','ģ<><C4A3>',Edit2.text);
|
|
|
|
|
|
|
|
|
if trim(str)='' then
|
|
|
begin
|
|
|
str:='where '+open_data('0008','v_op_ctnmg_detail.¼<><C2BC><EFBFBD><EFBFBD>',
|
|
|
'no','no','no','no');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str:=str+' and '+open_data('0008','v_op_ctnmg_detail.¼<><C2BC><EFBFBD><EFBFBD>',
|
|
|
'no','no','no','no');
|
|
|
end;
|
|
|
|
|
|
str:='select * from v_op_ctnmg_detail '+str+'order by ctnid';
|
|
|
|
|
|
t_op_seae.close;
|
|
|
// t_op_seae.Parameters.ParamByName('SQLStr').value:=str;
|
|
|
t_op_seae.sql.text:=str;
|
|
|
t_op_seae.Open;
|
|
|
|
|
|
t_ch_accept.open;
|
|
|
t_ch_pay.open;
|
|
|
t_op_gain.OPEN;
|
|
|
|
|
|
if t_op_seae.IsEmpty then
|
|
|
begin
|
|
|
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
if Key=#13 then
|
|
|
bsSkinButton44.OnClick(Sender);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_ctn_close.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;
|
|
|
|
|
|
end.
|