📄 iqc_lai_liao_report.pas
字号:
unit iqc_lai_liao_report;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables;
type
Tiqc_lai_liao_repor = class(TForm)
Label1: TLabel;
Edit1: TEdit;
ComboBox1: TComboBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Query1: TQuery;
Query2: TQuery;
Label5: TLabel;
Query3: TQuery;
Query4: TQuery;
Query5: TQuery;
Query6: TQuery;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure ComboBox1KeyPress(Sender: TObject; var Key: Char);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Edit1Exit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
iqc_lai_liao_repor: Tiqc_lai_liao_repor;
implementation
uses IQC_lai_liao_juan;
{$R *.dfm}
procedure Tiqc_lai_liao_repor.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;
procedure Tiqc_lai_liao_repor.Edit1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=chr(13) then
combobox1.SetFocus;
end;
procedure Tiqc_lai_liao_repor.ComboBox1KeyPress(Sender: TObject;
var Key: Char);
begin
query1.Active:=false;
query1.SQL.Clear;
query1.SQL.Add('select * from nian_shou_wei_chong1 where (nian_shou_no=:mm) and (wu_no=:nn)');
query1.ParamByName('mm').AsString:=edit1.Text;
query1.ParamByName('nn').AsString:=combobox1.Text;
query1.Prepare;
query1.Active:=true;
if key=chr(13) then
begin
edit2.Text:=query1.FieldByName('wu_name').AsString;
edit3.Text:=query1.FieldByName('wu_gui').AsString;
button1.SetFocus;
end;
end;
procedure Tiqc_lai_liao_repor.Button2Click(Sender: TObject);
begin
close;
end;
procedure Tiqc_lai_liao_repor.Button1Click(Sender: TObject);
var IQC_lai_liao_jua:TIQC_lai_liao_jua; xws1,xws2,b1,b2:double;
begin
IQC_lai_liao_jua:=TIQC_lai_liao_jua.Create(self);
query2.Active:=false;
query2.SQL.Clear;
query2.SQL.Add('select * from nian_shou_wei_zhu1 where nian_shou_no=:ll');
query2.ParamByName('ll').AsString:=edit1.Text;
query2.Prepare;
query2.Active:=true;
IQC_lai_liao_jua.QRLabel58.Caption:=query2.FieldByName('gong_shang').AsString;
IQC_lai_liao_jua.QRLabel72.Caption:=query2.FieldByName('shou_huo_no').AsString;
IQC_lai_liao_jua.QRLabel61.Caption:=query2.FieldByName('lai_liao_date').AsString;
IQC_lai_liao_jua.QRLabel76.Caption:=query2.FieldByName('nian_shou_date').AsString;
IQC_lai_liao_jua.USxm.Caption:=label5.Caption;
query3.Active:=false;
query3.SQL.Clear;
query3.SQL.Add('select * from nian_shou_wei_chong1 where (nian_shou_no=:mm) and (wu_no=:nn)');
query3.ParamByName('mm').AsString:=edit1.Text;
query3.ParamByName('nn').AsString:=combobox1.Text;
query3.Prepare;
query3.Active:=true;
IQC_lai_liao_jua.QRLabel60.Caption:=query3.FieldByName('shong_huo_liang').AsString;
IQC_lai_liao_jua.QRLabel73.Caption:=query3.FieldByName('wu_no').AsString;
IQC_lai_liao_jua.QRLabel75.Caption:=query3.FieldByName('wu_name').AsString;
IQC_lai_liao_jua.QRLabel77.Caption:=query3.FieldByName('biao_zhen').AsString;
IQC_lai_liao_jua.QRLabel59.Caption:=query3.FieldByName('miao_shu').AsString;
IQC_lai_liao_jua.QRLabel85.Caption:=query3.FieldByName('nian_shou_no').AsString;
IQC_lai_liao_jua.QRLabel14.Caption:=query3.FieldByName('aql').AsString;
IQC_lai_liao_jua.QRLabel83.Caption:=query3.FieldByName('qian_shu_liang').AsString;
IQC_lai_liao_jua.QRLabel78.Caption:=query3.FieldByName('nian_shu').AsString;
IQC_lai_liao_jua.QRLabel79.Caption:=query3.FieldByName('qing_shu').AsString;
IQC_lai_liao_jua.QRLabel80.Caption:=query3.FieldByName('bei_zhu').AsString;
IQC_lai_liao_jua.QRLabel81.Caption:=query3.FieldByName('jian_yi').AsString;
IQC_lai_liao_jua.QRLabel82.Caption:=query3.FieldByName('chu_li_things').AsString;
IQC_lai_liao_jua.QRLabel63.Caption:=query3.FieldByName('ma').AsString;
IQC_lai_liao_jua.QRLabel64.Caption:=query3.FieldByName('mi').AsString;
IQC_lai_liao_jua.QRLabel69.Caption:=query3.FieldByName('ma').AsString;
IQC_lai_liao_jua.QRLabel70.Caption:=query3.FieldByName('mi').AsString;
IQC_lai_liao_jua.QRLabel86.Caption:=query3.FieldByName('bumen').AsString;
if query3.FieldByName('ma').AsString<>'' then
xws1:=query3.FieldByName('ma').AsFloat
else
xws1:=0;
if query3.FieldByName('qian_shu_liang').AsString<>'' then
xws2:=query3.FieldByName('qian_shu_liang').AsFloat
else
xws2:=0;
b1:=xws1/xws2;
query4.Active:=false;
query4.SQL.Clear;
query4.SQL.Add('select * from aql where (lot_barch_size=:mm) and (acceptable_levels=:nn)');
query4.ParamByName('mm').AsString:=query3.FieldByName('fan_wei').AsString;
query4.ParamByName('nn').AsString:=query3.FieldByName('ma').AsString;
query4.Prepare;
query4.Active:=true;
IQC_lai_liao_jua.QRLabel65.Caption:=query4.FieldByName('ying_shou_shu').AsString;
IQC_lai_liao_jua.QRLabel66.Caption:=inttostr(query4.FieldByName('ying_shou_shu').AsInteger+1);
if query4.FieldByName('ying_shou_shu').AsString<>'' then
b2:=query4.FieldByName('ying_shou_shu').AsInteger+1
else
b2:=0;
if b1>b2 then
IQC_lai_liao_jua.QRLabel71.Caption:='ぃ
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -