📄 quality_check.pas
字号:
with frm_data.ClientDataSet4 do
begin
Close;
Commandtext:='';
Commandtext:='Update [Receipt] set Examine_Man3='''+Trim(Handle_Man)+''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''质量验收单''';
Execute;
L3.Caption:='';
L3.Caption:=LevelName2+'【已审】';
Flag3:=2;
Application.MessageBox('【审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
Cmd_Check_Filsh;
end;
except
Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
Exit;
end;
end;
end
else if Flag3=2 then
begin
if Application.MessageBox('确定需要【反审核】该单据吗?'+#13#10+'如果【反审核】你将使后面级别的人的【审核】作废,'+#13#10+'后面级别的人必须重新【审核】,才能够生效,请确认!',pchar(application.Title),mb_okcancel)=idok then
begin
try
with frm_data.ClientDataSet4 do
begin
Close;
Commandtext:='';
Commandtext:='Update [Receipt] set Examine_Man3='''',Examine_Man3='''',Examine_Man4='''',Examine_Man5='''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''质量验收单''';
Execute;
L3.Caption:='';
L3.Caption:=LevelName2+':'+Handle_Man;
L3.Visible:=True;
L3.Caption:=LevelName3+':'+Handle_Man;
L4.Caption:=LevelName4+':'+Handle_Man;
L5.Caption:=LevelName5+':'+Handle_Man;
Flag3:=1;Flag3:=1; Flag4:=1; Flag5:=1;
Application.MessageBox('【反审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
Cmd_Check_Filsh;
end;
except
Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
Exit;
end;
end;
end;
end;
procedure Tfrm_Quality_Check.Cmd4Click(Sender: TObject);
begin
if Flag4=1 then
begin
if Application.MessageBox('确定需要【审核】该单据吗?请确认!',pchar(application.Title),mb_okcancel)=idok then
begin
try
with frm_data.ClientDataSet4 do
begin
Close;
Commandtext:='';
Commandtext:='Update [Receipt] set Examine_Man4='''+Trim(Handle_Man)+''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''质量验收单''';
Execute;
L4.Caption:='';
L4.Caption:=LevelName4+'【已审】';
Flag4:=2;
Application.MessageBox('【审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
Cmd_Check_Filsh;
end;
except
Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
Exit;
end;
end;
end
else if Flag4=2 then
begin
if Application.MessageBox('确定需要【反审核】该单据吗?'+#13#10+'如果【反审核】你将使后面级别的人的【审核】作废,'+#13#10+'后面级别的人必须重新【审核】,才能够生效,请确认!',pchar(application.Title),mb_okcancel)=idok then
begin
try
with frm_data.ClientDataSet4 do
begin
Close;
Commandtext:='';
Commandtext:='Update [Receipt] set Examine_Man4='''',Examine_Man5='''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''质量验收单''';
Execute;
L4.Caption:=LevelName4+':'+Handle_Man;
L4.Visible:=True;
L5.Caption:=LevelName5+':'+Handle_Man;
Flag4:=1;Flag5:=1;
Application.MessageBox('【反审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
Cmd_Check_Filsh;
end;
except
Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
Exit;
end;
end;
end;
end;
procedure Tfrm_Quality_Check.Cmd5Click(Sender: TObject);
begin
if Flag5=1 then
begin
if Application.MessageBox('确定需要【审核】该单据吗?请确认!',pchar(application.Title),mb_okcancel)=idok then
begin
try
with frm_data.ClientDataSet4 do
begin
Close;
Commandtext:='';
Commandtext:='Update [Receipt] set Examine_Man5='''+Trim(Handle_Man)+''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''质量验收单''';
Execute;
L5.Caption:='';
L5.Caption:=LevelName5+'【已审】';
Flag5:=2;
Application.MessageBox('【审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
Cmd_Check_Filsh;
end;
except
Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
Exit;
end;
end;
end
else if Flag5=2 then
begin
if Application.MessageBox('确定需要【反审核】该单据吗?'+#13#10+'如果【反审核】你将使后面级别的人的【审核】作废,'+#13#10+'后面级别的人必须重新【审核】,才能够生效,请确认!',pchar(application.Title),mb_okcancel)=idok then
begin
try
with frm_data.ClientDataSet4 do
begin
Close;
Commandtext:='';
Commandtext:='Update [Receipt] set Examine_Man5='''' where Receipt_No='''+Trim(Edit2.Text)+''' and Receipt_Name=''质量验收单''';
Execute;
L5.Caption:=LevelName5+':'+Handle_Man;
L5.Visible:=True;
Flag5:=1;
Application.MessageBox('【反审核】操作成功!请确认',Pchar(application.Title),MB_ICONwarning);
Cmd_Check_Filsh;
end;
except
Application.MessageBox('操作失败!,请确认!',pchar(application.Title),mb_iconwarning);
Exit;
end;
end;
end;
end;
procedure Tfrm_Quality_Check.Cmd_LHDJClick(Sender: TObject);
begin
LHXZ_Str:='';
LHXZ_Str:='Quality_Check_001';
LHXZ_Str_List_NO:='';
LHXZ_Str_Result:='';
frm_Stock_Write_Check:=Tfrm_Stock_Write_Check.Create(self);
frm_Stock_Write_Check.ShowModal;
if LHXZ_Str_Result='Quality_Check_001' then
begin
Edit3.Text:=LHXZ_Str_List_NO;
with frm_data.ClientDataSet3 do
begin
Close;
CommandText:='';
CommandText:='SELECT * FROM [Stock_Write] where Stock_NO='''+Trim(LHXZ_Str_List_NO)+'''';
Open;
if frm_data.ClientDataSet3.RecordCount>0 then
begin
Edit4.Text:=frm_data.ClientDataSet3.FieldByName('Gather_Name').AsString;
Edit5.Text:=frm_data.ClientDataSet3.FieldByName('Storage_Name').AsString;
Edit7.Text:=frm_data.ClientDataSet3.FieldByName('Shop_NO').AsString;
Edit11.Text:=frm_data.ClientDataSet3.FieldByName('Contract_NO').AsString;
end
else
begin
Application.MessageBox('没有需要的数据,请确认!',Pchar(application.Title),MB_ICONwarning)
end;
end;
end;
frm_Stock_Write_Check.Free;
end;
procedure Tfrm_Quality_Check.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_Data.ClientDataSet3.Active:=False;
frm_data.ClientDataSet3.Close;
Action:=cafree;
end;
procedure Tfrm_Quality_Check.SpeedButton1Click(Sender: TObject);
begin
Check_Mond:='';
Check_Mond:='Quality_Check'; //质量验收
frm_Supply_Monad:=Tfrm_Supply_Monad.Create(self);
frm_Supply_Monad.Caption:='【供货单位】';
frm_Supply_Monad.ShowModal;
Edit4.Text:=check_Mond_Result;
frm_Supply_Monad.Free;
end;
procedure Tfrm_Quality_Check.SpeedButton5Click(Sender: TObject);
begin
Check_Storage:='';Check_Storage_Result:='';
Check_Storage:='Quality_Checkstr';
frm_Storage_Select:=Tfrm_Storage_Select.Create(self);
frm_Storage_Select.ShowModal;
Edit5.Text:=Trim(Check_Storage_Result_NO);
Edit_Storage_Name.Text:=Trim(Check_Storage_Result);
frm_Storage_Select.Free;
end;
procedure Tfrm_Quality_Check.SpeedButton9Click(Sender: TObject);
begin
Employe_Check:='';
Employe_Check:='Quality_Checkstr';
Employe_Check_Result:='';
frm_Login_Man:=Tfrm_Login_Man.Create(self);
frm_Login_Man.Caption:='经手人选择';
frm_Login_Man.ShowModal;
Edit6.Text:=Employe_Check_Result;
frm_Login_Man.Free;
end;
procedure Tfrm_Quality_Check.SpeedButton8Click(Sender: TObject);
begin
ChildShop_Str:='';
ChildShop_Result_NO:='';
ChildShop_Result_Name:='';
ChildShop_Str:='Quality_Check_str';
frm_ChildShop_Select:=Tfrm_ChildShop_Select.Create(self);
frm_ChildShop_Select.ShowModal;
Edit7.Text:=ChildShop_Result_NO;
//Edit_Shop_Name.Text:=ChildShop_Result_Name;
frm_ChildShop_Select.Free;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -