| | |
| | | } |
| | | InfoMessage MP_ChangeLossSettingExcel_Import_PositiveInteger |
| | | { |
| | | DefaultText: 'The import ChangeLossNr is not positive integer.' |
| | | DefaultText: 'The import ChangeLossNr is not positive number.' |
| | | } |
| | | InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ChangeLossNumber |
| | | { |
| | | #keys: '3[415136.0.1176550071][415136.0.1176550070][415136.0.1176550072]' |
| | | ValueType: Real |
| | | } |
| | |
| | | Product_MP product2, |
| | | Date startdate, |
| | | Date enddate, |
| | | Number number |
| | | String number |
| | | ) as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-5-2024 (created) |
| | | feedback := ''; |
| | | |
| | | if( isnull( unit ) or isnull( product1 ) or isnull( product2 ) or number < 1 ){ |
| | | if( [Number]number < 0 ){ |
| | | feedback := Translations::MP_ChangeLossSettingExcel_Import_PositiveInteger(); |
| | | } |
| | | if( isnull( unit ) or isnull( product1 ) or isnull( product2 ) or [Number]number = 0 ){ |
| | | feedback := Translations::MP_ChangeLossSetting_CheckNull(); |
| | | } |
| | | if( product1 = product2 ){ |
| | |
| | | error( Translations::MP_ChangeLossSettingExcel_Import_NullInputRequiredField() ); |
| | | } |
| | | //导å
¥çæ°éå°äº0 |
| | | if( exists( macroplan, ChangeLossSettingExcel, excel, [Real]excel.ChangeLossNumber() > 0 and ceil( [Real]excel.ChangeLossNumber() ) <> floor( [Real]excel.ChangeLossNumber() ) ) ){ |
| | | if( exists( macroplan, ChangeLossSettingExcel, excel, [Real]excel.ChangeLossNumber() <= 0 ) ){ |
| | | error( Translations::MP_ChangeLossSettingExcel_Import_PositiveInteger() ); |
| | | } |
| | | //导å
¥äº§åæ¯å¦åå¨ |
| | |
| | | [* |
| | | // çå
°é¸½ Aug-22-2024 (created) |
| | | traverse( macroplan, ChangeLossSetting, cls ){ |
| | | macroplan.ChangeLossSettingExcel( relnew, Product1 := cls.ProductFirst().ID(), Product2 := cls.ProductSecond().ID(), Unit := cls.Unit().ID(), ChangeLossNumber := [String]cls.ChangeLossNr(), StartDate := cls.StartDate(), EndDate := cls.EndDate() ); |
| | | macroplan.ChangeLossSettingExcel( relnew, Product1 := cls.ProductFirst().ID(), Product2 := cls.ProductSecond().ID(), Unit := cls.Unit().ID(), ChangeLossNumber := [String]cls.ChangeLossNumber(), StartDate := cls.StartDate(), EndDate := cls.EndDate() ); |
| | | } |
| | | value := macroplan.MP_ExportChangeLossSettingsBroker().ExecuteToXLS( isxlsxformat ).AsBinaryValue(); |
| | | macroplan.ChangeLossSettingExcel( relflush ); |
| | |
| | | and cls.Unit().ID() = excel.Unit() |
| | | and cls.StartDate() = excel.StartDate() |
| | | and cls.EndDate() = excel.EndDate() ); |
| | | info( excel.ChangeLossNumber() ); |
| | | if( isnull( cls ) ){ |
| | | product1 := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product1() ); |
| | | product2 := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product2() ); |
| | | unit := selectobject( macroplan, Unit, unit, unit.ID() = excel.Unit() ); |
| | | feedback := ''; |
| | | if( ChangeLossSetting::ValidateInput( feedback, macroplan, null( ChangeLossSetting ), unit, product1, product2, excel.StartDate(), excel.EndDate(), [Number]excel.ChangeLossNumber() ) ){ |
| | | cls := macroplan.ChangeLossSetting( relnew, ChangeLossNr := [Number]excel.ChangeLossNumber() ); |
| | | if( ChangeLossSetting::ValidateInput( feedback, macroplan, null( ChangeLossSetting ), unit, product1, product2, excel.StartDate(), excel.EndDate(), excel.ChangeLossNumber() ) ){ |
| | | cls := macroplan.ChangeLossSetting( relnew, ChangeLossNumber := [Real]excel.ChangeLossNumber() ); |
| | | |
| | | cls.ProductFirst( relset, product1 ); |
| | | cls.ProductSecond( relset, product2 ); |
| | |
| | | error( feedback ); |
| | | } |
| | | }else { |
| | | cls.ChangeLossNr( [Number]excel.ChangeLossNumber() ); |
| | | cls.ChangeLossNumber( [Real]excel.ChangeLossNumber() ); |
| | | } |
| | | info( '-------------------', cls.ChangeLossNumber() ); |
| | | excel.Delete(); |
| | | } |
| | | *] |
| | |
| | | tempOPC.OfflinePlanRow().Type() = "1" and |
| | | tempOPC.OfflinePlanRow().ProductID() = firstOrderCell.OfflinePlanRow().ProductID() |
| | | ); |
| | | firstQuantityCell.Value( [String] ( [Number]firstQuantityCell.Value() - cls.ChangeLossNr() ) ); |
| | | firstQuantityCell.Value( [String] ( [Number]firstQuantityCell.Value() - cls.ChangeLossNumber() ) ); |
| | | // info( "å½ååæ¶é´ï¼", opc.ColumnDate().Format( "Y-M2-D2" ), " å½ååºå·ï¼", i, " åå
æ ¼çå¼ï¼", firstOrderCell.Value(), " 产ååï¼", firstOrderCell.OfflinePlanRow().ProductID(), |
| | | // "ä¸ä¸ä¸ªåºå·ï¼", i + 1, " åå
æ ¼çå¼ï¼", secondOrderCell.Value(), " 产ååï¼", secondOrderCell.OfflinePlanRow().ProductID() ); |
| | | } |
| | |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component npChangeLossNr |
| | | { |
| | | #keys: '[415136.0.738250237]' |
| | | BaseType: 'WebNumberPicker' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'dhDialogData.Data.ChangeLossNr' |
| | | Label: 'Change loss number' |
| | | Min: '0' |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | Component dsStartDate |
| | | { |
| | | #keys: '[415136.0.1132411785]' |
| | |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component efChangeLossNr |
| | | { |
| | | #keys: '[415136.0.1176801957]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'dhDialogData.Data.ChangeLossNumber' |
| | | Label: 'Change loss number' |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return ChangeLossSetting::ValidateInput( feedback, MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), dsStartDate.Date(), dsEndDate.Date(), [Number]npChangeLossNr.Number() ); |
| | | return ChangeLossSetting::ValidateInput( feedback, MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), dsStartDate.Date(), dsEndDate.Date(), efChangeLossNr.Text() ); |
| | | *] |
| | | QuillAction |
| | | { |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNr","title":"ChangeLossNr","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNr"}}]' |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNumber","title":"ChangeLossNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNumber"}}]' |
| | | ContextMenu: 'listContextMenuChangeLossSetting' |
| | | Taborder: 2 |
| | | ] |
| | |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_ChangeLossNr |
| | | column_ChangeLossNumber |
| | | { |
| | | columnId: 'ChangeLossNr' |
| | | dataPath: 'ChangeLossNr' |
| | | dataType: 'number' |
| | | columnId: 'ChangeLossNumber' |
| | | dataPath: 'ChangeLossNumber' |
| | | dataType: 'real' |
| | | index: 5 |
| | | subtotals: '' |
| | | width: 150 |
| | | width: 183 |
| | | } |
| | | } |
| | | } |
| | |
| | | component=submodel |
| | | kind=Quintiq Metadata File |
| | | name=MacroPlanner |
| | | version.component=2022.3.0.0 |
| | | version.component=2022.3.0.56 |
| | | version.fileformat=2 |
| | | version.quintiq=6.3.3.0 , build 248673 |