From b796873878ce004fa64c9340825edf2e3aa0cb49 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 04 十一月 2024 17:12:24 +0800
Subject: [PATCH] 修复一些bug
---
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pnlContent.def | 62 -----
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pShiftPattern3_cbShiftPattern3_OnChanged.def | 17 +
_Main/BL/Type_ProductionLineBatchData/Method_Enable.qbl | 78 -------
_Main/BL/Type_ProductionLineBatchData/Method_Update#540.qbl | 45 ++++
_Main/BL/Type_ProductionLineBatchData/Method_Enable3Lines.qbl | 84 ++++++++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pLine3.def | 54 +++++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pLine3_cbLine3_OnChanged.def | 17 +
_Main/BL/Type_ProductionLineBatchData/StaticMethod_Create#104.qbl | 42 ++++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pnlActions_btnOk_OnClick.def | 55 +++-
_Main/BL/Type_ProductionLineBatchData/Method_Enable2Lines.qbl | 72 +++++++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pShiftPattern3.def | 54 +++++
11 files changed, 433 insertions(+), 147 deletions(-)
diff --git a/_Main/BL/Type_ProductionLineBatchData/Method_Enable.qbl b/_Main/BL/Type_ProductionLineBatchData/Method_Enable.qbl
index bf28d76..8051bdc 100644
--- a/_Main/BL/Type_ProductionLineBatchData/Method_Enable.qbl
+++ b/_Main/BL/Type_ProductionLineBatchData/Method_Enable.qbl
@@ -5,80 +5,10 @@
TextBody:
[*
// rislai Jun-7-2024 (created)
- owner := this.MacroPlan();
-
- // 杞崲鐝缂撳瓨
- shiftPattern1 := this.ShiftPattern1();
- shiftPattern2 := this.ShiftPattern2();
- shiftPattern3 := this.ShiftPattern3();
- tempShiftPattern := shiftPattern1;
-
- dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Day' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
- weekPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Week' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
-
- // period_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
- if( dayPeriod_MPs.Size() > 0 ){
-
- startDate := dayPeriod_MPs.Element( 0 ).StartDate();
- endDate := dayPeriod_MPs.Element( dayPeriod_MPs.Size() - 1 ).EndDate();
-
- // 姣忎竷澶╄疆鎹㈢彮娆�
- for( i := startDate.StartOfWeek(); i < (endDate.StartOfWeek() - 1).StartOfNextWeek(); i := i.StartOfNextWeek()){
- tempStartDate := i;
- tempEndDate := i.StartOfNextWeek();
-
- tempPeriod_MPs := selectset( dayPeriod_MPs,Elements,period_MP,period_MP.StartDate() >= tempStartDate and period_MP.EndDate() <= tempEndDate );
-
- unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
- unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
- unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
- if( unitPeriodTimes1.Size() > 0 ){
- this.OnOK( unitPeriodTimes1,shiftPattern1 );
- }
- if( unitPeriodTimes2.Size() > 0 ){
- this.OnOK( unitPeriodTimes2,shiftPattern2 );
- }
- if( unitPeriodTimes3.Size() > 0 ){
- this.OnOK( unitPeriodTimes3,shiftPattern3 );
- }
-
- // 鎹㈢彮娆�
- tempShiftPattern := shiftPattern1;
- shiftPattern1 := shiftPattern2;
- shiftPattern2 := shiftPattern3;
- shiftPattern3 := tempShiftPattern;
- }
+ if( not isnull( this.Unit3())){
+ this.Enable3Lines();
+ }else{
+ this.Enable2Lines();
}
-
- // 杞崲鐝缂撳瓨
- shiftPattern1 := this.ShiftPattern1();
- shiftPattern2 := this.ShiftPattern2();
- shiftPattern3 := this.ShiftPattern3();
- tempShiftPattern := shiftPattern1;
- if( weekPeriod_MPs.Size() <> 0 ){
- traverse( weekPeriod_MPs,Elements,period_MP ){
- unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
- unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
- unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
-
- if( unitPeriodTimes1.Size() > 0 ){
- this.OnOK( unitPeriodTimes1,shiftPattern1 );
- }
- if( unitPeriodTimes2.Size() > 0 ){
- this.OnOK( unitPeriodTimes2,shiftPattern2 );
- }
- if( unitPeriodTimes3.Size() > 0 ){
- this.OnOK( unitPeriodTimes3,shiftPattern3 );
- }
-
- // 鎹㈢彮娆�
- tempShiftPattern := shiftPattern1;
- shiftPattern1 := shiftPattern2;
- shiftPattern2 := shiftPattern3;
- shiftPattern3 := tempShiftPattern;
- }
- }
-
- this.IsEnable( true );
*]
}
diff --git a/_Main/BL/Type_ProductionLineBatchData/Method_Enable2Lines.qbl b/_Main/BL/Type_ProductionLineBatchData/Method_Enable2Lines.qbl
new file mode 100644
index 0000000..35db7ff
--- /dev/null
+++ b/_Main/BL/Type_ProductionLineBatchData/Method_Enable2Lines.qbl
@@ -0,0 +1,72 @@
+Quintiq file version 2.0
+#parent: #root
+Method Enable2Lines
+{
+ TextBody:
+ [*
+ // rislai Jun-7-2024 (created)
+ owner := this.MacroPlan();
+
+ // 杞崲鐝缂撳瓨
+ shiftPattern1 := this.ShiftPattern1();
+ shiftPattern2 := this.ShiftPattern2();
+ tempShiftPattern := shiftPattern1;
+
+ dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Day' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
+ weekPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Week' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
+
+ // period_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
+ if( dayPeriod_MPs.Size() > 0 ){
+
+ startDate := dayPeriod_MPs.Element( 0 ).StartDate();
+ endDate := dayPeriod_MPs.Element( dayPeriod_MPs.Size() - 1 ).EndDate();
+
+ // 姣忎竷澶╄疆鎹㈢彮娆�
+ for( i := startDate.StartOfWeek(); i < (endDate.StartOfWeek() - 1).StartOfNextWeek(); i := i.StartOfNextWeek()){
+ tempStartDate := i;
+ tempEndDate := i.StartOfNextWeek();
+
+ tempPeriod_MPs := selectset( dayPeriod_MPs,Elements,period_MP,period_MP.StartDate() >= tempStartDate and period_MP.EndDate() <= tempEndDate );
+
+ unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
+ unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
+ if( unitPeriodTimes1.Size() > 0 ){
+ this.OnOK( unitPeriodTimes1,shiftPattern1 );
+ }
+ if( unitPeriodTimes2.Size() > 0 ){
+ this.OnOK( unitPeriodTimes2,shiftPattern2 );
+ }
+
+ // 鎹㈢彮娆�
+ tempShiftPattern := shiftPattern1;
+ shiftPattern1 := shiftPattern2;
+ shiftPattern2 := tempShiftPattern;
+ }
+ }
+
+ // 杞崲鐝缂撳瓨
+ shiftPattern1 := this.ShiftPattern1();
+ shiftPattern2 := this.ShiftPattern2();
+ tempShiftPattern := shiftPattern1;
+ if( weekPeriod_MPs.Size() <> 0 ){
+ traverse( weekPeriod_MPs,Elements,period_MP ){
+ unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
+ unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
+
+ if( unitPeriodTimes1.Size() > 0 ){
+ this.OnOK( unitPeriodTimes1,shiftPattern1 );
+ }
+ if( unitPeriodTimes2.Size() > 0 ){
+ this.OnOK( unitPeriodTimes2,shiftPattern2 );
+ }
+
+ // 鎹㈢彮娆�
+ tempShiftPattern := shiftPattern1;
+ shiftPattern1 := shiftPattern2;
+ shiftPattern2 := tempShiftPattern;
+ }
+ }
+
+ this.IsEnable( true );
+ *]
+}
diff --git a/_Main/BL/Type_ProductionLineBatchData/Method_Enable3Lines.qbl b/_Main/BL/Type_ProductionLineBatchData/Method_Enable3Lines.qbl
new file mode 100644
index 0000000..07526a9
--- /dev/null
+++ b/_Main/BL/Type_ProductionLineBatchData/Method_Enable3Lines.qbl
@@ -0,0 +1,84 @@
+Quintiq file version 2.0
+#parent: #root
+Method Enable3Lines
+{
+ TextBody:
+ [*
+ // rislai Jun-7-2024 (created)
+ owner := this.MacroPlan();
+
+ // 杞崲鐝缂撳瓨
+ shiftPattern1 := this.ShiftPattern1();
+ shiftPattern2 := this.ShiftPattern2();
+ shiftPattern3 := this.ShiftPattern3();
+ tempShiftPattern := shiftPattern1;
+
+ dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Day' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
+ weekPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Week' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
+
+ // period_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate());
+ if( dayPeriod_MPs.Size() > 0 ){
+
+ startDate := dayPeriod_MPs.Element( 0 ).StartDate();
+ endDate := dayPeriod_MPs.Element( dayPeriod_MPs.Size() - 1 ).EndDate();
+
+ // 姣忎竷澶╄疆鎹㈢彮娆�
+ for( i := startDate.StartOfWeek(); i < (endDate.StartOfWeek() - 1).StartOfNextWeek(); i := i.StartOfNextWeek()){
+ tempStartDate := i;
+ tempEndDate := i.StartOfNextWeek();
+
+ tempPeriod_MPs := selectset( dayPeriod_MPs,Elements,period_MP,period_MP.StartDate() >= tempStartDate and period_MP.EndDate() <= tempEndDate );
+
+ unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
+ unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
+ unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
+ if( unitPeriodTimes1.Size() > 0 ){
+ this.OnOK( unitPeriodTimes1,shiftPattern1 );
+ }
+ if( unitPeriodTimes2.Size() > 0 ){
+ this.OnOK( unitPeriodTimes2,shiftPattern2 );
+ }
+ if( unitPeriodTimes3.Size() > 0 ){
+ this.OnOK( unitPeriodTimes3,shiftPattern3 );
+ }
+
+ // 鎹㈢彮娆�
+ tempShiftPattern := shiftPattern1;
+ shiftPattern1 := shiftPattern2;
+ shiftPattern2 := shiftPattern3;
+ shiftPattern3 := tempShiftPattern;
+ }
+ }
+
+ // 杞崲鐝缂撳瓨
+ shiftPattern1 := this.ShiftPattern1();
+ shiftPattern2 := this.ShiftPattern2();
+ shiftPattern3 := this.ShiftPattern3();
+ tempShiftPattern := shiftPattern1;
+ if( weekPeriod_MPs.Size() <> 0 ){
+ traverse( weekPeriod_MPs,Elements,period_MP ){
+ unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
+ unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
+ unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
+
+ if( unitPeriodTimes1.Size() > 0 ){
+ this.OnOK( unitPeriodTimes1,shiftPattern1 );
+ }
+ if( unitPeriodTimes2.Size() > 0 ){
+ this.OnOK( unitPeriodTimes2,shiftPattern2 );
+ }
+ if( unitPeriodTimes3.Size() > 0 ){
+ this.OnOK( unitPeriodTimes3,shiftPattern3 );
+ }
+
+ // 鎹㈢彮娆�
+ tempShiftPattern := shiftPattern1;
+ shiftPattern1 := shiftPattern2;
+ shiftPattern2 := shiftPattern3;
+ shiftPattern3 := tempShiftPattern;
+ }
+ }
+
+ this.IsEnable( true );
+ *]
+}
diff --git "a/_Main/BL/Type_ProductionLineBatchData/Method_Update\043540.qbl" "b/_Main/BL/Type_ProductionLineBatchData/Method_Update\043540.qbl"
new file mode 100644
index 0000000..3f77e86
--- /dev/null
+++ "b/_Main/BL/Type_ProductionLineBatchData/Method_Update\043540.qbl"
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: #root
+Method Update (
+ Unit line1,
+ Unit line2,
+ ShiftPattern shiftPattern1,
+ ShiftPattern shiftPattern2,
+ Date startDate,
+ Date endDate
+)
+{
+ TextBody:
+ [*
+ // rislai Jun-7-2024 (created)
+ owner := this.MacroPlan();
+
+ if( isnull( shiftPattern1 ) or isnull( shiftPattern2 ) or isnull( line1 ) or isnull( line2 )){
+ error( "鏁版嵁涓嶈兘涓虹┖锛�" );
+ }
+ // 锛�1锛� 鏂板浜х嚎1鍜屼骇绾�2鐩稿悓鏃舵姤閿欌�滅浉鍚屼骇绾挎棤娉曟柊澧炩�濓紱
+ if( line1 = line2 ){
+ error( "鐩稿悓浜х嚎鏃犳硶鏂板" );
+ }
+
+ // 锛�2锛� 鐩稿悓鐨勪骇绾跨彮娆★紝鐢熸晥鏃堕棿鍙互缁存姢澶氫釜锛屼絾鏄敓鏁堟椂闂撮噸澶嶆椂鎶ラ敊鈥滆鏁版嵁宸茬淮鎶も�濓紱
+ verifyData := select( owner,ProductionLineBatchData,data,data.Unit1() = line1 and data.Unit2() = line2 and
+ data.ShiftPattern1() = shiftPattern1 and data.ShiftPattern2() = shiftPattern2 and
+ data.StartDate() = startDate and data.EndDate() = endDate and data <> this );
+ if( not isnull( verifyData )){
+ error( "璇ユ暟鎹凡缁存姢" );
+ }
+
+ shiftPattern3 := null( ShiftPattern );
+ line3 := null( Unit );
+
+ this.ShiftPattern1( relset, shiftPattern1 );
+ this.ShiftPattern2( relset, shiftPattern2 );
+ this.ShiftPattern3( relset, shiftPattern3 );
+ this.Unit1( relset, line1 );
+ this.Unit2( relset, line2 );
+ this.Unit3( relset, line3 );
+ this.StartDate( startDate );
+ this.EndDate( endDate );
+ *]
+}
diff --git "a/_Main/BL/Type_ProductionLineBatchData/StaticMethod_Create\043104.qbl" "b/_Main/BL/Type_ProductionLineBatchData/StaticMethod_Create\043104.qbl"
new file mode 100644
index 0000000..e6d74ef
--- /dev/null
+++ "b/_Main/BL/Type_ProductionLineBatchData/StaticMethod_Create\043104.qbl"
@@ -0,0 +1,42 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Create (
+ MacroPlan owner,
+ Unit line1,
+ Unit line2,
+ ShiftPattern shiftPattern1,
+ ShiftPattern shiftPattern2,
+ Date startDate,
+ Date endDate
+) as ProductionLineBatchData
+{
+ TextBody:
+ [*
+ // rislai Jun-7-2024 (created)
+ if( isnull( shiftPattern1 ) or isnull( line1 ) ){
+ error( "鏁版嵁涓嶈兘涓虹┖锛�" );
+ }
+ // 锛�1锛� 鏂板浜х嚎1鍜屼骇绾�2鐩稿悓鏃舵姤閿欌�滅浉鍚屼骇绾挎棤娉曟柊澧炩�濓紱
+ if( line1 = line2 ){
+ error( "鐩稿悓浜х嚎鏃犳硶鏂板" );
+ }
+
+ // 锛�2锛� 鐩稿悓鐨勪骇绾跨彮娆★紝鐢熸晥鏃堕棿鍙互缁存姢澶氫釜锛屼絾鏄敓鏁堟椂闂撮噸澶嶆椂鎶ラ敊鈥滆鏁版嵁宸茬淮鎶も�濓紱
+ verifyData := select( owner,ProductionLineBatchData,data,data.Unit1() = line1 and data.Unit2() = line2 and
+ data.ShiftPattern1() = shiftPattern1 and data.ShiftPattern2() = shiftPattern2 and
+ data.StartDate() = startDate and data.EndDate() = endDate );
+ if( not isnull( verifyData )){
+ error( "璇ユ暟鎹凡缁存姢" );
+ }
+
+ data := owner.ProductionLineBatchData( relnew,
+ ShiftPattern1 := shiftPattern1,
+ ShiftPattern2 := shiftPattern2,
+ Unit1 := line1,
+ Unit2 := line2,
+ StartDate := startDate,
+ EndDate := endDate );
+
+ return data;
+ *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pLine3.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pLine3.def
new file mode 100644
index 0000000..84728c9
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pLine3.def
@@ -0,0 +1,54 @@
+Quintiq file version 2.0
+Component pLine3
+{
+ #keys: '[414996.1.190660603]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ Component ddlLine3 id:ddlLine3_522
+ {
+ #keys: '[414996.1.190660682]'
+ BaseType: 'WebDropDownList'
+ Databinding: 'Unit'
+ Children:
+ [
+ Component deContent872 id:deContent872_106
+ {
+ #keys: '[414996.1.190660683]'
+ BaseType: 'WebDataExtractor'
+ Properties:
+ [
+ DataType: 'structured[Unit]'
+ Source: 'ApplicationMacroPlanner.DataHolderUnit'
+ Taborder: 0
+ Transformation: 'Elements.astype(Unit)'
+ ]
+ }
+ ]
+ Properties:
+ [
+ DataBinding: 'DialogData.Data.Unit3'
+ DisplayField: 'Name'
+ Label: 'Line 3'
+ NumberOfColumns: 50
+ Taborder: 0
+ ]
+ }
+ Component cbLine3
+ {
+ #keys: '[414996.1.190660695]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Checked: true
+ Taborder: 1
+ ]
+ }
+ ]
+ Properties:
+ [
+ FixedSize: true
+ Orientation: 'horizontal'
+ Taborder: 2
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pShiftPattern3.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pShiftPattern3.def
new file mode 100644
index 0000000..ee58076
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pShiftPattern3.def
@@ -0,0 +1,54 @@
+Quintiq file version 2.0
+Component pShiftPattern3
+{
+ #keys: '[414996.1.190660633]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ Component ddlShiftPattern3 id:ddlShiftPattern3_474
+ {
+ #keys: '[414996.1.190660743]'
+ BaseType: 'WebDropDownList'
+ Databinding: 'ShiftPattern'
+ Children:
+ [
+ Component deContent529 id:deContent529_265
+ {
+ #keys: '[414996.1.190660744]'
+ BaseType: 'WebDataExtractor'
+ Properties:
+ [
+ DataType: 'MacroPlan'
+ Source: 'MacroPlan'
+ Taborder: 0
+ Transformation: 'ShiftPattern'
+ ]
+ }
+ ]
+ Properties:
+ [
+ DataBinding: 'DialogData.Data.ShiftPattern3'
+ DisplayField: 'Name'
+ Label: 'Shift pattern 3'
+ NumberOfColumns: 50
+ Taborder: 0
+ ]
+ }
+ Component cbShiftPattern3
+ {
+ #keys: '[414996.1.190660783]'
+ BaseType: 'WebCheckbox'
+ Properties:
+ [
+ Checked: true
+ Taborder: 1
+ ]
+ }
+ ]
+ Properties:
+ [
+ FixedSize: true
+ Orientation: 'horizontal'
+ Taborder: 5
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pnlContent.def
index e69df80..40cbccf 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Component_pnlContent.def
@@ -30,6 +30,7 @@
DataBinding: 'DialogData.Data.Unit1'
DisplayField: 'Name'
Label: 'Line 1'
+ NumberOfColumns: 50
Taborder: 0
]
}
@@ -58,6 +59,7 @@
DataBinding: 'DialogData.Data.Unit2'
DisplayField: 'Name'
Label: 'Line 2'
+ NumberOfColumns: 50
Taborder: 1
]
}
@@ -86,6 +88,7 @@
DataBinding: 'DialogData.Data.ShiftPattern1'
DisplayField: 'Name'
Label: 'Shift pattern 1'
+ NumberOfColumns: 50
Taborder: 3
]
}
@@ -114,6 +117,7 @@
DataBinding: 'DialogData.Data.ShiftPattern2'
DisplayField: 'Name'
Label: 'Shift pattern 2'
+ NumberOfColumns: 50
Taborder: 4
]
}
@@ -139,62 +143,8 @@
Taborder: 7
]
}
- Component ddlLine3
- {
- #keys: '[414996.1.106189463]'
- BaseType: 'WebDropDownList'
- Databinding: 'Unit'
- Children:
- [
- Component deContent872
- {
- #keys: '[414996.1.106189464]'
- BaseType: 'WebDataExtractor'
- Properties:
- [
- DataType: 'structured[Unit]'
- Source: 'ApplicationMacroPlanner.DataHolderUnit'
- Taborder: 0
- Transformation: 'Elements.astype(Unit)'
- ]
- }
- ]
- Properties:
- [
- DataBinding: 'DialogData.Data.Unit3'
- DisplayField: 'Name'
- Label: 'Line 3'
- Taborder: 2
- ]
- }
- Component ddlShiftPattern3
- {
- #keys: '[414996.1.108410230]'
- BaseType: 'WebDropDownList'
- Databinding: 'ShiftPattern'
- Children:
- [
- Component deContent529
- {
- #keys: '[414996.1.108410231]'
- BaseType: 'WebDataExtractor'
- Properties:
- [
- DataType: 'MacroPlan'
- Source: 'MacroPlan'
- Taborder: 0
- Transformation: 'ShiftPattern'
- ]
- }
- ]
- Properties:
- [
- DataBinding: 'DialogData.Data.ShiftPattern3'
- DisplayField: 'Name'
- Label: 'Shift pattern 3'
- Taborder: 5
- ]
- }
+ #child: pLine3
+ #child: pShiftPattern3
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pLine3_cbLine3_OnChanged.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pLine3_cbLine3_OnChanged.def
new file mode 100644
index 0000000..74e4b93
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pLine3_cbLine3_OnChanged.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: pLine3/cbLine3
+Response OnChanged () id:Response_pLine3_cbLine3_OnChanged
+{
+ #keys: '[414996.1.190690650]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebCheckbox_OnChanged'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ ddlLine3.Enabled( cbLine3.Checked(),"" );
+ cbShiftPattern3.Checked( cbLine3.Checked() )
+ *]
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pShiftPattern3_cbShiftPattern3_OnChanged.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pShiftPattern3_cbShiftPattern3_OnChanged.def
new file mode 100644
index 0000000..0460073
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pShiftPattern3_cbShiftPattern3_OnChanged.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: pShiftPattern3/cbShiftPattern3
+Response OnChanged () id:Response_pShiftPattern3_cbShiftPattern3_OnChanged
+{
+ #keys: '[414996.1.192162308]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebCheckbox_OnChanged'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ ddlShiftPattern3.Enabled( cbShiftPattern3.Checked(),"" );
+ cbLine3.Checked( cbShiftPattern3.Checked() );
+ *]
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pnlActions_btnOk_OnClick.def
index d6e9bc5..f4bf725 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditProductionLineBatchData/Response_pnlActions_btnOk_OnClick.def
@@ -13,24 +13,45 @@
Body:
[*
if( not isnull( DialogData.Data( ))){
- DialogData.Data( ).Update( ddlLine1.Data(),
- ddlLine2.Data(),
- ddlLine3.Data(),
- ddlShiftPattern1.Data(),
- ddlShiftPattern2.Data(),
- ddlShiftPattern3.Data(),
- dsStartDate.Date(),
- dsEndDate.Date());
+ if( cbLine3.Checked() ){
+ DialogData.Data( ).Update( ddlLine1.Data(),
+ ddlLine2.Data(),
+ ddlLine3.Data(),
+ ddlShiftPattern1.Data(),
+ ddlShiftPattern2.Data(),
+ ddlShiftPattern3.Data(),
+ dsStartDate.Date(),
+ dsEndDate.Date());
+ }else{
+ DialogData.Data( ).Update( ddlLine1.Data(),
+ ddlLine2.Data(),
+ ddlShiftPattern1.Data(),
+ ddlShiftPattern2.Data(),
+ dsStartDate.Date(),
+ dsEndDate.Date());
+ }
+
}else{
- ProductionLineBatchData::Create( MacroPlan,
- ddlLine1.Data(),
- ddlLine2.Data(),
- ddlLine3.Data(),
- ddlShiftPattern1.Data(),
- ddlShiftPattern2.Data(),
- ddlShiftPattern3.Data(),
- dsStartDate.Date(),
- dsEndDate.Date());
+ if( cbLine3.Checked() ){
+ ProductionLineBatchData::Create( MacroPlan,
+ ddlLine1.Data(),
+ ddlLine2.Data(),
+ ddlLine3.Data(),
+ ddlShiftPattern1.Data(),
+ ddlShiftPattern2.Data(),
+ ddlShiftPattern3.Data(),
+ dsStartDate.Date(),
+ dsEndDate.Date());
+ }else{
+ ProductionLineBatchData::Create( MacroPlan,
+ ddlLine1.Data(),
+ ddlLine2.Data(),
+ ddlShiftPattern1.Data(),
+ ddlShiftPattern2.Data(),
+ dsStartDate.Date(),
+ dsEndDate.Date());
+ }
+
}
// Form.ApplyChanges();
--
Gitblit v1.9.3