11
This commit is contained in:
parent
56ab7867a3
commit
87728906b3
|
|
@ -5,20 +5,20 @@ interface
|
|||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows, Messages, forms, OleCtnrs, DateUtils, cxClasses, dxSkinsCore,
|
||||
|
||||
dxSkinDarkRoom,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dxSkinOffice2013White,
|
||||
dxSkinSharpPlus,
|
||||
dxSkinSpringTime,
|
||||
dxSkinsDefaultPainters,
|
||||
;
|
||||
dxSkinDarkRoom, dxSkinOffice2013White, dxSkinSharpPlus, dxSkinSpringTime,
|
||||
dxSkinsDefaultPainters, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
|
||||
dxSkinCaramel, dxSkinCoffee, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
||||
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||
dxSkinOffice2013LightGray, dxSkinPumpkin, dxSkinSeven,
|
||||
dxSkinSevenClassic, dxSkinSharp, dxSkinSilver, dxSkinStardust,
|
||||
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010,
|
||||
dxSkinWhiteprint, dxSkinXmas2008Blue ;
|
||||
|
||||
var
|
||||
DConString: string; {全局连接字符串}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
||||
Left = 189
|
||||
Top = 136
|
||||
Left = 338
|
||||
Top = 367
|
||||
Width = 1260
|
||||
Height = 678
|
||||
Caption = #21592#24037#25171#21345#26597#35810
|
||||
|
|
@ -21,7 +21,7 @@ object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
|||
Left = 0
|
||||
Top = 69
|
||||
Width = 481
|
||||
Height = 570
|
||||
Height = 578
|
||||
Align = alLeft
|
||||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
|
|
@ -78,7 +78,7 @@ object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
|||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 1244
|
||||
Width = 1252
|
||||
Height = 37
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
|
|
@ -147,7 +147,7 @@ object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
|||
Left = 210
|
||||
Top = 9
|
||||
Width = 112
|
||||
Height = 21
|
||||
Height = 20
|
||||
TabOrder = 1
|
||||
OnChange = YGNameChange
|
||||
end
|
||||
|
|
@ -156,7 +156,7 @@ object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
|||
Left = 410
|
||||
Top = 9
|
||||
Width = 112
|
||||
Height = 21
|
||||
Height = 20
|
||||
TabOrder = 2
|
||||
OnChange = YGNameChange
|
||||
end
|
||||
|
|
@ -175,8 +175,8 @@ object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
|||
object ScrollBox1: TScrollBox
|
||||
Left = 481
|
||||
Top = 69
|
||||
Width = 763
|
||||
Height = 570
|
||||
Width = 771
|
||||
Height = 578
|
||||
HorzScrollBar.Visible = False
|
||||
VertScrollBar.Visible = False
|
||||
Align = alClient
|
||||
|
|
@ -195,8 +195,8 @@ object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
|||
Style.BorderStyle = ebsSingle
|
||||
TabOrder = 0
|
||||
OnDblClick = Picture4DblClick
|
||||
Height = 566
|
||||
Width = 759
|
||||
Height = 574
|
||||
Width = 767
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 206
|
||||
|
|
@ -219,7 +219,7 @@ object FrmWorkDeptList_DKCX: TFrmWorkDeptList_DKCX
|
|||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1244
|
||||
Width = 1252
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 95
|
||||
|
|
|
|||
|
|
@ -7,26 +7,25 @@ uses
|
|||
Dialogs, ComCtrls, ToolWin, cxStyles, cxCustomData, cxGraphics, cxFilter,
|
||||
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxTextEdit, cxCalendar,
|
||||
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, ADODB, DBClient,
|
||||
cxButtonEdit, cxPC, StdCtrls, ExtCtrls, ExtDlgs, IdBaseComponent,
|
||||
IdComponent, IdTCPConnection, IdTCPClient, IdFTP,jpeg, IniFiles,
|
||||
DelphiTwain, Buttons, cxContainer, cxImage, cxDBEdit,strutils,ShellAPI,
|
||||
RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
|
||||
dxSkinDarkRoom,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dxSkinOffice2013White,
|
||||
dxSkinSharpPlus,
|
||||
dxSkinSpringTime,
|
||||
dxSkinsDefaultPainters,
|
||||
dxSkinscxPCPainter,
|
||||
cxNavigator;
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, ADODB, DBClient, cxButtonEdit,
|
||||
cxPC, StdCtrls, ExtCtrls, ExtDlgs, IdBaseComponent, IdComponent,
|
||||
IdTCPConnection, IdTCPClient, IdFTP, jpeg, IniFiles, DelphiTwain, Buttons,
|
||||
cxContainer, cxImage, cxDBEdit, strutils, ShellAPI, RM_Dataset, RM_System,
|
||||
RM_Common, RM_Class, RM_GridReport, cxLookAndFeels, cxLookAndFeelPainters,
|
||||
dxSkinsCore, dxSkinDarkRoom, dxSkinOffice2013White, dxSkinSharpPlus,
|
||||
dxSkinSpringTime, dxSkinsDefaultPainters, dxSkinscxPCPainter, cxNavigator,
|
||||
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
||||
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
|
||||
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
|
||||
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
|
||||
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||
dxSkinOffice2013LightGray, dxSkinPumpkin, dxSkinSeven,
|
||||
dxSkinSevenClassic, dxSkinSharp, dxSkinSilver, dxSkinStardust,
|
||||
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010,
|
||||
dxSkinWhiteprint, dxSkinXmas2008Blue;
|
||||
|
||||
type
|
||||
TFrmWorkDeptList_DKCX = class(TForm)
|
||||
|
|
@ -67,41 +66,37 @@ type
|
|||
EndDate: TDateTimePicker;
|
||||
RM1: TRMGridReport;
|
||||
RMDBMain: TRMDBDataSet;
|
||||
procedure v1Column1PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBExportClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
procedure YGNameChange(Sender: TObject);
|
||||
procedure Picture4DblClick(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure TSBKQBClick(Sender: TObject);
|
||||
private
|
||||
hWndC : THandle;
|
||||
CapturingAVI : bool;
|
||||
hWndC: THandle;
|
||||
CapturingAVI: bool;
|
||||
{ Private declarations }
|
||||
ClickPos: TPoint;
|
||||
SelectedSource, PicLeft, PicTop, PicWidth, PicHeight: Integer;
|
||||
procedure initGrid();
|
||||
procedure SetStatus();
|
||||
procedure LookImage(FileName:string);
|
||||
procedure LookImage(FileName: string);
|
||||
{ Private declarations }
|
||||
public
|
||||
FilePath:string;
|
||||
FileName:string;
|
||||
FTFType:string;
|
||||
pat1:string;
|
||||
pic1:string;
|
||||
fkeyNo:string;
|
||||
fFlileFlag:string;
|
||||
FilePath: string;
|
||||
FileName: string;
|
||||
FTFType: string;
|
||||
pat1: string;
|
||||
pic1: string;
|
||||
fkeyNo: string;
|
||||
fFlileFlag: string;
|
||||
{ Public declarations }
|
||||
MyJpeg: TJPEGImage;
|
||||
{ Public declarations }
|
||||
|
|
@ -112,48 +107,76 @@ var
|
|||
|
||||
implementation
|
||||
|
||||
uses U_ZDYHelp,U_RTfun,U_DataLink;
|
||||
const WM_CAP_START = WM_USER;
|
||||
const WM_CAP_STOP = WM_CAP_START + 68;
|
||||
const WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10;
|
||||
const WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11;
|
||||
const WM_CAP_SAVEDIB = WM_CAP_START + 25;
|
||||
const WM_CAP_GRAB_FRAME = WM_CAP_START + 60;
|
||||
const WM_CAP_SEQUENCE = WM_CAP_START + 62;
|
||||
const WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20;
|
||||
const WM_CAP_SEQUENCE_NOFILE =WM_CAP_START+ 63 ;
|
||||
const WM_CAP_SET_OVERLAY =WM_CAP_START+ 51 ;
|
||||
const WM_CAP_SET_PREVIEW =WM_CAP_START+ 50 ;
|
||||
const WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START +6;
|
||||
const WM_CAP_SET_CALLBACK_ERROR=WM_CAP_START +2;
|
||||
const WM_CAP_SET_CALLBACK_STATUSA= WM_CAP_START +3;
|
||||
const WM_CAP_SET_CALLBACK_FRAME= WM_CAP_START +5;
|
||||
const WM_CAP_SET_SCALE=WM_CAP_START+ 53 ;
|
||||
const WM_CAP_SET_PREVIEWRATE=WM_CAP_START+ 52 ;
|
||||
function capCreateCaptureWindowA(lpszWindowName : PCHAR;
|
||||
dwStyle : longint;
|
||||
x : integer;
|
||||
y : integer;
|
||||
nWidth : integer;
|
||||
nHeight : integer;
|
||||
ParentWin : HWND;
|
||||
nId : integer): HWND;
|
||||
STDCALL EXTERNAL 'AVICAP32.DLL';
|
||||
uses
|
||||
U_ZDYHelp, U_RTfun, U_DataLink;
|
||||
|
||||
const
|
||||
WM_CAP_START = WM_USER;
|
||||
|
||||
const
|
||||
WM_CAP_STOP = WM_CAP_START + 68;
|
||||
|
||||
const
|
||||
WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10;
|
||||
|
||||
const
|
||||
WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11;
|
||||
|
||||
const
|
||||
WM_CAP_SAVEDIB = WM_CAP_START + 25;
|
||||
|
||||
const
|
||||
WM_CAP_GRAB_FRAME = WM_CAP_START + 60;
|
||||
|
||||
const
|
||||
WM_CAP_SEQUENCE = WM_CAP_START + 62;
|
||||
|
||||
const
|
||||
WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20;
|
||||
|
||||
const
|
||||
WM_CAP_SEQUENCE_NOFILE = WM_CAP_START + 63;
|
||||
|
||||
const
|
||||
WM_CAP_SET_OVERLAY = WM_CAP_START + 51;
|
||||
|
||||
const
|
||||
WM_CAP_SET_PREVIEW = WM_CAP_START + 50;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START + 6;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_ERROR = WM_CAP_START + 2;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_STATUSA = WM_CAP_START + 3;
|
||||
|
||||
const
|
||||
WM_CAP_SET_CALLBACK_FRAME = WM_CAP_START + 5;
|
||||
|
||||
const
|
||||
WM_CAP_SET_SCALE = WM_CAP_START + 53;
|
||||
|
||||
const
|
||||
WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52;
|
||||
|
||||
function capCreateCaptureWindowA(lpszWindowName: PCHAR; dwStyle: longint; x: integer; y: integer; nWidth: integer; nHeight: integer; ParentWin: HWND; nId: integer): HWND; stdcall external 'AVICAP32.DLL';
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TFrmWorkDeptList_DKCX.LookImage(FileName:string);
|
||||
procedure TFrmWorkDeptList_DKCX.LookImage(FileName: string);
|
||||
var
|
||||
sFieldName:string;
|
||||
sFieldName: string;
|
||||
begin
|
||||
sFieldName:=leftbstr(ExtractFilePath(Application.ExeName),1)+':\图片查看';
|
||||
sFieldName := leftbstr(ExtractFilePath(Application.ExeName), 1) + ':\图片查看';
|
||||
|
||||
if not DirectoryExists(pchar(sFieldName)) then
|
||||
CreateDirectory(pchar(sFieldName),nil);
|
||||
CreateDirectory(pchar(sFieldName), nil);
|
||||
|
||||
sFieldName:=sFieldName+'\'+trim(fileName);
|
||||
sFieldName := sFieldName + '\' + trim(FileName);
|
||||
|
||||
try
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI','SERVER','服务器地址','127.0.0.1');
|
||||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
|
||||
IdFTP1.Username := 'three';
|
||||
IdFTP1.Password := '641010';
|
||||
IdFTP1.Connect();
|
||||
|
|
@ -164,13 +187,13 @@ begin
|
|||
if IdFTP1.Connected then
|
||||
begin
|
||||
|
||||
Panel2.Caption:='正在下载数据,请稍等...';
|
||||
Panel2.Visible:=true;
|
||||
Panel2.Caption := '正在下载数据,请稍等...';
|
||||
Panel2.Visible := true;
|
||||
application.ProcessMessages;
|
||||
try
|
||||
IdFTP1.Get(fFlileFlag+'\'+ Trim(fileName), sFieldName,true, false);
|
||||
IdFTP1.Get(fFlileFlag + '\' + Trim(FileName), sFieldName, true, false);
|
||||
except
|
||||
Panel2.Visible:=false;
|
||||
Panel2.Visible := false;
|
||||
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
|
|
@ -178,14 +201,15 @@ begin
|
|||
end
|
||||
else
|
||||
begin
|
||||
Panel2.Visible:=false;
|
||||
Panel2.Visible := false;
|
||||
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
|
||||
IdFTP1.Quit;
|
||||
Exit;
|
||||
end;
|
||||
Panel2.Visible:=false;
|
||||
if IdFTP1.Connected then IdFTP1.Quit;
|
||||
ShellExecute(Handle, 'open',PChar(sFieldName),'', '', SW_SHOWNORMAL);
|
||||
Panel2.Visible := false;
|
||||
if IdFTP1.Connected then
|
||||
IdFTP1.Quit;
|
||||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.SetStatus();
|
||||
|
|
@ -200,30 +224,29 @@ begin
|
|||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from OA_YG_KQ ');
|
||||
sql.add('where filltime>='''+trim(FormatDateTime('yyyy-MM-dd',BegDate.Date))+'''');
|
||||
sql.add(' and filltime<'''+trim(FormatDateTime('yyyy-MM-dd',endDate.Date+1))+'''');
|
||||
sql.add('where filltime>=''' + trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
||||
sql.add(' and filltime<''' + trim(FormatDateTime('yyyy-MM-dd', endDate.Date + 1)) + '''');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
SCreateCDS20(ADOQueryMain,Order_KQB);
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
SCreateCDS20(ADOQueryMain, Order_KQB);
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.v1Column1PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
procedure TFrmWorkDeptList_DKCX.v1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='PriceUnit';
|
||||
flagname:='币种';
|
||||
if ShowModal=1 then
|
||||
flag := 'PriceUnit';
|
||||
flagname := '币种';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with Order_Main do
|
||||
begin
|
||||
edit;
|
||||
fieldbyname('PriceUnit').AsString:=trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
fieldbyname('PriceUnit').AsString := trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -234,7 +257,7 @@ end;
|
|||
|
||||
procedure TFrmWorkDeptList_DKCX.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid('打卡',Tv1,'费用报销管理');
|
||||
ReadCxGrid('打卡', Tv1, '费用报销管理');
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
close;
|
||||
|
|
@ -243,25 +266,23 @@ begin
|
|||
sql.Add('where convert(varchar(10),DKDate,120)=convert(varchar(10),getdate(),120)');
|
||||
open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
fFlileFlag:='123YP';
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
fFlileFlag := '123YP';
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
procedure TFrmWorkDeptList_DKCX.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
MyJpeg.Free;
|
||||
FrmWorkDeptList_DKCX:=nil;
|
||||
FrmWorkDeptList_DKCX := nil;
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.Image1MouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TFrmWorkDeptList_DKCX.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
ClickPos.x := X;
|
||||
ClickPos.y := Y;
|
||||
|
|
@ -270,20 +291,21 @@ end;
|
|||
procedure TFrmWorkDeptList_DKCX.FormCreate(Sender: TObject);
|
||||
begin
|
||||
MyJpeg := TJpegImage.Create;
|
||||
EndDate.Date:=SGetServerDate(ADOQueryDel);
|
||||
begdate.Date:=EndDate.Date;
|
||||
EndDate.Date := SGetServerDate(ADOQueryDel);
|
||||
begdate.Date := EndDate.Date;
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid('打卡',Tv1,'费用报销管理');
|
||||
WriteCxGrid('打卡', Tv1, '费用报销管理');
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel('员工考勤',cxGrid1);
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel('员工考勤', cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.TBRafreshClick(Sender: TObject);
|
||||
|
|
@ -293,54 +315,54 @@ end;
|
|||
|
||||
procedure TFrmWorkDeptList_DKCX.YGNameChange(Sender: TObject);
|
||||
begin
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.Picture4DblClick(Sender: TObject);
|
||||
var
|
||||
sFieldName:string;
|
||||
fileName:string;
|
||||
sFieldName: string;
|
||||
fileName: string;
|
||||
begin
|
||||
IF TcxDBImage(Sender).Picture.Height=0 then exit;
|
||||
if TcxDBImage(Sender).Picture.Height = 0 then
|
||||
exit;
|
||||
LookImage(ADOQueryImage.fieldbyname(TcxDBImage(Sender).Hint).asstring);
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.Tv1FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure TFrmWorkDeptList_DKCX.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
if Order_Main.IsEmpty then exit;
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
with ADOQueryImage do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from TP_File A');
|
||||
sql.Add('where WBID='+quotedstr(trim(Order_Main.fieldbyname('KQID').AsString)));
|
||||
sql.Add('and TFType='+quotedstr(trim('员工')));
|
||||
sql.Add('where WBID=' + quotedstr(trim(Order_Main.fieldbyname('KQID').AsString)));
|
||||
sql.Add('and TFType=' + quotedstr(trim('员工')));
|
||||
open;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFrmWorkDeptList_DKCX.TSBKQBClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile:String;
|
||||
Txt,fImagePath:string;
|
||||
fPrintFile: string;
|
||||
Txt, fImagePath: string;
|
||||
Moudle: THandle;
|
||||
Makebar:TMakebar;
|
||||
Mixtext:TMixtext;
|
||||
Makebar: TMakebar;
|
||||
Mixtext: TMixtext;
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\上班考勤表.rmf';
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\上班考勤表.rmf';
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select YGName');
|
||||
sql.Add(' ,one=(select cast(''是'' as varchar(10)) from OA_YG_KQ B where B.YGName=A.YGName and B.DKDate='''+trim(FormatDateTime('yyyy-MM',BegDate.Date))+'-01'+''')');
|
||||
sql.Add(' ,TWO=(select cast(''是'' as varchar(10)) from OA_YG_KQ B where B.YGName=A.YGName and B.DKDate='''+trim(FormatDateTime('yyyy-MM',BegDate.Date))+'-01'+''')');
|
||||
sql.Add(' ,one=(select cast(''是'' as varchar(10)) from OA_YG_KQ B where B.YGName=A.YGName and B.DKDate=''' + trim(FormatDateTime('yyyy-MM', BegDate.Date)) + '-01' + ''')');
|
||||
sql.Add(' ,TWO=(select cast(''是'' as varchar(10)) from OA_YG_KQ B where B.YGName=A.YGName and B.DKDate=''' + trim(FormatDateTime('yyyy-MM', BegDate.Date)) + '-01' + ''')');
|
||||
sql.Add(' from OA_YG_DangAn A ');
|
||||
// ShowMessage(sql.text);
|
||||
open;
|
||||
|
|
@ -349,11 +371,13 @@ begin
|
|||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.PrintReport;
|
||||
end else
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找'+ExtractFilePath(Application.ExeName)+'Report\员工卡.rmf'),'提示',0);
|
||||
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\员工卡.rmf'), '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
object frmYGList: TfrmYGList
|
||||
Left = 29
|
||||
Top = 88
|
||||
Left = 196
|
||||
Top = 405
|
||||
Width = 1405
|
||||
Height = 715
|
||||
Caption = #21592#24037#26723#26696#21015#34920
|
||||
|
|
@ -20,7 +20,7 @@ object frmYGList: TfrmYGList
|
|||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1389
|
||||
Width = 1397
|
||||
Height = 62
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
|
|
@ -137,16 +137,24 @@ object frmYGList: TfrmYGList
|
|||
ImageIndex = 4
|
||||
OnClick = TPrintClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
object ToolButton6: TToolButton
|
||||
Left = 63
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #39044#35272#25171#21360
|
||||
ImageIndex = 4
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 150
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 97
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 126
|
||||
Left = 213
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#20837#32844#34920
|
||||
|
|
@ -154,7 +162,7 @@ object frmYGList: TfrmYGList
|
|||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
Left = 225
|
||||
Left = 312
|
||||
Top = 33
|
||||
Width = 40
|
||||
Height = 24
|
||||
|
|
@ -176,7 +184,7 @@ object frmYGList: TfrmYGList
|
|||
'4')
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 265
|
||||
Left = 352
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#21592#24037#33457#21517#20876
|
||||
|
|
@ -184,7 +192,7 @@ object frmYGList: TfrmYGList
|
|||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 388
|
||||
Left = 475
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #36523#20221#35777#27491#38754
|
||||
|
|
@ -192,7 +200,7 @@ object frmYGList: TfrmYGList
|
|||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 487
|
||||
Left = 574
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #36523#20221#35777#21453#38754
|
||||
|
|
@ -200,7 +208,7 @@ object frmYGList: TfrmYGList
|
|||
OnClick = ToolButton5Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 586
|
||||
Left = 673
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -211,7 +219,7 @@ object frmYGList: TfrmYGList
|
|||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 62
|
||||
Width = 1389
|
||||
Width = 1397
|
||||
Height = 36
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
|
|
@ -315,7 +323,7 @@ object frmYGList: TfrmYGList
|
|||
Left = 0
|
||||
Top = 98
|
||||
Width = 211
|
||||
Height = 578
|
||||
Height = 586
|
||||
Align = alLeft
|
||||
Bands = <
|
||||
item
|
||||
|
|
@ -348,15 +356,15 @@ object frmYGList: TfrmYGList
|
|||
Left = 211
|
||||
Top = 98
|
||||
Width = 8
|
||||
Height = 578
|
||||
Height = 586
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
Control = cxDBTreeList1
|
||||
end
|
||||
object TPanel
|
||||
Left = 219
|
||||
Top = 98
|
||||
Width = 1170
|
||||
Height = 578
|
||||
Width = 1178
|
||||
Height = 586
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
|
|
@ -364,7 +372,7 @@ object frmYGList: TfrmYGList
|
|||
object cxTabControl1: TcxTabControl
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1166
|
||||
Width = 1174
|
||||
Height = 21
|
||||
Align = alTop
|
||||
TabOrder = 0
|
||||
|
|
@ -377,14 +385,14 @@ object frmYGList: TfrmYGList
|
|||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1166
|
||||
ClientRectRight = 1174
|
||||
ClientRectTop = 23
|
||||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 23
|
||||
Width = 1166
|
||||
Height = 358
|
||||
Width = 1174
|
||||
Height = 366
|
||||
Align = alClient
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 1
|
||||
|
|
@ -541,8 +549,8 @@ object frmYGList: TfrmYGList
|
|||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 2
|
||||
Top = 381
|
||||
Width = 1166
|
||||
Top = 389
|
||||
Width = 1174
|
||||
Height = 195
|
||||
Align = alBottom
|
||||
Caption = #36523#20221#35777#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
|
||||
|
|
@ -550,7 +558,7 @@ object frmYGList: TfrmYGList
|
|||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Top = 14
|
||||
Width = 1162
|
||||
Width = 1170
|
||||
Height = 179
|
||||
Align = alClient
|
||||
BevelInner = bvLowered
|
||||
|
|
|
|||
|
|
@ -12,10 +12,24 @@ uses
|
|||
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxButtonEdit,
|
||||
cxDropDownEdit, cxPC, cxTL, cxMaskEdit, cxInplaceContainer, cxDBTL, cxTLData,
|
||||
cxTimeEdit, cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu,
|
||||
dxBarBuiltInMenu, cxNavigator, jpeg, U_SLT;
|
||||
dxBarBuiltInMenu, cxNavigator, jpeg, U_SLT, dxSkinsCore, dxSkinBlack,
|
||||
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
|
||||
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
|
||||
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
|
||||
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
|
||||
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
||||
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
||||
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
||||
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||
|
||||
type
|
||||
TfrmYGList = class(TForm)
|
||||
|
||||
ToolBar1: TToolBar;
|
||||
TBRafresh: TToolButton;
|
||||
TBFind: TToolButton;
|
||||
|
|
@ -94,6 +108,7 @@ type
|
|||
ScrollBox1: TScrollBox;
|
||||
RM2: TRMGridReport;
|
||||
RMDBMain2: TRMDBDataSet;
|
||||
ToolButton6: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -127,6 +142,7 @@ type
|
|||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure ToolButton6Click(Sender: TObject);
|
||||
private
|
||||
canshu1: string;
|
||||
DQdate: TDateTime;
|
||||
|
|
@ -151,7 +167,7 @@ implementation
|
|||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_YGInPut, U_YGYPZZChkList_NXZZJL, U_FjList_RZ,
|
||||
U_ZDYBZType, U_FileUp3, U_FileUp4;
|
||||
U_ZDYBZType, U_FileUp3, U_FileUp4 ,superobject, U_LabelPrintFun;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
|
@ -617,6 +633,7 @@ begin
|
|||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||
exit;
|
||||
end;
|
||||
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RMVariables['QRBARCODE'] := fImagePath;
|
||||
|
|
@ -821,5 +838,26 @@ begin
|
|||
InitImage();
|
||||
end;
|
||||
|
||||
procedure TfrmYGList.ToolButton6Click(Sender: TObject);
|
||||
var
|
||||
FPrintJson, JsonResult, MFiltration: string;
|
||||
RTValues: TStringArray;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if Order_Main.Locate('SSel', True, []) then
|
||||
begin
|
||||
RTValues := SelCDSKey(Order_Main, ['YGID']);
|
||||
MFiltration := RTValues[0];
|
||||
end
|
||||
else
|
||||
begin
|
||||
MFiltration := Trim(Order_Main.fieldbyname('YGID').AsString);
|
||||
end;
|
||||
FPrintJson := '{ "LMType": "LMType","QrCodeField": "YGID","PreviewPrint": true,"DConString": "' + DConString + '","DCode": "' + DCode + '","DName": "' + DName + '", "PrtArgs": [ { "IsSql": true, "Filtration": " ' + MFiltration + '" }] }';
|
||||
|
||||
FormPrint(Application, PChar(FPrintJson));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -1017,7 +1017,7 @@ begin
|
|||
if SaveCKData() then
|
||||
begin
|
||||
Application.MessageBox('保存成功!', '提示', 0);
|
||||
//ModalResult:=1;
|
||||
ModalResult:=1;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -737,6 +737,7 @@ object frmYMTRKList: TfrmYMTRKList
|
|||
DataBinding.FieldName = 'MQty'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Sorting = False
|
||||
Width = 63
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user