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.

629 lines
18 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_signqtdlist;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, bsSkinCtrls, DB,
ADODB, ExtCtrls, RxLookup, StdCtrls, wwdbdatetimepicker, wwdblook, Menus,
Mask, bsSkinBoxCtrls, bsdbctrls,DateUtils, kbmMemTable, DBCtrlsEh,ShellAPI,
ComCtrls, bsSkinTabs, dxDBTLCl, dxGrClms, cxDBLabel, cxControls,
cxContainer, cxEdit, cxLabel;
type
Tfrm_op_seae_signqdtlist = class(TForm)
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
kbmMemTable1: TkbmMemTable;
kbmMemTable1Field: TStringField;
kbmMemTable1Field3: TStringField;
kbmMemTable1Field4: TStringField;
kbmMemTable1Field5: TStringField;
kbmMemTable1Field6: TStringField;
kbmMemTable1Field7: TStringField;
kbmMemTable1Field2: TStringField;
kbmMemTable1Field9: TStringField;
kbmMemTable1Field10: TStringField;
kbmMemTable1Field8: TStringField;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
kbmMemTable1Field11: TStringField;
kbmMemTable1Field12: TStringField;
kbmMemTable1Field13: TStringField;
kbmMemTable1Field14: TStringField;
kbmMemTable1Field15: TStringField;
kbmMemTable1Field16: TStringField;
bsSkinPanel3: TbsSkinPanel;
btn3_notify: TbsSkinButton;
btn6_exit: TbsSkinButton;
btn1_search: TbsSkinButton;
btn2_clear: TbsSkinButton;
bsSkinPanel4: TbsSkinPanel;
Label13: TLabel;
Label14: TLabel;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBDateTimePicker6: TwwDBDateTimePicker;
dxDBGrid1: TdxDBGrid;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
Edit6_searchkhmch: TEdit;
Label8: TLabel;
kbmMemTable1Field17: TStringField;
kbmMemTable1Field18: TStringField;
kbmMemTable1Field19: TStringField;
kbmMemTable1Field20: TStringField;
kbmMemTable1Field21: TStringField;
kbmMemTable1Field22: TBooleanField;
kbmMemTable1Field23: TStringField;
dxdbgrdclmnDBGrid1Column10: TdxDBGridColumn;
kbmMemTable1Field24_xuanxiang: TBooleanField;
dxdbgrdclmnDBGrid1Column11: TdxDBGridColumn;
dxdbgrdclmnDBGrid1Column12: TdxDBGridColumn;
dxdbgrdclmnDBGrid1Column13: TdxDBGridColumn;
Edit1_qdtbh: TEdit;
lbl14: TLabel;
lbl15_searchqdthm: TLabel;
Edit15_searchqdthm: TEdit;
bsknpnl1_m: TbsSkinPanel;
qry1_qdtm: TADOQuery;
ds1: TDataSource;
lbl10: TLabel;
cbb1: TDBComboBoxEh;
dxdbgrdclmnDBGrid1Column14: TdxDBGridColumn;
dxdbgrdchckclmnDBGrid1Column14_tf: TdxDBGridCheckColumn;
dxdbgrdclmnDBGrid1Column15: TdxDBGridColumn;
dxdbgrdchckclmnDBGrid1Column13b: TdxDBGridCheckColumn;
mniN2: TMenuItem;
mniN3: TMenuItem;
dxdbgrdclmnDBGrid1Column16: TdxDBGridColumn;
dxdbgrdclmnDBGrid1Column17: TdxDBGridColumn;
procedure btn4_exitClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure N1Click(Sender: TObject);
procedure Edit3_ztdhKeyPress(Sender: TObject; var Key: Char);
procedure btn1_searchClick(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure btn6_exitClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure searchqdt(bh:string);
procedure Edit1_qdtbhKeyPress(Sender: TObject; var Key: Char);
procedure dxDBGrid1DblClick(Sender: TObject);
procedure btn3_notifyClick(Sender: TObject);
procedure Edit6_searchkhmchKeyPress(Sender: TObject; var Key: Char);
procedure mniN2Click(Sender: TObject);
procedure mniN3Click(Sender: TObject);
procedure dxDBGrid1CustomDraw(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 }
employeePhone:string;
function CheckBilldue():Boolean;
public
{ Public declarations }
op:integer;
function GetmblState(bsno:string):Boolean;
function GetmblzbState(bsno:string):Boolean;
function GetmblStateOut(bsno:string):Boolean;
procedure UpateSeaeState(bsno,billstate:string);
function GetSeaeStateDate(bsno,billstate:string):string;
function _GetmblStateout(bsno,bsstatus:string):string;
procedure Initsql_ts(AdoQuery:TAdoQuery);
procedure initialEmployeePhone();
procedure show_qdtxx(qdtbh:string;iway:Integer);
end;
var
frm_op_seae_signqdtlist: Tfrm_op_seae_signqdtlist;
implementation
uses u_main,my_sys_function, u_op_seae_teshufandan,u_sys_progress,u_op_seae_sign_info,
u_op_seae_sign;
{$R *.dfm}
const stateNewQD = '<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
//
function Tfrm_op_seae_signqdtlist._GetmblStateout(bsno,bsstatus:string):string;
var aAdoQuery:TAdoQuery;
begin
result:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬,¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
SQL.Add('from t_op_state where <20><><EFBFBD><EFBFBD>=:bsNo1 and ҵ<><D2B5>״̬=:bsstatus ');
Parameters.ParamByName('bsNo1').value:=bsno;
Parameters.ParamByName('bsstatus').value:=bsstatus;
Open;
if not IsEmpty then
result:=FieldByName('ҵ<><D2B5>״̬').AsString;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_signqdtlist.GetSeaeStateDate(bsno,billstate:string):string;
var aAdoQuery:TAdoQuery;
begin
Result:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_state');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:bsNo and ҵ<><D2B5>״̬=:billstate');
Parameters.ParamByName('bsNo').value:=bsno;
Parameters.ParamByName('billstate').value:=billstate;
open;
if not IsEmpty then
Result:=FormatDateTime('YYYY-MM-DD',FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
finally
aAdoQuery.Free;
end;
end;
procedure Tfrm_op_seae_signqdtlist.UpateSeaeState(bsno,billstate:string);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('Update t_op_Seae');
SQL.Add('set <20>ᵥǩ<E1B5A5><C7A9>״̬=:billstate where <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Parameters.ParamByName('billstate').value:=billstate;
execsql;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_signqdtlist.GetmblState(bsno:string):Boolean;
var aAdoQuery:TAdoQuery;
b1,b2,b3:Boolean;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''֪ͨ<CDA8>ŵ<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b1:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b2:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b3:= isempty or (RecordCount=0);
result:=(b1 or b2) and b3;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_signqdtlist.GetmblzbState(bsno:string):Boolean; //
var aAdoQuery:TAdoQuery;
b1,b2,b3,b4:Boolean;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''֪ͨ<CDA8>ŵ<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b1:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b2:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b3:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b4:= isempty or (RecordCount=0);
result:=(b1 or b2 or b3) and b4;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_signqdtlist.GetmblStateOut(bsno:string):Boolean;
var aAdoQuery:TAdoQuery;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
result:=RecordCount=1;
finally
aAdoQuery.Free;
end;
end;
procedure Tfrm_op_seae_signqdtlist.btn4_exitClick(Sender: TObject);
begin
Close;
end;
procedure Tfrm_op_seae_signqdtlist.FormShow(Sender: TObject);
var str,mblstatus:string;
begin
Width :=width-1;
dxDBGrid1.Width :=dxDBGrid1.width-1;
bsSkinPanel3.Height :=34;
wwDBDateTimePicker5.Date:=Date-7;//StrToDateTime(Formatdatetime('YYYY-MM-DD',date-3));
wwDBDateTimePicker6.Date:=Date;//StrToDateTime(Formatdatetime('YYYY-MM-DD',date));
show_qdtxx('',1);
Edit1_qdtbh.SetFocus();
loadreggrid(dxdbgrid1,false,caption );
end;
procedure Tfrm_op_seae_signqdtlist.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_seae_signqdtlist.Hide;
frm_op_seae_signqdtlist.ManualFloat(frm_op_seae_signqdtlist.BoundsRect );
frm_main.freeTabs('frm_op_seae_signqdtlist');
action:=cafree;
frm_op_seae_signqdtlist:=nil;
end;
procedure Tfrm_op_seae_signqdtlist.Initsql_ts(AdoQuery:TAdoQuery);
begin
with AdoQuery do
begin
Close;Sql.Clear;
SQL.Add('Select <20><><EFBFBD><EFBFBD>,<2C>ŵ<EFBFBD>״̬ from t_op_fangdan');
sql.add('order by <20><><EFBFBD><EFBFBD>');
Open;First;
end;
end;
procedure Tfrm_op_seae_signqdtlist.N1Click(Sender: TObject);
begin
//grid_save_xls(dxdbgrd2);
end;
procedure Tfrm_op_seae_signqdtlist.Edit3_ztdhKeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
//bsSkinButton8Click(Sender);
end;
end;
procedure Tfrm_op_seae_signqdtlist.btn1_searchClick(Sender: TObject);
begin
//
show_qdtxx('',1);
end;
procedure Tfrm_op_seae_signqdtlist.MenuItem1Click(Sender: TObject);
begin
grid_save_xls(dxDBGrid1);
end;
procedure Tfrm_op_seae_signqdtlist.btn6_exitClick(Sender: TObject);
begin
Close();
end;
procedure Tfrm_op_seae_signqdtlist.initialEmployeePhone();
var
empQuery:TADOQuery;
begin
//
empQuery:=CreateAdoQuery();
with empQuery do
begin
SQL.Add('select [<5B>̶<EFBFBD><CCB6>绰],[<5B>ƶ<EFBFBD><C6B6>绰] from [t_sys_employee] where [<5B><><EFBFBD><EFBFBD>]='''+ employee +''' ');
Open;First;
employeePhone :=FieldByName('<27>̶<EFBFBD><CCB6>绰').AsString;
close();
end;
end;
procedure Tfrm_op_seae_signqdtlist.searchqdt(bh:string);
begin
//
if bh<>'' then
begin
//
show_qdtxx(bh,1);
end;
end;
procedure Tfrm_op_seae_signqdtlist.Edit1_qdtbhKeyPress(Sender: TObject;
var Key: Char);
var
str:string;
begin
//
if key=#13 then
begin
str:= Edit1_qdtbh.Text;
Edit1_qdtbh.Clear();
Edit15_searchqdthm.Text:=str;
show_qdtxx(str,0);
end;
end;
procedure Tfrm_op_seae_signqdtlist.dxDBGrid1DblClick(Sender: TObject);
var
str:string;
begin
//
str:=qry1_qdtm.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
show_qdtxx(str,2);
qry1_qdtm.Requery();
end;
procedure Tfrm_op_seae_signqdtlist.show_qdtxx (qdtbh:string;iway:Integer);
var
str:string;
begin
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if not assigned(frm_op_seae_sign_info) then
frm_op_seae_sign_info:=Tfrm_op_seae_sign_info.Create (self);
//˫<><CBAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ϸ
if iway=2 then
begin
frm_op_seae_sign_info.InitialUserinfo(qdtbh,3);
frm_op_seae_sign_info.SigninfoShow();
Exit;
end;
if(qdtbh<>'') then
str :=' where ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =''' +qdtbh + ''''
else
begin
//
str:=' where 1=1';
if wwDBDateTimePicker5.text<>''then
str:=str+' and t_op_seae_sign_main.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
if wwDBDateTimePicker6.text<>''then
str:=str+' and t_op_seae_sign_main.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker6.text+' 23:59:59''';
if Edit6_searchkhmch.text<>''then
str:=str+' and t_op_seae_sign_main.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> like'+'''%'+stringreplace(trim(Edit6_searchkhmch.text),'''','''''',[rfReplaceAll])+'%''';
end;
str:='SELECT *,case <20>Ƿ<EFBFBD><C7B7>ط<EFBFBD> when 1 then ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+1 else null end as <20><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD> FROM [t_op_seae_sign_main] ' +str;
qry1_qdtm.Close() ;
qry1_qdtm.SQL.Clear;
qry1_qdtm.SQL.Add(str);
qry1_qdtm.open; qry1_qdtm.First;
if qry1_qdtm.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ҵļ<D2B5>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>');
exit;
end;
if (qry1_qdtm.Recordset.RecordCount=1) and (qdtbh<>'') and (iway=0) then
begin
//
frm_op_seae_sign_info.InitialUserinfo(qdtbh,3);
frm_op_seae_sign_info.SigninfoShow();
end;
end;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB>Ƿ<EFBFBD>Ƿ<EFBFBD><C7B7>
/// </summary>
function Tfrm_op_seae_signqdtlist.CheckBilldue():Boolean;
var
FeeItems:string;
amt,usd:Double;
wtdw,tdh:string;
begin
wtdw:=t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString;
tdh:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
if (Trim(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='') or (Trim(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') or (Trim(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>') or (t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull) then
begin
if GetCrmsales(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString
,t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,amt,usd,FeeItems) then
begin
//<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪƱ<CEAA><C6B1>
MessageDlg('<27><><EFBFBD><EFBFBD><E1B5A5>Ϊ"'+ tdh+'"<22><>'+wtdw+'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪƱ<CEAA><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:'+FormatFloat('0.00;0.00;0',amt) +'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;0.00;0',USD) +'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>',mtWarning,[mbok],0);
Result:=False;
end ;
end
else
begin
if GetCrmsales(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,t_op_seae.FieldByName('ί<>е<EFBFBD>λ').AsString
,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,amt,usd,FeeItems) then
begin
MessageDlg( '<27><><EFBFBD><EFBFBD><E1B5A5>Ϊ"'+ tdh+'"<22><>'+wtdw+'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>Ϊ:'+FormatFloat('0.00;0.00;0',amt) +'<27><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>Ϊ:'+FormatFloat('0.00;0.00;0',USD) +'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>',mtWarning,[mbok],0);
Result:=False;
end;
end;
end; //end CheckBilldue
procedure Tfrm_op_seae_signqdtlist.btn3_notifyClick(Sender: TObject);
var
qdtzht,strsql:string;
i,noticecount:integer;
aQuery:TADOQuery;
DatabaseDateTime:TDatetime;
qdtlx:string;
begin
//
if dxDBGrid1.SelectedCount<1 then
Exit;
aQuery:=CreateAdoQuery;
with aQuery do
try
Close;sql.Clear;
sql.Add('select GetDate() as FDate');
open;
DatabaseDateTime:=FieldValues['FDate'];
finally
FreeAndNil(aQuery);
end;
{ <20><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>
<EFBFBD>Ѵ<EFBFBD>ӡǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ѷ<EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
֪ͨǨ<EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ǩ<EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>ͻ<EFBFBD>ǩ<EFBFBD><EFBFBD>ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> }
noticecount:=0;
//<2F><><EFBFBD><EFBFBD>״̬
try
frm_main.db.BeginTrans;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
qry1_qdtm.GoTobookmark(pointer(dxDBGrid1.SelectedRows[i]));
qdtzht := qry1_qdtm.FieldByName('״̬').AsString;
qdtlx:= qry1_qdtm.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if (qdtlx='Ʊ<><C6B1>') and (qdtzht='<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>') or (qdtzht='<27>Ѵ<EFBFBD>ӡǩ<D3A1><C7A9><EFBFBD><EFBFBD>') or (qdtzht='<27>ѷ<EFBFBD><D1B7><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>') then
begin
//
qry1_qdtm.Edit;
qry1_qdtm.FieldByName('״̬').AsString:='֪ͨǩ<D6AA><C7A9>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
qry1_qdtm.FieldByName('֪ͨǩ<D6AA><C7A9>ʱ<EFBFBD><CAB1>').AsDateTime:= GetDbDatetime;
strsql:='INSERT INTO [dbo].[t_op_state]([<5B><><EFBFBD><EFBFBD>],[ҵ<><D2B5>״̬],[¼<><C2BC><EFBFBD><EFBFBD>] ,[¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] ) '
+'select <20><><EFBFBD><EFBFBD> ,''֪ͨǩ<D6AA><C7A9>'' as ҵ<><D2B5>״̬,'''+ employee +''' as ¼<><C2BC><EFBFBD><EFBFBD> ,GETDATE() ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from'
+' (select <20><><EFBFBD><EFBFBD> from t_op_seae_sign_detail d where ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+ qry1_qdtm.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString +''''
+' and not exists (select <20><><EFBFBD><EFBFBD> from [t_op_state] where ҵ<><D2B5>״̬=''֪ͨǩ<D6AA><C7A9>'' and <20><><EFBFBD><EFBFBD>= d.<2E><><EFBFBD><EFBFBD> )) v;';
frm_main.db.Execute(strsql);
noticecount:=noticecount+1;
end;
end;
frm_main.db.CommitTrans;
if noticecount>0 then
application.MessageBox(PChar('ǩ<><C7A9><EFBFBD><EFBFBD>֪ͨ<CDA8>ѷ<EFBFBD><D1B7><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+IntToStr(noticecount)+'<27><><EFBFBD><EFBFBD>Ϣ'),'<27><>Ϣ<EFBFBD><CFA2>ʾ') ;
qry1_qdtm.Requery();
except
on ex: Exception do
begin
errorlog(ex.Message) ;
ShowMessage(ex.Message);
qry1_qdtm.Cancel;
frm_main.db.rollbacktrans;
end;
end;
end;
procedure Tfrm_op_seae_signqdtlist.Edit6_searchkhmchKeyPress(
Sender: TObject; var Key: Char);
begin
// <20>س<EFBFBD><D8B3>Զ<EFBFBD><D4B6><EFBFBD>ѯ
if key=#13 then
begin
btn1_searchClick(btn1_search);
end;
end;
procedure Tfrm_op_seae_signqdtlist.mniN2Click(Sender: TObject);
var
tmpfile:string;
begin
if qry1_qdtm.IsEmpty then exit;
try
tmpfile:=qry1_qdtm.fieldbyname('<27>ͻ<EFBFBD>ǩ<EFBFBD><C7A9>').asstring ;
if(tmpfile='') or (not FileExists(tmpfile)) then
Exit;
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
except
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
end ;
end;
procedure Tfrm_op_seae_signqdtlist.mniN3Click(Sender: TObject);
var
tmpfile:string;
begin
if qry1_qdtm.IsEmpty then exit;
try
tmpfile:=qry1_qdtm.fieldbyname('<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>').asstring ;
if(tmpfile='') or (not FileExists(tmpfile)) then
Exit;
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
except
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
end ;
end;
procedure Tfrm_op_seae_signqdtlist.dxDBGrid1CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
value:string;
begin
value:=ANode.Strings[dxdbgrdchckclmnDBGrid1Column14_tf.Index];
if value ='True' then
begin
AFont.Color:=clgreen;
end
else
AFont.Color:=clblack;
end;
end.