lazhen
2024-09-13 ff58551ba28f475ad78c9eebbf543aee15ace8bf
换型损失设置添加时间范围
已修改7个文件
已添加4个文件
已删除1个文件
100 ■■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/Attribute_EndDate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/Attribute_StartDate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSettingExcel/Attribute_EndDate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSettingExcel/Attribute_StartDate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting#568.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_listContextMenuSD.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl
@@ -186,6 +186,10 @@
  {
    DefaultText: 'The required field is blank.'
  }
  InfoMessage MP_ChangeLossSetting_DateCoincide
  {
    DefaultText: '日期区间重合.'
  }
  InfoMessage MP_ChangeLossSetting_Exist
  {
    DefaultText: 'The same data already exists.'
_Main/BL/Type_ChangeLossSetting/Attribute_EndDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute EndDate
{
  #keys: '3[415136.0.1132170029][415136.0.1132170028][415136.0.1132170030]'
  ValueType: Date
}
_Main/BL/Type_ChangeLossSetting/Attribute_StartDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute StartDate
{
  #keys: '3[415136.0.1132170019][415136.0.1132170018][415136.0.1132170020]'
  ValueType: Date
}
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl
@@ -7,6 +7,8 @@
  Unit unit,
  Product_MP product1,
  Product_MP product2,
  Date startdate,
  Date enddate,
  Number number
) as Boolean
{
@@ -21,11 +23,17 @@
    if( product1 = product2 ){
      feedback := Translations::MP_ChangeLossSetting_SameProduct();
    }
    if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit
    if( startdate > enddate ){
      feedback := Translations::MP_LibCal_Event_ValidDatePeriod();
    }
    if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and not ( cls.StartDate() > enddate or cls.EndDate() < startdate )
                and ( ( cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) 
                      or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){
      feedback := Translations::MP_ChangeLossSetting_Exist()
    }
    if( exists( owner, ChangeLossSetting, cls, cls <> old and not ( cls.StartDate() > enddate or cls.EndDate() < startdate ) ) ){
      feedback := Translations::MP_ChangeLossSetting_DateCoincide()
    }
    
    return feedback = '';
  *]
_Main/BL/Type_ChangeLossSettingExcel/Attribute_EndDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute EndDate
{
  #keys: '3[415136.0.1132074698][415136.0.1132074697][415136.0.1132074699]'
  ValueType: Date
}
_Main/BL/Type_ChangeLossSettingExcel/Attribute_StartDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute StartDate
{
  #keys: '3[415136.0.1132074695][415136.0.1132074694][415136.0.1132074696]'
  ValueType: Date
}
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
@@ -10,7 +10,9 @@
    if( exists( macroplan, ChangeLossSettingExcel, excel, excel.Product1() = '' 
                or excel.Product2() = '' 
                or excel.Unit() = '' 
                or excel.ChangeLossNumber() = '' ) ){
                or excel.ChangeLossNumber() = ''
                or not excel.StartDate().IsFinite()
                or not excel.EndDate().IsFinite() ) ){
      error( Translations::MP_ChangeLossSettingExcel_Import_NullInputRequiredField() );
    }
    //导入的数量小于0
@@ -29,6 +31,10 @@
    if( exists( macroplan, ChangeLossSettingExcel, excel, excel.Product1() = excel.Product2() ) ){
      error( Translations::MP_ChangeLossSetting_SameProduct() );
    }
    //导入的时间区间校验
    if( exists( macroplan, ChangeLossSettingExcel, excel, excel.StartDate() > excel.EndDate() ) ){
      error( Translations::MP_LibCal_Event_ValidDatePeriod() );
    }
    //重复导入校验
    //if( selectduplicates( owner, LaneExcel, excel, excel.StartFrom(), 
    //                      excel.EndTo(), 
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def
@@ -98,9 +98,31 @@
        DataBinding: 'dhDialogData.Data.ChangeLossNr'
        Label: 'Change loss number'
        Min: '0'
        Taborder: 5
      ]
    }
    Component dsStartDate
    {
      #keys: '[415136.0.1132411785]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        DataBinding: 'dhDialogData.Data.StartDate'
        Label: 'Start date'
        Taborder: 3
      ]
    }
    Component dsEndDate
    {
      #keys: '[415136.0.1132411840]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        DataBinding: 'dhDialogData.Data.EndDate'
        Label: 'End date'
        Taborder: 4
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def
@@ -6,7 +6,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return ChangeLossSetting::ValidateInput( feedback, MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), [Number]npChangeLossNr.Number() );
    return ChangeLossSetting::ValidateInput( feedback, MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), dsStartDate.Date(), dsEndDate.Date(), [Number]npChangeLossNr.Number() );
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting#568.def
@@ -28,7 +28,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNr","title":"ChangeLossNr","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNr"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNr","title":"ChangeLossNr","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNr"}}]'
        ContextMenu: 'listContextMenuChangeLossSetting'
        Taborder: 2
      ]
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_listContextMenuSD.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw
@@ -60,12 +60,30 @@
              subtotals: ''
              width: 150
            }
            column_StartDate
            {
              columnId: 'StartDate'
              dataPath: 'StartDate'
              dataType: 'date'
              index: 3
              subtotals: ''
              width: 150
            }
            column_EndDate
            {
              columnId: 'EndDate'
              dataPath: 'EndDate'
              dataType: 'date'
              index: 4
              subtotals: ''
              width: 150
            }
            column_ChangeLossNr
            {
              columnId: 'ChangeLossNr'
              dataPath: 'ChangeLossNr'
              dataType: 'number'
              index: 3
              index: 5
              subtotals: ''
              width: 150
            }