566 lines
14 KiB
ObjectPascal
566 lines
14 KiB
ObjectPascal
![]() |
unit U_DyeOutput;
|
|||
|
|
|||
|
interface
|
|||
|
|
|||
|
uses
|
|||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
Dialogs, StdCtrls, ExtCtrls, Menus, cxLookAndFeelPainters, cxButtons,
|
|||
|
cxControls, cxContainer, cxEdit, cxTextEdit, Buttons, DB, ADODB, cxGraphics,
|
|||
|
cxLookAndFeels, cxCheckBox, cxMaskEdit, cxDropDownEdit, cxCheckComboBox,
|
|||
|
cxGroupBox, cxRadioGroup, CheckLst, cxCheckListBox, U_BaseList, dxSkinsCore,
|
|||
|
dxSkinsDefaultPainters, Datasnap.DBClient, MovePanel;
|
|||
|
|
|||
|
type
|
|||
|
TfrmDyeOutput = class(TfrmBaseList)
|
|||
|
Panel1: TPanel;
|
|||
|
Label1: TLabel;
|
|||
|
Panel2: TPanel;
|
|||
|
Scan: TcxTextEdit;
|
|||
|
Label2: TLabel;
|
|||
|
LCKID: TcxTextEdit;
|
|||
|
Label3: TLabel;
|
|||
|
custName: TcxTextEdit;
|
|||
|
Label4: TLabel;
|
|||
|
Label5: TLabel;
|
|||
|
C_Name: TcxTextEdit;
|
|||
|
C_I_Name: TcxTextEdit;
|
|||
|
Label7: TLabel;
|
|||
|
C_Color: TcxTextEdit;
|
|||
|
Label12: TLabel;
|
|||
|
Panel_JP: TPanel;
|
|||
|
SpeedButton1: TSpeedButton;
|
|||
|
SpeedButton2: TSpeedButton;
|
|||
|
SpeedButton3: TSpeedButton;
|
|||
|
SpeedButton4: TSpeedButton;
|
|||
|
SpeedButton5: TSpeedButton;
|
|||
|
SpeedButton6: TSpeedButton;
|
|||
|
SpeedButton7: TSpeedButton;
|
|||
|
SpeedButton8: TSpeedButton;
|
|||
|
SpeedButton9: TSpeedButton;
|
|||
|
SpeedButton10: TSpeedButton;
|
|||
|
SpeedButton12: TSpeedButton;
|
|||
|
SpeedButton49: TSpeedButton;
|
|||
|
ADOQuery1: TADOQuery;
|
|||
|
ADO_Car: TADOQuery;
|
|||
|
ADO_YG: TADOQuery;
|
|||
|
ADO_Cmd: TADOQuery;
|
|||
|
ADO_Tmp: TADOQuery;
|
|||
|
SpeedButton14: TSpeedButton;
|
|||
|
SpeedButton15: TSpeedButton;
|
|||
|
SpeedButton16: TSpeedButton;
|
|||
|
SpeedButton17: TSpeedButton;
|
|||
|
SpeedButton19: TSpeedButton;
|
|||
|
GlideMsg: TComboBox;
|
|||
|
CDS_GX: TClientDataSet;
|
|||
|
SpeedButton13: TSpeedButton;
|
|||
|
SpeedButton21: TSpeedButton;
|
|||
|
cxButton3: TcxButton;
|
|||
|
Label9: TLabel;
|
|||
|
Label10: TLabel;
|
|||
|
C_Width: TcxTextEdit;
|
|||
|
C_GramWeight: TcxTextEdit;
|
|||
|
Label13: TLabel;
|
|||
|
KKPS: TcxTextEdit;
|
|||
|
SpeedButton11: TSpeedButton;
|
|||
|
SpeedButton22: TSpeedButton;
|
|||
|
SpeedButton23: TSpeedButton;
|
|||
|
SpeedButton24: TSpeedButton;
|
|||
|
SpeedButton25: TSpeedButton;
|
|||
|
SpeedButton26: TSpeedButton;
|
|||
|
Label14: TLabel;
|
|||
|
rollnum: TcxTextEdit;
|
|||
|
Label54: TLabel;
|
|||
|
Label55: TLabel;
|
|||
|
Edit16: TEdit;
|
|||
|
Edit17: TEdit;
|
|||
|
MovePanel1: TMovePanel;
|
|||
|
tishi: TLabel;
|
|||
|
Button1: TButton;
|
|||
|
Timer1: TTimer;
|
|||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
procedure FormDestroy(Sender: TObject);
|
|||
|
procedure FormCreate(Sender: TObject);
|
|||
|
procedure SpeedButton1Click(Sender: TObject);
|
|||
|
procedure SpeedButton12Click(Sender: TObject);
|
|||
|
procedure SpeedButton49Click(Sender: TObject);
|
|||
|
procedure GlideRateClick(Sender: TObject);
|
|||
|
procedure ScanKeyPress(Sender: TObject; var Key: Char);
|
|||
|
procedure Sel1Click(Sender: TObject);
|
|||
|
procedure SpeedButton14Click(Sender: TObject);
|
|||
|
procedure FormShow(Sender: TObject);
|
|||
|
procedure cxButton3Click(Sender: TObject);
|
|||
|
procedure TSNOTEExit(Sender: TObject);
|
|||
|
procedure GlideMsgChange(Sender: TObject);
|
|||
|
procedure Edit16Click(Sender: TObject);
|
|||
|
procedure Edit17Click(Sender: TObject);
|
|||
|
procedure Button1Click(Sender: TObject);
|
|||
|
procedure Timer1Timer(Sender: TObject);
|
|||
|
private
|
|||
|
fGlideName, fSCunit, fJPUnit: string;
|
|||
|
procedure InitCar(fPCID: string);
|
|||
|
|
|||
|
{ Private declarations }
|
|||
|
public
|
|||
|
fflag: Integer;
|
|||
|
fKeyNo: string;
|
|||
|
{ Public declarations }
|
|||
|
end;
|
|||
|
|
|||
|
var
|
|||
|
frmDyeOutput: TfrmDyeOutput;
|
|||
|
|
|||
|
implementation
|
|||
|
|
|||
|
uses
|
|||
|
U_DataLink, U_RTFun;
|
|||
|
{$R *.dfm}
|
|||
|
|
|||
|
procedure SOutData(mParent: TWinControl; FTag: Integer);
|
|||
|
var
|
|||
|
i, idx: integer;
|
|||
|
begin
|
|||
|
with mParent do
|
|||
|
begin
|
|||
|
for i := 0 to ControlCount - 1 do
|
|||
|
begin
|
|||
|
if Controls[i] is TLabel then
|
|||
|
continue;
|
|||
|
if Controls[i].Tag <> FTag then
|
|||
|
continue;
|
|||
|
if Controls[i] is TEdit then
|
|||
|
begin
|
|||
|
TEdit(Controls[i]).Text := '';
|
|||
|
end
|
|||
|
else if Controls[i] is TcxTextEdit then
|
|||
|
begin
|
|||
|
TcxTextEdit(Controls[i]).Text := '';
|
|||
|
end;
|
|||
|
end;
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure SInData(ADOQueryTmp: TADOQuery; mParent: TWinControl; FTag: Integer);
|
|||
|
var
|
|||
|
i, idx: integer;
|
|||
|
mfield, mfieldCode: string;
|
|||
|
begin
|
|||
|
with ADOQueryTmp do
|
|||
|
begin
|
|||
|
if isEmpty then
|
|||
|
exit;
|
|||
|
with mParent do
|
|||
|
begin
|
|||
|
for i := 0 to ControlCount - 1 do
|
|||
|
begin
|
|||
|
if Controls[i] is TLabel then
|
|||
|
continue;
|
|||
|
if Controls[i].Tag <> FTag then
|
|||
|
continue;
|
|||
|
mfield := Controls[i].Name;
|
|||
|
if Controls[i] is TEdit then
|
|||
|
begin
|
|||
|
if Trim(fieldByName(mfield).AsString) <> '' then
|
|||
|
TEdit(Controls[i]).Text := trim(fieldByName(mfield).AsString)
|
|||
|
else
|
|||
|
TEdit(Controls[i]).Text := '';
|
|||
|
end
|
|||
|
else if Controls[i] is TcxTextEdit then
|
|||
|
begin
|
|||
|
if Trim(fieldByName(mfield).AsString) <> '' then
|
|||
|
TcxTextEdit(Controls[i]).Text := trim(fieldByName(mfield).AsString)
|
|||
|
else
|
|||
|
TcxTextEdit(Controls[i]).Text := '';
|
|||
|
end;
|
|||
|
end; // end for
|
|||
|
end; // end with
|
|||
|
end; //end for with
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.InitCar(fPCID: string);
|
|||
|
begin
|
|||
|
try
|
|||
|
with ADO_Car do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add(' select * from PB_LCK A INNER JOIN Knit_Plan_Sub B ON A.SUBID=B.SUBID ');
|
|||
|
SQL.Add('INNER JOIN Knit_Plan_MAIN C ON A.MAINID=B.MAINID');
|
|||
|
sql.Add('where LCKID=' + quotedstr(trim(fPCID)));
|
|||
|
// showmessage(sql.Text);
|
|||
|
open;
|
|||
|
end;
|
|||
|
// if trim(ADO_Car.fieldbyname('ShowMsg').AsString) <> '' then
|
|||
|
// begin
|
|||
|
// Scan.text := '';
|
|||
|
// Application.MessageBox(pchar(trim(ADO_Car.fieldbyname('ShowMsg').AsString)), '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_ICONERROR);
|
|||
|
// ADO_Car.Close;
|
|||
|
// exit;
|
|||
|
// end
|
|||
|
// else
|
|||
|
SInData(ADO_Car, Panel2, 2);
|
|||
|
ROLLNUM.text := ADO_Car.FieldByName('KKPS').AsString;
|
|||
|
|
|||
|
|
|||
|
Scan.text := '';
|
|||
|
Scan.OnClick(Scan);
|
|||
|
except
|
|||
|
Scan.text := '';
|
|||
|
Scan.OnClick(Scan);
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
Action := cafree;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.FormDestroy(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
frmDyeOutput := nil;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.FormCreate(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
Panel2.Align := alclient;
|
|||
|
SOutData(Panel2, 2);
|
|||
|
SOutData(Panel2, 0);
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.SpeedButton1Click(Sender: TObject);
|
|||
|
var
|
|||
|
fsj: string;
|
|||
|
begin
|
|||
|
fsj := Trim(TSpeedButton(Sender).Hint);
|
|||
|
if Trim(fsj) = '' then
|
|||
|
Exit;
|
|||
|
fsj := Trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
|||
|
TcxTextEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text := fsj + Trim(TSpeedButton(Sender).Caption);
|
|||
|
|
|||
|
TcxTextEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).SelStart := length(TcxTextEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.SpeedButton12Click(Sender: TObject);
|
|||
|
var
|
|||
|
fsj: string;
|
|||
|
begin
|
|||
|
fsj := Trim(TEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
|||
|
if Trim(fsj) = '' then
|
|||
|
Exit;
|
|||
|
TcxTextEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text := Copy(fsj, 1, Length(fsj) - 1);
|
|||
|
TcxTextEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).SelStart := length(TcxTextEdit(FindComponent(Trim(TSpeedButton(Sender).Hint))).Text);
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.SpeedButton49Click(Sender: TObject);
|
|||
|
begin
|
|||
|
Panel_JP.Visible := false;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.Edit16Click(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
if Trim(Edit16.Text) = '' then
|
|||
|
begin
|
|||
|
Edit16.Text := '<27><>';
|
|||
|
Edit17.Text := '';
|
|||
|
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
Edit16.Text := '';
|
|||
|
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.Edit17Click(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
if Trim(Edit17.Text) = '' then
|
|||
|
begin
|
|||
|
Edit16.Text := '';
|
|||
|
Edit17.Text := '<27><>';
|
|||
|
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
Edit17.Text := '';
|
|||
|
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.Timer1Timer(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
Button1.Click();
|
|||
|
Timer1.Enabled := False;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.TSNOTEExit(Sender: TObject);
|
|||
|
var
|
|||
|
fsj: string;
|
|||
|
str: string;
|
|||
|
begin
|
|||
|
// with ADO_Tmp do
|
|||
|
// begin
|
|||
|
// close;
|
|||
|
// sql.Clear;
|
|||
|
// sql.Add('select * from SY_Employee ');
|
|||
|
// sql.Add('where EECode =' + quotedstr(EECode.Text));
|
|||
|
// open;
|
|||
|
// end;
|
|||
|
// EEName.Text := trim(ADO_Tmp.fieldbyname('EEName').AsString);
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.GlideMsgChange(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
// if CDS_GX.Locate('Name', GlideMsg.Text, []) then
|
|||
|
// begin
|
|||
|
// with ADO_Tmp do
|
|||
|
// begin
|
|||
|
// Close;
|
|||
|
// sql.Clear;
|
|||
|
// sql.Add('SELECT yyps=isnull(clps,0) from Dye_Plan_Glide X where pcid=' + QuotedStr(PCID.Text));
|
|||
|
//
|
|||
|
// sql.Add('and X.GlideNo=' + QuotedStr(trim(CDS_GX.FieldByName('GlideNo').AsString)));
|
|||
|
// sql.Add('and X.GlideName=' + QuotedStr(trim(CDS_GX.FieldByName('GlideName').AsString)));
|
|||
|
// Open;
|
|||
|
// end;
|
|||
|
//
|
|||
|
// if ADO_Tmp.IsEmpty = false then
|
|||
|
// begin
|
|||
|
// KYPS.Text := FloatToStr(strtofloatdef(PCPIECE.Text, 0) - ADO_Tmp.FieldByName('yyps').asfloat);
|
|||
|
// rollnum.text := KYPS.Text;
|
|||
|
// end;
|
|||
|
// end;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.GlideRateClick(Sender: TObject);
|
|||
|
var
|
|||
|
i: Integer;
|
|||
|
begin
|
|||
|
Panel_JP.Visible := True;
|
|||
|
with Panel_JP do
|
|||
|
begin
|
|||
|
for i := 0 to ControlCount - 1 do
|
|||
|
begin
|
|||
|
if Controls[i] is TSpeedButton then
|
|||
|
begin
|
|||
|
TSpeedButton(Controls[i]).Hint := Trim(TEdit(Sender).Name);
|
|||
|
end;
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.ScanKeyPress(Sender: TObject; var Key: Char);
|
|||
|
var
|
|||
|
fsj: string;
|
|||
|
str: string;
|
|||
|
begin
|
|||
|
if trim(Scan.Text) = '' then
|
|||
|
exit;
|
|||
|
if Key = #13 then
|
|||
|
begin
|
|||
|
InitCar(Scan.Text);
|
|||
|
|
|||
|
fsj := 'exec P_Dye_Glide_Get_Idx ' + quotedstr(LCKID.Text);
|
|||
|
|
|||
|
SInitComBoxBySql(ADO_Cmd, GlideMsg, False, fsj);
|
|||
|
|
|||
|
with ADO_Tmp do
|
|||
|
begin
|
|||
|
Close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add('exec P_Dye_Glide_Get_Idx ' + quotedstr(LCKID.Text));
|
|||
|
Open;
|
|||
|
end;
|
|||
|
SCreateCDS(ADO_Tmp, CDS_GX);
|
|||
|
SInitCDSData(ADO_Tmp, CDS_GX);
|
|||
|
CDS_GX.First;
|
|||
|
GlideMsg.ItemIndex := 0;
|
|||
|
GlideMsgChange(Sender);
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.Button1Click(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
MovePanel1.Visible := false;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.cxButton3Click(Sender: TObject);
|
|||
|
var
|
|||
|
key: Char;
|
|||
|
begin
|
|||
|
key := #13;
|
|||
|
ScanKeyPress(Scan, key);
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.Sel1Click(Sender: TObject);
|
|||
|
begin
|
|||
|
if trim(TcxTextEdit(Sender).Text) = '<27><>' then
|
|||
|
begin
|
|||
|
TcxTextEdit(Sender).Text := '';
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
TcxTextEdit(Sender).Text := '<27><>';
|
|||
|
end;
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.SpeedButton14Click(Sender: TObject);
|
|||
|
begin
|
|||
|
|
|||
|
try
|
|||
|
SpeedButton14.Enabled := False;
|
|||
|
// if PCID.Text = '' then
|
|||
|
// begin
|
|||
|
// raise Exception.Create(pchar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD>'));
|
|||
|
// end;
|
|||
|
|
|||
|
if LCKID.Text = '' then
|
|||
|
begin
|
|||
|
MovePanel1.Visible := true;
|
|||
|
SpeedButton14.Enabled := True;
|
|||
|
tishi.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>';
|
|||
|
Timer1.Enabled := true;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
if strtofloatdef(trim(ROLLNUM.Text), 0) = 0 then
|
|||
|
begin
|
|||
|
MovePanel1.Visible := true;
|
|||
|
SpeedButton14.Enabled := True;
|
|||
|
tishi.Caption := '<27><><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
Timer1.Enabled := true;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
if not CDS_GX.Locate('Name', GlideMsg.Text, []) then
|
|||
|
begin
|
|||
|
MovePanel1.Visible := true;
|
|||
|
SpeedButton14.Enabled := True;
|
|||
|
tishi.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>';
|
|||
|
Timer1.Enabled := true;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
// raise Exception.Create(pchar('<27><><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>㣡'));
|
|||
|
// if not CDS_GX.Locate('Name', GlideMsg.Text, []) then
|
|||
|
// raise Exception.Create(pchar('<27><><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>!'));
|
|||
|
if GetLSNo(ADO_Tmp, fkeyNo, 'CL', 'CL_Group', 4, 1) = False then
|
|||
|
raise Exception.Create(pchar('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!'));
|
|||
|
// if (Edit16.Text = '') and (Edit17.Text = '') then
|
|||
|
// begin
|
|||
|
// raise Exception.Create(pchar('<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>飡'));
|
|||
|
// end;
|
|||
|
|
|||
|
if (Edit16.Text = '') and (Edit17.Text = '') then
|
|||
|
begin
|
|||
|
MovePanel1.Visible := true;
|
|||
|
SpeedButton14.Enabled := True;
|
|||
|
tishi.Caption := '<27><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
Timer1.Enabled := true;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
|
|||
|
if StrToFloatDef(ROLLNUM.Text, 0) > StrToFloatDef(KKPS.Text, 0) then
|
|||
|
begin
|
|||
|
MovePanel1.Visible := true;
|
|||
|
SpeedButton14.Enabled := True;
|
|||
|
tishi.Caption := '<27>Ǽ<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5>';
|
|||
|
Timer1.Enabled := true;
|
|||
|
exit;
|
|||
|
end;
|
|||
|
|
|||
|
|
|||
|
// if StrToFloatDef(ROLLNUM.Text, 0) > StrToFloatDef(KYPS.Text, 0) then
|
|||
|
// begin
|
|||
|
// Application.MessageBox('<27>Ǽ<EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
// SpeedButton14.Enabled := True;
|
|||
|
// Exit;
|
|||
|
// end;
|
|||
|
// if (CDS_GX.FieldByName('GlideNo').AsString = CDS_GX.FieldByName('maxGlideNo').AsString) and (StrToFloatDef(QTY.Text, 0) = 0) then
|
|||
|
// begin
|
|||
|
// Application.MessageBox('<27><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
// SpeedButton14.Enabled := True;
|
|||
|
// Exit;
|
|||
|
// end;
|
|||
|
|
|||
|
with ADO_Cmd do
|
|||
|
begin
|
|||
|
close;
|
|||
|
sql.Clear;
|
|||
|
sql.Add(' select * from Dye_Plan_Glide_OutPut where 1=2 ');
|
|||
|
open;
|
|||
|
Append;
|
|||
|
FieldByName('GOID').Value := fkeyNo;
|
|||
|
FieldByName('PCID').Value := trim(LCKID.text);
|
|||
|
FieldByName('GlideNo').Value := trim(CDS_GX.FieldByName('GlideNo').AsString);
|
|||
|
FieldByName('GlideName').Value := trim(CDS_GX.FieldByName('GlideName').AsString);
|
|||
|
if Edit16.Text <> '' then
|
|||
|
begin
|
|||
|
FieldByName('StaffName').Value := trim('<27><>');
|
|||
|
end;
|
|||
|
if Edit17.Text <> '' then
|
|||
|
begin
|
|||
|
FieldByName('StaffName').Value := trim('<27><>');
|
|||
|
end;
|
|||
|
|
|||
|
FieldByName('Qty').Value := 0;
|
|||
|
|
|||
|
FieldByName('RollNum').Value := trim(ROLLNUM.text);
|
|||
|
FieldByName('Filler').Value := trim(DName);
|
|||
|
Post;
|
|||
|
end;
|
|||
|
|
|||
|
////////////////// <20><><EFBFBD>½<EFBFBD><C2BD><EFBFBD> //////////////////
|
|||
|
// with ADO_Cmd do
|
|||
|
// begin
|
|||
|
// Close;
|
|||
|
// sql.Clear;
|
|||
|
// sql.Add('insert into Dye_Need_Up(UType,UDataId,UOperation,UOperator,UModule,UDetails) ');
|
|||
|
// sql.Add('values(''<27><>̨ˢ<CCA8><CBA2>'' ');
|
|||
|
// sql.Add(',' + quotedstr(LCKID.text));
|
|||
|
// sql.Add(',''PCˢ<43><CBA2>'' ');
|
|||
|
// sql.Add(',' + quotedstr(DName));
|
|||
|
// sql.Add(',' + quotedstr(trim(self.Caption)));
|
|||
|
// sql.Add(',' + quotedstr(fkeyNo));
|
|||
|
// sql.Add(') ');
|
|||
|
// execsql;
|
|||
|
// end;
|
|||
|
////////////////// <20><><EFBFBD>½<EFBFBD><C2BD><EFBFBD> //////////////////
|
|||
|
|
|||
|
Scan.SetFocus;
|
|||
|
SpeedButton14.Enabled := True;
|
|||
|
// Application.MessageBox('ˢ<><CBA2><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ');
|
|||
|
|
|||
|
MovePanel1.Visible := true;
|
|||
|
|
|||
|
tishi.Caption := 'ˢ<><CBA2><EFBFBD>ɹ<EFBFBD>';
|
|||
|
Timer1.Enabled := true;
|
|||
|
|
|||
|
LCKID.TEXT := '';
|
|||
|
except
|
|||
|
Scan.SetFocus;
|
|||
|
SpeedButton14.Enabled := True;
|
|||
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
|||
|
Exit;
|
|||
|
end;
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmDyeOutput.FormShow(Sender: TObject);
|
|||
|
begin
|
|||
|
inherited;
|
|||
|
Scan.OnClick(Scan);
|
|||
|
end;
|
|||
|
|
|||
|
end.
|
|||
|
|