From b373f7e6e82ce3cf6b6daa13e5dc6e76a50baacb Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期五, 22 十一月 2024 15:05:41 +0800
Subject: [PATCH] 添加根据curve快速分割的入口
---
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_listContextMenuSD.def | 28 ++++++++++++++
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Response_MacroPlanner_ListSalesDemands_MenuSplitUsingCurve_OnClick.def | 19 +++++++++
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_ListSalesDemands.def | 4 ++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_SplitUsingCurve.def | 20 ++++++++++
4 files changed, 71 insertions(+), 0 deletions(-)
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_SplitUsingCurve.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_SplitUsingCurve.def
new file mode 100644
index 0000000..3235720
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_SplitUsingCurve.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Method SplitUsingCurve () id:Method_DialogCreateEditForecast_SplitUsingCurve
+{
+ #keys: '[414996.1.244251122]'
+ Body:
+ [*
+ // New Sales demand
+ owner := select( DataHolderProduct.Data(), Elements, e, not e.IsSystem() );
+ data := owner.SalesDemand( relshadow, Forecast, ID := "" ); // Temporary set ID to empty, will be set during OnOK
+
+ PanelCurve.Visible( true );
+ bSplitUsingCurve.Visible( true );
+ btnOk.Visible( false );
+
+ DataHolderDialogData.Data( &data );
+ Form.SetDefaultValue();
+ ApplicationMacroPlanner.ShowFormModal( Form );
+ *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_ListSalesDemands.def b/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_ListSalesDemands.def
index 5fc2143..1411531 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_ListSalesDemands.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_ListSalesDemands.def
@@ -5,6 +5,10 @@
[
Component DataSetLevelSalesDemands #extension
{
+ Children:
+ [
+ #child: listContextMenuSD
+ ]
Properties:
[
Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgNotLinkedToPeriod","title":"ImgNotLinkedToPeriod","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgNotLinkedToPeriod"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgIsPostponed","title":"ImgIsPostponed","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgIsPostponed"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPoint_MP.ID","title":"Stocking point","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"StockingPoint_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegment_MP.Name","title":"Sales segment","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SalesSegment_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Product_MP.ID","title":"Product","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Product_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"Start","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasure_MP.Name","title":"Quantity UoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"UnitOfMeasure_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Original Qty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NettedQuantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"NettedQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FulfilledQuantity","title":"Fulfilled","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"FulfilledQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeChart","columnid":"Fulfillment Illustration","title":"Fulfillment","subtotals":"","tooltip":"","width":-1,"display":"shown","type":"stackbar","relative":true,"attributes":[{"name":"Fulfilled demand","color":"rgb(87,184,71)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Fulfillment","title":"Fulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"object.FulfilledQuantity().Round(2)"}},{"name":"Unfulfilled demand","color":"rgb(232,123,0)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Unfulfilled demand","title":"Unfulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"maxvalue(object.NettedQuantity()-object.FulfilledQuantity(),0.0).Round(2)"}}]}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PriceUoM","title":"PriceUoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"PriceUoM"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Priority.Name","title":"Priority","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Priority.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandUncertaintyPercentage","title":"Uncertainty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandUncertaintyPercentage"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Origin","title":"Origin","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Origin"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Differnce","title":"Differnce","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Differnce"}}]'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_listContextMenuSD.def b/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_listContextMenuSD.def
new file mode 100644
index 0000000..a228488
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_listContextMenuSD.def
@@ -0,0 +1,28 @@
+Quintiq file version 2.0
+Component listContextMenuSD #extension
+{
+ Children:
+ [
+ Component MenuSeparator2
+ {
+ #keys: '[414996.1.244250822]'
+ BaseType: 'WebMenu'
+ Properties:
+ [
+ Separator: true
+ Taborder: 10
+ ]
+ }
+ Component MenuSplitUsingCurve
+ {
+ #keys: '[414996.1.244250869]'
+ BaseType: 'WebMenu'
+ Properties:
+ [
+ Image: 'GRAPH_FORK'
+ Taborder: 11
+ Title: 'Split using curve'
+ ]
+ }
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Response_MacroPlanner_ListSalesDemands_MenuSplitUsingCurve_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Response_MacroPlanner_ListSalesDemands_MenuSplitUsingCurve_OnClick.def
new file mode 100644
index 0000000..5651dd8
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Response_MacroPlanner_ListSalesDemands_MenuSplitUsingCurve_OnClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: ListSalesDemands
+Response OnClick () id:Response_MacroPlanner_ListSalesDemands_MenuSplitUsingCurve_OnClick
+{
+ #keys: '[414996.1.245583277]'
+ CanBindMultiple: false
+ DefinitionID => //FormSalesDemands/ListSalesDemands/Responsedef_ListSalesDemands_WebMenu_OnClick
+ GroupServerCalls: true
+ Initiator: 'MenuSplitUsingCurve'
+ QuillAction
+ {
+ Body:
+ [*
+ //Create new sales demand
+ dlg := construct( DialogCreateEditForecast );
+ dlg.SplitUsingCurve();
+ *]
+ }
+}
--
Gitblit v1.9.3