📄 mrp_qry_chginfomo_c.pas
字号:
unit Mrp_Qry_ChgInfoMo_C;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Condition, Db, AdODB, StdCtrls, Mask;
Type
TFrm_Mrp_Qry_ChgInfoMo_C = Class(TFrm_Base_Condition)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
MoNoState: TEdit;
MoNoend: TEdit;
ChgEmployeeCodeState: TEdit;
ChgEmployeeCodeend: TEdit;
ChgTimeState: TMaskEdit;
ChgTimeend: TMaskEdit;
Label7: TLabel;
ItemCodeState: TEdit;
Label8: TLabel;
ItemCodeend: TEdit;
procedure FormShow(Sender: TObject);
procedure MoNoendExit(Sender: TObject);
procedure ChgEmployeeCodeendExit(Sender: TObject);
procedure btn_okClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_Mrp_Qry_ChgInfoMo_C: TFrm_Mrp_Qry_ChgInfoMo_C;
implementation
uses Sys_Global;
{$R *.DFM}
procedure TFrm_Mrp_Qry_ChgInfoMo_C.FormShow(Sender: TObject);
begin
inherited;
ChgTimeState.Text := FormatDateTime('yyyy.mm.dd', date()-30);
ChgTimeend.Text := FormatDateTime('yyyy.mm.dd',date());
MoNoState.SetFocus;
end;
procedure TFrm_Mrp_Qry_ChgInfoMo_C.MoNoendExit(Sender: TObject);
begin
inherited;
if ActiveControl.Name <> 'btn_Cancel' then
begin
if MoNoend.Text = '' then
begin
DispInfo('请输入生产定单号!',3);
MoNoend.SetFocus;
abort;
end;
end;
end;
procedure TFrm_Mrp_Qry_ChgInfoMo_C.ChgEmployeeCodeendExit(
Sender: TObject);
begin
inherited;
if ActiveControl.Name <> 'btn_Cancel' then
begin
if Tedit(sender).Text = '' then
begin
DispInfo('请输入操作员代码!',3);
Tedit(sender).SetFocus;
abort;
end;
end;
end;
procedure TFrm_Mrp_Qry_ChgInfoMo_C.btn_okClick(Sender: TObject);
begin
inherited;
condition:=' (MoNo between '''+MoNoState.Text +''' And '''+MoNoend.Text+''') '
+' And (ChgEmployeeCode between '''+ChgEmployeeCodeState.Text +''' And '''+ChgEmployeeCodeend.Text+''') '
+' And (MoLineHistory.ItemCode between '''+ItemCodeState.Text +''' And '''+ItemCodeend.Text+''') '
+' And (ChgTime between '''+ChgTimeState.Text +''' And '''+ChgTimeend.Text+' 23:59:59.999'+''') ';
conditionHint:= '生产订单号从:'+MoNoState.Text+ '到:'+MoNoend.Text+
'/操作员代码从:'+ChgEmployeeCodeState.Text+'到:'+ChgEmployeeCodeend.Text+
'/物料代码从:'+ItemCodeState.Text+'到:'+ItemCodeend.Text+
'/操作日期从:'+ChgTimeState.Text+'到:'+ChgTimeState.Text;
Self.ModalResult := mrok;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -