966 lines
29 KiB
ObjectPascal
966 lines
29 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, cxStyles, cxCustomData,
|
||
cxFilter, cxData, cxDataStorage, cxNavigator, dxDateRanges,
|
||
dxScrollbarAnnotations, cxDBData, Vcl.ComCtrls, Vcl.ToolWin, cxGridLevel,
|
||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||
cxGridCustomView, cxGrid, dxBarBuiltInMenu, cxGridCustomPopupMenu,
|
||
cxGridPopupMenu, RM_Dataset, RM_Common, RM_Class, RM_GridReport;
|
||
|
||
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;
|
||
ADOQueryCmd: 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;
|
||
lbl1: TLabel;
|
||
OutNumber: TcxTextEdit;
|
||
MachineNo: TcxTextEdit;
|
||
lbl2: TLabel;
|
||
ADOQueryTemp: TADOQuery;
|
||
lbl3: TLabel;
|
||
MachineNo2: TcxTextEdit;
|
||
lbl4: TLabel;
|
||
rollnum2: TcxTextEdit;
|
||
lbl5: TLabel;
|
||
Qty: TcxTextEdit;
|
||
lbl6: TLabel;
|
||
Qty2: TcxTextEdit;
|
||
cxButton1: TcxButton;
|
||
cxButton2: TcxButton;
|
||
SpeedButton27: TSpeedButton;
|
||
Panel3: TPanel;
|
||
cxGrid1: TcxGrid;
|
||
Tv1: TcxGridDBTableView;
|
||
cxGridLevel1: TcxGridLevel;
|
||
tlb1: TToolBar;
|
||
btn5: TToolButton;
|
||
CDS_1: TClientDataSet;
|
||
DS_1: TDataSource;
|
||
GPM_1: TcxGridPopupMenu;
|
||
cxgrdbclmnTv1Column1: TcxGridDBColumn;
|
||
cxgrdbclmnTv1Column2: TcxGridDBColumn;
|
||
cxgrdbclmnTv1Column3: TcxGridDBColumn;
|
||
cxgrdbclmnTv1Column4: TcxGridDBColumn;
|
||
cxButton4: TcxButton;
|
||
cxgrdbclmnTv1Column5: TcxGridDBColumn;
|
||
cxButton5: TcxButton;
|
||
ADOQueryPrint: TADOQuery;
|
||
RM1: TRMGridReport;
|
||
RMDB_1: TRMDBDataSet;
|
||
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);
|
||
procedure cxButton2Click(Sender: TObject);
|
||
procedure cxButton1Click(Sender: TObject);
|
||
procedure btn5Click(Sender: TObject);
|
||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||
procedure cxButton4Click(Sender: TObject);
|
||
procedure cxButton5Click(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, U_LabelPrint;
|
||
{$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 OutNumber=(select count(C.LCKID) OutNumber from PB_LCK C,PB_CK_LCK B where B.LCKID = C.LCKID and C.LCKID = A.LCKID),* 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.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||
begin
|
||
if AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('ISPrint').Index] > 0 then
|
||
ACanvas.Brush.Color := clLtGray;
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
||
// ACanvas.Font.Color := $1C6BFF;
|
||
// if (Date - AViewInfo.GridRecord.Values[tv1.GetColumnByFieldName('OrdDate').Index]) >= 5 then
|
||
// begin
|
||
// //<2F><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>ɫ
|
||
// ACanvas.Brush.Color := clLtGray;
|
||
// end;
|
||
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
|
||
|
||
if Copy(trim(Scan.Text), 1, 2) = 'CJ' then
|
||
begin
|
||
with ADO_Tmp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select * from Bs_Frame where MCID = ' + quotedstr(trim(Scan.Text)));
|
||
Open;
|
||
end;
|
||
if ADO_Tmp.IsEmpty then
|
||
begin
|
||
Application.MessageBox('û<>иó<D0B8><C3B3>ܺ<EFBFBD><DCBA><EFBFBD>Ϣ<EFBFBD><CFA2>', '<27><>ʾ<EFBFBD><CABE>Ϣ');
|
||
Scan.Text := '';
|
||
exit;
|
||
end
|
||
else
|
||
begin
|
||
if MachineNo.Text = '' then
|
||
begin
|
||
MachineNo.Text := ADO_Tmp.FieldByName('MCNO').AsString;
|
||
end
|
||
else
|
||
begin
|
||
MachineNo2.Text := ADO_Tmp.FieldByName('MCNO').AsString;
|
||
end;
|
||
Scan.Text := '';
|
||
with ADO_Tmp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select * from Dye_Plan_Glide_OutPut A inner join PB_LCK B on A.PCID = B.LCKID where A.GlideName = ''<27><><EFBFBD><EFBFBD>'' and A.MachineNo = ' + quotedstr(MachineNo.Text));
|
||
// showmessage(sql.Text);
|
||
Open;
|
||
end;
|
||
SCreateCDS(ADO_Tmp, CDS_1);
|
||
SInitCDSData(ADO_Tmp, CDS_1);
|
||
end;
|
||
end
|
||
else
|
||
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;
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmDyeOutput.btn5Click(Sender: TObject);
|
||
begin
|
||
WriteCxGrid('<27><><EFBFBD>̿<EFBFBD>ˢ<EFBFBD><CBA2>', Tv1, 'ˢ<><CBA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
end;
|
||
|
||
procedure TfrmDyeOutput.Button1Click(Sender: TObject);
|
||
begin
|
||
inherited;
|
||
MovePanel1.Visible := false;
|
||
Scan.SetFocus;
|
||
end;
|
||
|
||
procedure TfrmDyeOutput.cxButton1Click(Sender: TObject);
|
||
begin
|
||
MachineNo.Text := '';
|
||
end;
|
||
|
||
procedure TfrmDyeOutput.cxButton2Click(Sender: TObject);
|
||
begin
|
||
MachineNo2.Text := '';
|
||
end;
|
||
|
||
procedure TfrmDyeOutput.cxButton3Click(Sender: TObject);
|
||
var
|
||
key: Char;
|
||
begin
|
||
key := #13;
|
||
ScanKeyPress(Scan, key);
|
||
|
||
end;
|
||
|
||
procedure TfrmDyeOutput.cxButton4Click(Sender: TObject);
|
||
var
|
||
fPrintFile, FLabVolume: string;
|
||
begin
|
||
with ADOQueryPrint do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add(' select * from Dye_Plan_Glide_OutPut A inner join PB_LCK B on A.PCID = B.LCKID inner join Knit_Plan_Sub C on B.SubID = C.SubId where A.GlideName = ''<27><><EFBFBD><EFBFBD>'' and ');
|
||
SQL.Add(' A.MachineNo =''' + Trim(MachineNo.Text) + '''');
|
||
SQL.Add(' and ISNULL(A.ISPrint, 0)<= 0');
|
||
Open;
|
||
end;
|
||
if ADOQueryPrint.IsEmpty then
|
||
begin
|
||
MovePanel1.Visible := true;
|
||
SpeedButton14.Enabled := True;
|
||
tishi.Caption := 'û<><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>ӡ<EFBFBD><D3A1>';
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
FLabVolume := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ӡ';
|
||
ExportFtErpFile(FLabVolume + '.rmf', ADOQueryTemp);
|
||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + FLabVolume + '.rmf';
|
||
|
||
if FileExists(fPrintFile) then
|
||
begin
|
||
RM1.LoadFromFile(fPrintFile);
|
||
Rm1.DefaultCopies := 1;
|
||
RM1.PrintReport;
|
||
end
|
||
else
|
||
begin
|
||
Application.MessageBox(PChar('û<><C3BB><EFBFBD><EFBFBD>' + fPrintFile), '<27><>ʾ', 0);
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmDyeOutput.cxButton5Click(Sender: TObject);
|
||
var
|
||
WSql: string;
|
||
fPrintFile, FLabVolume: string;
|
||
begin
|
||
if CDS_1.IsEmpty then
|
||
Exit;
|
||
if not CDS_1.Locate('SSel', True, []) then
|
||
begin
|
||
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
WSql := '';
|
||
CDS_1.DisableControls;
|
||
with CDS_1 do
|
||
begin
|
||
First;
|
||
while not Eof do
|
||
begin
|
||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||
begin
|
||
if WSql <> '' then
|
||
begin
|
||
WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('GOID').AsString));
|
||
end
|
||
else
|
||
begin
|
||
WSql := QuotedStr(Trim(CDS_1.fieldbyname('GOID').AsString));
|
||
end;
|
||
end;
|
||
Next;
|
||
end;
|
||
end;
|
||
CDS_1.Locate('SSel', True, []);
|
||
CDS_1.EnableControls;
|
||
with ADOQueryPrint do
|
||
begin
|
||
Close;
|
||
SQL.Clear;
|
||
sql.Add(' select * from Dye_Plan_Glide_OutPut A inner join PB_LCK B on A.PCID = B.LCKID inner join Knit_Plan_Sub C on B.SubID = C.SubId where A.GlideName = ''<27><><EFBFBD><EFBFBD>'' ');
|
||
SQL.Add(' and A.GOID in(' + Trim(WSql) + ')');
|
||
SQL.Add(' and ISNULL(A.ISPrint, 0)<= 0');
|
||
// showmessage(Sql.Text);
|
||
Open;
|
||
end;
|
||
if ADOQueryPrint.IsEmpty then
|
||
begin
|
||
MovePanel1.Visible := true;
|
||
SpeedButton14.Enabled := True;
|
||
tishi.Caption := '<27><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
FLabVolume := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ӡ';
|
||
ExportFtErpFile(FLabVolume + '.rmf', ADOQueryTemp);
|
||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + FLabVolume + '.rmf';
|
||
|
||
if FileExists(fPrintFile) then
|
||
begin
|
||
RM1.LoadFromFile(fPrintFile);
|
||
Rm1.DefaultCopies := 1;
|
||
RM1.PrintReport;
|
||
end
|
||
else
|
||
begin
|
||
Application.MessageBox(PChar('û<><C3BB><EFBFBD><EFBFBD>' + fPrintFile), '<27><>ʾ', 0);
|
||
end;
|
||
|
||
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);
|
||
var
|
||
Maxno: string;
|
||
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 (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><CAB5>ƥ<EFBFBD><C6A5>';
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
|
||
if StrToFloatDef(Qty.Text, 0) <= 0 then
|
||
begin
|
||
MovePanel1.Visible := true;
|
||
SpeedButton14.Enabled := True;
|
||
tishi.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD>빫<EFBFBD><EBB9AB><EFBFBD><EFBFBD>';
|
||
Qty.SetFocus;
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
if MachineNo2.Text <> '' then
|
||
begin
|
||
if strtofloatdef(trim(ROLLNUM2.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>';
|
||
rollnum2.SetFocus;
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
if StrToFloatDef(ROLLNUM2.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><CAB5>ƥ<EFBFBD><C6A5>';
|
||
rollnum2.SetFocus;
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
if (StrToFloatDef(ROLLNUM.Text, 0) + StrToFloatDef(ROLLNUM2.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><CAB5>ƥ<EFBFBD><C6A5>';
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
if StrToFloatDef(Qty2.Text, 0) <= 0 then
|
||
begin
|
||
MovePanel1.Visible := true;
|
||
SpeedButton14.Enabled := True;
|
||
tishi.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD>빫<EFBFBD><EBB9AB><EFBFBD><EFBFBD>';
|
||
Qty2.SetFocus;
|
||
Timer1.Enabled := true;
|
||
exit;
|
||
end;
|
||
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 (MachineNo.Text = '') then
|
||
begin
|
||
MovePanel1.Visible := true;
|
||
SpeedButton14.Enabled := True;
|
||
tishi.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD>복<EFBFBD>ţ<EFBFBD>';
|
||
Timer1.Enabled := true;
|
||
Exit;
|
||
end;
|
||
if GetLSNo(ADO_Tmp, fkeyNo, 'CL', 'CL_Group', 4, 1) = False then
|
||
raise Exception.Create(pchar('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!'));
|
||
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 := trim(Qty.text);
|
||
FieldByName('MachineNo').Value := trim(MachineNo.text);
|
||
FieldByName('RollNum').Value := trim(ROLLNUM.text);
|
||
FieldByName('Filler').Value := trim(DName);
|
||
Post;
|
||
end;
|
||
|
||
if MachineNo2.text <> '' then
|
||
begin
|
||
if GetLSNo(ADO_Tmp, fkeyNo, 'CL', 'CL_Group', 4, 1) = False then
|
||
raise Exception.Create(pchar('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!'));
|
||
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 := trim(Qty2.text);
|
||
FieldByName('MachineNo').Value := trim(MachineNo2.text);
|
||
FieldByName('RollNum').Value := trim(ROLLNUM2.text);
|
||
FieldByName('Filler').Value := trim(DName);
|
||
Post;
|
||
end;
|
||
end;
|
||
|
||
if (CDS_GX.FieldByName('GlideNo').AsString = CDS_GX.FieldByName('maxGlideNo').AsString) then
|
||
begin
|
||
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('exec P_Dye_Cloth_AutoIn ');
|
||
Sql.Add(' @lckId=' + quotedstr(trim(LCKID.text)));
|
||
Sql.Add(',@Fillid=' + quotedstr(Trim(DCode)));
|
||
Sql.Add(',@Filler=' + quotedstr(Trim(DName)));
|
||
Sql.Add(',@IOTime=' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', Now))));
|
||
Open;
|
||
end;
|
||
if ADOQueryTemp.FieldByName('intReturn').AsInteger = -1 then
|
||
begin
|
||
Application.MessageBox(PChar(ADOQueryTemp.fieldbyname('ShowMsg').AsString), '<27><>ʾ', 0);
|
||
exit;
|
||
end;
|
||
|
||
end;
|
||
|
||
|
||
// //<2F><><EFBFBD><EFBFBD><CDB9><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB>֮<EFBFBD><D6AE><EFBFBD>ѿ<EFBFBD><D1BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>
|
||
if CDS_GX.FieldByName('GlideNo').AsString = CDS_GX.FieldByName('maxGlideNo').AsString then
|
||
begin
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('Update BS_Cloth_IO Set StkPiece=StkPiece-' + FloatToStr(StrToFloatDef(ROLLNUM.Text, 0) + StrToFloatDef(ROLLNUM2.Text, 0)));
|
||
// sql.Add(',STKQty=STKQty-' + FloatToStr(StrToFloatDef(QTY.Text, 0) + StrToFloatDef(QTY2.Text, 0)));
|
||
sql.Add('where LckId=''' + trim(LCKID.text) + '''');
|
||
ExecSQL;
|
||
end;
|
||
// with ADOQueryCmd do
|
||
// begin
|
||
// Append;
|
||
// FieldByName('BCIOID').Value := Trim(Maxno);
|
||
// FieldByName('STKName').Value := 'Ⱦɫ<C8BE><C9AB><EFBFBD><EFBFBD>';
|
||
// FieldByName('Workshop').Value := ADOQueryTemp.fieldbyname('Workshop').Value;
|
||
// FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd', Now));
|
||
// FieldByName('IOQtyFlag').Value := -1;
|
||
// FieldByName('STKID').Value := ADOQueryTemp.fieldbyname('STKID').Value;
|
||
// FieldByName('IOFlag').Value := '<27><><EFBFBD><EFBFBD>';
|
||
// FieldByName('IOType').Value := '<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD>';
|
||
// FieldByName('C_code').Value := ADOQueryTemp.fieldbyname('C_code').Value;
|
||
// FieldByName('C_Name').Value := ADOQueryTemp.fieldbyname('C_Name').Value;
|
||
// FieldByName('C_Composition').Value := ADOQueryTemp.fieldbyname('C_Composition').Value;
|
||
// FieldByName('C_Spec').Value := ADOQueryTemp.fieldbyname('C_Spec').Value;
|
||
// FieldByName('C_Width').Value := ADOQueryTemp.fieldbyname('C_Width').Value;
|
||
// FieldByName('C_GramWeight').Value := ADOQueryTemp.fieldbyname('C_GramWeight').Value;
|
||
// FieldByName('C_Color').Value := ADOQueryTemp.fieldbyname('C_Color').Value;
|
||
// FieldByName('C_ColorNo').Value := ADOQueryTemp.fieldbyname('C_ColorNo').Value;
|
||
// FieldByName('C_EColor').Value := ADOQueryTemp.fieldbyname('C_EColor').Value;
|
||
// FieldByName('C_Pattern').Value := ADOQueryTemp.fieldbyname('C_Pattern').Value;
|
||
// FieldByName('C_StyleNo').Value := ADOQueryTemp.fieldbyname('C_StyleNo').Value;
|
||
// FieldByName('C_ColorDepth').Value := ADOQueryTemp.fieldbyname('C_ColorDepth').Value;
|
||
// FieldByName('BatchNO').Value := ADOQueryTemp.fieldbyname('BatchNo').Value;
|
||
// FieldByName('StkCoNo').Value := ADOQueryTemp.fieldbyname('StkCoNo').Value;
|
||
// FieldByName('StkCoName').Value := ADOQueryTemp.fieldbyname('StkCoName').Value;
|
||
// FieldByName('FromCoNo').Value := ADOQueryTemp.fieldbyname('FromCoNo').Value;
|
||
// FieldByName('FromCoName').Value := ADOQueryTemp.fieldbyname('FromCoName').Value;
|
||
// FieldByName('ToCoNo').Value := ADOQueryTemp.fieldbyname('ToCoNo').Value;
|
||
// FieldByName('ToCoName').Value := ADOQueryTemp.fieldbyname('ToCoName').Value;
|
||
// FieldByName('FromOrdNo').Value := ADOQueryTemp.fieldbyname('FromOrdNo').Value;
|
||
// FieldByName('FromMainId').Value := ADOQueryTemp.fieldbyname('FromMainId').Value;
|
||
// FieldByName('FromSubId').Value := ADOQueryTemp.fieldbyname('FromSubId').Value;
|
||
// FieldByName('ToOrdNo').Value := ADOQueryTemp.fieldbyname('ToOrdNo').Value;
|
||
// FieldByName('ToMainId').Value := ADOQueryTemp.fieldbyname('ToMainId').Value;
|
||
// FieldByName('ToSubId').Value := ADOQueryTemp.fieldbyname('ToSubId').Value;
|
||
// FieldByName('PieceWeight').Value := ADOQueryTemp.fieldbyname('PieceWeight').Value;
|
||
// FieldByName('PieceLen').Value := ADOQueryTemp.fieldbyname('PieceLen').Value;
|
||
// FieldByName('StkPosition').Value := ADOQueryTemp.fieldbyname('StkPosition').Value;
|
||
// FieldByName('BZSpec').Value := ADOQueryTemp.fieldbyname('BZSpec').Value;
|
||
// FieldByName('QtyUnit').Value := ADOQueryTemp.fieldbyname('QtyUnit').Value;
|
||
// FieldByName('Qty').Value := ADOQueryTemp.fieldbyname('STKQTY').Value;
|
||
// FieldByName('Piece').Value := RollNum.Text;
|
||
// FieldByName('Filler').Value := Trim(DName);
|
||
// FieldByName('C_XINHAO').Value := ADOQueryTemp.fieldbyname('C_XINHAO').Value;
|
||
// FieldByName('C_GONGYI').Value := ADOQueryTemp.fieldbyname('C_GONGYI').Value;
|
||
// FieldByName('C_JITAI').Value := ADOQueryTemp.fieldbyname('C_JITAI').Value;
|
||
// FieldByName('C_ZHUANGKUANG').Value := ADOQueryTemp.fieldbyname('C_ZHUANGKUANG').Value;
|
||
// FieldByName('C_JIAJI').Value := ADOQueryTemp.fieldbyname('C_JIAJI').Value;
|
||
//// FieldByName('JIAZINO').Value := MachineNo.Text;
|
||
// Post;
|
||
// end;
|
||
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 := '';
|
||
MachineNo.Text := '';
|
||
MachineNo2.Text := '';
|
||
rollnum.Text := '';
|
||
rollnum2.Text := '';
|
||
Qty.Text := '';
|
||
Qty2.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;
|
||
ReadCxGrid('<27><><EFBFBD>̿<EFBFBD>ˢ<EFBFBD><CBA2>', Tv1, 'ˢ<><CBA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
Scan.OnClick(Scan);
|
||
end;
|
||
|
||
end.
|
||
|