limj
2023-09-21 89c96171bb971dcaed7cf289b58ef44ca689523c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Quintiq file version 2.0
#parent: #root
Response OnCreated () id:Response_FrmOrderForecast_OnCreated
{
  #keys: '[414724.0.91471552]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      // 初始化查询参数月份
      ds_Month_FOF.Date(Date::ActualDate());
      // 预测数据2此处理(筛选+客户名称提取)
      if( MacroPlan.H_Forecast(relget ).Size()>0)
      {
        MacroPlan.H_Forecast(relget ).Delete( 0,MacroPlan.H_Forecast(relget ).Size()-1);
      }
      //AllData:= selectset( MacroPlan, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() 
      //                     and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth()
      //                     and object.Quantity()>0 );
      //
      //CustomName:="";
      //DepartMent:="";
      //idx:=0;
      //traverse( AllData,Elements,Obj,not isnull(Obj))
      //{
      //  idx:=Obj.SalesSegmentName().FindString( "_",0);
      //  if(idx>0)
      //  {
      //    DepartMent:=Obj.SalesSegmentName().SubString( 0,idx+1);
      //    CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1));
      //  }
      //  else
      //  {
      //    CustomName :=Obj.SalesSegmentName();
      //  }
      //  
      //   ArrayData:=Obj.SalesSegmentName().SubString( 0,Obj.SalesSegmentName().FindString( "_",0)+1);
      //   MacroPlan.H_Forecast(relnew,OrderCode := H_FunctionClass::SM_GenerateID( "OF"),
      //                          SKU := Obj.ProductID(),
      //                          CustomCode := CustomName,
      //                         CustomName := CustomName,
      //                         Util:=Obj.UnitOfMeasureName(),
      //                         NeedTime:=Obj.EndDate(),
      //                         ForecastQty:=[Number]Obj.Quantity().Round( 0),
      //                         Department:=DepartMent);
      //}
    *]
    GroupServerCalls: false
  }
}