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

📄 shou_report.pas

📁 采购管理系统:delphi+sql实现了企业采购自动化作业流程
💻 PAS
字号:
unit shou_report;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, Buttons, DB, DBTables, Mask;

type
  Tshou_repor = class(TForm)
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    ComboBox1: TComboBox;
    GroupBox1: TGroupBox;
    BitBtn1: TBitBtn;
    BitBtn3: TBitBtn;
    Label3: TLabel;
    Label4: TLabel;
    Query1: TQuery;
    Label1: TLabel;
    Query2: TQuery;
    t1: TMaskEdit;
    t2: TMaskEdit;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure BitBtn1Click(Sender: TObject);
    procedure RadioButton1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure RadioButton2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
    procedure ComboBox1KeyPress(Sender: TObject; var Key: Char);
    procedure t1KeyPress(Sender: TObject; var Key: Char);
    procedure t2KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  shou_repor: Tshou_repor;

implementation
 uses shou_huo_report,shou_huo_report1, data_cai;
{$R *.dfm}

procedure Tshou_repor.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;

procedure Tshou_repor.BitBtn1Click(Sender: TObject);
var shou_huo_repor:Tshou_huo_repor; shou_huo_report11:Tshou_huo_report11;
begin
shou_huo_repor:=Tshou_huo_repor.Create(self);
//
query2.Active:=false;
query2.SQL.Clear;
query2.SQL.Add('select gong_si_chuan from gong_si' );
query2.Prepare;
query2.Active:=true;
shou_huo_repor.QRLabel4.Caption:=query2.FieldByName('gong_si_chuan').AsString+shou_huo_repor.QRLabel4.Caption;
//
shou_huo_report11:=Tshou_huo_report11.Create(self);
//
//query2.Active:=false;
//query2.SQL.Clear;
//query2.SQL.Add('select  gong_si_chuan from gong_si ' );
//query2.Prepare;
//query2.Active:=true;
shou_huo_report11.QRLabel4.Caption:=query2.FieldByName('gong_si_chuan').AsString+shou_huo_report11.QRLabel4.Caption;
//
if (RadioButton1.Checked) and (combobox1.Text<>'') then
begin
shou_huo_repor.StoredProc1.Active:=false;
shou_huo_repor.StoredProc1.ParamByName('@str1').AsString:=combobox1.Text;
shou_huo_repor.StoredProc1.Prepare;
shou_huo_repor.StoredProc1.Active:=true;
shou_huo_repor.QRLabel6.Caption:=label1.Caption;
shou_huo_repor.QuickRep1.Preview;
shou_huo_repor.Release;
end;
if RadioButton2.Checked  then
begin
shou_huo_report11.StoredProc1.Active:=false;
shou_huo_report11.StoredProc1.ParamByName('@str1').AsDateTime:=strtodate(t1.Text);
shou_huo_report11.StoredProc1.ParamByName('@str2').AsDateTime:=strtodate(t2.Text);
shou_huo_report11.StoredProc1.Prepare;
shou_huo_report11.StoredProc1.Active:=true;
shou_huo_report11.QRLabel6.Caption:=label1.Caption;
shou_huo_report11.QRLabel17.Caption:=t1.Text;
shou_huo_report11.QRlabel19.Caption:=t2.Text;
shou_huo_report11.QuickRep1.Preview;
shou_huo_report11.Release;
end;
end;

procedure Tshou_repor.RadioButton1Click(Sender: TObject);
begin
if RadioButton1.Checked then
begin
combobox1.Enabled:=true;
combobox1.SetFocus;
end
else
begin
combobox1.Enabled:=false;
end;
end;

procedure Tshou_repor.FormCreate(Sender: TObject);
begin
combobox1.Enabled:=false;
label1.Visible:=false;
t1.Enabled:=false;
t2.Enabled:=false;
t1.Text:=datetostr(date);
t2.Text:=datetostr(date);
combobox1.Text:='';
query1.Active:=false;
query1.SQL.Clear;
query1.SQL.Add('select ding_gou_no from ding_gou_zhu where yes_or_no=:ll and yes_or_no_dao=:kk');
query1.ParamByName('ll').AsString:='琌';
query1.ParamByName('kk').AsString:='

⌨️ 快捷键说明

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