📄 inv_purchasein_h.pas
字号:
unit Inv_PurchaseIn_H;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Entry_Head, Menus, Db, ActnList, AdODB, Grids, DBGridEh, StdCtrls,
ExtCtrls, ComCtrls, ToolWin, jpeg, ExtPrintReport;
Type
TFrm_Inv_PurchaseIn_H = Class(TFrm_Base_Entry_Head)
AdoQry_HeadWHCode: TStringField;
AdoQry_HeadWHName: TStringField;
AdoQry_HeadWhPositionCode: TStringField;
AdoQry_HeadWhPositionName: TStringField;
AdoQry_HeadInvBillNo: TStringField;
AdoQry_HeadInvBillId: TBCDField;
AdoQry_HeadInvBillDate: TDateTimeField;
AdoQry_HeadPoNo: TStringField;
AdoQry_HeadVendorCode: TStringField;
AdoQry_HeadVendorName: TStringField;
AdoQry_HeadInvBillRemArk: TStringField;
AdoQry_HeadVendorBillNo: TStringField;
procedure FormCreate(Sender: TObject);
procedure Act_CheckDebtExecute(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
end;
var
Frm_Inv_PurchaseIn_H: TFrm_Inv_PurchaseIn_H;
implementation
uses Inv_PurchaseIn_B, Inv_FromCheckIn;
{$R *.DFM}
{ TFrm_Inv_SaleMaterial_H }
procedure TFrm_Inv_PurchaseIn_H.InitForm(AdOConnection: TAdOConnection;
ReadOnly: Boolean);
begin
inherited;
if UpperCase(Param2)='Over' then
Caption:='超订单';
if Param1='0101' then
Caption:=Caption+'采购入库制单'
else if Param1='0102' then
Caption:=Caption+'进口采购入库制单'
else if Param1='0103' then
Caption:=Caption+'委外采购入库制单';
Pnl_Title.Caption:=Caption;
SelectFromSQL:='Select InvInBill.WHCode'
+',Warehouse.WHName'
+',InvInBill.WhPositionCode'
+',WhPosition.WhPositionName'
+',InvInBill.InvBillNo'
+',InvInBill.InvBillId'
+',InvInBill.InvBillDate'
+',InvInBill.PoNo'
+',InvInBill.VendorCode'
+',Vendor.VendorName'
+',InvInBill.InvBillRemArk'
+',InvInBill.VendorBillNo'
+' From InvInBill'
+' Join Warehouse On InvInBill.WHCode=Warehouse.WHCode'
+' Join Vendor On InvInBill.VendorCode=Vendor.VendorCode'
+' Join WhPosition On InvInBill.WhPositionCode=WhPosition.WhPositionCode'
+' And InvInBill.WHCode=WhPosition.WHCode ';
OrderByFields:='WHCode,InvBillNo';
if UpperCase(Param2)='Over' then
ConditionUserDefine:='InvInBill.WHCode In'
+' (Select WHCode From WHAccessCtrl Where EmployeeCode='''+UserCode+''')'
// +' And InvInBill.InvBillStkChck=0'
+' And InvInBill.BillTypeCode='''+Param1+''''
+' And InvInBill.OverPlan=1'
else
ConditionUserDefine:='InvInBill.WHCode In'
+' (Select WHCode From WHAccessCtrl Where EmployeeCode='''+UserCode+''')'
//+' And InvInBill.InvBillStkChck=0'
+' And InvInBill.BillTypeCode='''+Param1+''''
+' And InvInBill.OverPlan<>1';
GetData;
Frm_Entry_Body:=TFrm_Inv_PurchaseIn_B.Create(Self);
Frm_Entry_Body.Caption:=Caption;
Frm_Entry_Body.Pnl_Title.Caption:=Caption;
end;
procedure TFrm_Inv_PurchaseIn_H.FormCreate(Sender: TObject);
begin
inherited;
TlBtn_Modify.Action:=Act_CheckDebt;
end;
procedure TFrm_Inv_PurchaseIn_H.Act_CheckDebtExecute(Sender: TObject);
begin//从待检入库
inherited;
Application.CreateForm(TFrm_Inv_FromCheckIn,Frm_Inv_FromCheckIn);
Frm_Inv_FromCheckIn.SetUserParam(Param1,Param2,Param3,Param4,Param5,Param6);
Frm_Inv_FromCheckIn.SetSysParam(UserCode,ModuleCode,MenuId,LoginDate);
Frm_Inv_FromCheckIn.InitForm(DBConnect,False);
end;
procedure TFrm_Inv_PurchaseIn_H.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Inv_PurchaseIn_H:=nil;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -