From 4aa75980d1f773bf6f8ce0e4967900d684d1afff Mon Sep 17 00:00:00 2001
From: lihongji <3117313295@qq.com>
Date: 星期三, 13 十一月 2024 15:24:46 +0800
Subject: [PATCH] 包装计划更新
---
_Main/BL/Type_PackagingPlanCell/Method_UpdateValue.qbl | 36 ++++++++++++++++++++++++++++++++++++
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnUpdateValue.def | 19 +++++++++++++++++++
_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnCheckEditability.def | 2 +-
3 files changed, 56 insertions(+), 1 deletions(-)
diff --git a/_Main/BL/Type_PackagingPlanCell/Method_UpdateValue.qbl b/_Main/BL/Type_PackagingPlanCell/Method_UpdateValue.qbl
new file mode 100644
index 0000000..ef3037a
--- /dev/null
+++ b/_Main/BL/Type_PackagingPlanCell/Method_UpdateValue.qbl
@@ -0,0 +1,36 @@
+Quintiq file version 2.0
+#parent: #root
+Method UpdateValue (
+ String attrName,
+ Real value
+)
+{
+ TextBody:
+ [*
+ if ( attrName = "Package" ) { // 鍖呰
+ this.Package( value );
+ }
+
+ if ( attrName = "Unpacking" ) { // 鎷嗗寘
+ this.Unpacking( value );
+ }
+
+ if ( attrName = "Out" ) { // 璋冨嚭
+ unitID := ifexpr( this.PackagingPlanRow().Factory() = "澶ц繛宸ュ巶", "DL to CC", "CC to DL" ) + " " + this.PackagingPlanRow().Category() + " Transport";
+
+ pit := select( this.PackagingPlanRow().MacroPlan(), Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT,
+ tempPIT.Trip().LaneLeg().Lane().UnitID() = unitID and
+ tempPIT.Trip().Departure().Date() = this.PackagingPlanColumn().StartDate() and
+ tempPIT.ProductID() = this.PackagingPlanRow().ProductID() );
+
+ pit.Update( value, true );
+ this.Out( value );
+
+ cell := select( this.PackagingPlanRow().MacroPlan(), PackagingPlanRow.PackagingPlanCell, tempPPCell,
+ tempPPCell.PackagingPlanRow().Factory() = ifexpr( this.PackagingPlanRow().Factory() = "澶ц繛宸ュ巶", "闀挎槬宸ュ巶", "澶ц繛宸ュ巶" ) and
+ tempPPCell.PackagingPlanRow().ProductID() = this.PackagingPlanRow().ProductID() and
+ tempPPCell.PackagingPlanColumn().StartDate() = pit.Trip().Arrival().Date() );
+ cell.TransferIn( value );
+ }
+ *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnCheckEditability.def b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnCheckEditability.def
index 8be5f6a..3d723b6 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnCheckEditability.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnCheckEditability.def
@@ -12,7 +12,7 @@
{
Body:
[*
- cond := focusedattribute = "Package" or focusedattribute = "Unpacking";
+ cond := focusedattribute = "Package" or focusedattribute = "Unpacking" or focusedattribute = "Out";
editinfo.CanEdit( cond );
editinfo.UserHint( ifexpr( cond, "", "涓嶈兘淇敼" ) );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnUpdateValue.def
new file mode 100644
index 0000000..a159225
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPackagingPlan/Response_MatrixEditor493_OnUpdateValue.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor493
+Response OnUpdateValue (
+ PackagingPlanCell cell,
+ Real value
+) id:Response_MatrixEditor493_OnUpdateValue
+{
+ #keys: '[413988.1.122061406]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
+ QuillAction
+ {
+ Body:
+ [*
+ cell.UpdateValue( focusedattribute, value );
+ *]
+ GroupServerCalls: false
+ }
+}
--
Gitblit v1.9.3