Kevin Kok Khah Whey
2023-09-25 34d29be6a3eb0c025da50b77f2107c4ad259c6c0
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
Quintiq file version 2.0
#parent: Panel351/btn_Add_Order_FOF449
Response OnClick (
  H_OrderForecastRealQty selection
) id:Response_Panel351_btn_Add_Order_FOF449_OnClick_880
{
  #keys: '[414724.0.141244111]'
  CanBindMultiple: false
  DefinitionID => /Panel351/Responsedef_Panel351_btn_Add_Order_FOF449_OnClick
  QuillAction
  {
    Body:
    [*
      if( not isnull( selection))
      {
        SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
        if( isnull( SelectItem))
        {
           MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
                                      ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
                                                                       .Add( "Util",selection.Unit())
                                                                       .Add( "CustomCode",selection.CustomCode())
                                                                       .Add( "CustomName",selection.CustomName()).Build().AsString());
        }
        else
        {
          SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
                                                   .Add( "Util",selection.Unit())
                                                   .Add( "CustomCode",selection.CustomCode())
                                                   .Add( "CustomName",selection.CustomName()).Build().AsString());
        }
        Application.OpenForm( "FrmAuthorizeAndCountersign_Order","modal");  
      }
      else
      {
        WebMessageBox::Information( "请选择一项预测后再点击按钮!");  
      }
    *]
    GroupServerCalls: false
  }
}