From 2b083591cb7d72c8c3367c0fc111a097cd36b6f3 Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期三, 21 八月 2024 10:52:56 +0800 Subject: [PATCH] 客户需求(PPA+IDS)前端设置 --- _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupDebug.def | 13 -- _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlActions.def | 40 ++++++++ _Main/BL/InfoMessages.qbl | 4 _Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl | 12 ++ _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/_ROOT_Component_DialogCustomerDemandPPAIDS.def | 23 ++++ _Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDema.qbl | 23 ++++ _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnOk_OnClick.def | 15 +++ _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick.def | 23 ++++ /dev/null | 24 ---- _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_New.def | 15 +++ _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def | 17 +++ _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def | 23 ++++ _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlContent.def | 37 +++++++ _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnCancel_OnClick.def | 15 +++ 14 files changed, 245 insertions(+), 39 deletions(-) diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl index 9e8ee99..97e2fd6 100644 --- a/_Main/BL/InfoMessages.qbl +++ b/_Main/BL/InfoMessages.qbl @@ -106,6 +106,10 @@ { DefaultText: 'application/json' } + InfoMessage InterfaceDataset_CustomerDemandPPAIDS_Name + { + DefaultText: 'Customer demand(PPA + IDS)' + } InfoMessage InterfaceDataset_FinishedEngineInventory_Name { DefaultText: 'Finished engine inventory' diff --git a/_Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDema.qbl b/_Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDema.qbl new file mode 100644 index 0000000..4d6561f --- /dev/null +++ b/_Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDema.qbl @@ -0,0 +1,23 @@ +Quintiq file version 2.0 +#parent: #root +Relation CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDemandPPAIDS +{ + #keys: '1[415136.0.1024850018]' + DefaultRelationStrategy + { + } + RelationSide.LeftSide InterfaceDataset + { + #keys: '3[415136.0.1024850020][415136.0.1024850019][415136.0.1024850021]' + Cardinality: '0to1' + ObjectDefinition: CustomerDemandPPAIDS + OwningSide: 'Reference' + } + RelationSide.RightSide CustomerDemandPPAIDS + { + #keys: '3[415136.0.1024850023][415136.0.1024850022][415136.0.1024850024]' + Cardinality: '1toN' + ObjectDefinition: InterfaceDataset + OwningSide: 'Owned' + } +} diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl index 6c951ff..afb4b46 100644 --- a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl +++ b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl @@ -1,7 +1,8 @@ Quintiq file version 2.0 #parent: #root StaticMethod GenerateData ( - MacroPlan macroplan, + const MacroPlan macroplan, + InterfaceDataset interfaceDataset, Boolean versionflag ) { @@ -9,7 +10,16 @@ TextBody: [* // 鐢勫叞楦� Aug-20-2024 (created) + interfaceDataset.CustomerDemandPPAIDS( relflush ); + nowdate := DateTime::ActualTime(); traverse( macroplan, SalesDemand.astype( Forecast ), forecast ){ + interfaceDataset.CustomerDemandPPAIDS( relnew, Product := forecast.ProductID() + , DemandDate := forecast.StartDate() + , DemandQty := [Number]forecast.Quantity() + , VersionName := macroplan.ScenarioName() + , InterfaceTime := nowdate + , VersionFlag := versionflag + ); } *] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupDebug.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupDebug.def index 3006f58..a24dc49 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupDebug.def +++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupDebug.def @@ -31,19 +31,6 @@ Taborder: 1 ] } - Component ButtonDataPush - { - #keys: '[415136.0.1020582499]' - BaseType: 'WebButton' - Children: - [ - #child: ContextMenuDataPush - ] - Properties: - [ - Taborder: 2 - ] - } ] Properties: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuDataPush.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuDataPush.def deleted file mode 100644 index 6c10812..0000000 --- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuDataPush.def +++ /dev/null @@ -1,24 +0,0 @@ -Quintiq file version 2.0 -Component ContextMenuDataPush -{ - #keys: '[415136.0.1020582519]' - BaseType: 'WebContextMenu' - Children: - [ - Component MenuDataPushLoginfo - { - #keys: '[415136.0.1020582520]' - BaseType: 'WebMenu' - Properties: - [ - Image: 'DOCUMENT' - Taborder: 0 - Title: 'Data push loginfo' - ] - } - ] - Properties: - [ - Taborder: 0 - ] -} diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def index 77bd762..4509029 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def +++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def @@ -44,10 +44,31 @@ BaseType: 'WebMenu' Properties: [ - Taborder: 3 + Taborder: 4 Title: '璁″垝搴撳瓨鏁版嵁鎺ㄩ�佹帴鍙f祴璇�' ] } + Component MenuInterface367 + { + #keys: '[415136.0.1024980241]' + BaseType: 'WebMenu' + Properties: + [ + Separator: true + Taborder: 3 + ] + } + Component MenuCustomerDemandPPAIDS + { + #keys: '[415136.0.1024980263]' + BaseType: 'WebMenu' + Properties: + [ + Image: 'FLAG_AMBER' + Taborder: 5 + Title: 'Customer demand(PPA + IDS)' + ] + } ] Properties: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick.def new file mode 100644 index 0000000..c1c6094 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick.def @@ -0,0 +1,23 @@ +Quintiq file version 2.0 +#parent: ContextMenuInterface/MenuCustomerDemandPPAIDS +Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick +{ + #keys: '[415136.0.1024980283]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebMenu_OnClick' + Precondition: + [* + return not isnull( MacroPlan ) and not isnull( InterfaceDataset ); + *] + QuillAction + { + Body: + [* + + dlg := construct( DialogCustomerDemandPPAIDS ); + dlg.Title( Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ); + dlg.New( Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ); + *] + GroupServerCalls: false + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlActions.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlActions.def new file mode 100644 index 0000000..7f463be --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlActions.def @@ -0,0 +1,40 @@ +Quintiq file version 2.0 +Component pnlActions +{ + #keys: '[415136.0.1022501788]' + BaseType: 'WebPanel' + Children: + [ + Component btnOk + { + #keys: '[415136.0.1022501792]' + BaseType: 'WebButton' + Properties: + [ + Label: 'OK' + Taborder: 0 + ] + } + Component btnCancel + { + #keys: '[415136.0.1022501794]' + BaseType: 'WebButton' + Properties: + [ + Label: 'Cancel' + Taborder: 1 + ] + } + ] + Properties: + [ + Alignment: 'trailing' + Border: true + ExcludeFromActiveComponent: true + FixedSize: true + Orientation: 'horizontal' + Padding: 'true' + Style: 'footer' + Taborder: 1 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlContent.def new file mode 100644 index 0000000..3030534 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlContent.def @@ -0,0 +1,37 @@ +Quintiq file version 2.0 +Component pnlContent +{ + #keys: '[415136.0.1022501786]' + BaseType: 'WebPanel' + Children: + [ + Component rbgVersionFlag + { + #keys: '[415136.0.1022501839]' + BaseType: 'WebRadioButtonGroup' + Properties: + [ + ButtonLabels: '鍙戝竷鐗堟湰;姹囨姤鐗堟湰' + ButtonValues: 'true;false' + Taborder: 0 + Title: '鐗堟湰鏍囪瘑' + ] + } + Component efInterfacename + { + #keys: '[415136.0.1022501890]' + BaseType: 'WebEditField' + Properties: + [ + Label: '鎺ュ彛鍚嶇О' + Taborder: 1 + Visible: false + ] + } + ] + Properties: + [ + Padding: 'true' + Taborder: 0 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_New.def new file mode 100644 index 0000000..76b6d83 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_New.def @@ -0,0 +1,15 @@ +Quintiq file version 2.0 +#parent: #root +Method New ( + String name +) id:Method_DialogCustomerDemandPPAIDS_New +{ + #keys: '[415136.0.1022502059]' + Body: + [* + // Edit Product(s) + efInterfacename.Text( name ); + + ApplicationMacroPlanner.ShowFormModal( this ); + *] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def new file mode 100644 index 0000000..234e7ba --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def @@ -0,0 +1,17 @@ +Quintiq file version 2.0 +#parent: #root +Method OnOK () id:Method_DialogCustomerDemandPPAIDS_OnOK +{ + #keys: '[415136.0.1022502154]' + Body: + [* + // On ok + Form.ApplyChanges(); + + if( efInterfacename.Text() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ){ + CustomerDemandPPAIDS::GenerateData( MacroPlan, InterfaceDataset, ifexpr( rbgVersionFlag.BoundValue() = "true", true, false ) ); + } + + Form.Close(); + *] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnCancel_OnClick.def new file mode 100644 index 0000000..871ca36 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnCancel_OnClick.def @@ -0,0 +1,15 @@ +Quintiq file version 2.0 +#parent: pnlActions/btnCancel +Response OnClick () id:Response_pnlActions_btnCancel_OnClick +{ + #keys: '[415136.0.1022501798]' + DefinitionID: 'Responsedef_WebButton_OnClick' + GroupServerCalls: true + QuillAction + { + Body: + [* + Form.Close(); + *] + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnOk_OnClick.def new file mode 100644 index 0000000..7e47a2d --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnOk_OnClick.def @@ -0,0 +1,15 @@ +Quintiq file version 2.0 +#parent: pnlActions/btnOk +Response OnClick () id:Response_pnlActions_btnOk_OnClick +{ + #keys: '[415136.0.1022501797]' + DefinitionID: 'Responsedef_WebButton_OnClick' + GroupServerCalls: true + QuillAction + { + Body: + [* + Form.OnOK(); + *] + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/_ROOT_Component_DialogCustomerDemandPPAIDS.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/_ROOT_Component_DialogCustomerDemandPPAIDS.def new file mode 100644 index 0000000..0a9f844 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/_ROOT_Component_DialogCustomerDemandPPAIDS.def @@ -0,0 +1,23 @@ +Quintiq file version 2.0 +#root +#parent: MacroPlannerWebApp +OrphanComponent DialogCustomerDemandPPAIDS +{ + #keys: '[415136.0.1022501784]' + BaseType: 'WebForm' + Children: + [ + #child: pnlContent + #child: pnlActions + ] + Properties: + [ + Alignment: 'trailing' + EnterButton: 'btnOk' + EscapeButton: 'btnCancel' + ExcludeFromActiveComponent: true + Image: 'FLAG_AMBER' + Padding: 'false' + Title: 'Customer demand(PPA + IDS)' + ] +} -- Gitblit v1.9.3