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

📄 fmtslostu.pas

📁 小型库存管理,希望有帮助,小型库存管理,希望有帮助
💻 PAS
字号:
unit FMTsLostU;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FMBizMulU, DB, Menus, ADODB, Grids, DBGrids, dxDBTLCl, dxGrClms,
  dxDBGrid, dxTL, dxDBCtrl, dxCntner, DBCtrls, ComCtrls, StdCtrls, Mask,
  Buttons, ExtCtrls;

type
  TFMTsLost = class(TFMBizMul)
    cdsDetailfBuyPrice: TFloatField;
    procedure btnQueryClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure btnPrintClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FMTsLost: TFMTsLost;

implementation

{$R *.dfm}

uses RepTsLostU ;

procedure TFMTsLost.btnQueryClick(Sender: TObject);
begin
  PTableName :='ts_lost_head';
  inherited;
end;

procedure TFMTsLost.FormCreate(Sender: TObject);
begin
  inherited;
  aPriceType := 1 ;
  aNumType :=1 ;
  aMainTable :='ts_lost_head';
  aDetailTable :='ts_lost_detail';
  aKeyField :='fBillId';
  aBillNo :='fBillNo';
  Style :='DZ';
end;

procedure TFMTsLost.btnPrintClick(Sender: TObject);
begin
  inherited;
  if Application.FindComponent('RepTsLost')=nil then
        RepTsLost:=TRepTsLost.create(self);
  RepTsLost.Caption :=Self.Caption ;
  RepTsLost.idtCompany.Caption :=aCompany ;
  RepTsLost.idtTitle.Caption :=Self.Caption;
  RepTsLost.cdsRep.Active :=false ;
  RepTsLost.cdsRep.CommandText :='SELECT a.*, b.fProductId, b.fqty, c.fProductNo, c.fProductName, c.fSpec, c.fSaleUnit, b.fBuyPrice,u.fusername '
   +' FROM ts_lost_head AS a, ts_lost_detail AS b, ts_item AS c,  ts_User AS u '
   +' WHERE a.fBillId=b.fBillId And b.fProductId=c.fProductId  '
   +' and a.fcreuser=u.fuserno and a.fBillId in '+GetPrintList
   +' order by a.fbillid,b.fProductId ' ;
  RepTsLost.cdsRep.Active :=true ;
  RepTsLost.Show ;
  RepTsLost.Visible :=false ;
  RepTsLost.QRep.Preview ;
end;

end.

⌨️ 快捷键说明

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