📄 mrp_qry_analyzermo1.pas
字号:
unit Mrp_Qry_AnalyzerMo1;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Qry, Menus, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
StdCtrls, ExtCtrls, ComCtrls, ToolWin, DBCtrls;
Type
TFrm_Mrp_Qry_AnalyzerMo1 = Class(TFrm_Base_Qry)
AdoQry_MainMoNo: TStringField;
AdoQry_MainDeptName: TStringField;
AdoQry_MainMoLineNo: TIntegerField;
AdoQry_MainItemCode: TStringField;
AdoQry_MainItemName: TStringField;
AdoQry_MainMoLinedate: TDateTimeField;
AdoQry_MainMoLineStatus: TStringField;
AdoQry_MainMoQty: TFloatField;
AdoQry_MainFinishQty: TFloatField;
AdoQry_MainMoNoFinishQty: TFloatField;
AdoQry_MainFinishRate: TStringField;
AdoQry_MainItemflag: TStringField;
dbtxtDeptName: TDBText;
dbtxtItemflag: TDBText;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
dbtxtFinishrate: TDBText;
AdoQry_MainDeptflag: TStringField;
AdoQry_MainDeptCode: TStringField;
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
end;
var
Frm_Mrp_Qry_AnalyzerMo1: TFrm_Mrp_Qry_AnalyzerMo1;
implementation
uses Mrp_Qry_AnalyzerMo1_C;
{$R *.DFM}
procedure TFrm_Mrp_Qry_AnalyzerMo1.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Mrp_Qry_AnalyzerMo1:=nil;
end;
procedure TFrm_Mrp_Qry_AnalyzerMo1.InitForm(AdOConnection: TAdOConnection;
ReadOnly: Boolean);
begin
inherited;
SelectFromSql:='Select Mo.MoNo,mo.DeptCode,Dept.DeptName,MoLine.MoLineNo,MoLine.ItemCode,'+
' Item.ItemName,MoLine.MoLinedate,'+
' Deptflag=mo.DeptCode+'' ''+Dept.DeptName,'+
' Itemflag=MoLine.ItemCode+'' ''+Item.ItemName,'+
' MoLineStatus= case MoLineStatus when 5 then ''5 准备'' when 6 then ''6 下达'' when 7 then ''7 关闭'' when 8 then ''8 永久关闭'' end,'+
' MoLine.MoQty,MoLine.MoQty-MoLine.MoNoFinishQty As FinishQty,'+
' MoLine.MoNoFinishQty,case MoLine.moqty when 0 then ''0%'' else Convert(varchAr,Convert(decimal(12,0),(MoLine.MoQty-'+
' MoLine.MoNoFinishqty)*100/MoLine.MoQty))+''%'' end As FinishRate'+
' From MoLine'+
' Join Mo On MoLine.MoNo=Mo.MoNo and MoLine.MoQty>0'+
' left outer Join Item On MoLine.ItemCode=Item.ItemCode'+
' left outer Join Dept On Mo.DeptCode=Dept.DeptCode ';
// Condition:=' MoLine.MoLinestatus<>3';
Orderbyfields:='DeptCode,mono,MoLineno,ItemCode';
// Getdata;
Frm_Sys_Condition:=TFrm_Mrp_Qry_AnalyzerMo1_C.Create(self);
act_filter.Execute;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -