Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lmj
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute CurrencyID |
| | | { |
| | | #keys: '3[414502.0.397320037][414502.0.397320036][414502.0.397320038]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute UnitOfMeasure_MPID |
| | | { |
| | | #keys: '3[414502.0.397254634][414502.0.397254633][414502.0.397254635]' |
| | | ValueType: String |
| | | } |
| | |
| | | #parent: #root |
| | | Method SynchronizeDataToMacroPlan ( |
| | | MacroPlan macroPlan, |
| | | Boolean isUnitOfMeasure_MP |
| | | String executionUser, |
| | | Boolean isUnitOfMeasure_MP, |
| | | Boolean isCustomOrder |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | if ( isUnitOfMeasure_MP ) { |
| | | Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan ); |
| | | } |
| | | |
| | | if ( isCustomOrder ) { |
| | | Global_MappingCustomOrder::SynchronizeMacroPlanData( this, macroPlan, executionUser ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateCustomOrder ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse ( globalOTDTable, Global_MappingCustomOrder, gmco ) { |
| | | targetProduct_MP := Global_MappingCustomOrder::GetProduct_MP( macroPlan, gmco ); |
| | | targetStockingPoint_MP := Global_MappingCustomOrder::GetStockingPoing_MP( macroPlan, gmco ); |
| | | Global_MappingCustomOrder::GetSalesSegment_MP( macroPlan, gmco ); |
| | | Global_MappingCustomOrder::GetCurrency_MP( macroPlan, gmco ); |
| | | Global_MappingCustomOrder::GetUnitOfMeasure_MP( macroPlan, gmco ); |
| | | |
| | | targetCustomerOrder := CustomerOrder::Create( targetProduct_MP, |
| | | targetStockingPoint_MP, |
| | | gmco.ID(), |
| | | gmco.OrderDate(), |
| | | gmco.Quantity(), |
| | | gmco.Price(), |
| | | "Normal", |
| | | gmco.SalesSegmentName(), |
| | | gmco.CurrencyID(), |
| | | gmco.UnitOfMeasureName(), |
| | | false, |
| | | gmco.Customer(), |
| | | gmco.CustomerID(), |
| | | gmco.OrderID(), |
| | | gmco.OrderLineID(), |
| | | true, |
| | | true, |
| | | false |
| | | ); |
| | | targetCustomerOrder.BusinessType( gmco.BusinessType() ); |
| | | targetCustomerOrder.OrderType( gmco.OrderType() ); |
| | | targetCustomerOrder.IsAvailable( gmco.IsAvailable() ); |
| | | targetCustomerOrder.ProductGrade( gmco.ProductGrade() ); |
| | | targetCustomerOrder.SegmentPriority( gmco.SegmentPriority() ); |
| | | targetCustomerOrder.SheetProfitability( gmco.SheetProfitability() ); |
| | | targetCustomerOrder.OrderTime( gmco.OrderTime() ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetCurrency_MP ( |
| | | MacroPlan macroPlan, |
| | | Global_MappingCustomOrder gmco |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | isExists := exists( macroPlan, Currency_MP, tempCMP, tempCMP.ID() = gmco.CurrencyID() ); |
| | | |
| | | if ( not isExists ) { |
| | | Currency_MP::Create( gmco.CurrencyID(), macroPlan, gmco.CurrencyID(), "", false, false ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetProduct_MP ( |
| | | MacroPlan macroPlan, |
| | | Global_MappingCustomOrder gmco |
| | | ) as Product_MP |
| | | { |
| | | TextBody: |
| | | [* |
| | | targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = gmco.ProductID() ); |
| | | if ( isnull( targetProduct_MP ) ) { |
| | | targetProduct_MP := Product_MP::Create( gmco.ProductID(), macroPlan, null( Product_MP ), gmco.ProductID(), null( SupplyChainView ), 0, 0, false ); |
| | | } |
| | | |
| | | return targetProduct_MP; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetSalesSegment_MP ( |
| | | MacroPlan macroPlan, |
| | | Global_MappingCustomOrder gmco |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | isExists := exists( macroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = gmco.SalesSegmentName() ); |
| | | |
| | | if ( not isExists ) { |
| | | SalesSegment_MP::Create( macroPlan, "", gmco.SalesSegmentName(), 0, false ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetStockingPoing_MP ( |
| | | MacroPlan macroPlan, |
| | | Global_MappingCustomOrder gmco |
| | | ) as StockingPoint_MP |
| | | { |
| | | TextBody: |
| | | [* |
| | | targetStockingPoint_MP := select( macroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = gmco.StockingPointID() ); |
| | | if ( isnull( targetStockingPoint_MP ) ) { |
| | | targetStockingPoint_MP := StockingPoint_MP::Create( gmco.StockingPointID(), macroPlan, null( Unit ), gmco.StockingPointID(), null( SupplyChainView ), 0, 0, false ); |
| | | } |
| | | |
| | | return targetStockingPoint_MP; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetUnitOfMeasure_MP ( |
| | | MacroPlan macroPlan, |
| | | Global_MappingCustomOrder gmco |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | isExists := exists( macroPlan, UnitOfMeasure_MP, tempUOMMP, tempUOMMP.Name() = gmco.UnitOfMeasureName() ); |
| | | |
| | | if ( not isExists ) { |
| | | UnitOfMeasure_MP::Create( macroPlan, gmco.UnitOfMeasureName(), false, false ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeMacroPlanData ( |
| | | GlobalOTDTable globalOTDTable, |
| | | MacroPlan macroPlan, |
| | | String executionUser |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew, |
| | | Name := "åæ¥è®¢åæ°æ®", |
| | | IsSuccess := true, |
| | | ExecuteUser := executionUser |
| | | ); |
| | | |
| | | Global_MappingCustomOrder::CreateCustomOrder( globalOTDTable, macroPlan ); |
| | | try { |
| | | |
| | | global_BrokerExecuteLog.ExecutionStatus( "Complete" ); |
| | | global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) ); |
| | | } onerror { |
| | | global_BrokerExecuteLog.IsSuccess( false ); |
| | | global_BrokerExecuteLog.ErrorNo( e.ErrorNr() ); |
| | | global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() ); |
| | | global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) ); |
| | | global_BrokerExecuteLog.ExecutionStatus( "Complete" ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | strMsg :=""; |
| | | |
| | | try{ |
| | | if( Owner.MappingBOM(relsize )>0) |
| | | if( GlobData.Global_MappingOperationBOM(relsize )>0) |
| | | { |
| | | // å¾å°ä¸ä¸çº§æ°æ® |
| | | AllData:= selectset( GlobData, Global_MappingOperationBOM,object,object.ComponentCode()=ParentSKU); |
| | | AllData:= selectset( GlobData, Global_MappingOperationBOM,object,object.ProductCode()=ParentSKU); |
| | | ObjProduct := null( Product_MP,constcontent ); |
| | | ObjUnit := null( Unit,constcontent ); |
| | | MaterialType:=""; |
| | |
| | | traverse( AllData,Elements,Obj,not isnull( Obj)) |
| | | { |
| | | // å¾å°å½åå·²åå¨çç©æä¿¡æ¯ï¼è®¢åID + SKUï¼ |
| | | ObjMaterial := select( Owner,H_MaterialInfo,ObjM,ObjM.ForecastID()=ForecastId and ObjM.SKU()=Obj.ProductCode()); |
| | | ObjMaterial := select( Owner,H_MaterialInfo,ObjM,ObjM.ForecastID()=ForecastId and ObjM.SKU()=Obj.ComponentCode()); |
| | | if( isnull( ObjMaterial)) |
| | | { |
| | | // ç©æç±»å |
| | | MaterialType := Obj.ProductType(); |
| | | // å¾å°ç©æä¿¡æ¯ |
| | | ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner,Obj.ProductCode()); |
| | | ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner,Obj.ComponentCode()); |
| | | if( not isnull( ObjProduct)) |
| | | { |
| | | MaterialType:= ObjProduct.ParentID(); |
| | | MaterialName:=ObjProduct.Name(); |
| | | } |
| | | ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ProductCode()); |
| | | ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ComponentCode()); |
| | | if( not isnull( ObjUnit)) |
| | | { |
| | | StockPoint:= ObjUnit.Name(); |
| | | } |
| | | Owner.H_MaterialInfo(relnew,ParentSKU := Obj.ComponentCode(),SKU := Obj.ProductCode(),ForecastID := ForecastId,OrgCode := Obj.OrganCode(),VCode := VCode |
| | | Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := Obj.ComponentCode(),ForecastID := ForecastId,OrgCode := Obj.OrganCode(),VCode := VCode |
| | | ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := MaterialType,NeedDate := NDate |
| | | ,NeedQty := [Number](ProductQty/NRate*NComponentsUsed).Round( 0),Unit := Obj.UnitOfMeasureName() |
| | | ,StockPoint :=StockPoint,MaterialName := MaterialName ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SM_OrderHedgingEx ( |
| | | MacroPlan Owner, |
| | | String Operator |
| | | ) as owning JSON |
| | | { |
| | | Description: '填产åå²å' |
| | | TextBody: |
| | | [* |
| | | /*******************************填产å订åå²å*********************** |
| | | *彿°åç§°ï¼SM_OrderHedgingEx |
| | | *å 建 人ï¼yunying |
| | | *å建æ¶é´ï¼2023-09-27 |
| | | *æ è¿°ï¼å¡«äº§å订åå²å,填产åç表ï¼Owner.FillingCapacityOrder |
| | | *å æ°ï¼Operator æä½äºº |
| | | *è¿ å å¼ï¼JSON {Status: true æå/false 失败,Msg:"æç¤ºæ¶æ¯",Count: 0ï¼å²å订åçæ°éï¼} |
| | | *******************************************************************/ |
| | | // åå§åç»æ |
| | | bStatus := false; |
| | | strMsg :=""; |
| | | // å²åæåæ¡æ° |
| | | nCount:=0; |
| | | try |
| | | { |
| | | if(not isnull( Owner)) |
| | | { |
| | | // è·åæä½è®¢å |
| | | NewOrders := selectset( Owner,FillingCapacityOrder,Obj,Obj.State() = "æªå²å" or Obj.State() =""); |
| | | if(NewOrders.Size()>0) |
| | | { |
| | | // æ°è®¢åä¸å订åå²å |
| | | traverse( NewOrders,Elements,Obj) |
| | | { |
| | | if( (Obj.OrderType()="åç¾" or Obj.OrderType()="ææ") and Obj.Quantity()>0 ) |
| | | { |
| | | // å¾å°æä½ç¸å
³çåç¾è®¢å |
| | | ROrders:= select( Owner,SalesDemand.astype( CustomerOrder ),ObjOrder, |
| | | ObjOrder.CustomerName() = Obj.Customer() |
| | | and ObjOrder.ProductID()=Obj.ProductID() |
| | | and ObjOrder.OrderTag() ="åç¾" |
| | | ); |
| | | // åç¾æ å²åï¼ç´æ¥å订åä¸å å
¥åç¾æ°æ® |
| | | if( Obj.OrderType()="åç¾") |
| | | { |
| | | if( not isnull( ROrders)) |
| | | { |
| | | ROrders.Quantity(ROrders.Quantity()+Obj.Quantity()); |
| | | } |
| | | else |
| | | { |
| | | // æ°å¢è®¢å |
| | | error( "----------------请å®ç°æ°å¢åç¾è®¢ååè½ä»£ç ---------------------"); |
| | | // 订åå¿
è¦ä¿¡æ¯å¦ä¸ï¼ |
| | | // OrderTag = "åç¾" |
| | | // Quantity = Obj.Quantity() |
| | | // å
¶ä»ä¿¡æ¯ç»§æ¿å½åç订å |
| | | } |
| | | } |
| | | else if(Obj.OrderType()="ææ") |
| | | { |
| | | // å¾å°æä½ç¸å
³çææè®¢å |
| | | AOrders:= select( Owner,SalesDemand.astype( CustomerOrder ),ObjOrder, |
| | | ObjOrder.CustomerName() = Obj.Customer() |
| | | and ObjOrder.ProductID()=Obj.ProductID() |
| | | and ObjOrder.OrderTag() ="ææ" |
| | | ); |
| | | if( not isnull( ROrders)) |
| | | { |
| | | // å½ååç¾æ°é |
| | | RQty:=ROrders.Quantity(); |
| | | // è®¡ç®æ°çæææ°é |
| | | AQty:= Obj.Quantity() - ROrders.Quantity(); |
| | | // ææå¤§äº0ï¼åç¾è¢«å²æ²¡,å¦åææè¢«å²ï¼åç¾çäºAQtyçç»å¯¹å¼ |
| | | if( AQty>=0) |
| | | { |
| | | RQty:=0; |
| | | } |
| | | else |
| | | { |
| | | RQty :=ROrders.Quantity() - Obj.Quantity(); |
| | | AQty :=0; |
| | | } |
| | | // æ´æ°åç¾æ°æ® |
| | | if( RQty>=0) |
| | | { |
| | | ROrders.Quantity(RQty); |
| | | } |
| | | else |
| | | { |
| | | ROrders.Delete(); |
| | | } |
| | | // æ´æ°æææ°æ® |
| | | if(AQty>0 ) |
| | | { |
| | | if( not isnull( AOrders)) |
| | | { |
| | | AOrders.Quantity(AOrders.Quantity()+AQty); |
| | | } |
| | | // æ°å¢ææè®¢å |
| | | // error( "----------------请å®ç°æ°å¢ææè®¢ååè½ä»£ç ---------------------"); |
| | | customOrder := CustomerOrder::Create( select( Owner, Product_MP, tmepPMP, tmepPMP.ID() = Obj.ProductID() ), |
| | | select( Owner, StockingPoint_MP, tempSPMP, tempSPMP.ID() = Obj.StockingPointID() ), |
| | | OS::GenerateGUIDAsString(), |
| | | Obj.OrderDate(), |
| | | AQty, |
| | | 0.0, |
| | | "Normal", |
| | | Obj.SalesSegmentName(), |
| | | Obj.CurrencyID(), |
| | | Obj.UnitOfMeasureName(), |
| | | false, |
| | | Obj.Customer(), |
| | | Obj.CustomerID(), |
| | | "", |
| | | "", |
| | | true, |
| | | true, |
| | | false |
| | | ); |
| | | customOrder.OrderTag( "ææ" ); |
| | | // 订åå¿
è¦ä¿¡æ¯å¦ä¸ï¼ |
| | | // OrderTag = "ææ" |
| | | // Quantity = AQty |
| | | // å
¶ä»ä¿¡æ¯ç»§æ¿å½åç订å |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // å°æ°æææ°æ®ç´¯å å°è®¢åä¸ |
| | | if( not isnull( AOrders)) |
| | | { |
| | | AOrders.Quantity(AOrders.Quantity()+Obj.Quantity()); |
| | | } |
| | | else |
| | | { |
| | | // æ°å¢ææè®¢å |
| | | error( "----------------请å®ç°æ°å¢ææè®¢ååè½ä»£ç ---------------------"); |
| | | // 订åå¿
è¦ä¿¡æ¯å¦ä¸ï¼ |
| | | // OrderTag = "ææ" |
| | | // Quantity = Obj.Quantity() |
| | | // å
¶ä»ä¿¡æ¯ç»§æ¿å½åç订å |
| | | } |
| | | } |
| | | } |
| | | // æ´æ°å²åç¶æ |
| | | Obj.State("å·²å²å"); |
| | | nCount++; |
| | | } |
| | | else |
| | | { |
| | | // æ æ³è¯å«çç±»åï¼ææ°é为0æ¶æä¸å¤ç |
| | | //strMsg :="订åç±»åï¼" + Obj.OrderType() + "æ æ³å²åï¼"; |
| | | } |
| | | } |
| | | bStatus:=true; |
| | | strMsg :="填产åå²å宿ï¼"; |
| | | } |
| | | else |
| | | { |
| | | strMsg :="æ å¯å²åçæ°æ®ï¼"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | strMsg :="å è½½æ°æ®å¤±è´¥ï¼è¯·å建æéæ©åºæ¯ååæä½ï¼"; |
| | | } |
| | | } |
| | | onerror |
| | | { |
| | | strMsg :="填产å订åå²ååçé误ï¼è¯·è系系ç»ç®¡çåï¼"; |
| | | // è®°å½é误æ¥å¿ |
| | | // Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_OrderHedgingEx", |
| | | // DeveloperInformation := e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(), |
| | | // GeneralInformation := e.GeneralInformation()); |
| | | } |
| | | return JSON::Object().Add( "Status",bStatus) |
| | | .Add( "Count",nCount) |
| | | .Add( "Msg",strMsg).Build(); |
| | | *] |
| | | } |
| | |
| | | nReverseQtyNew :=0; //计ç®åçåç¾æ°é |
| | | nAuthorizeQtyNew :=0; //计ç®åçæææ°é |
| | | nHaveForecastQty :=0; //æé¢æµæ°é |
| | | nNoHaveForecastQty:=0;//äºé¢æµæ°é |
| | | nNoHaveForecastQty:=0;//æ 颿µæ°é |
| | | // è·å颿µæ°éï¼å®¢æ·+SKU+æä»½ çè®ºæ¯æ²¡æç©æé¢æµï¼ |
| | | OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU |
| | | and Obj.CustomCode() = CustomerCode |
| | |
| | | [* |
| | | // Administrator Aug-21-2023 (created) |
| | | // list to deal |
| | | listtodeal := construct( structured[MappingOperation] ); |
| | | listtodeal := construct( structured[Global_MappingOperation] ); |
| | | |
| | | if( isnull( businesstypes ) or businesstypes.Size() = 0 ) { |
| | | listtodeal := selectset( this, MappingOperation, item, true ); |
| | | listtodeal := selectset( globalOTDTable, Global_MappingOperation, item, true ); |
| | | } else { |
| | | organcodelist := selectvalues( globalOTDTable, BusinessType.OrganCode, organ, businesstypes.Find( organ.BusinessType().BusinessTypeName() ) <> -1, organ.OrganCodeName() ); |
| | | listtodeal := selectset( this, |
| | | MappingOperation, |
| | | listtodeal := selectset( globalOTDTable, Global_MappingOperation, |
| | | item, |
| | | ( businesstypes.Find( item.BusinessType() ) <> -1 ) and |
| | | ( organcodelist.Find( item.OrganCode() ) >= 0 ) ); |
| | | } |
| | | |
| | | // Get the list to deal with max sequence number |
| | | listtodealwithmaxsn := construct( structured[MappingOperation] ); |
| | | listtodealwithmaxsn := construct( structured[Global_MappingOperation] ); |
| | | traverse( listtodeal, Elements, item ){ |
| | | maxsn := maxselect( this, |
| | | MappingOperation, |
| | | maxsn := maxselect( globalOTDTable, Global_MappingOperation, |
| | | moperation, |
| | | moperation.OrganCode() = item.OrganCode(), |
| | | moperation.ProductID() = item.ProductID(), |
| | |
| | | if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){ |
| | | info( "Now is dealing with the " + count.AsQUILL() + "OperationCost " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" ); |
| | | } |
| | | id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection(); |
| | | id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection()+"_" + [String]item.SequenceNumber(); |
| | | if( guard( item.Line(), "" ).Length() > 0 ) { |
| | | id := id + "_" + item.Line(); |
| | | } |
| | |
| | | isfromdb := false; |
| | | existoperationcost := OperationCost::FindOperationCostTypeIndex( id ); |
| | | if( isnull( existoperationcost ) ){ |
| | | connecteditem := select( this, |
| | | MappingOperationCost, |
| | | connecteditem := select( globalOTDTable, |
| | | Global_MappingOperationCost, |
| | | moperationcost, |
| | | moperationcost.OrgCode() = item.OrganCode(), |
| | | moperationcost.ProductID() = item.ProductID() ); |
| | |
| | | DataBinding: 'DataHolderFillingCapacityOrder.Data.Quantity' |
| | | Label: 'æ°é' |
| | | Mask: 'REAL' |
| | | Taborder: 12 |
| | | Taborder: 13 |
| | | ] |
| | | } |
| | | Component dropDownStringListUnitOfMeasureName id:dropDownStringListUnitOfMeasureName_750 |
| | |
| | | DataBinding: 'DataHolderFillingCapacityOrder.Data.SalesAmount' |
| | | Label: 'éå®é¢' |
| | | Mask: 'NUMBER' |
| | | Taborder: 13 |
| | | Taborder: 14 |
| | | ] |
| | | } |
| | | Component dsDemandDate |
| | |
| | | [ |
| | | DataBinding: 'DataHolderFillingCapacityOrder.Data.DemandDate' |
| | | Label: 'éæ±æ¥æ' |
| | | Taborder: 15 |
| | | Taborder: 16 |
| | | ] |
| | | } |
| | | Component dsForecastDemandDate |
| | |
| | | [ |
| | | DataBinding: 'DataHolderFillingCapacityOrder.Data.ForecastDemandDate' |
| | | Label: 'é¢æéæ±æ¥æ' |
| | | Taborder: 14 |
| | | Taborder: 15 |
| | | ] |
| | | } |
| | | Component ddlSalesSegment |
| | |
| | | [ |
| | | DataBinding: 'DataHolderFillingCapacityOrder.Data.Customer' |
| | | Label: 'Customer name' |
| | | Taborder: 10 |
| | | Taborder: 11 |
| | | ] |
| | | } |
| | | Component efCustomID |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'Customer ID' |
| | | Taborder: 11 |
| | | Taborder: 12 |
| | | ] |
| | | } |
| | | Component ddslOrderType |
| | |
| | | DataBinding: 'DataHolderFillingCapacityOrder.Data.OrderType' |
| | | Label: '订åç±»å' |
| | | Strings: 'åç¾;ææ' |
| | | Taborder: 16 |
| | | Taborder: 17 |
| | | ] |
| | | } |
| | | Component ddlCurrency_MP |
| | | { |
| | | #keys: '[414502.0.395021898]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'Currency_MP' |
| | | Children: |
| | | [ |
| | | Component deContent593 |
| | | { |
| | | #keys: '[414502.0.395021900]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'MacroPlan' |
| | | Source: 'MacroPlan' |
| | | Taborder: 0 |
| | | Transformation: 'Currency_MP' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DisplayField: 'Name' |
| | | Label: 'è´§å¸' |
| | | Taborder: 10 |
| | | ] |
| | | } |
| | | ] |
| | |
| | | ForecastDemandDate := dsForecastDemandDate.Date(), |
| | | DemandDate := dsDemandDate.Date(), |
| | | OrderType := ddslOrderType.Text(), |
| | | SalesAmount := [Number]edtSalesAmount.Text() |
| | | SalesAmount := [Number]edtSalesAmount.Text(), |
| | | CurrencyID := ddlCurrency_MP.Data().ID() |
| | | ); |
| | | } else { |
| | | data.ProductID( guard( ddlProduct_MP.Data().ID(), "null" ) ); |
| | |
| | | data.DemandDate( dsDemandDate.Date() ); |
| | | data.OrderType( ddslOrderType.Text() ); |
| | | data.SalesAmount( [Number]edtSalesAmount.Text() ); |
| | | data.CurrencyID( ddlCurrency_MP.Data().ID() ); |
| | | } |
| | | |
| | | Form.Close(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelFillingCapacityOrder/ButtonDeduct |
| | | Response OnClick () id:Response_PanelFillingCapacityOrder_ButtonDeduct_OnClick |
| | | { |
| | | #keys: '[414502.0.395021805]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( MacroPlan ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | H_FunctionClass::SM_OrderHedgingEx( MacroPlan, ApplicationMacroPlanner.GetUserName() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | CanBindMultiple: false |
| | | DefinitionID => /ListInterfaceTest/Responsedef_ListInterfaceTest_WebMenu_OnClick |
| | | Initiator: 'MenuCreateShowData' |
| | | Precondition: |
| | | [* |
| | | flag := selection.BrokerName() = "GlobalOTDTable_CustomOrder" |
| | | |
| | | if ( not flag ) { |
| | | feedback := "æä¸æ¯æï¼ï¼ï¼"; |
| | | } |
| | | |
| | | return flag; |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | |
| | | Body: |
| | | [* |
| | | GlobalOTDTable.SynchronizeDataToMacroPlan( MacroPlan, |
| | | CheckboxUnitOfMeasure_MP.Checked() |
| | | ApplicationMacroPlanner.GetUserName(), |
| | | CheckboxUnitOfMeasure_MP.Checked(), |
| | | CheckboxCustomOrder.Checked() |
| | | ); |
| | | |
| | | WebMessageBox::Success( "忥æåï¼", true ); |
| | |
| | | lb_SKUCode_FAAC.Text(SelForecast.Get( "SKU").GetString()); |
| | | lb_SKUName_FAAC.Text("产å"); |
| | | lb_Util_FAAC.Text(SelForecast.Get( "Util").GetString()); |
| | | lb_SKUName_FAAC.Text(SelForecast.Get( "SKUName").GetString()); |
| | | txt_CustomID_FAAC.Text(SelForecast.Get( "CustomCode").GetString()); |
| | | txt_CustomName_FAAC.Text(SelForecast.Get( "CustomName").GetString()); |
| | | lb_Operator_FAAC.Text(ApplicationMacroPlanner.GetUserName()); |
| | | |
| | | // 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()); |
| | | } |
| | | } |
| | | *] |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | Taborder: 2 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component Panel391 |
| | | { |
| | | #keys: '[414724.0.193860534]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component Button655 |
| | | { |
| | | #keys: '[414724.0.193860558]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'BULL' |
| | | Label: '填产å²å' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: Panel391/Button655 |
| | | Response OnClick () id:Response_Panel391_Button655_OnClick |
| | | { |
| | | #keys: '[414724.0.194975663]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return not isnull( MacroPlan); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | HResult := H_FunctionClass::SM_OrderHedgingEx( MacroPlan,"æµè¯ç¨æ·" ); |
| | | Msg := HResult.Get( "Msg").GetString(); |
| | | if( HResult.Get( "Status").GetBoolean()) |
| | | { |
| | | if( Msg.Length()>0) |
| | | { |
| | | WebMessageBox::Information(Msg); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if( Msg.Length()>0) |
| | | { |
| | | WebMessageBox::Warning(Msg); |
| | | } |
| | | else |
| | | { |
| | | WebMessageBox::Information("è¿è¡é误ï¼"); |
| | | } |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | #child: Panel391 |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | } |
| | | components |
| | | { |
| | | FormFillingCapacityOrder_PanelFillingCapacityOrder |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormFillingCapacityOrder_ListFillingCapacityOrder |
| | | { |
| | | } |
| | |
| | | dataPath: 'OrderType' |
| | | dataType: 'string' |
| | | index: 12 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | form_FormPriorityPolicy |
| | | { |
| | | title: 'QTIANMA_JITUAN::FormPriorityPolicy' |
| | | shown: true |
| | | componentID: 'QTIANMA_JITUAN::FormPriorityPolicy' |
| | | layout |
| | | { |
| | | mode: 'open' |
| | | rowPosition: 32 |
| | | rowSpan: 13 |
| | | columnPosition: 5 |
| | | columnSpan: 8 |
| | | } |
| | | components |
| | | { |
| | | FormPriorityPolicy_ListPriorityPolicy |
| | | { |
| | | } |
| | | FormPriorityPolicy_DataSetLevelPriorityPolicy |
| | | { |
| | | groupDepth: -1 |
| | | column_Name |
| | | { |
| | | columnId: 'Name' |
| | | dataPath: 'Name' |
| | | dataType: 'string' |
| | | index: 0 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Formula |
| | | { |
| | | columnId: 'Formula' |
| | | dataPath: 'Formula' |
| | | dataType: 'string' |
| | | index: 1 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_CalculateValue |
| | | { |
| | | columnId: 'CalculateValue' |
| | | dataPath: 'CalculateValue' |
| | | dataType: 'string' |
| | | index: 2 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Desc |
| | | { |
| | | columnId: 'Desc' |
| | | dataPath: 'Desc' |
| | | dataType: 'string' |
| | | index: 3 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | } |
| | | FormPriorityPolicy_PanelPriorityPolicyOperation |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormPriorityPolicy_PanelPriorityPolicyOperationButton |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormPriorityPolicy_PanelPriorityPolicyCoefficient |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | } |
| | | } |
| | | form_FormPriorityResult |
| | | { |
| | | title: 'QTIANMA_JITUAN::FormPriorityResult' |
| | | shown: true |
| | | componentID: 'QTIANMA_JITUAN::FormPriorityResult' |
| | | layout |
| | | { |
| | | mode: 'open' |
| | | rowPosition: 45 |
| | | rowSpan: 17 |
| | | columnPosition: 1 |
| | | columnSpan: 12 |
| | | } |
| | | components |
| | | { |
| | | FormPriorityResult_PanelPriorityResult |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormPriorityResult_ListPriorityResult |
| | | { |
| | | } |
| | | FormPriorityResult_DataSetLevelPriorityResult |
| | | { |
| | | groupDepth: -1 |
| | | column_SalesSegmentName |
| | | { |
| | | columnId: 'SalesSegmentName' |
| | | dataPath: 'SalesSegmentName' |
| | | dataType: 'string' |
| | | index: 0 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_ProductID |
| | | { |
| | | columnId: 'ProductID' |
| | | dataPath: 'ProductID' |
| | | dataType: 'string' |
| | | index: 1 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_StockingPointID |
| | | { |
| | | columnId: 'StockingPointID' |
| | | dataPath: 'StockingPointID' |
| | | dataType: 'string' |
| | | index: 2 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Customer |
| | | { |
| | | columnId: 'Customer' |
| | | dataPath: 'Customer' |
| | | dataType: 'string' |
| | | index: 3 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_BusinessType |
| | | { |
| | | columnId: 'BusinessType' |
| | | dataPath: 'BusinessType' |
| | | dataType: 'string' |
| | | index: 4 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Quantity |
| | | { |
| | | columnId: 'Quantity' |
| | | dataPath: 'Quantity' |
| | | dataType: 'real' |
| | | index: 5 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_UnitOfMeasureName |
| | | { |
| | | columnId: 'UnitOfMeasureName' |
| | | dataPath: 'UnitOfMeasureName' |
| | | dataType: 'string' |
| | | index: 6 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_DemandDate |
| | | { |
| | | columnId: 'DemandDate' |
| | | dataPath: 'DemandDate' |
| | | dataType: 'date' |
| | | index: 7 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityResultScore |
| | | { |
| | | columnId: 'PriorityResultScore' |
| | | dataPath: 'PriorityResultScore' |
| | | dataType: 'real' |
| | | index: 8 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | } |
| | | FormPriorityResult_PanelPriorityResultDetails |
| | | { |
| | | sizeRatio: 1 |
| | | } |
| | | FormPriorityResult_ListPriorityResultBusinessTypeDetails |
| | | { |
| | | } |
| | | FormPriorityResult_DataSetLevelPriorityResultDetails |
| | | { |
| | | groupDepth: -1 |
| | | column_SalesSegmentName |
| | | { |
| | | columnId: 'SalesSegmentName' |
| | | dataPath: 'SalesSegmentName' |
| | | dataType: 'string' |
| | | index: 0 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_StockingPointID |
| | | { |
| | | columnId: 'StockingPointID' |
| | | dataPath: 'StockingPointID' |
| | | dataType: 'string' |
| | | index: 1 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Customer |
| | | { |
| | | columnId: 'Customer' |
| | | dataPath: 'Customer' |
| | | dataType: 'string' |
| | | index: 2 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_BusinessType |
| | | { |
| | | columnId: 'BusinessType' |
| | | dataPath: 'BusinessType' |
| | | dataType: 'string' |
| | | index: 3 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Quantity |
| | | { |
| | | columnId: 'Quantity' |
| | | dataPath: 'Quantity' |
| | | dataType: 'real' |
| | | index: 4 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_UnitOfMeasureName |
| | | { |
| | | columnId: 'UnitOfMeasureName' |
| | | dataPath: 'UnitOfMeasureName' |
| | | dataType: 'string' |
| | | index: 5 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_DemandDate |
| | | { |
| | | columnId: 'DemandDate' |
| | | dataPath: 'DemandDate' |
| | | dataType: 'date' |
| | | index: 6 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityResultScore |
| | | { |
| | | columnId: 'PriorityResultScore' |
| | | dataPath: 'PriorityResultScore' |
| | | dataType: 'real' |
| | | index: 7 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityPolicyName |
| | | { |
| | | columnId: 'PriorityPolicyName' |
| | | dataPath: 'PriorityPolicyName' |
| | | dataType: 'string' |
| | | index: 8 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityFactorName |
| | | { |
| | | columnId: 'PriorityFactorName' |
| | | dataPath: 'PriorityFactorName' |
| | | dataType: 'string' |
| | | index: 9 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityFactorGradingName |
| | | { |
| | | columnId: 'PriorityFactorGradingName' |
| | | dataPath: 'PriorityFactorGradingName' |
| | | dataType: 'string' |
| | | index: 10 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityTotalScore |
| | | { |
| | | columnId: 'PriorityTotalScore' |
| | | dataPath: 'PriorityTotalScore' |
| | | dataType: 'real' |
| | | index: 11 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | } |
| | | FormPriorityResult_ListPriorityResultGroupDetails |
| | | { |
| | | } |
| | | FormPriorityResult_DataSetLevelPriorityResultDetails872 |
| | | { |
| | | groupDepth: -1 |
| | | column_SalesSegmentName |
| | | { |
| | | columnId: 'SalesSegmentName' |
| | | dataPath: 'SalesSegmentName' |
| | | dataType: 'string' |
| | | index: 0 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_StockingPointID |
| | | { |
| | | columnId: 'StockingPointID' |
| | | dataPath: 'StockingPointID' |
| | | dataType: 'string' |
| | | index: 1 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Customer |
| | | { |
| | | columnId: 'Customer' |
| | | dataPath: 'Customer' |
| | | dataType: 'string' |
| | | index: 2 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_BusinessType |
| | | { |
| | | columnId: 'BusinessType' |
| | | dataPath: 'BusinessType' |
| | | dataType: 'string' |
| | | index: 3 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Quantity |
| | | { |
| | | columnId: 'Quantity' |
| | | dataPath: 'Quantity' |
| | | dataType: 'real' |
| | | index: 4 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_UnitOfMeasureName |
| | | { |
| | | columnId: 'UnitOfMeasureName' |
| | | dataPath: 'UnitOfMeasureName' |
| | | dataType: 'string' |
| | | index: 5 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_DemandDate |
| | | { |
| | | columnId: 'DemandDate' |
| | | dataPath: 'DemandDate' |
| | | dataType: 'date' |
| | | index: 6 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityResultScore |
| | | { |
| | | columnId: 'PriorityResultScore' |
| | | dataPath: 'PriorityResultScore' |
| | | dataType: 'real' |
| | | index: 7 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityPolicyName |
| | | { |
| | | columnId: 'PriorityPolicyName' |
| | | dataPath: 'PriorityPolicyName' |
| | | dataType: 'string' |
| | | index: 8 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityFactorName |
| | | { |
| | | columnId: 'PriorityFactorName' |
| | | dataPath: 'PriorityFactorName' |
| | | dataType: 'string' |
| | | index: 9 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityFactorGradingName |
| | | { |
| | | columnId: 'PriorityFactorGradingName' |
| | | dataPath: 'PriorityFactorGradingName' |
| | | dataType: 'string' |
| | | index: 10 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_PriorityTotalScore |
| | | { |
| | | columnId: 'PriorityTotalScore' |
| | | dataPath: 'PriorityTotalScore' |
| | | dataType: 'real' |
| | | index: 11 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | form_FormPriorityFactor |
| | | { |
| | | title: 'QTIANMA_JITUAN::FormPriorityFactor' |
| | | shown: true |
| | | componentID: 'QTIANMA_JITUAN::FormPriorityFactor' |
| | | layout |
| | | { |
| | | mode: 'open' |
| | | rowPosition: 37 |
| | | rowSpan: 8 |
| | | columnPosition: 1 |
| | | columnSpan: 4 |
| | | } |
| | | components |
| | | { |
| | | FormPriorityFactor_ListPriorityFactor |
| | | { |
| | | } |
| | | FormPriorityFactor_DataSetLevelPriorityFactor |
| | | { |
| | | groupDepth: -1 |
| | | column_Name |
| | | { |
| | | columnId: 'Name' |
| | | dataPath: 'Name' |
| | | dataType: 'string' |
| | | index: 0 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Coefficient |
| | | { |
| | | columnId: 'Coefficient' |
| | | dataPath: 'Coefficient' |
| | | dataType: 'real' |
| | | index: 1 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Desc |
| | | { |
| | | columnId: 'Desc' |
| | | dataPath: 'Desc' |
| | | dataType: 'string' |
| | | index: 2 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | form_FormPriorityFactorGrading |
| | | { |
| | | title: 'QTIANMA_JITUAN::FormPriorityFactorGrading' |
| | | shown: true |
| | | componentID: 'QTIANMA_JITUAN::FormPriorityFactorGrading' |
| | | layout |
| | | { |
| | | mode: 'open' |
| | | rowPosition: 32 |
| | | rowSpan: 5 |
| | | columnPosition: 1 |
| | | columnSpan: 4 |
| | | } |
| | | components |
| | | { |
| | | FormPriorityFactorGrading_ListPriorityFactorGrading |
| | | { |
| | | } |
| | | FormPriorityFactorGrading_DataSetLevelPriorityFactorGrading |
| | | { |
| | | groupDepth: -1 |
| | | column_GradingName |
| | | { |
| | | columnId: 'GradingName' |
| | | dataPath: 'GradingName' |
| | | dataType: 'string' |
| | | index: 0 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_GradeValueStr |
| | | { |
| | | columnId: 'GradeValueStr' |
| | | dataPath: 'GradeValueStr' |
| | | dataType: 'string' |
| | | index: 1 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_GradeDesc |
| | | { |
| | | columnId: 'GradeDesc' |
| | | dataPath: 'GradeDesc' |
| | | dataType: 'string' |
| | | index: 2 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |