Quintiq file version 2.0
#parent: #root
Response OnCreated () id:Response_FrmAuthorizeAndCountersign_OnCreated
{
  #keys: '[414724.0.80341563]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      /**********************获取下一个周5的日期*******************/
      //定义下一个星期
      nTargetWeenNum := 5;
      nTodayWeekNum := Date::ActualDate().DayOfWeek();
      nAddDays := 0;
      if( nTodayWeekNum <= nTargetWeenNum)
      {
        nAddDays := nTargetWeenNum-nTodayWeekNum;
      }
      else
      {
        nAddDays := 7 - nTodayWeekNum+nTargetWeenNum;
      }
      // 下一个星期的日期
      dtNeedDate := Date::ActualDate() + nAddDays;
      /******************************获取下一个周5的日期 结束***********************/
      ds_NeedDate.Date(dtNeedDate);
      
      // 获取选择后的SKU
      SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
      if(not isnull( SelectItem) and SelectItem.Value().Length()>0)
      {
        StrValue := SelectItem.Value().Tokenize( ";");
        lb_SKUCode_FAAC.Text(StrValue.Element( 0));
        lb_SKUName_FAAC.Text("产品");
        lb_Operator_FAAC.Text("");
        lb_Util_FAAC.Text(StrValue.Element( 1));
        txt_CustomID_FAAC.Text(StrValue.Element( 2));
        txt_CustomName_FAAC.Text(StrValue.Element( 3));
        lb_Operator_FAAC.Text(ApplicationMacroPlanner.GetUserName());
      }
    *]
    GroupServerCalls: false
  }
}
