From 284dcbad0bb037ef25e53cbb0af26c0100865af0 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 14 十月 2024 18:29:26 +0800
Subject: [PATCH] 修复一些bug
---
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily#478.def | 25 ++++
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly#791.def | 95 +++++++++++++++
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def | 81 -------------
_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl | 8
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def | 36 ++++++
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick#952.def | 19 +++
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def | 36 ++++++
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def | 16 ++
_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504#801.def | 1
_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def | 9
10 files changed, 238 insertions(+), 88 deletions(-)
diff --git a/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl b/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl
index b53b40e..7b369a3 100644
--- a/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl
+++ b/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl
@@ -5,7 +5,8 @@
ShiftPattern shiftPattern,
Date startDate,
Date endDate,
- Numbers weekdays
+ Numbers weekdays,
+ Number skipWeek
)
{
TextBody:
@@ -22,15 +23,14 @@
period_MP.EndDate() <= endDate and exists( weekdays, Elements,dayOfWeek,dayOfWeek = period_MP.StartDate().DayOfWeek() ),period_MP.StartDate());
if( dayPeriod_MPs.Size() > 0 ){
- unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( dayPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()) and not isnull( unitPeriodTime.UnitAvailability()));
+ unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( dayPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
if( unitPeriodTimes.Size() > 0 ){
LocalTool::SetUnitShiftPattern( owner,unitPeriodTimes,shiftPattern );
}
-
}
if( weekPeriod_MPs.Size() <> 0 ){
traverse( weekPeriod_MPs,Elements,period_MP ){
- unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP() and not isnull( unitPeriodTime.UnitAvailability()));
+ unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
if( unitPeriodTimes.Size() > 0 ){
LocalTool::SetUnitShiftPattern( owner,unitPeriodTimes,shiftPattern );
}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def" "b/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def"
index 56e00de..fd4ce6d 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def"
@@ -136,6 +136,7 @@
BaseType: 'WebButton'
Properties:
[
+ Label: '鍒锋柊涓嬫媺妗�'
Taborder: 3
]
}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily\043478.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily\043478.def"
new file mode 100644
index 0000000..e278730
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily\043478.def"
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+Component PanelDaily id:PanelDaily_478
+{
+ #keys: '[414996.1.127440897]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ #child: PanelDaily819
+ Component bApply568 id:bApply568_478
+ {
+ #keys: '[414996.1.127821084]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Label: 'Apply'
+ Taborder: 1
+ ]
+ }
+ ]
+ Properties:
+ [
+ Taborder: 0
+ Title: 'Daily'
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def
new file mode 100644
index 0000000..3bfe67a
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def
@@ -0,0 +1,36 @@
+Quintiq file version 2.0
+Component PanelDaily819
+{
+ #keys: '[414996.1.126333417]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ Component efDaily
+ {
+ #keys: '[414996.1.126333418]'
+ BaseType: 'WebEditField'
+ Properties:
+ [
+ Label: 'Recur every '
+ Taborder: 0
+ Text: '1'
+ ]
+ }
+ Component LabelDaily
+ {
+ #keys: '[414996.1.126333419]'
+ BaseType: 'WebLabel'
+ Properties:
+ [
+ Label: 'day(s)'
+ Taborder: 1
+ ]
+ }
+ ]
+ Properties:
+ [
+ FixedSize: true
+ Orientation: 'horizontal'
+ Taborder: 0
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def
index 3731f86..cf6148c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def
@@ -35,16 +35,6 @@
Taborder: 0
]
}
- Component bApply
- {
- #keys: '[414996.1.116470621]'
- BaseType: 'WebButton'
- Properties:
- [
- Label: 'Apply'
- Taborder: 11
- ]
- }
Component ddlShiftPattern
{
#keys: '[414996.1.116430349]'
@@ -72,76 +62,7 @@
Taborder: 1
]
}
- Component cbMonday
- {
- #keys: '[414996.1.117120493]'
- BaseType: 'WebCheckbox'
- Properties:
- [
- Label: 'Monday'
- Taborder: 4
- ]
- }
- Component cbTuesday
- {
- #keys: '[414996.1.117120516]'
- BaseType: 'WebCheckbox'
- Properties:
- [
- Label: 'Tuesday'
- Taborder: 5
- ]
- }
- Component cbWednesday
- {
- #keys: '[414996.1.117120539]'
- BaseType: 'WebCheckbox'
- Properties:
- [
- Label: 'Wednesday'
- Taborder: 6
- ]
- }
- Component cbThursday
- {
- #keys: '[414996.1.117120576]'
- BaseType: 'WebCheckbox'
- Properties:
- [
- Label: 'Thursday'
- Taborder: 7
- ]
- }
- Component cbFriday
- {
- #keys: '[414996.1.117120599]'
- BaseType: 'WebCheckbox'
- Properties:
- [
- Label: 'Friday'
- Taborder: 8
- ]
- }
- Component cbSaturday id:cbSaturday_682
- {
- #keys: '[414996.1.117120636]'
- BaseType: 'WebCheckbox'
- Properties:
- [
- Label: 'Saturday'
- Taborder: 9
- ]
- }
- Component cbSunday
- {
- #keys: '[414996.1.117120659]'
- BaseType: 'WebCheckbox'
- Properties:
- [
- Label: 'Sunday'
- Taborder: 10
- ]
- }
+ #child: PanelRight445
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def
new file mode 100644
index 0000000..12cb959
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+Component PanelRight445
+{
+ #keys: '[414996.1.127440860]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ #child: PanelDaily_478
+ #child: PanelWeekly_791
+ ]
+ Properties:
+ [
+ Orientation: 'tab-top'
+ Taborder: 4
+ ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly\043791.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly\043791.def"
new file mode 100644
index 0000000..e23e06e
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly\043791.def"
@@ -0,0 +1,95 @@
+Quintiq file version 2.0
+Component PanelWeekly id:PanelWeekly_791
+{
+ #keys: '[414996.1.127440920]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ Component cbMonday
+ {
+ #keys: '[414996.1.127440921]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Label: 'Monday'
+ Taborder: 1
+ ]
+ }
+ Component cbTuesday
+ {
+ #keys: '[414996.1.127440922]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Label: 'Tuesday'
+ Taborder: 2
+ ]
+ }
+ Component cbWednesday
+ {
+ #keys: '[414996.1.127440923]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Label: 'Wednesday'
+ Taborder: 3
+ ]
+ }
+ Component cbThursday
+ {
+ #keys: '[414996.1.127440924]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Label: 'Thursday'
+ Taborder: 4
+ ]
+ }
+ Component cbFriday
+ {
+ #keys: '[414996.1.127440925]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Label: 'Friday'
+ Taborder: 5
+ ]
+ }
+ Component cbSaturday
+ {
+ #keys: '[414996.1.127440926]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Label: 'Saturday'
+ Taborder: 6
+ ]
+ }
+ Component cbSunday
+ {
+ #keys: '[414996.1.127440927]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Label: 'Sunday'
+ Taborder: 7
+ ]
+ }
+ #child: PanelWeekly996
+ Component bApply
+ {
+ #keys: '[414996.1.127910499]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Label: 'Apply'
+ Taborder: 8
+ ]
+ }
+ ]
+ Properties:
+ [
+ Taborder: 1
+ Title: 'Weekly'
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def
new file mode 100644
index 0000000..d7d963c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def
@@ -0,0 +1,36 @@
+Quintiq file version 2.0
+Component PanelWeekly996
+{
+ #keys: '[414996.1.127820590]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ Component efWeekly id:efWeekly_637
+ {
+ #keys: '[414996.1.127820639]'
+ BaseType: 'WebEditField'
+ Properties:
+ [
+ Label: 'Recur every '
+ Taborder: 0
+ Text: '1'
+ ]
+ }
+ Component LabelWeekly
+ {
+ #keys: '[414996.1.127820645]'
+ BaseType: 'WebLabel'
+ Properties:
+ [
+ Label: 'week(s)'
+ Taborder: 1
+ ]
+ }
+ ]
+ Properties:
+ [
+ FixedSize: true
+ Orientation: 'horizontal'
+ Taborder: 0
+ ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick\043952.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick\043952.def"
new file mode 100644
index 0000000..b81be71
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick\043952.def"
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelDaily_478/bApply568_478
+Response OnClick () id:Response_PanelDaily819_bApply568_OnClick_952
+{
+ #keys: '[414996.1.127821083]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+
+ skipDay := [Number]efDaily.Text();
+ // LocalTool::BatchSetUnitShiftPattern( dhSelectUnit.Data(),ddlShiftPattern.Data(),dsStartDate.Date(),dsEndDate.Date(),weekdays ,skipWeek );
+ WebMessageBox::Success( "Success");
+ *]
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelRight_bApply_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def
similarity index 82%
rename from _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelRight_bApply_OnClick.def
rename to _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def
index 1a2c721..76a1490 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelRight_bApply_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def
@@ -1,8 +1,8 @@
Quintiq file version 2.0
-#parent: PanelRight/bApply
-Response OnClick () id:Response_PanelRight_bApply_OnClick
+#parent: PanelWeekly_791/bApply
+Response OnClick () id:Response_PanelWeekly996_bApply_OnClick
{
- #keys: '[414996.1.117189721]'
+ #keys: '[414996.1.127910498]'
CanBindMultiple: false
DefinitionID: 'Responsedef_WebButton_OnClick'
GroupServerCalls: true
@@ -32,7 +32,8 @@
if( cbSunday.Checked() ){
weekdays.Add( 7 );
}
- LocalTool::BatchSetUnitShiftPattern( dhSelectUnit.Data(),ddlShiftPattern.Data(),dsStartDate.Date(),dsEndDate.Date(),weekdays );
+ skipWeek := [Number]efWeekly.Text();
+ LocalTool::BatchSetUnitShiftPattern( dhSelectUnit.Data(),ddlShiftPattern.Data(),dsStartDate.Date(),dsEndDate.Date(),weekdays ,skipWeek );
WebMessageBox::Success( "Success");
*]
}
--
Gitblit v1.9.3