lihongji
2024-11-14 a746b44994e729613737baa922796383027fc54c
_Main/UI/MacroPlannerWebApp/Component_DialogPublishPlan/Method_OnOK.def
@@ -7,34 +7,67 @@
  [*
    this.ApplyChanges();
    
      showlabel := '是否发送';
      plannames := construct( Strings );
      if( cbCustomDemand.Checked() ){
        plannames.Add( lblCustomDemand.Label() );
      }
      if( cbOfflinePlan.Checked() ){
        plannames.Add( lblOfflinePlan.Label() );
      }
      if( cbShiftPlan.Checked() ){
        plannames.Add( lblShiftPlan.Label() );
      }
      if( cbAssembleOnlinePlan.Checked() ){
        plannames.Add( lblAssembleOnlinePlan.Label() );
      }
      if( cbInventoryPlan.Checked() ){
        plannames.Add( lblInventoryPlan.Label() );
      }
    showlabel       := '是否发送';
    dlplannames     := construct( Strings );
    ccplannames     := construct( Strings );
    if( cbCustomDemand.Checked() ){
      dlplannames.Add( lblCustomDemand.Label() );
    }
    if( cbCustomDemandCC.Checked() ){
      ccplannames.Add( lblCustomDemandCC.Label() );
    }
    if( cbOfflinePlan.Checked() ){
      dlplannames.Add( lblOfflinePlan.Label() );
      ArchiveCell_ScheduleSummary::Create( MacroPlan,Archive );
    }
    if( cbOfflinePlanCC.Checked() ){
      ccplannames.Add( lblOfflinePlanCC.Label() );
      ArchiveCell_ScheduleSummary::Create( MacroPlan,Archive );
    }
    if( cbShiftPlan.Checked() ){
      dlplannames.Add( lblShiftPlan.Label() );
      ArchiveCell_ScheduleSummary::Create( MacroPlan,Archive );
    }
    if( cbShiftPlanCC.Checked() ){
      ccplannames.Add( lblShiftPlanCC.Label() );
      ArchiveCell_ScheduleSummary::Create( MacroPlan,Archive );
    }
    if( cbAssembleOnlinePlan.Checked() ){
      dlplannames.Add( lblAssembleOnlinePlan.Label() );
    }
    if( cbAssembleOnlinePlanCC.Checked() ){
      ccplannames.Add( lblAssembleOnlinePlanCC.Label() );
    }
    if( cbInventoryPlan.Checked() ){
      dlplannames.Add( lblInventoryPlan.Label() );
    }
    if( cbInventoryPlanCC.Checked() ){
      ccplannames.Add( lblInventoryPlanCC.Label() );
    }
    
      showlabel := showlabel.Concat( plannames.Concatenate( "、" ) ).Concat( '?' );
    currentuser  := QuintiqUser::CurrentUser().DisplayName();
      if( WebMessageBox::Question( this, showlabel, 'OK|Cancel' ) = 0 ){
        InterfaceDataset.PublishPlanReportData( MacroPlan, cbCustomDemand.Checked()
    dlshowname      := '大连工厂的';
    if( dlplannames.Size() > 0 ){
      showlabel     := showlabel.Concat( dlshowname.Concat( dlplannames.Concatenate( "、" ) ) ).Concat( ";");
    }
    ccshowname      := '长春工厂的';
    if( ccplannames.Size() > 0 ){
      showlabel     := showlabel.Concat( ccshowname.Concat( ccplannames.Concatenate( "、" ) ) ).Concat( ";");
    }
    showlabel       := showlabel.Concat( '。' );
    currentuser     := QuintiqUser::CurrentUser().DisplayName();
    if( WebMessageBox::Question( this, showlabel, 'OK|Cancel' ) = 0 ){
      InterfaceDataset.PublishPlanReportData( MacroPlan, cbCustomDemand.Checked()
                                              , cbCustomDemandCC.Checked()
                                              , cbOfflinePlan.Checked()
                                              , cbOfflinePlanCC.Checked()
                                              , cbShiftPlan.Checked()
                                              , cbShiftPlanCC.Checked()
                                              , cbAssembleOnlinePlan.Checked()
                                              , cbAssembleOnlinePlanCC.Checked()
                                              , cbInventoryPlan.Checked()
                                              , cbInventoryPlanCC.Checked()
                                                , currentuser );
      }
    }
    
    this.Close();
  *]