| 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( "SKUName",selection.SKUName()) | 
|                                                                        .Add( "CustomName",selection.CustomName()).Build().AsString()); | 
|         } | 
|         else | 
|         { | 
|           SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU()) | 
|                                                    .Add( "Util",selection.Unit()) | 
|                                                    .Add( "CustomCode",selection.CustomCode()) | 
|                                                    .Add( "SKUName",selection.SKUName()) | 
|                                                    .Add( "CustomName",selection.CustomName()).Build().AsString()); | 
|         } | 
|         Application.OpenForm( "FrmAuthorizeAndCountersign_Order","modal");   | 
|       } | 
|       else | 
|       { | 
|         WebMessageBox::Information( "请选择一项预测后再点击按钮!");   | 
|       } | 
|     *] | 
|     GroupServerCalls: false | 
|   } | 
| } |