xiaoding721
2023-11-08 c3f03f3e56a589ad752eba80bb51a887eed469d3
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def
@@ -9,25 +9,30 @@
    feedback := Translations::FilllingCapacity_ValidateInput();
    checkValue := not Coefficient.Text() = '' and not PriorityFactorName.Text() = '';
    
    if(not checkValue )
    {
    if(not checkValue ){
      feedback := Translations::PriorityFactor_CheckNameValid();
      editData := DataHolderEditPriorityFactor.Data();
      checkValue := not PriorityFactor::CheckNameValid( MacroPlan,editData.BusinessType(),[Real]Coefficient.Text(),PriorityFactorName.Text(),Desc.Text());
    }
    if( PriorityFactorName.Text() = ''){
      feedback := Translations::PriorityFactor_CheckNameNull();
    }
    return checkValue
  *]
  QuillAction
  {
    Body:
    [*
      priortyFactor := select( MacroPlan,PriorityFactor,pf,pf.Name() = PriorityFactorName.Text());
      if( not isnull( priortyFactor )){
        WebMessageBox::Error( "系统内已存在该优先级因子");
      if( NewFlag.Checked() ){
       // New
        repeatOne := select( MacroPlan,PriorityFactor,pf,pf.Name() = PriorityFactorName.Text());
        if( not isnull( repeatOne )){
          WebMessageBox::Error( Translations::PriorityFactor_CheckNameValid() );
        }else{
          Form.ClickBtnOK();
        }
      }else {
        Form.ClickBtnOK();
        Form.ClickBtnOK();
      }
    *]
    GroupServerCalls: false