You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
3.0 KiB
Plaintext

unit u_op_state_igz_one;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxControls, cxContainer, cxTreeView, bsSkinCtrls, DB, ADODB,ComCtrls,
StdCtrls, cxImage, cxTrackBar, cxEdit, cxRadioGroup, ExtCtrls,
bsSkinBoxCtrls;
type
Tfrm_op_state_igz_one = class(TForm)
bsSkinScrollBox1: TbsSkinScrollBox;
bsSkinScrollBar1: TbsSkinScrollBar;
bsSkinButton5: TbsSkinButton;
procedure FormShow(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
mblno,ctnNo:string;
end;
var
frm_op_state_igz_one: Tfrm_op_state_igz_one;
implementation
uses u_main,u_data_share, my_sys_function;
{$R *.dfm}
procedure Tfrm_op_state_igz_one.FormShow(Sender: TObject);
var
i,j:integer;
ctn,ctnstatus,ctnstatusDate,ctnstatusNode:string;
ADOQuery1:TADOQuery;
begin
ADOQuery1:=CreateAdoQuery;
with ADOQuery1 do
begin
close;sql.Clear;
SQL.Add('select * from t_op_state_igz');
SQL.Add('where 主提单号=:主提单号 and 箱号=:箱号');
SQL.Add('order by 状态时间 desc ');
Parameters.ParamByName('主提单号').Value:=mblno;
Parameters.ParamByName('箱号').Value:=ctnNo;
Open;First;
i:=1;
while not eof do
begin
ctnstatus:=FieldByName('业务状态').AsString;
ctnstatusDate:=FieldByName('状态时间').AsString;
with TcxRadioButton.Create(Self) do
begin
Name := 'RadioButton' + InttoStr(I);
Parent := bsSkinScrollBox1;
Caption:='';
Top:=10;
Left:=10+(i-1)*140;
if i=1 then
begin
Checked:=True;
end;
Enabled:=False;
Width:=15;
end;
with TbsSkinLabel.Create(Self) do
begin
Name := 'Label' + InttoStr(I);
Parent := bsSkinScrollBox1;
Caption:=ctnstatus;
Top:=40;
Left:=10+(i-1)*140;
Width:=120;
SkinData:=frm_main.bsSkinData1;
end;
with TbsSkinLabel.Create(Self) do
begin
Name := 'Label' + InttoStr(I+1000);
Parent := bsSkinScrollBox1;
Caption:=ctnstatusDate;
SkinData:=frm_main.bsSkinData1;
Top:=60;
Left:=10+(i-1)*140;
Width:=120;
end;
with TbsSkinPanel.Create(Self) do
begin
Name := 'Panel' + InttoStr(I);
Parent := bsSkinScrollBox1;
Caption:='';
Top:=15;
Left:=30+(i-1)*140;
Height:=6;
Width:=140;
SkinData:=frm_main.bsSkinData1;
end;
i:=i+1;
Next;
end;
end;
end;
procedure Tfrm_op_state_igz_one.bsSkinButton1Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_state_igz_one.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
end.