📄 inv_mnoutaudit_h.pas
字号:
unit Inv_MnOutAudit_H;
//
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Check_Head, Menus, Db, ActnList, AdODB, Grids, DBGridEh, StdCtrls,
ExtCtrls, ComCtrls, ToolWin, jpeg, ExtPrintReport;
Type
TFrm_Inv_MnOutAudit_H = Class(TFrm_Base_Check_Head)
AdoQry_HeadInvBilltmpflag: TIntegerField;
AdoQry_HeadInvBillid: TFloatField;
AdoQry_HeadwhCode: TStringField;
AdoQry_HeadwhCodeName: TStringField;
AdoQry_HeadWhPositionCode: TStringField;
AdoQry_HeadWhPositionCodeName: TStringField;
AdoQry_HeadDeptCode: TStringField;
AdoQry_HeadDeptCodeName: TStringField;
AdoQry_HeadshiftType: TStringField;
AdoQry_HeadInvBillno: TStringField;
AdoQry_HeadInvBilldate: TDateTimeField;
AdoQry_Headmono: TStringField;
AdoQry_HeadMoLineno: TIntegerField;
AdoQry_HeadOverPlan: TIntegerField;
AdoQry_HeadWipWaster: TIntegerField;
private
BillTypeCode:string;
{ Private declarations }
public
tmp_MoRequestshift,tmp_DeptCode:string;
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
{ Public declarations }
end;
var
Frm_Inv_MnOutAudit_H: TFrm_Inv_MnOutAudit_H;
implementation
uses Inv_MnOutAudit_B;
{$R *.DFM}
procedure TFrm_Inv_MnOutAudit_H.InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);
begin
inherited;
BillTypeCode:=Param1;
//设置表头SQL
SelectFromSQL:='select '+
'InvOutBill.InvBilltmpflag,'+
'InvOutBill.InvBillid,'+
'InvOutBill.whCode,'+
'InvOutBill.whCode+'+' '' '' '+'+Warehouse.whName as whCodeName,'+
'InvOutBill.WhPositionCode,'+
'InvOutBill.WhPositionCode+'+' '' '' '+'+WhPosition.WhPositionName as WhPositionCodeName,'+
'InvOutBill.DeptCode,'+
'InvOutBill.DeptCode+'+''' '''+'+DeptName as DeptCodeName,'+
'InvOutBill.shiftType,'+
'InvOutBill.InvBillno,'+
'InvOutBill.InvBilldate,'+
'InvOutBill.mono,'+
'InvOutBill.MoLineno,'+
'InvOutBill.WipWaster,'+
'InvOutBill.OverPlan'+
' from InvOutBill '+
' left join Warehouse '+
' on InvOutBill.whCode=Warehouse.whCode '+
' left join WhPosition '+
' on InvOutBill.whCode=WhPosition.whCode '+
' and InvOutBill.WhPositionCode=WhPosition.WhPositionCode '+
' left join Dept on InvOutBill.DeptCode=Dept.DeptCode ';
//固定条件为用户为仓管员,单据类型为‘生产领料 0201’ BillTypeCode由菜单传入
ConditionUserDefine:='InvOutBill.ISMoUnitRequest=0 and InvOutBill.whCode in (select whCode '+
' from whAccessCtrl '+
' where EmployeeCode='''+userCode+''') '+
' and InvOutBill.BillTypeCode='''+BillTypeCode+''''+
' and InvOutBill.InvBillwhchck=0 ';
//设置排序字段信息
OrderByFields:='whCode,DeptCode,InvBillno';
getdata;
lbl_Order.Caption:='仓库代码,部门,单据号';
Frm_Check_Body:=TFrm_Inv_MnOutAudit_B.Create(Self);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -