Sure here is the code (written by a non-developer, apologies):
--> Make All fields Read Only based on an Option Set Value
function disableAllFields(executionContext) {
var formcontext=executionContext.getFormContext();
formcontext.ui.controls.forEach(function (control, i) {
if (exe_bidstatus != 283,780,002) {
if (control && control.getDisabled && !control.getDisabled()) {
control.setDisabled(true);
}
});
}