yypsybs
2023-09-13 8fcc77bd33ae72964c0e3cff47d5bb19593c3bc9
PRcheckbox
已修改11个文件
已添加11个文件
307 ■■■■■ 文件已修改
_Main/BL/Type_PRData/StaticMethod_CanCall.qbl 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/StaticMethod_DoCall.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/StaticMethod_ProductIdOver14Days.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRHistoryData/StaticMethod_ProductIdOver14Days.qbl 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_ListPRData#844.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_listContextMenuPRData#1.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_DataHolderChecked_OnDataChanged#774.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_MenuCall_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_OnUserCheckedChanged#613.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_OnUserCheckedChanged.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_OnCreated.def 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonSendPR_OnClick.def 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/_ROOT_Component_FormPRData#633.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_ListPRHistoryData#844.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_PanelPRHistoryButton.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_DataHolderChecked_OnDataChanged.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_MenuCall_OnClick.def 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_OnUserCheckedChanged#635.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_OnUserCheckedChanged.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPRA_OnClick.def 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/_ROOT_Component_FormPRHistoryData.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/StaticMethod_CanCall.qbl
@@ -8,10 +8,14 @@
  TextBody:
  [*
    // yypsybs Sep-12-2023 (created)
    info( "CanCall " + [String]toCalls.Size() + " PRs" )
    feedback_o := "";
    traverse( toCalls, Elements, toCall ) {
      if( toCall.SendStatus() <> "" ) {
        feedback_o := "SendStatus must be empty!";
    if( toCalls.Size() = 0 ) {
      feedback_o := "No checked PR";
    } else {
      havaUnsent := exists( toCalls, Elements, toCall, toCall.SendStatus() = "" );
      if( not havaUnsent ) {
        feedback_o := "No unsent PR";
      }
    }
    return feedback_o = "";
_Main/BL/Type_PRData/StaticMethod_DoCall.qbl
@@ -9,8 +9,12 @@
  TextBody:
  [*
    // yypsybs Sep-12-2023 (created)
    info( "DoCall " + [String]toCalls.Size() + " PRs" );
    nowNo := 1;
    traverse( toCalls, Elements, toCall, toCall.SendStatus() = "" ) {
      info ( "DoCall " + [String]nowNo + "/" + [String]toCalls.Size() + " PR" );
      toCall.DoCall( globalData, callBy );  
      nowNo := nowNo + 1;
    }
  *]
}
_Main/BL/Type_PRData/StaticMethod_ProductIdOver14Days.qbl
@@ -10,7 +10,7 @@
    result := "";
    
    productIds := selectuniquevalues( toChecks, Elements, item, 
                                      (item.ProduceRequiredDate() - Duration::Days( 14 )).Date() > Date::Today(),
                                      (item.ProduceRequiredDate() - Duration::Days( 14 )).Date() > Date::Today() and item.SendStatus() = "",
                                      item.ProductID() ); 
    productIds := selectsortedset( productIds, Elements, item, item );
    
_Main/BL/Type_PRHistoryData/StaticMethod_ProductIdOver14Days.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ProductIdOver14Days (
  PRHistoryDatas toChecks
) as String
{
  TextBody:
  [*
    // yypsybs Sep-12-2023 (created)
    result := "";
    productIds := selectuniquevalues( toChecks, Elements, item,
                                      (item.ProduceRequiredDate() - Duration::Days( 14 )).Date() > Date::Today() and item.SendStatus() = "",
                                      item.ProductID() );
    productIds := selectsortedset( productIds, Elements, item, item );
    if( productIds.Size() > 0 ) {
      result := result + productIds.Element( 0 );
      for( i := 1; i < productIds.Size(); i := i + 1 ) {
        result := result + ",";
        result := result + productIds.Element( 0 );
      }
    }
    return result;
  *]
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_ListPRData#844.def
@@ -37,7 +37,8 @@
  ]
  Properties:
  [
    Taborder: 0
    SelectionCheckboxes: true
    Taborder: 1
  ]
  ResponseDefinitions:
  [
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
Component PanelPRDataButton
{
  #keys: '[414384.0.798052026]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ButtonSendPR
    {
      #keys: '[414384.0.798052096]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'ARROW_RIGHT'
        Label: 'Send checked PRs'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_listContextMenuPRData#1.def
@@ -13,7 +13,7 @@
      [
        Image: 'MEDIA_PLAY_GREEN'
        Taborder: 3
        Title: 'Call'
        Title: 'Send selected PRs'
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_DataHolderChecked_OnDataChanged#774.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: DataHolderChecked_187
Response OnDataChanged () id:Response_ListPRData_844_DataHolderChecked_OnDataChanged_774
{
  #keys: '[414384.0.799231412]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      //traverse ( this.Data(), Elements, e ) {
      //  info( "选中的物料号:", e.MatCode() );
      //}
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_MenuCall_OnClick.def
@@ -18,10 +18,10 @@
    [*
      productIdsOver14Days := PRData::ProductIdOver14Days( selection );
      if( productIdsOver14Days <> "" ) {
        if( WebMessageBox::Question( "该批次中的物料号" + productIdsOver14Days + "订单应该在2周后释放,请确认是否现在释放?" ) = 0 ) {
        if( WebMessageBox::Question( "该批次中的物料号" + productIdsOver14Days + "订单应该在2周后释放,请确认是否现在释放?(已释放的将被跳过)" ) = 0 ) {
          PRData::DoCall( GlobalOTDTable, selection, ApplicationMacroPlanner.GetUserName() );
        }
      } else if( WebMessageBox::Question( "是否发送选中的数据?" ) = 0 ) {
      } else if( WebMessageBox::Question( "是否发送选中的数据?(已释放的将被跳过)" ) = 0 ) {
        PRData::DoCall( GlobalOTDTable, selection, ApplicationMacroPlanner.GetUserName() );
      }
    *]
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_OnUserCheckedChanged#613.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: ListPRData_844
Response OnUserCheckedChanged () id:Response_ListPRData_844_OnUserCheckedChanged_613
{
  #keys: '[414384.0.798051611]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebList_OnUserCheckedChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      info( "checked 0 PRs" );
      DataHolderChecked.Data().Flush();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_OnUserCheckedChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: ListPRData_844
Response OnUserCheckedChanged (
  structured[PRData] checkeditems
) id:Response_ListPRData_844_OnUserCheckedChanged
{
  #keys: '[414384.0.798051163]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebList_OnUserCheckedChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      info( "checked " + [String]checkeditems.Size() + " PRs" );
      DataHolderChecked.Data( checkeditems.Copy() );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_OnCreated.def
@@ -10,9 +10,13 @@
  {
    Body:
    [*
      MacroPlan.PRData( relflush );
      GlobalOTDTable.PRHistoryData( relflush );
      PRData::TestData( MacroPlan );
      if( not isnull( MacroPlan ) ) {
        MacroPlan.PRData( relflush );
        PRData::TestData( MacroPlan );
      }
      if( not isnull( GlobalOTDTable ) ) {
        GlobalOTDTable.PRHistoryData( relflush );
      }
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonSendPR_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
Quintiq file version 2.0
#parent: PanelPRDataButton/ButtonSendPR
Response OnClick () id:Response_PanelPRDataButton_ButtonSendPR_OnClick
{
  #keys: '[414384.0.799260793]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return PRData::CanCall( DataHolderChecked.Data(), feedback );
  *]
  QuillAction
  {
    Body:
    [*
      productIdsOver14Days := PRData::ProductIdOver14Days( DataHolderChecked.Data() );
      if( productIdsOver14Days <> "" ) {
        if( WebMessageBox::Question( "该批次中的物料号" + productIdsOver14Days + "订单应该在2周后释放,请确认是否现在释放?(已释放的将被跳过)" ) = 0 ) {
          PRData::DoCall( GlobalOTDTable, DataHolderChecked.Data(), ApplicationMacroPlanner.GetUserName() );
        }
      } else if( WebMessageBox::Question( "是否发送选中的数据?(已释放的将被跳过)" ) = 0 ) {
        PRData::DoCall( GlobalOTDTable, DataHolderChecked.Data(), ApplicationMacroPlanner.GetUserName() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form633/_ROOT_Component_FormPRData#633.def
@@ -8,6 +8,17 @@
  Children:
  [
    #child: ListPRData_844
    #child: PanelPRDataButton
    Component DataHolderChecked id:DataHolderChecked_187
    {
      #keys: '[414384.0.799231414]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[PRData]*'
      Properties:
      [
        Taborder: 2
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_ListPRHistoryData#844.def
@@ -37,7 +37,8 @@
  ]
  Properties:
  [
    Taborder: 0
    SelectionCheckboxes: true
    Taborder: 1
  ]
  ResponseDefinitions:
  [
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_PanelPRHistoryButton.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
Component PanelPRHistoryButton
{
  #keys: '[414384.0.799483156]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ButtonResendPRA
    {
      #keys: '[414384.0.799483157]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'ARROW_RIGHT'
        Label: 'Resend checked PRs'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_DataHolderChecked_OnDataChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: DataHolderChecked
Response OnDataChanged () id:Response_FormPRData_DataHolderChecked_OnDataChanged
{
  #keys: '[414384.0.799483137]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      //traverse ( this.Data(), Elements, e ) {
      //  info( "选中的物料号:", e.MatCode() );
      //}
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_MenuCall_OnClick.def
@@ -7,15 +7,20 @@
  #keys: '[414384.0.793461657]'
  CanBindMultiple: false
  DefinitionID => /ListPRHistoryData_844/Responsedef_ListPRHistoryData_844_WebMenu_OnClick
  GroupServerCalls: true
  Initiator: 'MenuCall'
  QuillAction
  {
    Body:
    [*
      if( WebMessageBox::Question( "是否发送选中的数据?" ) = 0 ) {
      productIdsOver14Days := PRHistoryData::ProductIdOver14Days( selection );
      if( productIdsOver14Days <> "" ) {
        if( WebMessageBox::Question( "该批次中的物料号" + productIdsOver14Days + "订单应该在2周后释放,请确认是否重新释放?" ) = 0 ) {
          PRHistoryData::ReCall( selection, ApplicationMacroPlanner.GetUserName() );
        }
      } else if( WebMessageBox::Question( "是否重新释放选中的内容?" ) = 0 ) {
        PRHistoryData::ReCall( selection, ApplicationMacroPlanner.GetUserName() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_OnUserCheckedChanged#635.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: ListPRHistoryData_844
Response OnUserCheckedChanged () id:Response_ListPRHistoryData_844_OnUserCheckedChanged_635
{
  #keys: '[414384.0.799575492]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebList_OnUserCheckedChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      info( "checked 0 PRs" );
      DataHolderChecked.Data().Flush();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_OnUserCheckedChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: ListPRHistoryData_844
Response OnUserCheckedChanged (
  structured[PRHistoryData] checkeditems
) id:Response_ListPRHistoryData_844_OnUserCheckedChanged
{
  #keys: '[414384.0.799483356]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebList_OnUserCheckedChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      info( "checked " + [String]checkeditems.Size() + " PRs" );
      DataHolderChecked.Data( checkeditems.Copy() );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPRA_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
Quintiq file version 2.0
#parent: PanelPRHistoryButton/ButtonResendPRA
Response OnClick () id:Response_PanelPRHistoryButton_ButtonResendPRA_OnClick
{
  #keys: '[414384.0.799483155]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    info( DataHolderChecked.Data().Size() );
    return DataHolderChecked.Data().Size() > 0;
  *]
  QuillAction
  {
    Body:
    [*
      productIdsOver14Days := PRHistoryData::ProductIdOver14Days( DataHolderChecked.Data() );
      if( productIdsOver14Days <> "" ) {
        if( WebMessageBox::Question( "该批次中的物料号" + productIdsOver14Days + "订单应该在2周后释放,请确认是否重新释放?" ) = 0 ) {
          PRHistoryData::ReCall( DataHolderChecked.Data(), ApplicationMacroPlanner.GetUserName() );
        }
      } else if( WebMessageBox::Question( "是否重新释放选中的内容?" ) = 0 ) {
        PRHistoryData::ReCall( DataHolderChecked.Data(), ApplicationMacroPlanner.GetUserName() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/_ROOT_Component_FormPRHistoryData.def
@@ -8,6 +8,17 @@
  Children:
  [
    #child: ListPRHistoryData_844
    #child: PanelPRHistoryButton
    Component DataHolderChecked
    {
      #keys: '[414384.0.799483139]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[PRHistoryData]*'
      Properties:
      [
        Taborder: 2
      ]
    }
  ]
  Properties:
  [