xiaoding721
2023-11-08 c3f03f3e56a589ad752eba80bb51a887eed469d3
新增优先级因子新增校验的功能
已修改13个文件
已添加5个文件
已删除3个文件
294 ■■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_Flag_MacroPlan_MacroPlan_Flag.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Flag/Attribute_flag.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Flag/DefaultValue_flag.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_OnCreate.qbl 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PriorityFactor/Method_CreatePrioitifyFacotrDetail.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Component_pnlContent.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_New.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlContent_PriorityFactorName_OnChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_ClickBtnOK.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_Edit.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_New.def 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlActions_btnOk_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetail.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnSelectionChanged.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuNewPriorityFactor_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_ListPriorityFactorGrading.def 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_DataHolderPriorityFactor_OnDataChanged.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl
@@ -10,6 +10,10 @@
  {
    DefaultText: 'Please input validate value !'
  }
  InfoMessage PriorityFactor_CheckNameNull
  {
    DefaultText: '优先级因子名称不能为空。'
  }
  InfoMessage PriorityFactor_CheckNameValid
  {
    DefaultText: '该优先级因子名称已存在!'
_Main/BL/Relations/Relation_Flag_MacroPlan_MacroPlan_Flag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation Flag_MacroPlan_MacroPlan_Flag
{
  #keys: '1[414996.0.51027441]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide MacroPlan
  {
    #keys: '3[414996.0.51027443][414996.0.51027442][414996.0.51027444]'
    Cardinality: '0to1'
    ObjectDefinition: Flag
    OwningSide: 'Reference'
  }
  RelationSide.RightSide Flag
  {
    #keys: '3[414996.0.51027446][414996.0.51027445][414996.0.51027447]'
    Cardinality: '1toN'
    ObjectDefinition: MacroPlan
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_Flag/Attribute_flag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute flag
{
  #keys: '3[414996.0.51027432][414996.0.51027431][414996.0.51027433]'
  ValueType: Boolean
}
_Main/BL/Type_Flag/DefaultValue_flag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  ISOValue: 'false'
  TargetAttribute: flag
}
_Main/BL/Type_MacroPlan/Method_OnCreate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,100 @@
Quintiq file version 2.0
#parent: #root
Method OnCreate #extension
{
  TextBody:
  [*
    this.DatasetName( this.MDSMacroPlan().Name() );
    //Create related object
    // Initialize sanitycheck group
    SanityCheckGroup::CreateSanityCheckGroups( this );
    //Initialize calendar registry
    this.InitializeCalendarRegistry();
    /* isfromdb is set to true so that default objects are created with
       IsManuallyConfigured = false
    */
    isfromdb := true;
    // Period parameters
    start := DateTime::ActualTime().StartOfYear();
    PeriodParameter_MP::Create( '1',
                                this,
                                start,
                                isfromdb );
    // GlobalParameters
    this.GlobalParameters_MP( relnew, ID := '1', PeriodSpecificationForUnitActual := GlobalParameters_MP::GetDefaultPeriodSpecification() );
    // Create resource manager where it contains certain limit of data, applicable to 3ds cloud
    this.ResourceManager_MP( relnew );
    this.UpdateSizingParameterStatus();
    this.SmartPlanSetting( relnew );
    this.IDHolder( relnew );
    // Create default sales segment
    SalesSegment_MP::Create( this, null(SalesSegment_MP), GlobalParameters_MP::GetDefaultSalesSegment(), 0, isfromdb );
    // Create default period specification
    PeriodSpecification_MP::Create( GlobalParameters_MP::GetDefaultPeriodSpecification(),
                                    this, GlobalParameters_MP::GetDefaultPeriodSpecTimeUnit(),
                                    1,
                                    DateTime::Now().StartOfYear(), 12, 18, isfromdb,
                                    true,
                                    false );
    // Create dummy period specification for leading periods
    PeriodSpecification_MP::Create( GlobalParameters_MP::GetDefaultPlanningPeriodSpecification(),
                                    this, "",
                                    0,
                                    DateTime::Now().StartOfYear(), 0, 0, false,
                                    false,
                                    true );
    isproductcategory := false;
    ProductLevel_MP::Create( GlobalParameters_MP::GetProductRoot(), isproductcategory, this, isfromdb );
    SalesLevel_MP::Create( GlobalParameters_MP::GetRegionRoot(), this, isfromdb );
    this.CreateDefaultPriority();
    this.MPVersion( DomainModel::Domain().Version().Version() );
    rcv := RoutingConfiguratorView::Create( this.IDHolder().GetRoutingConfiguratorViewID(), this );
    this.IDHolder().RoutingConfiguratorViewID( [Number]rcv.ID() )
    SCVConfiguration::Create( this );
    UnitOfMeasure_MP::CreateDefaultUOM( this );
    Currency_MP::CreateBaseCurrency( this );
    // Create account cost drivers
    AccountCostDriver::CreateAccountCostDrivers( this );
    // Create default shiftpattern
    ShiftPattern::CreateDefaultShiftPattern( this );
    // DataExchangeFramework
    dtd := DataTransformationDefinition::Create( this );
    DataTransformationManufacturingDemand::Create( dtd );
    // Create MacroPlanPTF object
    MacroPlanPTF::Create( this );
    // Create wizard manager
    this.WizardManager( relnew, Id := "" );
    this.PreliminaryFeature( relnew );
    this.SetTime();
    // Create wizard for supply chain initialization
    this.CreateSupplyChainWizard();
    // MEIO parameters
    this.MEIO_Parameters( relnew );
    // Create World puzzle
    this.FindCreateWorldPuzzle();
  *]
}
_Main/BL/Type_PriorityFactor/Method_CreatePrioitifyFacotrDetail.qbl
@@ -1,11 +1,13 @@
Quintiq file version 2.0
#parent: #root
Method CreatePrioitifyFacotrDetail (
  PriorityFactorDetail priorityFactorDetails
  String PriorityFactoryDetailName,
  String GradeTarget,
  Boolean isRange,
  String RangeMax,
  String RangeMin,
  String GradeDesc
)
{
  TextBody:
  [*
    // Akari Nov-7-2023 (created)
  *]
  TextBody: '// Akari Nov-7-2023 (created)'
}
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Component_pnlContent.def
@@ -39,6 +39,16 @@
        Taborder: 2
      ]
    }
    Component NewFlag
    {
      #keys: '[414996.0.58138242]'
      BaseType: 'WebCheckbox'
      Properties:
      [
        Taborder: 3
        Visible: false
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_New.def
@@ -13,6 +13,8 @@
    
    DataHolderEditPriorityFactor.Data(&data);
    
    NewFlag.Checked( true );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_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
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlContent_PriorityFactorName_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: pnlContent/PriorityFactorName
Response OnChanged () id:Response_pnlContent_PriorityFactorName_OnChanged
{
  #keys: '[414996.0.58353845]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebEditField_OnChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      EditFlag.Checked(true);
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_ClickBtnOK.def
@@ -7,10 +7,10 @@
  [*
    btnOk.Enabled(false,'');
    
    // OnOk
    this.ApplyChanges();
    //DataHolderEditPriorityFactorDetails.Data( ).Commit();
    DataHolderEditPriorityFactorDetail.Data( ).Commit();
    
    this.Close();
  *]
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_Edit.def
@@ -14,7 +14,7 @@
        isRange.Checked(true);
    }
    PriorityFactorDetailsName.Enabled( false,"" );
    DataHolderEditPriorityFactorDetail.Data( selection );
    DataHolderEditPriorityFactorDetail.Data( &data );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_New.def
@@ -7,12 +7,9 @@
  #keys: '[414996.0.35320212]'
  Body:
  [*
    data := owner.PriorityFactorDetail(relnew);
    data := owner.PriorityFactorDetail(relshadow);
    
    info( isnull( owner ));
    info( isnull( data ));
    DataHolderEditPriorityFactorDetail.Data( data );
    DataHolderEditPriorityFactorDetail.Data( &data );
    
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlActions_btnOk_OnClick.def
@@ -21,7 +21,7 @@
  {
    Body:
    [*
      DialogEditPriorityFactorDetail.ClickBtnOK();
      Form.ClickBtnOK();
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetail.def
@@ -13,7 +13,7 @@
    {
      #keys: '[414996.0.38864386]'
      BaseType: 'WebDataHolder'
      Databinding: 'PriorityFactorDetail'
      Databinding: 'shadow[PriorityFactorDetail]*'
      Properties:
      [
        Taborder: 2
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnSelectionChanged.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuNewPriorityFactor_OnClick.def
@@ -13,8 +13,8 @@
  {
    Body:
    [*
      dlg := construct( DialogEditPriorityFactorDetail );
      dlg.New( selection );
      dlg := construct( DialogEditPriorityFactor );
      dlg.New( MacroPlan,"" );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_ListPriorityFactorGrading.def
@@ -11,10 +11,10 @@
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'structured[PriorityFactorDetails]'
        Source: 'DataHolderPriorityFactorGrading'
        DataType: 'PriorityFactor'
        Source: 'DataHolderPriorityFactor'
        Taborder: 0
        Transformation: 'Elements'
        Transformation: 'PriorityFactorDetail'
      ]
    }
    #child: listActionBarPagePriorityFactorGrading
@@ -36,7 +36,7 @@
  ]
  Properties:
  [
    Taborder: 2
    Taborder: 1
  ]
  ResponseDefinitions:
  [
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_DataHolderPriorityFactor_OnDataChanged.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def
@@ -7,16 +7,6 @@
  BaseType: 'WebForm'
  Children:
  [
    Component DataHolderPriorityFactorGrading
    {
      #keys: '[414382.0.478480902]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[PriorityFactorDetail]*'
      Properties:
      [
        Taborder: 1
      ]
    }
    #child: ListPriorityFactorGrading
    Component DataHolderPriorityFactor
    {