已重命名1个文件
	
		
		已修改20个文件
	
		
		已添加6个文件
	
		
		已删除14个文件
	
	
 
	
	
	
	
	
	
	
	
|  |  |  | 
|---|
|  |  |  | ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "åææ",NeedDate := NDate | 
|---|
|  |  |  | ,NeedQty := [Number](ProductQty*0.8).Round( 0),Unit := "PCS" | 
|---|
|  |  |  | ,StockPoint :="æµè¯",MaterialName := "æµè¯æ°æ®" ); | 
|---|
|  |  |  | Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := "SKU_M"+ (nCount+1).AsQUILL() ,ForecastID := ForecastId,OrgCode := "ORG_000",VCode := VCode | 
|---|
|  |  |  | ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "åæå",NeedDate := NDate | 
|---|
|  |  |  | ,NeedQty := [Number](ProductQty*0.8).Round( 0),Unit := "PCS" | 
|---|
|  |  |  | ,StockPoint :="æµè¯",MaterialName := "æµè¯æ°æ®" ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | bStatus := true; | 
|---|
|  |  |  | strMsg :=""; | 
|---|
|  |  |  | 
|---|
|  |  |  | /**********************************åå§å订å颿µä¿¡æ¯*************************************** | 
|---|
|  |  |  | *æ³¨ï¼æªç¡®å®ä¸æ¸¸é¢æµè®¢åæ´æ°é»è¾åæ°æ®æææ§ï¼è¿éè¿è¡äºæ¬¡å¤çï¼æ°çæä¸ä¸ªå表ï¼é¿å
䏿¸¸ä¿¡æ¯åå¨ä¸¥é | 
|---|
|  |  |  | *    å½±ååè½ | 
|---|
|  |  |  | * | 
|---|
|  |  |  | *---------------------è¯¥å½æ°å·²ä½åº---------------------- | 
|---|
|  |  |  | *****************************************************************************************/ | 
|---|
|  |  |  | // åå§åç»æ | 
|---|
|  |  |  | bStatus := false; | 
|---|
|  |  |  | 
|---|
|  |  |  | StockingPointID := Obj.StockingPointID(), | 
|---|
|  |  |  | Department:=DepartMent); | 
|---|
|  |  |  | // åå
¥é¢æµå®æ¶ä¿¡æ¯ | 
|---|
|  |  |  | ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomID()=CustomName and ObjO.SKU()=Obj.ProductID() | 
|---|
|  |  |  | ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomCode()=CustomName and ObjO.SKU()=Obj.ProductID() | 
|---|
|  |  |  | and ObjO.Month().StartOfMonth() = Obj.EndDate().StartOfMonth() ) | 
|---|
|  |  |  | if( isnull( ObjOrderRealQty)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,CustomID := CustomName,CustomName := CustomName,ForecatsQty := [Number]Obj.Quantity().Round( 0) | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,CustomCode := CustomName,CustomName := CustomName,ForecastQty := [Number]Obj.Quantity().Round( 0) | 
|---|
|  |  |  | ,ForecatsRealQty := [Number]Obj.Quantity().Round( 0),ID := H_FunctionClass::SM_GenerateID( "OR") | 
|---|
|  |  |  | ,Month := Obj.EndDate(),OrderCode := strOrderCode,SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName()); | 
|---|
|  |  |  | ,Month := Obj.EndDate(),SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecatsQty()) | 
|---|
|  |  |  | if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecastQty()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecatsQty(); | 
|---|
|  |  |  | RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecastQty(); | 
|---|
|  |  |  | RQty := ObjOrderRealQty.ForecatsRealQty() + RQty; | 
|---|
|  |  |  | if( RQty<0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | RQty :=0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0)); | 
|---|
|  |  |  | ObjOrderRealQty.ForecastQty([Number]Obj.Quantity().Round( 0)); | 
|---|
|  |  |  | ObjOrderRealQty.ForecatsRealQty(RQty); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | #parent: #root | 
|---|
|  |  |  | StaticMethod SM_InitialForcastDataEx ( | 
|---|
|  |  |  | MacroPlan Owner, | 
|---|
|  |  |  | Boolean IsNew | 
|---|
|  |  |  | Boolean IsNew, | 
|---|
|  |  |  | String VersionCode | 
|---|
|  |  |  | ) as owning JSON | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Description: 'åå§å订å颿µä¿¡æ¯' | 
|---|
|  |  |  | 
|---|
|  |  |  | /**********************************åå§å订å颿µä¿¡æ¯*************************************** | 
|---|
|  |  |  | *æ³¨ï¼æªç¡®å®ä¸æ¸¸é¢æµè®¢åæ´æ°é»è¾åæ°æ®æææ§ï¼è¿éè¿è¡äºæ¬¡å¤çï¼æ°çæä¸ä¸ªå表ï¼é¿å
䏿¸¸ä¿¡æ¯åå¨ä¸¥é | 
|---|
|  |  |  | *    å½±ååè½ | 
|---|
|  |  |  | * | 
|---|
|  |  |  | *åæ°ï¼IsNew æ¯å¦æ¶å
¨æ°æ°æ®ï¼å
¨æ°æ°æ®ä¼å°æ§çæ°æ®æ¸
é¤ï¼ç¶åéæ°å¡«å
ï¼ä¸æ¯å
¨æ°æ°æ®ï¼å°ç´¯è®¡åæ´æ° | 
|---|
|  |  |  | *****************************************************************************************/ | 
|---|
|  |  |  | // åå§åç»æ | 
|---|
|  |  |  | bStatus := false; | 
|---|
|  |  |  | strMsg :=""; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | // æ¸
餿§æ°æ®ï¼éæ°æå | 
|---|
|  |  |  | if(Owner.H_Forecast(relget ).Size()>0) | 
|---|
|  |  |  | // 20230925 ä¼åçä¸å¡é»è¾,å¦ææ¶æ°æ°æ®ï¼å颿µæ°æ®å
¨é¨å¹²æï¼ç¶åéæ°çæ | 
|---|
|  |  |  | if( IsNew) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | traverse( Owner,H_Forecast,Obj,not isnull( Obj)) | 
|---|
|  |  |  | if( Owner.H_OrderForecastRealQty(relsize )>0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_Forecast(reldelete, Obj); | 
|---|
|  |  |  | traverse( Owner,H_OrderForecastRealQty,Obj,not isnull( Obj)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(reldelete, Obj); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // è·å颿µè®¢åï¼å½æåä¹åç3个æé¢æµæ°æ® ä¸é¢æµæ°é>0ç | 
|---|
|  |  |  | AllData:= selectset( Owner, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() | 
|---|
|  |  |  | and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth() | 
|---|
|  |  |  | AllData:= selectset( Owner, Product_MP.SalesDemand.astype( Forecast ),object, | 
|---|
|  |  |  | object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() | 
|---|
|  |  |  | // éæ±ç»æªæ¥4个æçæ°æ®ï¼ä½å¯è½å¹¶ä¸åç¡®ï¼ææ¶æ³¨éæï¼å个æéå¶ | 
|---|
|  |  |  | //and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth() | 
|---|
|  |  |  | and object.Quantity()>0 ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | CustomName:=""; | 
|---|
|  |  |  | DepartMent:=""; | 
|---|
|  |  |  | idx:=0; | 
|---|
|  |  |  | strOrderCode:=""; | 
|---|
|  |  |  | RQty:=0; | 
|---|
|  |  |  | ObjOrderRealQty:=null( H_OrderForecastRealQty,constcontent ); | 
|---|
|  |  |  | //  ObjPruduct :=null( MappingProduct,constcontent ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | traverse( AllData,Elements,Obj,not isnull(Obj)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | // æ²¡æå®¢æ·ä¿¡æ¯åé¨é¨ä¿¡æ¯ï¼SalesSegmentName=äºä¸é¨+â-â+客æ·åç§° | 
|---|
|  |  |  | CustomName := Obj.SalesSegmentName(); | 
|---|
|  |  |  | DepartMent := Obj.SalesSegmentName(); | 
|---|
|  |  |  | // è¿éç¨æ¥æ¾åæªåï¼å ä¸ºä¸ç¡®å®æå ä¸ªæ¨ªçº¿ï¼ä»¥ç¬¬ä¸ä¸ªä¸ºå | 
|---|
|  |  |  | idx:=Obj.SalesSegmentName().FindString( "-",0); | 
|---|
|  |  |  | if(idx>0) | 
|---|
|  |  |  | 
|---|
|  |  |  | DepartMent:=Obj.SalesSegmentName().SubString( 0,idx); | 
|---|
|  |  |  | CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | CustomName :=Obj.SalesSegmentName(); | 
|---|
|  |  |  | DepartMent := "é¨é¨æ°æ®è·å失败ï¼" | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //    // ä»ç©æè¡¨è·åç©æä¿¡æ¯ | 
|---|
|  |  |  | //    ObjPruduct := H_FunctionClass::SM_GetProductInfo( Owner,Obj.ProductID()); | 
|---|
|  |  |  | //    if( not isnull( ObjPruduct)) | 
|---|
|  |  |  | //    { | 
|---|
|  |  |  | // | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  | // åå
¥é¢æµè®¢åä¿¡æ¯è¡¨ | 
|---|
|  |  |  | strOrderCode:=H_FunctionClass::SM_GenerateID( "OF"); | 
|---|
|  |  |  | Owner.H_Forecast(relnew,OrderCode := strOrderCode, | 
|---|
|  |  |  | SKU := Obj.ProductID(), | 
|---|
|  |  |  | CustomCode := CustomName, | 
|---|
|  |  |  | CustomName := CustomName, | 
|---|
|  |  |  | Util:=Obj.UnitOfMeasureName(), | 
|---|
|  |  |  | NeedTime:=Obj.EndDate(), | 
|---|
|  |  |  | ForecastQty:=[Number]Obj.Quantity().Round( 0), | 
|---|
|  |  |  | StockingPointID := Obj.StockingPointID(), | 
|---|
|  |  |  | Department:=DepartMent); | 
|---|
|  |  |  | // åå
¥é¢æµå®æ¶ä¿¡æ¯ | 
|---|
|  |  |  | ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomID()=CustomName and ObjO.SKU()=Obj.ProductID() | 
|---|
|  |  |  | // æ´æ°é¢æµä¿¡æ¯ï¼éæ°æ°æ®æ´æ°ä¿¡æ¯ã | 
|---|
|  |  |  | ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomCode()=CustomName and ObjO.SKU()=Obj.ProductID() | 
|---|
|  |  |  | and ObjO.Month().StartOfMonth() = Obj.EndDate().StartOfMonth() ) | 
|---|
|  |  |  | if( isnull( ObjOrderRealQty)) | 
|---|
|  |  |  | if( IsNew or isnull( ObjOrderRealQty)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,CustomID := CustomName,CustomName := CustomName,ForecatsQty := [Number]Obj.Quantity().Round( 0) | 
|---|
|  |  |  | ,ForecatsRealQty := [Number]Obj.Quantity().Round( 0),ID := H_FunctionClass::SM_GenerateID( "OR") | 
|---|
|  |  |  | ,Month := Obj.EndDate(),OrderCode := strOrderCode,SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName()); | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,CustomCode := CustomName,CustomName := CustomName,ForecastQty := [Number]Obj.Quantity().Round( 0) | 
|---|
|  |  |  | ,ForecatsRealQty := [Number]Obj.Quantity().Round( 0),ID := H_FunctionClass::SM_GenerateID( "OR") | 
|---|
|  |  |  | ,Month := Obj.EndDate(),SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName() | 
|---|
|  |  |  | ,Department := DepartMent,VCode := VersionCode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if( IsNew) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0)); | 
|---|
|  |  |  | ObjOrderRealQty.ForecatsRealQty([Number]Obj.Quantity().Round( 0)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecatsQty()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecatsQty(); | 
|---|
|  |  |  | RQty := ObjOrderRealQty.ForecatsRealQty() + RQty; | 
|---|
|  |  |  | if( RQty<0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | RQty :=0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0)); | 
|---|
|  |  |  | ObjOrderRealQty.ForecatsRealQty(RQty); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // æ´æ°äºé¢æµæ°æ®ï¼å计ç®å®æ¶æ°æ®å¢å | 
|---|
|  |  |  | if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecastQty()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecastQty(); | 
|---|
|  |  |  | RQty := ObjOrderRealQty.ForecatsRealQty() + RQty; | 
|---|
|  |  |  | if( RQty<0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | RQty :=0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ObjOrderRealQty.ForecastQty([Number]Obj.Quantity().Round( 0)); | 
|---|
|  |  |  | ObjOrderRealQty.ForecatsRealQty(RQty); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | bStatus := true; | 
|---|
|  |  |  | strMsg :="订å颿µåå§åæå!"; | 
|---|
|  |  |  | 
|---|
|  |  |  | nNoHaveForecastQty:=0;//äºé¢æµæ°é | 
|---|
|  |  |  | // è·å颿µæ°éï¼å®¢æ·+SKU+æä»½ çè®ºæ¯æ²¡æç©æé¢æµï¼ | 
|---|
|  |  |  | OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU | 
|---|
|  |  |  | and Obj.CustomID() = CustomerCode | 
|---|
|  |  |  | and Obj.CustomCode() = CustomerCode | 
|---|
|  |  |  | and Obj.Month().Format( "YM2") = Date::ActualDate().Format( "YM2")); | 
|---|
|  |  |  | if ( not isnull(OrderForecast)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := SKU, | 
|---|
|  |  |  | Month := Date::ActualDate(), | 
|---|
|  |  |  | CustomID := CustomerCode, | 
|---|
|  |  |  | CustomCode := CustomerCode, | 
|---|
|  |  |  | CustomName := "客æ·è¡¨è·å", | 
|---|
|  |  |  | OrderCode := "-", | 
|---|
|  |  |  | ForecatsQty :=0, | 
|---|
|  |  |  | ForecastQty := 0, | 
|---|
|  |  |  | ForecatsRealQty :=nForecastQtyNew, | 
|---|
|  |  |  | Unit := "SKU å°ç©æè¡¨è·å"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | if( not isnull( Owner)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | // åå§å颿µä¿¡æ¯ | 
|---|
|  |  |  | JResult := H_FunctionClass::SM_InitialForcastDataEx( Owner,IsNew); | 
|---|
|  |  |  | JResult := H_FunctionClass::SM_InitialForcastDataEx( Owner,IsNew,"--"); | 
|---|
|  |  |  | if( JResult.Get( "Status").GetBoolean()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | traverse( Owner,SalesDemand.astype( CustomerOrder ),ObjOrder,not isnull( ObjOrder)) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // è·å颿µæ°éï¼å®¢æ·+SKU+æä»½ çè®ºæ¯æ²¡æç©æé¢æµï¼ | 
|---|
|  |  |  | OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = ObjOrder.ProductID() | 
|---|
|  |  |  | and Obj.CustomID() = ObjOrder.CustomerName() | 
|---|
|  |  |  | and Obj.CustomCode() = ObjOrder.CustomerName() | 
|---|
|  |  |  | and Obj.Month().Format( "YM2") =ObjOrder.EndDate().Format( "YM2")); | 
|---|
|  |  |  | if ( not isnull(OrderForecast)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := ObjOrder.ProductID(), | 
|---|
|  |  |  | Month := ObjOrder.EndDate(), | 
|---|
|  |  |  | CustomID := ObjOrder.CustomerName(), | 
|---|
|  |  |  | CustomCode := ObjOrder.CustomerName(), | 
|---|
|  |  |  | CustomName := ObjOrder.CustomerName(), | 
|---|
|  |  |  | OrderCode := "-", | 
|---|
|  |  |  | ForecatsQty :=0, | 
|---|
|  |  |  | ForecastQty := 0, | 
|---|
|  |  |  | ForecatsRealQty :=nForecastQtyNew, | 
|---|
|  |  |  | Unit := ObjOrder.UnitOfMeasureName()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | nNoHaveForecastQty:=0;//äºé¢æµæ°é | 
|---|
|  |  |  | // è·å颿µæ°éï¼å®¢æ·+SKU+æä»½ çè®ºæ¯æ²¡æç©æé¢æµï¼ | 
|---|
|  |  |  | OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU | 
|---|
|  |  |  | and Obj.CustomID() = CustomerCode | 
|---|
|  |  |  | and Obj.CustomCode() = CustomerCode | 
|---|
|  |  |  | and Obj.Month().Format( "YM2") = Date::ActualDate().Format( "YM2")); | 
|---|
|  |  |  | if ( not isnull(OrderForecast)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := SKU, | 
|---|
|  |  |  | Month := Date::ActualDate(), | 
|---|
|  |  |  | CustomID := CustomerCode, | 
|---|
|  |  |  | CustomCode := CustomerCode, | 
|---|
|  |  |  | CustomName := CustomName, | 
|---|
|  |  |  | OrderCode := "-", | 
|---|
|  |  |  | ForecatsQty :=0, | 
|---|
|  |  |  | ForecastQty := 0, | 
|---|
|  |  |  | ForecatsRealQty :=nForecastQtyNew, | 
|---|
|  |  |  | Unit := Unit); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | for ( x := 1; x <= 10; x := x + 1 ) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Owner.H_OrderForecastRealQty(relnew,ID := "AAAAA_"+ x.AsQUILL(),SKU := "OTN-01-ACC-00"+ x.AsQUILL() , Month := Date::ActualDate(),CustomName := "å°ç±³", | 
|---|
|  |  |  | CustomID := "XM0001",OrderCode:="OD0001",ForecatsQty:=1000,ForecatsRealQty:=1000, Unit := "PCS"); | 
|---|
|  |  |  | CustomCode := "XM0001",ForecastQty := 1000,ForecatsRealQty:=1000, Unit := "PCS"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //H_FunctionClass := Owner.H_FunctionClass(relnew,VCode_Material := VCode,UpdateTime_Material := Date::ActualDate()); | 
|---|
| ¶Ô±ÈÐÂÎļþ | 
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: #root | 
|---|
|  |  |  | Attribute CustomCode | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.174571651][414724.0.174571650][414724.0.174571652]' | 
|---|
|  |  |  | Description: '客æ·IDï¼å¯ä¸å»ºä¹ä¸' | 
|---|
|  |  |  | ValueType: String | 
|---|
|  |  |  | } | 
|---|
| ¶Ô±ÈÐÂÎļþ | 
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: #root | 
|---|
|  |  |  | Attribute Department | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.174571661][414724.0.174571660][414724.0.174571662]' | 
|---|
|  |  |  | Description: 'é¨é¨ï¼æ²¡æä»·å¼ï¼æ¾ç¤ºä½¿ç¨' | 
|---|
|  |  |  | ValueType: String | 
|---|
|  |  |  | } | 
|---|
| ÎļþÃû´Ó _Main/BL/Type_H_OrderForecastRealQty/Attribute_ForecatsQty.qbl ÐÞ¸Ä | 
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: #root | 
|---|
|  |  |  | Attribute ForecatsQty | 
|---|
|  |  |  | Attribute ForecastQty | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.46380358][414724.0.46380357][414724.0.46380359]' | 
|---|
|  |  |  | Description: '颿µæ°é' | 
|---|
|  |  |  | 
|---|
|  |  |  | Attribute Month | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.46380308][414724.0.46380307][414724.0.46380309]' | 
|---|
|  |  |  | Description: 'æä»½' | 
|---|
|  |  |  | Description: 'æä»½ï¼å¯ä¸é®ä¹ä¸' | 
|---|
|  |  |  | ValueType: Date | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | Attribute SKU | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.46380348][414724.0.46380347][414724.0.46380349]' | 
|---|
|  |  |  | Description: 'SKUç¼ç ' | 
|---|
|  |  |  | Description: 'SKUç¼ç ï¼å¯ä¸é®ä¹ä¸' | 
|---|
|  |  |  | ValueType: String | 
|---|
|  |  |  | } | 
|---|
| ¶Ô±ÈÐÂÎļþ | 
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: #root | 
|---|
|  |  |  | Attribute SKUName | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.174572228][414724.0.174572227][414724.0.174572229]' | 
|---|
|  |  |  | Description: 'SKUåç§°' | 
|---|
|  |  |  | ValueType: String | 
|---|
|  |  |  | } | 
|---|
| ¶Ô±ÈÐÂÎļþ | 
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: #root | 
|---|
|  |  |  | Attribute StockingPointID | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.174571671][414724.0.174571670][414724.0.174571672]' | 
|---|
|  |  |  | Description: 'åºåç¹ï¼æ²¡æä»·å¼ï¼æ¾ç¤ºä½¿ç¨' | 
|---|
|  |  |  | ValueType: String | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | Attribute Unit | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.46380378][414724.0.46380377][414724.0.46380379]' | 
|---|
|  |  |  | Description: 'åä½' | 
|---|
|  |  |  | Description: 'åä½ï¼æ²¡æä»·å¼ï¼æ¾ç¤ºä½¿ç¨' | 
|---|
|  |  |  | ValueType: String | 
|---|
|  |  |  | } | 
|---|
| ¶Ô±ÈÐÂÎļþ | 
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: #root | 
|---|
|  |  |  | Attribute VCode | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '3[414724.0.174571641][414724.0.174571640][414724.0.174571642]' | 
|---|
|  |  |  | Description: 'çæ¬å·ï¼ææ¶ä¸éç¨ï¼é»è®¤-' | 
|---|
|  |  |  | ValueType: String | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | [* | 
|---|
|  |  |  | if( not isnull( selection)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | // é¢æµè®¢ååºæ¬ä¿¡æ¯ | 
|---|
|  |  |  | CustomCode:=""; | 
|---|
|  |  |  | CustomName:=""; | 
|---|
|  |  |  | SValueJsonString:=""; | 
|---|
|  |  |  | // è·å客æ·åç§°å客æ·ID | 
|---|
|  |  |  | if(txtSaveForecastData_FM.Text().Length()>0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | jForecast := JSON::Parse( txtSaveForecastData_FM.Text()); | 
|---|
|  |  |  | CustomCode := jForecast.Get( "CustomCode").GetString(); | 
|---|
|  |  |  | CustomName := jForecast.Get( "CustomName").GetString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(selection.MaterialType()="åæå") | 
|---|
|  |  |  | { | 
|---|
|  |  |  | OrderCode:=""; | 
|---|
|  |  |  | ForecastID:=""; | 
|---|
|  |  |  | if( txtSaveForecastData_FM.Text().Length()>0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | JForecast := JSON::Parse( txtSaveForecastData_FM.Text()); | 
|---|
|  |  |  | OrderCode := JForecast.Get( "OrderCode").GetString(); | 
|---|
|  |  |  | JForecast := JSON::Parse(txtSaveForecastData_FM.Text()); | 
|---|
|  |  |  | ForecastID := JForecast.Get( "ForecastID").GetString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), OrderCode,"-",selection.NeedDate()); | 
|---|
|  |  |  | jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), ForecastID,"-",selection.NeedDate()); | 
|---|
|  |  |  | if(jResult.Get( "Status").GetBoolean()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " +  selection.SKU().AsQUILL() | 
|---|
|  |  |  | + " and object.ForecastID() = " + OrderCode.AsQUILL() | 
|---|
|  |  |  | + " and object.ForecastID() = " + ForecastID.AsQUILL() | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | // å¼¹åºç©æåç¾ææ | 
|---|
|  |  |  | SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect"); | 
|---|
|  |  |  | if(not isnull(selection)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | SValueJsonString:= JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "MaterialName",selection.MaterialName()) | 
|---|
|  |  |  | .Add( "MaterialType",selection.MaterialType()) | 
|---|
|  |  |  | .Add( "OrgCode",selection.OrgCode()) | 
|---|
|  |  |  | .Add( "Unit",selection.Unit()) | 
|---|
|  |  |  | .Add( "CustomCode",CustomCode) | 
|---|
|  |  |  | .Add( "ParentSKU",lb_SUK_FM.Text()) | 
|---|
|  |  |  | .Add( "CustomName",CustomName).Build().AsString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(isnull( SelectItem)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | MacroPlan.H_MessagePassing(relnew,FKey := "FrmMaterial",ItemKey := "ListSelect", ValueJsonString:=SValueJsonString); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | SelectItem.ValueJsonString( SValueJsonString); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Application.OpenForm( "FrmAuthorizeAndCountersign_Material","modal"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | *] | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if( SelectItem.ValueJsonString().Length()>0) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | txtSaveForecastData_FM.Text(  SelectItem.ValueJsonString()); | 
|---|
|  |  |  | JSelect := JSON::Parse( SelectItem.ValueJsonString()); | 
|---|
|  |  |  | txtSaveForecastData_FM.Text(SelectItem.ValueJsonString()); | 
|---|
|  |  |  | JSelect := JSON::Parse(SelectItem.ValueJsonString()); | 
|---|
|  |  |  | lb_SUK_FM.Text(JSelect.Get( "SKU").GetString()); | 
|---|
|  |  |  | de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " + JSelect.Get( "SKU").GetString().AsQUILL() | 
|---|
|  |  |  | + " and object.ForecastID() = " + JSelect.Get( "OrderCode").GetString().AsQUILL() | 
|---|
|  |  |  | + " and object.ForecastID() = " + JSelect.Get( "ForecastID").GetString().AsQUILL() | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | Taborder: 3 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Component txt_QueryContent_FOF | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.172390935]' | 
|---|
|  |  |  | BaseType: 'WebEditField' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | PlaceHolder: 'æ¨¡ç³æç´¢' | 
|---|
|  |  |  | Taborder: 4 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Component btn_Query_FOF | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.172390951]' | 
|---|
|  |  |  | BaseType: 'WebButton' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | ButtonSize: 'compact' | 
|---|
|  |  |  | Description: 'æ¥è¯¢' | 
|---|
|  |  |  | Image: 'VIEW' | 
|---|
|  |  |  | Label: 'æ¥è¯¢' | 
|---|
|  |  |  | Taborder: 5 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | 
|---|
|  |  |  | BaseType: 'WebDataExtractor' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | DataType: 'structured[H_Forecast]' | 
|---|
|  |  |  | Source: 'dh_FOF_H_Forecast' | 
|---|
|  |  |  | DataType: 'structured[H_OrderForecastRealQty]' | 
|---|
|  |  |  | Source: 'dh_FOF_H_OrderForecastRealQty' | 
|---|
|  |  |  | Taborder: 0 | 
|---|
|  |  |  | Transformation: 'Elements' | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"订åç¼å·","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKUç¼ç ","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"颿µæ°é","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedTime","title":"éæ±æ¶é´","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Util","title":"åä½","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Util"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomName","title":"客æ·åç§°","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Department","title":"éå®é¨é¨","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Department"}}]' | 
|---|
|  |  |  | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Month","title":"æä»½","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Month"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomName","title":"客æ·åç§°","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKUç¼å·","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecatsQty","title":"颿µæ°é","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecatsQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecatsRealQty","title":"çº¯é¢æµæ°é","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecatsRealQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"åä½","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Department","title":"é¨é¨","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Department"}}]' | 
|---|
|  |  |  | ContextMenu: 'listContextMenu367' | 
|---|
|  |  |  | Taborder: 2 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Taborder: 7 | 
|---|
|  |  |  | Taborder: 3 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Body: | 
|---|
|  |  |  | [* | 
|---|
|  |  |  | // åå§åæ¥è¯¢åæ°æä»½ | 
|---|
|  |  |  | ds_Month_FOF.Date(Date::ActualDate()); | 
|---|
|  |  |  | // åå§å颿µæ°æ® | 
|---|
|  |  |  | JResult := H_FunctionClass::SM_InitialForcastData( MacroPlan); | 
|---|
|  |  |  | JResult := H_FunctionClass::SM_InitialForcastDataEx( MacroPlan,true,"-"); | 
|---|
|  |  |  | if(not JResult.Get( "Status").GetBoolean()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | WebMessageBox::Warning( JResult.Get( "Msg").GetString()); | 
|---|
|  |  |  | WebMessageBox::Warning( JResult.Get( "Msg").GetString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | WebMessageBox::Information( JResult.Get( "Msg").GetString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | *] | 
|---|
|  |  |  | GroupServerCalls: false | 
|---|
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: Panel351/btn_Add_Material_FOF503 | 
|---|
|  |  |  | Response OnClick ( | 
|---|
|  |  |  | H_Forecast selection | 
|---|
|  |  |  | H_OrderForecastRealQty selection | 
|---|
|  |  |  | ) id:Response_Panel351_btn_Add_Material_FOF503_OnClick_222 | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.145178766]' | 
|---|
|  |  |  | 
|---|
|  |  |  | if( isnull( SelectItem)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect", | 
|---|
|  |  |  | Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(), | 
|---|
|  |  |  | ValueJsonString := JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "Util",selection.Util()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()) | 
|---|
|  |  |  | .Add( "ForecastQty",selection.ForecastQty()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.NeedTime().AsQUILL()) | 
|---|
|  |  |  | .Add( "OrderCode",selection.OrderCode()).Build().AsString()); | 
|---|
|  |  |  | .Add( "Util",selection.Unit()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()) | 
|---|
|  |  |  | .Add( "ForecastQty",selection.ForecastQty()) | 
|---|
|  |  |  | .Add( "ForecastID",selection.ID()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName()); | 
|---|
|  |  |  | SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "Util",selection.Util()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()) | 
|---|
|  |  |  | .Add( "ForecastQty",selection.ForecastQty()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.NeedTime().AsQUILL()) | 
|---|
|  |  |  | .Add( "OrderCode",selection.OrderCode()).Build().AsString()); | 
|---|
|  |  |  | .Add( "Util",selection.Unit()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()) | 
|---|
|  |  |  | .Add( "ForecastQty",selection.ForecastQty()) | 
|---|
|  |  |  | .Add( "ForecastID",selection.ID()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime()); | 
|---|
|  |  |  | jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.ID(),"-",selection.Month()); | 
|---|
|  |  |  | if(jResult.Get( "Status").GetBoolean()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Application.OpenForm( "FrmMaterial","popout"); | 
|---|
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: Panel351/btn_Add_Order_FOF449 | 
|---|
|  |  |  | Response OnClick ( | 
|---|
|  |  |  | H_Forecast selection | 
|---|
|  |  |  | H_OrderForecastRealQty selection | 
|---|
|  |  |  | ) id:Response_Panel351_btn_Add_Order_FOF449_OnClick_880 | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.141244111]' | 
|---|
|  |  |  | 
|---|
|  |  |  | if( isnull( SelectItem)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect", | 
|---|
|  |  |  | Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(), | 
|---|
|  |  |  | ValueJsonString := JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "Util",selection.Util()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()).Build().AsString()); | 
|---|
|  |  |  | ValueJsonString := JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "Util",selection.Unit()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()).Build().AsString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName()); | 
|---|
|  |  |  | SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "Util",selection.Util()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()).Build().AsString()); | 
|---|
|  |  |  | .Add( "Util",selection.Unit()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()).Build().AsString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Application.OpenForm( "FrmAuthorizeAndCountersign_Order","modal"); | 
|---|
|  |  |  | } | 
|---|
| ¶Ô±ÈÐÂÎļþ | 
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: Panel351/btn_Query_FOF | 
|---|
|  |  |  | Response OnClick () id:Response_Panel351_btn_Query_FOF_OnClick | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.172390950]' | 
|---|
|  |  |  | CanBindMultiple: false | 
|---|
|  |  |  | DefinitionID: 'Responsedef_WebButton_OnClick' | 
|---|
|  |  |  | QuillAction | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Body: | 
|---|
|  |  |  | [* | 
|---|
|  |  |  | de_dh_FOF_H_Foecast.FixedFilter( "object.SKU().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )" | 
|---|
|  |  |  | + " or " + "object.CustomName().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )" | 
|---|
|  |  |  | + " or " + "object.Unit().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )" | 
|---|
|  |  |  | + " or " + "object.Department().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )" | 
|---|
|  |  |  | + " or " + "object.StockingPointID().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )" | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | *] | 
|---|
|  |  |  | GroupServerCalls: false | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | Quintiq file version 2.0 | 
|---|
|  |  |  | #parent: liH_Forecast | 
|---|
|  |  |  | Response OnDoubleClick ( | 
|---|
|  |  |  | H_Forecast selection | 
|---|
|  |  |  | H_OrderForecastRealQty selection | 
|---|
|  |  |  | ) id:Response_liH_Forecast_OnDoubleClick | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.111761136]' | 
|---|
|  |  |  | 
|---|
|  |  |  | if( isnull( SelectItem)) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect", | 
|---|
|  |  |  | Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(), | 
|---|
|  |  |  | ValueJsonString := JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "Util",selection.Util()) | 
|---|
|  |  |  | .Add( "Util",selection.Unit()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()) | 
|---|
|  |  |  | .Add( "ForecastQty",selection.ForecastQty()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.NeedTime().AsQUILL()) | 
|---|
|  |  |  | .Add( "OrderCode",selection.OrderCode()).Build().AsString()); | 
|---|
|  |  |  | .Add( "ForecastID",selection.ID()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName()); | 
|---|
|  |  |  | SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU()) | 
|---|
|  |  |  | .Add( "Util",selection.Util()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()) | 
|---|
|  |  |  | .Add( "ForecastQty",selection.ForecastQty()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.NeedTime().AsQUILL()) | 
|---|
|  |  |  | .Add( "OrderCode",selection.OrderCode()).Build().AsString()); | 
|---|
|  |  |  | .Add( "Util",selection.Unit()) | 
|---|
|  |  |  | .Add( "CustomCode",selection.CustomCode()) | 
|---|
|  |  |  | .Add( "CustomName",selection.CustomName()) | 
|---|
|  |  |  | .Add( "ForecastQty",selection.ForecastQty()) | 
|---|
|  |  |  | .Add( "ForecastID",selection.ID()) | 
|---|
|  |  |  | .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime()); | 
|---|
|  |  |  | jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.ID(),"-",selection.Month()); | 
|---|
|  |  |  | if(jResult.Get( "Status").GetBoolean()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Application.OpenForm( "FrmMaterial","popout"); | 
|---|
|  |  |  | 
|---|
|  |  |  | BaseType: 'WebForm' | 
|---|
|  |  |  | Children: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | #child: Panel849 | 
|---|
|  |  |  | #child: list_ForecastView_FOF | 
|---|
|  |  |  | Component dh_FOF_Data | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.86151860]' | 
|---|
|  |  |  | BaseType: 'WebDataHolder' | 
|---|
|  |  |  | Databinding: 'structured[SalesDemandBase]*' | 
|---|
|  |  |  | Children: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Component de_dh_FOF_Data | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.86151875]' | 
|---|
|  |  |  | BaseType: 'WebDataExtractor' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | DataType: 'structured[SalesDemandBase]' | 
|---|
|  |  |  | Source: 'dh_FOF_ChildrenData' | 
|---|
|  |  |  | Taborder: 0 | 
|---|
|  |  |  | Transformation: 'Elements' | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Component DataExtractor819 | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.107645127]' | 
|---|
|  |  |  | BaseType: 'WebDataExtractor' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | DataType: 'MacroPlan' | 
|---|
|  |  |  | Source: 'MacroPlan' | 
|---|
|  |  |  | Taborder: 1 | 
|---|
|  |  |  | Transformation: 'SalesDemand' | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Taborder: 4 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #child: Panel961 | 
|---|
|  |  |  | Component dh_FOF_ChildrenData | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.106541535]' | 
|---|
|  |  |  | BaseType: 'WebDataHolder' | 
|---|
|  |  |  | Databinding: 'structured[SalesDemandBase]*' | 
|---|
|  |  |  | Children: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Component de_FOF_ChildrenData_0 | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.106541577]' | 
|---|
|  |  |  | BaseType: 'WebDataExtractor' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | DataType: 'structured[Product_MP]' | 
|---|
|  |  |  | Source: 'ApplicationMacroPlanner.DataHolderProduct' | 
|---|
|  |  |  | Taborder: 0 | 
|---|
|  |  |  | Transformation: 'Elements.SalesDemand' | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Component de_FOF_ChildrenData_1 | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.106541594]' | 
|---|
|  |  |  | BaseType: 'WebDataExtractor' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | DataType: 'structured[StockingPoint_MP]' | 
|---|
|  |  |  | Source: 'ApplicationMacroPlanner.DataHolderStockingPoint' | 
|---|
|  |  |  | Taborder: 1 | 
|---|
|  |  |  | Transformation: 'Elements.SalesDemand' | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Component de_FOF_ChildrenData_2 | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.106541611]' | 
|---|
|  |  |  | BaseType: 'WebDataExtractor' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | DataType: 'structured[SalesSegment_MP]' | 
|---|
|  |  |  | Source: 'ApplicationMacroPlanner.DataHolderSalesSegment' | 
|---|
|  |  |  | Taborder: 2 | 
|---|
|  |  |  | Transformation: 'Elements.SalesDemand' | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Taborder: 3 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Component dh_FOF_H_Forecast | 
|---|
|  |  |  | Component dh_FOF_H_OrderForecastRealQty | 
|---|
|  |  |  | { | 
|---|
|  |  |  | #keys: '[414724.0.109053093]' | 
|---|
|  |  |  | BaseType: 'WebDataHolder' | 
|---|
|  |  |  | Databinding: 'structured[H_Forecast]*' | 
|---|
|  |  |  | Databinding: 'structured[H_OrderForecastRealQty]*' | 
|---|
|  |  |  | Children: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Component de_dh_FOF_H_Foecast | 
|---|
|  |  |  | 
|---|
|  |  |  | DataType: 'MacroPlan' | 
|---|
|  |  |  | Source: 'MacroPlan' | 
|---|
|  |  |  | Taborder: 0 | 
|---|
|  |  |  | Transformation: 'H_Forecast' | 
|---|
|  |  |  | Transformation: 'H_OrderForecastRealQty' | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Taborder: 6 | 
|---|
|  |  |  | Taborder: 2 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #child: liH_Forecast | 
|---|
|  |  |  | 
|---|
|  |  |  | BaseType: 'WebButton' | 
|---|
|  |  |  | Properties: | 
|---|
|  |  |  | [ | 
|---|
|  |  |  | Image: 'HORSE' | 
|---|
|  |  |  | Label: '订åå²å' | 
|---|
|  |  |  | Taborder: 3 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|