⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sfc_mninbillqry.pas

📁 一个MRPII系统源代码版本
💻 PAS
字号:
unit Sfc_MnInBillQry;

Interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Base_Entry_Body, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
  ExtCtrls, ComCtrls, ToolWin, StdCtrls, DBCtrls;

Type
  TFrm_Sfc_MnInBillQry = Class(TFrm_Base_Entry_Body)
    Label8: TLabel;
    DBText1: TDBText;
    Lbl_Warehouse: TLabel;
    Lbl_Dept: TLabel;
    Lbl_MoNo: TLabel;
    Lbl_RemArk: TLabel;
    Lbl_WhPosition: TLabel;
    Lbl_Shift: TLabel;
    Lbl_BillNo: TLabel;
    Lbl_BillDate: TLabel;
    Label5: TLabel;
    Label1: TLabel;
    Label3: TLabel;
    Label6: TLabel;
    Label2: TLabel;
    Label9: TLabel;
    Label7: TLabel;
    Label4: TLabel;
    procedure Act_PreviewExecute(Sender: TObject);
    procedure Act_PrintExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure InitControls; Override;
  end;

var
  Frm_Sfc_MnInBillQry: TFrm_Sfc_MnInBillQry;

implementation

uses Inv_Global,Sys_Global;

{$R *.DFM}

{ TFrm_Sfc_MnOutBillQry }

procedure TFrm_Sfc_MnInBillQry.InitControls;
begin
  if Param1='0104' then
  begin
    Caption:='车间半成品生产入库制单';
    Pnl_Title.Caption:='车间半成品生产入库制单';
  end
  else if Param1='0105' then
  begin
    Caption:='车间成品生产入库制单';
    Pnl_Title.Caption:='车间成品生产入库制单';
  end;
  inherited;
  AdoQry_Tmp.Close;
  AdoQry_Tmp.SQL.Text:='Select InvInBill.WHCode+'' ''+Warehouse.WHName As WHCodeName'
    +',InvInBill.WhPositionCode+'' ''+WhPosition.WhPositionName As WhPositionCodeName'
    +',InvInBill.InvBillNo'
    +',InvInBill.DeptCode+'' ''+Dept.DeptName As DeptCodeName'
    +',InvInBill.ShiftType'
    +',InvInBill.InvBillDate'
    +',InvInBill.MoNo'
    +',InvInBill.InvBillRemArk'
    +' From InvInBill'
    +' Join Warehouse On InvInBill.WHCode=Warehouse.WHCode'
    +' Join WhPosition On InvInBill.WhPositionCode=WhPosition.WhPositionCode'
    +' And InvInBill.WHCode=WhPosition.WHCode'
    +' Join Dept On InvInBill.DeptCode=Dept.DeptCode'
    +' Where InvInBill.InvBillId='+AdoQry_Head.fieldbyname('InvBillId').AsString;
  AdoQry_Tmp.Open;

  Lbl_Warehouse.Caption:=AdoQry_Tmp.fieldbyname('WHCodeName').AsString;
  Lbl_Dept.Caption:=AdoQry_Tmp.fieldbyname('DeptCodeName').AsString;
  Lbl_MoNo.Caption:=AdoQry_Tmp.fieldbyname('MoNo').AsString;
  Lbl_RemArk.Caption:=AdoQry_Tmp.fieldbyname('InvBillRemArk').AsString;
  Lbl_WhPosition.Caption:=AdoQry_Tmp.fieldbyname('WhPositionCodeName').AsString;
  Lbl_Shift.Caption:=AdoQry_Tmp.fieldbyname('ShiftType').AsString;
  Lbl_BillNo.Caption:=AdoQry_Tmp.fieldbyname('InvBillNo').AsString;
  Lbl_BillDate.Caption:=AdoQry_Tmp.fieldbyname('InvBillDate').AsString;

  AdoQry_Body.Close;
  AdoQry_Body.SQL.Text:='Select InvInBillLine.InvBillId'
    +',InvInBillLine.InvBillLineNo'
    +',InvInBillLine.MoLineNo'
    +',MoLine.MoQty'
    +',MoLine.MoLineDate'
    +',MoLine.MoNoFinishQty'
    +',MoLine.MoRealInQty'
    +',InvInBillLine.InvBillSfcQty'
    +',InvInBillLine.ItemCode'
    +',Item.ItemName'
    +',Uom.UomName'
    +',InvInBillLine.BillLineRemArk'
    +' From InvInBillLine'
    +' Join MoLine On InvInBillLine.MoNo=MoLine.MoNo'
    +' And InvInBillLine.MoLineNo=MoLine.MoLineNo'
    +' Join Item On InvInBillLine.ItemCode=Item.ItemCode'
    +' Join Uom On Item.UomCode=Uom.UomCode'
    +' Where InvInBillLine.InvBillId='+AdoQry_Head.fieldbyname('InvBillId').AsString;
  AdoQry_Body.Open;
  AdoQry_Body.Sort:='MoLineNo';
end;

procedure TFrm_Sfc_MnInBillQry.Act_PreviewExecute(Sender: TObject);
begin
  BillPrint(DBConnect,GetCode(Lbl_Warehouse.Caption),
    Lbl_BillNo.Caption,Param1,ModuleCode,True,False,True,'');
end;

procedure TFrm_Sfc_MnInBillQry.Act_PrintExecute(Sender: TObject);
begin
  inherited;
  BillPrint(DBConnect,GetCode(Lbl_Warehouse.Caption),
    Lbl_BillNo.Caption,Param1,ModuleCode,False,False,True,'');
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -