procedure TConTestRep_Win.FlowBroker1BeforeFlowOut(Sender: TObject; Command: TFlowOutCommand);
begin
if dsbMaster.DataSet.FieldByName('FDEALRESULT').AsString = nil then
begin
Command.Accept := false;
jsDialogs.ShowWarning('审批结论为空,不能流转','警告');
end
else if dsbMaster.DataSet.FieldByName('FDEALRESULT').AsString = -1 then
begin
Command.Accept := false;
jsDialogs.ShowWarning('重新测试请使用回退','警告');
end
else
Command.Accept := true;
end;
按钮变灰可以在按钮上绑一个action,然后在action的onupdate事件中写
procedure TMainForm.Action1Update(Sender: TObject);
begin
if ... then
(Sender as TAction).Enabled := False;
end;