📄 tasw00_01.pas.svn-base
字号:
Caption:=GetDBString('TASW0001001'); //任务管理平台
tlbFile.Caption:=GetDBString('TASW0001002'); //基本资料(&F)
tlbEdit.Caption:=GetDBString('TASW0001003'); //任务管理(&M)
tlbReport.Caption:=GetDBString('TASW0001004'); //查询报表(&R)
tlbHelp.Caption:=GetDBString('TASW0001005'); //帮助(&H)
ActTasS00.Caption:=GetDBString('TASW0001006'); //任务管理参数
ActOrd120.Caption:=GetDBString('TASW0001007'); //地区资料维护
ActOrd150.Caption:=GetDBString('TASW0001008'); //客户资料维护
ActHrm100.Caption:=GetDBString('TASW0001009'); //部门资料维护
ActHrm120.Caption:=GetDBString('TASW0001010'); //岗位资料维护
ActHrm130.Caption:=GetDBString('TASW0001011'); //员工状态维护
ActHrm150.Caption:=GetDBString('TASW0001012'); //员工资料维护
ActInv120.Caption:=GetDBString('TASW0001013'); //料品分类维护
ActInv140.Caption:=GetDBString('TASW0001015'); //计量单位维护
ActInv150.Caption:=GetDBString('TASW0001016'); //料品资料维护
ActTas100.Caption:=GetDBString('TASW0001018'); //任务类别维护
ActTas110.Caption:=GetDBString('TASW0001019'); //原因资料维护
ActTas120.Caption:=GetDBString('TASW0001020'); //状态资料维护
ActTas130.Caption:=GetDBString('TASW0001122'); //项目类别维护
ActPass.Caption:=GetDBString('TASW0001021'); //更改登录密码(&C)...
ActLongin.Caption:=GetDBString('TASW0001022'); //更换操作员(&U)...
ActExit.Caption:=GetDBString('TASW0001023'); //退出(&X)
ActTas500.Caption:=GetDBString('TASW0001024'); //项目计划维护
ActTas510.Caption:=GetDBString('TASW0001025'); //任务计划维护
ActTas520.Caption:=GetDBString('TASW0001026'); //任务工单维护
ActTas530.Caption:=GetDBString('TASW0001027'); //任务进度汇报
ActTas200.Caption:=GetDBString('TASW0001028'); //拖期任务报告
ActTas300.Caption:=GetDBString('TASW0001029'); //项目计划跟踪
ActTas400.Caption:=GetDBString('TASW0001031'); //服务数量分析
ActTas410.Caption:=GetDBString('TASW0001032'); //月服务量分析
ActTas420.Caption:=GetDBString('TASW0001033'); //项目数量分析
ActTas430.Caption:=GetDBString('TASW0001034'); //完成时间分析
ActTas440.Caption:=GetDBString('TASW0001035'); //未完任务分析
ActTas450.Caption:=GetDBString('TASW0001036'); //服务客户数量
ActTas460.Caption:=GetDBString('TASW0001037'); //资源使用分析
ActTas470.Caption:=GetDBString('TASW0001038'); //员工绩效分析
ActTas210.Caption:=GetDBString('TASW0001030'); //工作报告查询
ActTas220.Caption:=GetDBString('TASW0001039'); //任务历史查询
ActTas310.Caption:=GetDBString('TASW0001040'); //任务计划跟踪
// ActTas442.Caption:=GetDBString('TASW0001041'); //
ActTas425.Caption:=GetDBString('TASW0001124'); //月装机量分析
ActTas435.Caption:=GetDBString('TASW0001125'); //工单完成分析
ActContents.Caption:=GetDBString('TASW0001042'); //帮助主题(&H)
ActEmail.Caption:=GetDBString('TASW0001043'); //写信给作者(&E)...
ActHomePage.Caption:=GetDBString('TASW0001044'); //网上浩晖(&P)...
ActAbout.Caption:=GetDBString('TASW0001045'); //关于浩晖(&A)...
ActReg.Caption:=GetDBString('TASW0001046'); //软件注册(&R)...
ActUpgrade.Caption:=GetDBString('TASW0001047'); //在线智能升级(&U)...
tlbTas130.Caption:=GetDBString('TASW0001123'); //项目类别
tlbTas100.Caption:=GetDBString('TASW0001048'); //任务类别
tlbTas110.Caption:=GetDBString('TASW0001049'); //原因资料
tlbTas120.Caption:=GetDBString('TASW0001050'); //状态资料
tlbTas500.Caption:=GetDBString('TASW0001051'); //项目计划
tlbTas510.Caption:=GetDBString('TASW0001052'); //任务计划
tlbTas520.Caption:=GetDBString('TASW0001053'); //任务工单
tlbTas530.Caption:=GetDBString('TASW0001054'); //任务汇报
tlbExit.Caption:=GetDBString('TASW0001055'); //退出
pnLists.Caption:=GetDBString('TASW0001056'); //任务类别
pnReports.Caption:=GetDBString('TASW0001057'); //查询报表
TabSheet1.Caption:=GetDBString('TASW0001058'); //任务计划
TabSheet2.Caption:=GetDBString('TASW0001059'); //预警信息
lblClass.Caption:=GetDBString('TASW0001060'); //类别
lblDate.Caption:=GetDBString('TASW0001061'); //日期
sbSearch.Caption:=GetDBString('TASW0001062'); //查询
ActInsert.Caption:=GetDBString('TASW0001063'); //新增(&A)
ActUpdate.Caption:=GetDBString('TASW0001064'); //修改(&E)
ActDelete.Caption:=GetDBString('TASW0001065'); //删除(&D)
ActRefresh.Caption:=GetDBString('TASW0001066'); //刷新(&R)
ActLocate.Caption:=GetDBString('TASW0001067'); //查找(&F)
ActSearch.Caption:=GetDBString('TASW0001068'); //查询(&S)
ActPrint.Caption:=GetDBString('TASW0001069'); //打印(&P)
ActExport.Caption:=GetDBString('TASW0001070'); //导出(&E)
ActClose.Caption:=GetDBString('TASW0001071'); //完成(&C)
ActReturn.Caption:=GetDBString('TASW0001072'); //返工(&T)
ActOpen.Caption:=GetDBString('TASW0001116'); //查看(&N)
ActOpenTask.Caption:=GetDBString('TASW0001117'); //查看工单(&S)
ActNewTask.Caption:=GetDBString('TASW0001118'); //新增工单(&K)
ActOpenReport.Caption:=GetDBString('TASW0001119'); //查看汇报(&B)
ActNewReport.Caption:=GetDBString('TASW0001120'); //新增汇报(&O)
qryTas510T510_001.DisplayLabel:=GetDBString('TASW0001073'); //任务编号
qryTas510T510_002.DisplayLabel:=GetDBString('TAS51001074'); //任务名称
qryTas510T120_003.DisplayLabel:=GetDBString('TAS51001075'); //任务状态
qryTas510T100_002.DisplayLabel:=GetDBString('TAS51001076'); //任务类别
qryTas510T510_005.DisplayLabel:=GetDBString('TAS51001077'); //优先级别
qryTas510T510_006.DisplayLabel:=GetDBString('TAS51001078'); //申报日期
qryTas510T510_007.DisplayLabel:=GetDBString('TAS51001079'); //需求日期
qryTas510T510_008.DisplayLabel:=GetDBString('TAS51001080'); //来源类型
qryTas510T510_009.DisplayLabel:=GetDBString('TAS51001081'); //来源单号
qryTas510T510_011.DisplayLabel:=GetDBString('TAS51001082'); //时间单位
qryTas510T510_012.DisplayLabel:=GetDBString('TAS51001083'); //预计工时
qryTas510T510_013.DisplayLabel:=GetDBString('TAS51001084'); //实际工时
qryTas510T510_014.DisplayLabel:=GetDBString('TAS51001085'); //完工比率
qryTas510T510_015.DisplayLabel:=GetDBString('TAS51001086'); //工单总数
qryTas510O150_002.DisplayLabel:=GetDBString('TAS51001087'); //客户编号
qryTas510O150_003.DisplayLabel:=GetDBString('TAS51001088'); //客户名称
// qryTas510O150_005.DisplayLabel:=GetDBString('TAS51001089'); //电话号码
// qryTas510O150_012.DisplayLabel:=GetDBString('TAS51001090'); //客户地址
// qryTas510O151_002.DisplayLabel:=GetDBString('TAS51001091'); //联系人员
// qryTas510O151_004.DisplayLabel:=GetDBString('TAS51001092'); //职务名称
// qryTas510O150_007.DisplayLabel:=GetDBString('TAS51001093'); //电子邮件
qryTas510I150_002.DisplayLabel:=GetDBString('TAS51001094'); //产品编号
qryTas510I150_003.DisplayLabel:=GetDBString('TAS51001095'); //产品名称
// qryTas510I150_004.DisplayLabel:=GetDBString('TAS51001096'); //规格型号
// qryTas510I120_003.DisplayLabel:=GetDBString('TAS51001097'); //产品类别
// qryTas510M150_002.DisplayLabel:=GetDBString('TAS51001098'); //制造商号
// qryTas510M150_003.DisplayLabel:=GetDBString('TAS51001099'); //制造商名
qryTas510T510_018.DisplayLabel:=GetDBString('TAS51001100'); //机身编号
qryTas510T510_019.DisplayLabel:=GetDBString('TAS51001101'); //任务说明
qryTas510T510_020.DisplayLabel:=GetDBString('TAS51001102'); //制单日期
qryTas510T510_021.DisplayLabel:=GetDBString('TAS51001103'); //制单人员
qryTas510T510_022.DisplayLabel:=GetDBString('TAS51001104'); //修改日期
qryTas510T510_023.DisplayLabel:=GetDBString('TAS51001105'); //修改人员
qryTas510T510_025.DisplayLabel:=GetDBString('TAS51001048'); //预计开始日期
qryTas510T510_026.DisplayLabel:=GetDBString('TAS51001049'); //预计完成日期
qryTas510T510_027.DisplayLabel:=GetDBString('TAS51001050'); //实际开始日期
qryTas510T510_028.DisplayLabel:=GetDBString('TAS51001051'); //实际完成日期
AType[0]:=GetDBString('TASW0001106'); //销售订单
AType[1]:=GetDBString('TASW0001107'); //来电记录
AType[2]:=GetDBString('TASW0001108'); //项目计划
AType[3]:=GetDBString('TASW0001109'); //手工输入
AUnit[0]:=GetDBString('TASW0001110'); //时
AUnit[1]:=GetDBString('TASW0001111'); //天
AUnit[2]:=GetDBString('TASW0001112'); //周
AUnit[3]:=GetDBString('TASW0001113'); //月
PageControl1.ActivePageIndex:=0;
mmiReaded.Caption:=GetDBString('COM00006008'); //标识为“已阅读”
end;
procedure TTasW00_01Form.FormCreate(Sender: TObject);
var
ARights:string;
ADate:TDateTime;
begin
SetInterface;
ADate:=GetServerDate;
edtFromDate.Date:=GetMonthFirstDate(ADate);
edtToDate.Date:=GetMonthEndDate(ADate);
//查询报表
GetAllReport(adsReports,ActionList1,'TAS');
//取得所有任务类别
GetAllTasksClass(adsLists,cbTasClass);
sbSearch.Click;
//取得权限
ARights:=GetRights('TAS520','TAS'); //工单
ActOpenTask.Enabled:=ARights[1]='Y';
ActNewTask.Enabled:=ARights[2]='Y';
ARights:=GetRights('TAS530','TAS'); //汇报
ActOpenReport.Enabled:=ARights[1]='Y';
ActNewReport.Enabled:=ARights[2]='Y';
ARights:=GetRights('TAS510','TAS'); //计划
ActOpen.Enabled:=ARights[1]='Y';
ActInsert.Enabled:=ARights[2]='Y';
ActUpdate.Enabled:=ARights[3]='Y';
ActDelete.Enabled:=ARights[4]='Y';
ActRefresh.Enabled:=ARights[1]='Y';
ActLocate.Enabled:=ARights[1]='Y';
ActSearch.Enabled:=ARights[1]='Y';
ActPrint.Enabled:=ARights[5]='Y';
ActExport.Enabled:=ARights[5]='Y';
ActClose.Enabled:=ARights[2]='Y';
ActReturn.Enabled:=ARights[2]='Y';
ActReg.Visible:=ADemoFlag;
N1.Visible:=ADemoFlag;
end;
procedure TTasW00_01Form.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TTasW00_01Form.FormActivate(Sender: TObject);
begin
Animate1.ResName:='HOWWELL';
Animate1.Play(1,100,0);
AModule:='TAS';
end;
procedure TTasW00_01Form.dbgMasterBackgroundDrawEvent(Sender: TObject;
ACanvas: TCanvas; ARect: TRect);
var
AText:string;
begin
ARect.Left:=0;
ARect.Top:=0;
ACanvas.Brush.Color:=dbgMaster.GroupPanelColor;
ACanvas.Font.Color:=dbgMaster.GroupPanelFontColor;
//您可以把列标题拖放到此处使记录按此列进行分组
if dbgMaster.GroupColumnCount=0 then AText:=' '+GetDBString('NOT10001012') else AText:='';
Windows.FillRect(ACanvas.Handle, ARect, 0);
DrawText(ACanvas.Handle, PChar(AText), Length(AText), ARect, DT_LEFT or DT_EXPANDTABS or DT_NOPREFIX or DT_SINGLELINE or DT_VCENTER);
end;
procedure TTasW00_01Form.ActTasS00Execute(Sender: TObject);
begin
//现金系统参数
CreateFormInPackage('TTasS00_01Form',True);
end;
procedure TTasW00_01Form.ActOrd120Execute(Sender: TObject);
begin
//地区资料维护
CreateFormInPackage('TOrd120_01Form',True);
end;
procedure TTasW00_01Form.ActOrd150Execute(Sender: TObject);
begin
//客户资料维护
CreateFormInPackage('TOrd150_01Form',True);
end;
procedure TTasW00_01Form.ActHrm100Execute(Sender: TObject);
begin
//部门资料维护
CreateFormInPackage('THrm100_01Form',True);
end;
procedure TTasW00_01Form.ActHrm120Execute(Sender: TObject);
begin
//岗位资料维护
CreateFormInPackage('THrm120_01Form',True);
end;
procedure TTasW00_01Form.ActHrm130Execute(Sender: TObject);
begin
//员工状态维护
CreateFormInPackage('THrm130_01Form',True);
end;
procedure TTasW00_01Form.ActHrm150Execute(Sender: TObject);
begin
//员工资料维护
CreateFormInPackage('THrm150_01Form',True);
end;
procedure TTasW00_01Form.ActTas100Execute(Sender: TObject);
begin
//任务类别维护
CreateFormInPackage('TTas100_01Form',True);
//取得所有任务类别
LockWindowUpdate(tvLists.Handle);
GetAllTasksClass(adsLists,cbTasClass);
sbSearch.Click;
LockWindowUpdate(0);
end;
procedure TTasW00_01Form.ActTas120Execute(Sender: TObject);
begin
//任务状态维护
CreateFormInPackage('TTas120_01Form',True);
end;
procedure TTasW00_01Form.ActPassExecute(Sender: TObject);
begin
//更改登录密码(&C)...
AStartTime:=GetTickCount;
Sys600_01Form:=TSys600_01Form.Create(Application);
ShowRunTime; //显示程序执行时间
Sys600_01Form.ShowModal;
end;
procedure TTasW00_01Form.ActLonginExecute(Sender: TObject);
begin
//更换操作员(&U)...
ReLogin;
end;
procedure TTasW00_01Form.ActExitExecute(Sender: TObject);
begin
//退出(&X)
Application.MainForm.Close;
end;
procedure TTasW00_01Form.ActTas500Execute(Sender: TObject);
begin
//项目计划维护
CreateFormInPackage('TTas500_01Form',True);
end;
procedure TTasW00_01Form.ActTas510Execute(Sender: TObject);
begin
//任务计划维护
CreateFormInPackage('TTas510_01Form',True);
sbSearch.Click;
end;
procedure TTasW00_01Form.ActTas520Execute(Sender: TObject);
begin
//任务工单维护
CreateFormInPackage('TTas520_01Form',True);
sbSearch.Click;
end;
procedure TTasW00_01Form.ActTas530Execute(Sender: TObject);
begin
//任务进度汇报
CreateFormInPackage('TTas530_01Form',True);
sbSearch.Click;
end;
procedure TTasW00_01Form.ActContentsExecute(Sender: TObject);
begin
//帮助主题(&H)
Screen.Cursor:=crHourGlass;
Application.HelpCommand(HELP_FINDER,0);
Screen.Cursor:=crDefault;
end;
procedure TTasW00_01Form.ActEmailExecute(Sender: TObject);
begin
//写信给作者(&E)...
Screen.Cursor:=crHourGlass;
ShellExecute(Handle, nil, PChar('mailto:'+AEmail),nil,nil,SW_NORMAL);
Screen.Cursor:=crDefault;
end;
procedure TTasW00_01Form.ActHomePageExecute(Sender: TObject);
begin
//网上浩晖(&P)...
Screen.Cursor:=crHourGlass;
ShellExecute(Handle, nil, PChar(AHome),nil,nil,SW_NORMAL);
Screen.Cursor:=crDefault;
end;
procedure TTasW00_01Form.ActAboutExecute(Sender: TObject);
begin
//关于浩晖(&A)...
Screen.Cursor:=crHourGlass;
WelcomeForm:=TWelcomeForm.Create(Application);
WelcomeForm.AFlag:=True;
Screen.Cursor:=crDefault;
WelcomeForm.ShowModal;
end;
procedure TTasW00_01Form.ActRegExecute(Sender: TObject);
begin
//软件注册(&R)...
Screen.Cursor:=crHourGlass;
AStartTime:=GetTickCount;
HwRegisterForm:=THwRegisterForm.Create(Application);
ShowRunTime; //显示程序执行时间
Screen.Cursor:=crDefault;
HwRegisterForm.ShowModal;
ActReg.Visible:=ADemoFlag;
N1.Visible:=ADemoFlag;
end;
procedure TTasW00_01Form.ActUpgradeExecute(Sender: TObject);
begin
//在线智能升级(&U)...
ShowUpgradeForm;
end;
procedure TTasW00_01Form.sbSearchClick(Sender: TObject);
var
AClassNo:string;
begin
//查询
if (edtFromDate.Text='') or (edtToDate.Text='') then
begin
ShowMsg('UMS10000319'); //起止日期不可为空
if edtFromDate.Text='' then edtFromDate.SetFocus else edtToDate.SetFocus;
Abort;
end;
if edtFromDate.Date>edtToDate.Date then
begin
ShowMsg('UMS10000320'); //结束日期不能小于起始日期
edtToDate.SetFocus;
Abort;
end;
try
Screen.Cursor:=crHourGlass;
//使用颜色标明任务的状态。如:计划=黑色,执行=蓝色,完成=灰色,返工=红色
AIsColor:=GetSysParams('TAS0010')='Y';
//取得有子任务的电脑编号
AClassNo:=GetChildTask(cbTasClass.Text);
qryTas510.DisableControls;
qryTas510.Close;
qryTas510.SQL.Clear;
qryTas510.SQL.Add('select B.*,C.T100_002,D.T120_003,');
qryTas510.SQL.Add(' G.O150_001,G.O150_002,G.O150_003,I.H150_002,I.H150_003,D.T120_005');
qryTas510.SQL.Add('from TAS510 B,TAS100 C,TAS120 D,ORD150 G,HRM150 I');
qryTas510.SQL.Add('where B.T510_004=C.T100_001 and B.T510_003=D.T120_001 and B.T510_024=I.H150_001 and');
qryTas510.SQL.Add(' B.T510_016=G.O150_001 and ');
qryTas510.SQL.Add(' B.T510_006>='+GetDateString(edtFromDate.Date)+' and B.T510_006<='+GetDateString(edtToDate.Date));
if AClassNo<>'' then qryTas510.SQL.Add(' and B.T510_004 in ('+AClassNo+')');
qryTas510.SQL.Add('order by T510_001');
qryTas510.Open;
ARecordCount:=GetDataSetCount(qryTas510);
finally
qryTas510.EnableControls;
Screen.Cursor:=crDefault;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -