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.

180 lines
5.7 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_print_mul;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, ADODB, DB, BusinessSkinForm, dxDBTLCl, dxGrClms,
bsSkinCtrls, dxTL, dxDBCtrl, dxDBGrid, dxCntner;
type
Tfrm_op_seae_print_mul = class(TForm)
bsSkinPanel1: TbsSkinPanel;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
bsSkinButton8: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1TEU: TdxDBGridMaskColumn;
dxDBGrid1Column63: TdxDBGridMaskColumn;
dxDBGrid1Column64: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
dxDBGrid1Column66: TdxDBGridMaskColumn;
dxDBGrid1Column67: TdxDBGridMaskColumn;
bsBusinessSkinForm1: TbsBusinessSkinForm;
t_op_seae1: TDataSource;
t_sys_report: TADOQuery;
t_sys_report1: TDataSource;
t_op_seae: TADOStoredProc;
t_sys_report_employee: TADOQuery;
bsSkinButton12: TbsSkinButton;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_print_mul: Tfrm_op_seae_print_mul;
implementation
uses my_sys_function, u_main;
{$R *.dfm}
procedure Tfrm_op_seae_print_mul.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_print_mul.bsSkinButton8Click(Sender: TObject);
begin
if t_sys_report.IsEmpty then
begin
showmessage('û<>е<EFBFBD>֤<EFBFBD><D6A4>ʽ<EFBFBD><CABD><EFBFBD>޷<EFBFBD><DEB7><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>');
exit;
end;
sys_frprint_piliang('<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤',t_sys_report.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_op_seae,t_op_seae1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
if not t_sys_report_employee.Locate('CH_ID',t_sys_report.fieldbyname('CH_ID').asinteger,[])then
begin
t_sys_report_employee.insert;
t_sys_report_employee['CH_ID']:=t_sys_report['CH_ID'];
t_sys_report_employee['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤';
t_sys_report_employee['<27><><EFBFBD><EFBFBD>']:=employee;
t_sys_report_employee['<27><><EFBFBD><EFBFBD>']:=date;
t_sys_report_employee.post;
end
else
begin
t_sys_report_employee.edit;
t_sys_report_employee['<27><><EFBFBD><EFBFBD>']:=date;
t_sys_report_employee.post;
end;
end;
procedure Tfrm_op_seae_print_mul.FormShow(Sender: TObject);
var
str:widestring;
begin
t_sys_report_employee.close;
t_sys_report_employee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=employee;
t_sys_report_employee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:='<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤';
t_sys_report_employee.open;
if not t_sys_report_employee.IsEmpty then
begin
t_sys_report_employee.first;
while not t_sys_report_employee.eof do
begin
if t_sys_report_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').AsDateTime>=date-30 then
begin
if str='' then
str:=t_sys_report_employee.fieldbyname('CH_ID').asstring
else
str:=str+','+t_sys_report_employee.fieldbyname('CH_ID').asstring;
end;
t_sys_report_employee.next;
end;
str:=' and CH_ID in ('+str+')';
t_sys_report.close;
t_sys_report.sql.clear;
t_sys_report.sql.add('select * from t_sys_report where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '+str+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_sys_report.Parameters[0].value:='<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤';
t_sys_report.open;
end
else
begin
t_sys_report.close;
t_sys_report.sql.clear;
t_sys_report.sql.add('select * from t_sys_report where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_sys_report.Parameters[0].value:='<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤';
t_sys_report.open;
end;
end;
procedure Tfrm_op_seae_print_mul.bsSkinButton12Click(Sender: TObject);
var
str:widestring;
begin
if bsSkinButton12.caption='<27><><EFBFBD>и<EFBFBD>ʽ'then
begin
bsSkinButton12.caption:='<27><><EFBFBD>ڸ<EFBFBD>ʽ';
t_sys_report.close;
t_sys_report.sql.clear;
t_sys_report.sql.add('select * from t_sys_report where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_sys_report.Parameters[0].value:='<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤';
t_sys_report.open;
end
else
begin
if not t_sys_report_employee.IsEmpty then
begin
t_sys_report_employee.first;
while not t_sys_report_employee.eof do
begin
if t_sys_report_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').AsDateTime>=date-30 then
begin
if str='' then
str:=t_sys_report_employee.fieldbyname('CH_ID').asstring
else
str:=str+','+t_sys_report_employee.fieldbyname('CH_ID').asstring;
end;
t_sys_report_employee.next;
end;
str:=' and CH_ID in ('+str+')';
t_sys_report.close;
t_sys_report.sql.clear;
t_sys_report.sql.add('select * from t_sys_report where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '+str+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_sys_report.Parameters[0].value:='<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤';
t_sys_report.open;
end
else
begin
t_sys_report.close;
t_sys_report.sql.clear;
t_sys_report.sql.add('select * from t_sys_report where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_sys_report.Parameters[0].value:='<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤';
t_sys_report.open;
end;
bsSkinButton12.caption:='<27><><EFBFBD>и<EFBFBD>ʽ';
end;
end;
end.