📄 pm_enter_poh.pas
字号:
unit Pm_Enter_PoH;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Entry_Head, Menus, Db, ActnList, AdODB, Grids, DBGridEh, StdCtrls,
ExtCtrls, ComCtrls, ToolWin, DBCtrls, jpeg;
Type
TFrm_Pm_Enter_PoH = Class(TFrm_Base_Entry_Head)
AdoQry_HeadPONO: TStringField;
AdoQry_HeadVendorCode: TStringField;
AdoQry_HeadPOType: TIntegerField;
AdoQry_HeadPODate: TDateTimeField;
AdoQry_HeadPOTAXRATE_PERCENT: TIntegerField;
AdoQry_HeadCURRENCYCode: TStringField;
AdoQry_HeadEmployeeCode: TStringField;
AdoQry_HeadPORemArk: TStringField;
AdoQry_HeadPoSpecial: TIntegerField;
AdoQry_HeadPcNo: TStringField;
AdoQry_HeadVendorName: TStringField;
AdoQry_HeadCurrencyName: TStringField;
AdoQry_HeadEmployeeName: TStringField;
Label1: TLabel;
Label3: TLabel;
Label5: TLabel;
Lbl_VendorFlag: TLabel;
DBText1: TDBText;
DBText2: TDBText;
AdoQry_HeadCreateEmpolyeeCode: TStringField;
DBText3: TDBText;
procedure FormDestroy(Sender: TObject);
procedure DataSourceDataChange(Sender: TObject; Field: TField);
private
{ Private declarations }
public
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
{ Public declarations }
end;
var
Frm_Pm_Enter_PoH: TFrm_Pm_Enter_PoH;
implementation
uses Pm_Enter_Po;
{$R *.DFM}
procedure TFrm_Pm_Enter_PoH.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Pm_Enter_PoH:=Nil;
end;
procedure TFrm_Pm_Enter_PoH.InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);
begin
Application.ProcessMessages;
Inherited;
FreeFields:='POTAXRATE_PERCENT,';
If (ReadOnly) Then
begin
Pnl_Title.Caption:='采购订单查询';
Frm_Pm_Enter_PoH.Caption:='采购订单查询';
Act_New.Enabled:=False;
Act_New.Visible:=False;
Act_Modify.Enabled:=False;
Act_Modify.Visible:=False;
end
Else
begin
Pnl_Title.Caption:='采购订单准备';
Frm_Pm_Enter_PoH.Caption:='采购订单准备';
end;
Application.ProcessMessages;
SelectFromSql:=' Select Po.*,Vendor.VendorName,Currency. CurrencyName, Employee.EmployeeName '
+' From Po '
+' Left Join Currency On Po.CurrencyCode=Currency.CurrencyCode '
+' Left Join Employee On Po.EmployeeCode=Employee.EmployeeCode '
+' Left Join Vendor On Po.VendorCode=Vendor.VendorCode ';
ConditionUserDefine:='(Po.PoSpecial=0) And'
+' Exists (Select PoNo From PoLine where PoLine.PoNo=Po.PoNo)';
Condition:= ' Exists (Select PoNo From PoLine where PoLine.PoNo=Po.PoNo'
+' And PoLine.PoLineStatus=5)';
OrderByFields:='EmployeeCode,PoNo';
GetData;
Frm_Entry_Body:=TFrm_Pm_Enter_Po.Create(Application);
end;
procedure TFrm_Pm_Enter_PoH.DataSourceDataChange(Sender: TObject;
Field: TField);
begin
inherited;
Lbl_VendorFlag.Caption:=AdoQry_Head.fieldbyname('VendorCode').AsString+' '+AdoQry_Head.fieldbyname('VendorName').AsString;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -