yypsybs
2023-09-08 be9f3270a50b9f5318beff37bd4d70fa5632657a
4.11.物料属性标签设定&物料计划策略
已重命名2个文件
已添加35个文件
已修改17个文件
936 ■■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_MatAttrSettingAndPlanStrategyDetail_MatAttrSettingAndPlanStrategy_M.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_doVerify.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_expectedHeaders.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_export.qbl 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_exportFields.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_Comment.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_MatCode.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_ProductCode.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_ProductDesc.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_StandardLT.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Function_CalcMatCode.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/StaticMethod_CreateIfNotExist.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/_ROOT_Type_MatAttrSettingAndPlanStrategyDetail.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_base64Str.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_fileName.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_isXlsx.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_userName.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Method_createTable.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Method_parseTable.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Method_saveData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/StaticMethod_upload.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Attribute_FlagGeneric.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Attribute_FlagLongTerm.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Attribute_PlanningStrategyAuto.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Function_CalcMinProdDeliverLT.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Function_CalcPlanningStrategyAuto.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Function_CalcProductCount.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_CreateIfNotExist.qbl 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_DeleteIfExistByMatCode#526.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_delete.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_deleteIfExistByMatCode.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_getExistByMatCode.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_update.qbl 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Component_pnlActions.def 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Component_pnlContent.def 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Method_Edit.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Method_OnOK.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Response_pnlActions_btnCancel_OnClick.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Response_pnlActions_btnOk_OnClick.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/_ROOT_Component_DialogEditMatAttrSettingAndPlanStrategy.def 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Component_ListMatAttrSettingAndPlanStrategy.def 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Component_listActionBarPageMatAttrSettingAndPlanStrategy.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Component_listContextMenuMatAttrSettingAndPlanStrategy.def 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_ButtonMatAttrSettingAndPlanStrategyExport_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_ButtonMatAttrSettingAndPlanStrategyImport_OnClick.def 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_ListMatAttrSettingAndPlanStrategy_MenuEdit_OnClick.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_OnCreated.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/_ROOT_Component_FormMatAttrSettingAndPlanStrategy.def 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/Component_ListMatAttrSettingAndPlanStrategyDetail#21.def 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/Component_listActionBarPageMatAttrSettingAndPlanStrategyDetail#1.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/Component_listContextMenuMatAttrSettingAndPlanStrategyDetail#1.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/_ROOT_Component_FormMatAttrSettingAndPlanStrategyDetail.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
Quintiq file version 2.0
#parent: #root
InfoMessages id:#InfoMessages #extension
{
}
_Main/BL/Relations/Relation_MatAttrSettingAndPlanStrategyDetail_MatAttrSettingAndPlanStrategy_M.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation MatAttrSettingAndPlanStrategyDetail_MatAttrSettingAndPlanStrategy_MatAttrSettingAndPlanStrategy_MatAttrSettingAndPlanStrategyDetail
{
  #keys: '1[414384.0.766881387]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide MatAttrSettingAndPlanStrategy
  {
    #keys: '3[414384.0.766881389][414384.0.766881388][414384.0.766881390]'
    Cardinality: '0to1'
    ObjectDefinition: MatAttrSettingAndPlanStrategyDetail
    OwningSide: 'Reference'
  }
  RelationSide.RightSide MatAttrSettingAndPlanStrategyDetail
  {
    #keys: '3[414384.0.766881392][414384.0.766881391][414384.0.766881393]'
    Cardinality: '1toN'
    ObjectDefinition: MatAttrSettingAndPlanStrategy
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method InitTestData
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    mat1 := MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, "MAT_1", "MAT_1", "TYPE_1", 233.0, "通用", "长周期" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat1, "PROD_1", 666.0, "PROD_1_DESC" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat1, "PROD_2", 777.0, "PROD_2_DESC" );
    mat2 := MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, "MAT_2", "MAT_2", "TYPE_2", 233.0, "专用", "长周期" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat2, "PROD_1", 1666.0, "PROD_1_DESC" );
    MatAttrSettingAndPlanStrategyDetail::CreateIfNotExist( mat2, "PROD_2", 1777.0, "PROD_2_DESC" );
    MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, "MAT_3", "MAT_3", "TYPE_1", 233.0, "通用", "短周期" );
    MatAttrSettingAndPlanStrategy::CreateIfNotExist( this, "MAT_4", "MAT_4", "TYPE_2", 233.0, "专用", "短周期" );
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_doVerify.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod doVerify (
StaticMethod DoVerify (
  MatAttrSettingAndPlanStrategyDataTable toVerify
)
{
@@ -19,7 +19,7 @@
    //}
    // for test end
    
    expectedHeaders := MatAttrSettingAndPlanStrategyDataTable::expectedHeaders();
    expectedHeaders := MatAttrSettingAndPlanStrategyDataTable::ExpectedHeaders();
    traverse( columns, Elements, column ) {
      columnActualName := column.name();
      if( column.columnIndex() > expectedHeaders.Size() ) {
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_expectedHeaders.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod expectedHeaders () as owning Strings
StaticMethod ExpectedHeaders () as owning Strings
{
  TextBody:
  [*
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_export.qbl
@@ -1,19 +1,19 @@
Quintiq file version 2.0
#parent: #root
StaticMethod export (
StaticMethod Export (
  GlobalOTDTable parent
) as BinaryValue
) as String
{
  TextBody:
  [*
    // yypsybs Jul-1-2023 (created)
    xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?>
    <table>
      <name>MatAttrSettingAndPlanningStrategy</name>
      <name>MatAttrSettingAndPlanStrategy</name>
    ';
    //---------------------------------------------------------------------------------------------
    exportFields := MatAttrSettingAndPlanStrategyDataTable::exportFields();
    exportHeaders := MatAttrSettingAndPlanStrategyDataTable::expectedHeaders();
    exportFields := MatAttrSettingAndPlanStrategyDataTable::ExportFields();
    exportHeaders := MatAttrSettingAndPlanStrategyDataTable::ExpectedHeaders();
    if( exportFields.Size() <> exportHeaders.Size() ) {
      error( "fields and headers not match" );  
    }
@@ -22,7 +22,7 @@
      columnStr := "<column><name>" + header + "</name><type>String</type>";
      traverse( parent, MatAttrSettingAndPlanStrategy, oldRecord ) {
        fieldName := exportFields.Element( i );
        field := Reflection::FindAttribute( "MatAttrSettingAndPlanningStrategy", fieldName);
        field := Reflection::FindAttribute( "MatAttrSettingAndPlanStrategy", fieldName);
        if( not isnull( field ) ) {
          fieldValue := "";
          if( fieldValue = "" ) {
@@ -47,7 +47,7 @@
          
          columnStr := columnStr + cellStr;
        } else {
          error( "no field " + fieldName + " in type MatAttrSettingAndPlanningStrategy");
          error( "no field " + fieldName + " in type MatAttrSettingAndPlanStrategy");
        }
      }
      columnStr := columnStr + "</column>";
@@ -56,10 +56,10 @@
    //---------------------------------------------------------------------------------------------
    xmlTemplate := xmlTemplate + "</table>";
    tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) );
    XLS::SaveTable( tableHandle, OS::TempPath() + "MatAttrSettingAndPlanningStrategy.xlsx" );
    XLS::SaveTable( tableHandle, OS::TempPath() + "MatAttrSettingAndPlanStrategy.xlsx" );
    file := OSFile::Construct();
    file.Open( OS::TempPath() + "MatAttrSettingAndPlanningStrategy.xlsx", "Read", true );
    file.Open( OS::TempPath() + "MatAttrSettingAndPlanStrategy.xlsx", "Read", true );
    data := file.ReadBinary()
    return data;
    return data.AsBase64EncodedString();
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDataTable/StaticMethod_exportFields.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod exportFields () as owning Strings
StaticMethod ExportFields () as owning Strings
{
  TextBody:
  [*
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_Comment.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Comment
{
  #keys: '3[414384.0.766881447][414384.0.766881446][414384.0.766881448]'
  Description: '备注'
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_MatCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute MatCode
{
  #keys: '3[414384.0.766881404][414384.0.766881403][414384.0.766881405]'
  Description: '物料编码'
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_ProductCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductCode
{
  #keys: '3[414384.0.766881414][414384.0.766881413][414384.0.766881415]'
  Description: '成品编码'
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_ProductDesc.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductDesc
{
  #keys: '3[414384.0.766881437][414384.0.766881436][414384.0.766881438]'
  Description: '成品描述'
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Attribute_StandardLT.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute StandardLT
{
  #keys: '3[414384.0.766881424][414384.0.766881423][414384.0.766881425]'
  ValueType: Real
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/Function_CalcMatCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcMatCode
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    value := this.MatAttrSettingAndPlanStrategy().MatCode();
    this.MatCode( value );
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/StaticMethod_CreateIfNotExist.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateIfNotExist (
  MatAttrSettingAndPlanStrategy parent,
  String productCode,
  Real standardLT,
  String productDesc
) as MatAttrSettingAndPlanStrategyDetail
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    value := select( parent, MatAttrSettingAndPlanStrategyDetail, item, item.ProductCode() = productCode );
    if( isnull( value ) ) {
      value := parent.MatAttrSettingAndPlanStrategyDetail( relnew,
                                                           ProductCode := productCode,
                                                           StandardLT := standardLT,
                                                           ProductDesc := productDesc );
    }
    return value;
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyDetail/_ROOT_Type_MatAttrSettingAndPlanStrategyDetail.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type MatAttrSettingAndPlanStrategyDetail
{
  #keys: '5[414384.0.766881384][414384.0.766881382][0.0.0][414384.0.766881383][414384.0.766881385]'
  BaseType: Object
  Description: '物料属性标签设定&物料计划策略明细'
  StructuredName: 'MatAttrSettingAndPlanStrategyDetails'
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_base64Str.qbl
ÎļþÃû´Ó _Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_bytes.qbl ÐÞ¸Ä
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute bytes
Attribute Base64Str
{
  #keys: '3[414384.0.763764696][414384.0.763764695][414384.0.763764697]'
  ValueType: BinaryValue
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_fileName.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
Attribute fileName
Attribute FileName
{
  #keys: '3[414384.0.763764699][414384.0.763764698][414384.0.763764700]'
  ValueType: String
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_isXlsx.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
Attribute isXlsx
Attribute IsXlsx
{
  #keys: '3[414384.0.763764702][414384.0.763764701][414384.0.763764703]'
  ValueType: Boolean
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Attribute_userName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute UserName
{
  #keys: '3[414384.0.775080571][414384.0.775080570][414384.0.775080572]'
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Method_createTable.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
Method createTable (
Method CreateTable (
  String sheetName
) as MatAttrSettingAndPlanStrategyDataTable
{
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Method_parseTable.qbl
@@ -1,15 +1,16 @@
Quintiq file version 2.0
#parent: #root
Method parseTable
Method ParseTable
{
  TextBody:
  [*
    // yypsybs Jul-1-2023 (created)
    tableGroupHandle := TableGroupHandle::Create( this.fileName() );
    tableGroupHandle := XLS::LoadTableGroupFromBinaryData( this.bytes().AsBinaryData(), tableGroupHandle, true, this.isXlsx() );
    tableGroupHandle := TableGroupHandle::Create( this.FileName() );
    tableGroupHandle := XLS::LoadTableGroupFromBinaryData( BinaryData::FromBase64EncodedString( this.Base64Str() ), tableGroupHandle, true, this.IsXlsx() );
    sheets := tableGroupHandle.TableNames();
    
    traverse ( sheets, Elements, sheetName, sheetName = "MatAttrSettingAndPlanningStrategy" ) {
    traverse ( sheets, Elements, sheetName, sheetName = "MatAttrSettingAndPlanStrategy" ) {
      tableHandle := tableGroupHandle.Table( sheetName );
      tableXML := TableHandle::ExportXML( tableHandle );
      MatAttrSettingAndPlanStrategyDataTable::XMLImportMatAttrSettingAndPlanStrategyDataTableXMLHeaders(  tableXML );
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/Method_saveData.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
Method saveData
Method SaveData
{
  TextBody:
  [*
@@ -8,7 +8,7 @@
    if( this.MatAttrSettingAndPlanStrategyDataTable( relsize ) > 0 ) {
      traverse( this, MatAttrSettingAndPlanStrategyDataTable, table ) {
        traverse( table, MatAttrSettingAndPlanStrategyDataRow, row ) {
          MatAttrSettingAndPlanStrategy::update( this.GlobalOTDTable(), row );
          MatAttrSettingAndPlanStrategy::Update( this.GlobalOTDTable(), row, this.UserName() );
        }  
      }  
    }
_Main/BL/Type_MatAttrSettingAndPlanStrategyInputSource/StaticMethod_upload.qbl
@@ -1,9 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod upload (
StaticMethod Upload (
  GlobalOTDTable parent,
  String filePath,
  BinaryValue bytes
  String base64Str,
  String userName
) as MatAttrSettingAndPlanStrategyInputSource
{
  TextBody:
@@ -14,9 +15,10 @@
    fileName := filePath.Tokenize( "\" ).Element( filePath.Tokenize( "\" ).Size() - 1 );
    info( "fileName : " + fileName );
    inputSource := parent.MatAttrSettingAndPlanStrategyInputSource( relnew,
                                              fileName := fileName,
                                              bytes := bytes,
                                              isXlsx := fileName.EndsWith( "xlsx" ));
                                                                    FileName := fileName,
                                                                    Base64Str := base64Str,
                                                                    IsXlsx := fileName.EndsWith( "xlsx" ),
                                                                    UserName := userName );
    
    return inputSource;
  *]
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Attribute_FlagGeneric.qbl
@@ -3,6 +3,10 @@
Attribute FlagGeneric
{
  #keys: '3[414384.0.763764895][414384.0.763764894][414384.0.763764896]'
  Description: '是否通用'
  Description:
  [*
    æ˜¯å¦é€šç”¨
    ä¸“用 & é€šç”¨
  *]
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Attribute_FlagLongTerm.qbl
@@ -3,6 +3,10 @@
Attribute FlagLongTerm
{
  #keys: '3[414384.0.763764885][414384.0.763764884][414384.0.763764886]'
  Description: '是否长期'
  Description:
  [*
    æ˜¯å¦é•¿æœŸ
    é•¿å‘¨æœŸ & çŸ­å‘¨æœŸ
  *]
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Attribute_PlanningStrategyAuto.qbl
@@ -3,6 +3,10 @@
Attribute PlanningStrategyAuto
{
  #keys: '3[414384.0.759444687][414384.0.759444686][414384.0.759444688]'
  Description: '自动计划策略'
  Description:
  [*
    è‡ªåŠ¨è®¡åˆ’ç­–ç•¥
    JIT & å®‰å…¨åº“å­˜ & VMI
  *]
  ValueType: String
}
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Function_CalcMinProdDeliverLT.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Function CalcMinProdDeliverLT
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    value := 0.0;
    if( this.MatAttrSettingAndPlanStrategyDetail( relsize ) <> 0 ) {
      value := guard( min( this, MatAttrSettingAndPlanStrategyDetail, detail, detail.StandardLT() ) , 0.0 );
    }
    this.MinProdDeliverLT( value );
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Function_CalcPlanningStrategyAuto.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Function CalcPlanningStrategyAuto
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    value := "";
    if( this.FlagLongTerm() = "长周期" and this.FlagGeneric() = "专用" ) {
      value := "JIT";
    } else if ( this.FlagLongTerm() = "长周期" and this.FlagGeneric() = "通用" ) {
      value := "安全库存";
    } else if ( this.FlagLongTerm() = "短周期" and this.FlagGeneric() = "专用" ) {
      value := "JIT";
    } else if ( this.FlagLongTerm() = "短周期" and this.FlagGeneric() = "通用" ) {
      value := "VMI";
    }
    this.PlanningStrategyAuto( value );
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/Function_CalcProductCount.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcProductCount
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    value := counter( this, MatAttrSettingAndPlanStrategyDetail, item, true );
    this.ProductCount( value );
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_CreateIfNotExist.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateIfNotExist (
  GlobalOTDTable parent,
  String matCode,
  String matName,
  String matType,
  Real matArrivalLT,
  String flagGeneric,
  String flagLongTerm
) as MatAttrSettingAndPlanStrategy
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    value := MatAttrSettingAndPlanStrategy::GetExistByMatCode( parent, matCode );
    if( isnull( value ) ) {
      value := parent.MatAttrSettingAndPlanStrategy( relnew,
                                                     MatCode := matCode,
                                                     MatName := matName,
                                                     MatType := matType,
                                                     MatArrivalLT := matArrivalLT,
                                                     FlagGeneric := flagGeneric,
                                                     FlagLongTerm := flagLongTerm,
                                                     PlanningStrategyCustom := "",
                                                     UpdateBy := "",
                                                     UpdateTime := DateTime::MinDateTime() );
    }
    return value;
  *]
}
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_DeleteIfExistByMatCode#526.qbl
ÎļþÃû´Ó _Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_deleteIfExistByMatCode#136.qbl ÐÞ¸Ä
@@ -1,14 +1,14 @@
Quintiq file version 2.0
#parent: #root
StaticMethod deleteIfExistByMatCode (
StaticMethod DeleteIfExistByMatCode (
  GlobalOTDTable parent,
  Strings matCodes
  Strings matCode
)
{
  TextBody:
  [*
    // yypsybs Jul-2-2023 (created)
    toDels := selectset( parent, MatAttrSettingAndPlanStrategy, item, true, matCodes.Find( item.MatCode() ) <> -1 );
    toDels := selectset( parent, MatAttrSettingAndPlanStrategy, item, true, matCode.Find( item.MatCode() ) >= 0 );
    if( toDels.Size() > 0 ) {
      traverse( toDels, Elements, toDel ) {
        toDel.Delete();
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_delete.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod delete (
StaticMethod Delete (
  MatAttrSettingAndPlanStrategys toDels
)
{
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_deleteIfExistByMatCode.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod deleteIfExistByMatCode (
StaticMethod DeleteIfExistByMatCode (
  GlobalOTDTable parent,
  String matCode
)
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_getExistByMatCode.qbl
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod getExistByMatCode (
StaticMethod GetExistByMatCode (
  GlobalOTDTable parent,
  String matCode
) as MatAttrSettingAndPlanStrategy
_Main/BL/Type_MatAttrSettingAndPlanningStrategy/StaticMethod_update.qbl
@@ -1,14 +1,16 @@
Quintiq file version 2.0
#parent: #root
StaticMethod update (
StaticMethod Update (
  GlobalOTDTable parent,
  MatAttrSettingAndPlanStrategyDataRow excelRow
  MatAttrSettingAndPlanStrategyDataRow excelRow,
  String userName
) as MatAttrSettingAndPlanStrategy
{
  TextBody:
  [*
    fields := MatAttrSettingAndPlanStrategyDataTable::exportFields();
    headers := MatAttrSettingAndPlanStrategyDataTable::expectedHeaders();
    fields := MatAttrSettingAndPlanStrategyDataTable::ExportFields();
    headers := MatAttrSettingAndPlanStrategyDataTable::ExpectedHeaders();
    //info( "--------SaveData--------" );
    // æ‰¾å¾…更新记录
    toUpdate := null( MatAttrSettingAndPlanStrategy );
    matCode := "";
@@ -16,37 +18,50 @@
      header := headers.Element( i );
      cell := excelRow.MatAttrSettingAndPlanStrategyDataCell( relget ).Element( i );
      if( cell.MatAttrSettingAndPlanStrategyDataColumn().name() <> header ) {
        FeedbackObject::LocalFeedback().AddHard( "the column with index " + [String]i + " should be " + header + ", but found " + cell.MatAttrSettingAndPlanStrategyDataColumn().name() );
        error( "the column with index " + [String]i + " should be " + header + ", but found " + cell.MatAttrSettingAndPlanStrategyDataColumn().name() );
      }
      if( cell.MatAttrSettingAndPlanStrategyDataColumn().name() = "物料编码" and cell.value() <> "") {
        matCode := cell.value();
        toUpdate := MatAttrSettingAndPlanStrategy::getExistByMatCode( parent, matCode );
        toUpdate := MatAttrSettingAndPlanStrategy::GetExistByMatCode( parent, matCode );
        if( isnull( toUpdate ) ) {
          FeedbackObject::LocalFeedback().AddHard( "get MatAttrSettingAndPlanStrategy by matCode [" + matCode + "] failed" );
          error( "get MatAttrSettingAndPlanStrategy by matCode [" + matCode + "] failed" );
        }
      }
    }
    if( not isnull( toUpdate ) ) {
      // å¯¹æ¯”差异
      for( i := 0; i < fields.Size(); i++ ) {
        header := headers.Element( i );
    //    header := headers.Element( i );
        cell := excelRow.MatAttrSettingAndPlanStrategyDataCell( relget ).Element( i );
        fieldName := fields.Element( i );
        field := Reflection::FindAttribute( "MatAttrSettingAndPlanningStrategy", fieldName);
        field := Reflection::FindAttribute( "MatAttrSettingAndPlanStrategy", fieldName);
        if( isnull( field ) ) {
          FeedbackObject::LocalFeedback().AddHard( "MatAttrSettingAndPlanStrategy does not have field " + fieldName );
          error( "MatAttrSettingAndPlanStrategy does not have field " + fieldName );
        }
    //    info( "========header:" + header + "========" )
    //    info( "========fieldName:" + fieldName + "========" )
    //    info( "========cell:" + cell.value() + "========" )
        if( fieldName = "MatName" or fieldName = "MatType" or fieldName = "FlagLongTerm" or fieldName = "FlagGeneric" or fieldName = "PlanningStrategyAuto" ) {
           fieldValue := guard( field.GetString( toUpdate ), "" );
           if( fieldValue <> cell.value() ) {
             error( "column " + header + " does not support to be changed" );
           }
          // do nothing
        } else if( fieldName = "MatArrivalLT" or fieldName = "ProductCount" or fieldName = "MinProdDeliverLT" ) {
           fieldRealValue := guard( field.GetReal( toUpdate ), 0.0 );
           if( fieldRealValue <> [Real]cell.value() ) {
             error( "column " + header + " does not support to be changed" );
           }
          // do nothing
        } else if( fieldName = "PlanningStrategyCustom" ) {
          fieldValue := guard( field.GetString( toUpdate ), "" );
          toUpdate.PlanningStrategyCustom( fieldValue );
          if( cell.value() <> "VMI" and cell.value() <> "安全库存" and cell.value() <> "VIT" ) {
            FeedbackObject::LocalFeedback().AddHard( "unsupported PlanningStrategyCustom : " + cell.value() );
            error( "unsupported PlanningStrategyCustom : " + cell.value() );
          } else if( cell.value() <> toUpdate.PlanningStrategyCustom() ) {
            toUpdate.PlanningStrategyCustom( cell.value() );
            toUpdate.UpdateBy( userName );
            toUpdate.UpdateTime( DateTime::Now() );
          }
        }
      }
    } else {
      error( "no record with matCode : " + matCode )
      FeedbackObject::LocalFeedback().AddHard( "no record with matCode : " + matCode );
      error( "no record with matCode : " + matCode );
    }
    
    return toUpdate;
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Component_pnlActions.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
Component pnlActions
{
  #keys: '[414384.0.770880997]'
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk
    {
      #keys: '[414384.0.770881001]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel
    {
      #keys: '[414384.0.770881003]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Cancel'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    Border: true
    ExcludeFromActiveComponent: true
    FixedSize: true
    Orientation: 'horizontal'
    Padding: 'true'
    Style: 'footer'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Component_pnlContent.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
Quintiq file version 2.0
Component pnlContent
{
  #keys: '[414384.0.770880995]'
  BaseType: 'WebPanel'
  Children:
  [
    Component dropDownPlanningStrategyCustom
    {
      #keys: '[414384.0.770871903]'
      BaseType: 'WebDropDownStringList'
      Properties:
      [
        AllowEmpty: true
        DataBinding: 'DataHolderDialogData.Data.PlanningStrategyCustom'
        Label: 'PlanningStrategyCustom'
        Strings: 'JIT;安全库存;VMI'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Padding: 'true'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Method_Edit.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method Edit (
  MatAttrSettingAndPlanStrategy item
) id:Method_DialogEditMatAttrSettingAndPlanStrategy_Edit
{
  #keys: '[414384.0.772161633]'
  Body:
  [*
    // Edit uom
    data := shadow( item );
    DataHolderDialogData.Data( &data );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Method_OnOK.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogEditMatAttrSettingAndPlanStrategy_OnOK
{
  #keys: '[414384.0.772193415]'
  Body:
  [*
    // On ok
    Form.ApplyChanges();
    data := DataHolderDialogData.Data();
    data.WrappedInstance().PlanningStrategyCustom( dropDownPlanningStrategyCustom.Text() );
    Form.Close();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Response_pnlActions_btnCancel_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActions/btnCancel
Response OnClick () id:Response_pnlActions_btnCancel_OnClick
{
  #keys: '[414384.0.770881007]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.Close();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/Response_pnlActions_btnOk_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[414384.0.770881006]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.OnOK();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogEdit/_ROOT_Component_DialogEditMatAttrSettingAndPlanStrategy.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent DialogEditMatAttrSettingAndPlanStrategy
{
  #keys: '[414384.0.770880993]'
  BaseType: 'WebForm'
  Children:
  [
    #child: pnlContent
    #child: pnlActions
    Component DataHolderDialogData
    {
      #keys: '[414384.0.772100860]'
      BaseType: 'WebDataHolder'
      Databinding: 'shadow[MatAttrSettingAndPlanStrategy]*'
      Properties:
      [
        Taborder: 2
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    EnterButton: 'btnOk'
    EscapeButton: 'btnCancel'
    ExcludeFromActiveComponent: true
    Padding: 'false'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Component_ListMatAttrSettingAndPlanStrategy.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,105 @@
Quintiq file version 2.0
Component ListMatAttrSettingAndPlanStrategy
{
  #keys: '[414384.0.769370441]'
  BaseType: 'WebList'
  Children:
  [
    Component DataExtractorMatAttrSettingAndPlanStrategy
    {
      #keys: '[414384.0.769370442]'
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'GlobalOTDTable'
        Source: 'GlobalOTDTable'
        Taborder: 0
        Transformation: 'MatAttrSettingAndPlanStrategy'
      ]
    }
    Component DataSetLevelMatAttrSettingAndPlanStrategy
    {
      #keys: '[414384.0.769370443]'
      BaseType: 'WebDataSetLevel'
      Children:
      [
        #child: listContextMenuMatAttrSettingAndPlanStrategy
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatCode","title":"MatCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatName","title":"MatName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatType","title":"MatType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatArrivalLT","title":"MatArrivalLT","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatArrivalLT"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductCount","title":"ProductCount","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductCount"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MinProdDeliverLT","title":"MinProdDeliverLT","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MinProdDeliverLT"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FlagLongTerm","title":"FlagLongTerm","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FlagLongTerm"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FlagGeneric","title":"FlagGeneric","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FlagGeneric"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlanningStrategyAuto","title":"PlanningStrategyAuto","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlanningStrategyAuto"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlanningStrategyCustom","title":"PlanningStrategyCustom","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlanningStrategyCustom"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UpdateBy","title":"UpdateBy","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UpdateBy"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UpdateTime","title":"UpdateTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UpdateTime"}}]'
        ContextMenu: 'listContextMenuMatAttrSettingAndPlanStrategy'
        SortCriteria: 'MatCode'
        Taborder: 1
      ]
    }
    #child: listActionBarPageMatAttrSettingAndPlanStrategy
  ]
  Properties:
  [
    Taborder: 2
  ]
  ResponseDefinitions:
  [
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategy_WebMenu_OnClick
    {
      #keys: '[414384.0.769370436]'
      Initiator: 'WebMenu'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument selection
        {
          #keys: '[2651.0.25404553]'
          Binding: 'this.Selection()'
        }
      ]
    }
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategy_WebButton_OnClick
    {
      #keys: '[414384.0.769370435]'
      Initiator: 'WebButton'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument selection
        {
          #keys: '[6763.0.7953347]'
          Binding: 'this.Selection()'
        }
      ]
    }
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategy_WebMenu_OnClick_106
    {
      #keys: '[414384.0.769370434]'
      Initiator: 'WebMenu'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument checked
        {
          #keys: '[6763.0.7953392]'
          Binding: 'this.Checked()'
        }
      ]
    }
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategy_WebButton_OnClick_415
    {
      #keys: '[414384.0.769370433]'
      Initiator: 'WebButton'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument checked
        {
          #keys: '[6763.0.7953437]'
          Binding: 'this.Checked()'
        }
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Component_listActionBarPageMatAttrSettingAndPlanStrategy.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component listActionBarPageMatAttrSettingAndPlanStrategy
{
  #keys: '[414384.0.769370448]'
  BaseType: 'listActionBarPage'
  Properties:
  [
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Component_listContextMenuMatAttrSettingAndPlanStrategy.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
Quintiq file version 2.0
Component listContextMenuMatAttrSettingAndPlanStrategy
{
  #keys: '[414384.0.769370444]'
  BaseType: 'listContextMenu'
  Children:
  [
    Component MenuEdit
    {
      #keys: '[414384.0.769370445]'
      BaseType: 'WebMenu'
      Properties:
      [
        BindOnDoubleClick: true
        DelegationID: 'ActionBarData_Edit'
        Image: 'PENCIL'
        Shortcut: 'Enter'
        Taborder: 3
        Title: 'Edit...'
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_ButtonMatAttrSettingAndPlanStrategyExport_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: ButtonMatAttrSettingAndPlanStrategyExport
Response OnClick () id:Response_FormMatAttrSettingAndPlanStrategy_ButtonMatAttrSettingAndPlanStrategyExport_OnClick
{
  #keys: '[414384.0.772313427]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      info( "ButtonMatAttrSettingAndPlanStrategyExport.OnClick" );
      Application.Download( "MatAttrSettingAndPlanningStrategy.xlsx",
                            MatAttrSettingAndPlanStrategyDataTable::Export( GlobalOTDTable ) );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_ButtonMatAttrSettingAndPlanStrategyImport_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
Quintiq file version 2.0
#parent: ButtonMatAttrSettingAndPlanStrategyImport
Response OnClick () id:Response_FormMatAttrSettingAndPlanStrategy_ButtonMatAttrSettingAndPlanStrategyImport_OnClick
{
  #keys: '[414384.0.772313506]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      try {
        uploadJson := Application.GetFile();
        json := JSON::Parse( uploadJson );
        if( json.IsArray() or json.Size() = 0 ) {
          error( "please select one .xls or .xlsx file" );
        }
        name := json.Get( "name" ).GetString();
        base64Data := json.Get( "data" ).GetString();
        inputSource := MatAttrSettingAndPlanStrategyInputSource::Upload( GlobalOTDTable, name, base64Data, ApplicationMacroPlanner.GetUserName() );
        inputSource.ParseTable();
        inputSource.SaveData();
      } onerror {
        info( e.GeneralInformation() );
        info( e.DetailedInformation() );
        info( e.DeveloperInformation() );
        WebMessageBox::Error( e.GeneralInformation() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_ListMatAttrSettingAndPlanStrategy_MenuEdit_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: ListMatAttrSettingAndPlanStrategy
Response OnClick (
  MatAttrSettingAndPlanStrategy selection
) id:Response_ListMatAttrSettingAndPlanStrategy_MenuEdit_OnClick
{
  #keys: '[414384.0.769370438]'
  CanBindMultiple: false
  DefinitionID => /ListMatAttrSettingAndPlanStrategy/Responsedef_ListMatAttrSettingAndPlanStrategy_WebMenu_OnClick
  GroupServerCalls: true
  Initiator: 'MenuEdit'
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogEditMatAttrSettingAndPlanStrategy );
      dlg.Edit( selection );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/Response_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Response OnCreated () id:Response_FormMatAttrSettingAndPlanStrategy_OnCreated
{
  #keys: '[414384.0.770811994]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      GlobalOTDTable.InitTestData();
      info( "FormMatAttrSettingAndPlanStrategy created" )
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategy/_ROOT_Component_FormMatAttrSettingAndPlanStrategy.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent FormMatAttrSettingAndPlanStrategy
{
  #keys: '[414384.0.767100500]'
  BaseType: 'WebForm'
  Children:
  [
    #child: ListMatAttrSettingAndPlanStrategy
    Component ButtonMatAttrSettingAndPlanStrategyExport
    {
      #keys: '[414384.0.770831027]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'EXPORT1'
        Label: 'Export'
        Taborder: 0
      ]
    }
    Component ButtonMatAttrSettingAndPlanStrategyImport
    {
      #keys: '[414384.0.770831036]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'IMPORT1'
        Label: 'Import'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Description: '4.11.物料属性标签设定&物料计划策略'
    Title: '物料属性标签与物料计划策略'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/Component_ListMatAttrSettingAndPlanStrategyDetail#21.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,106 @@
Quintiq file version 2.0
Component ListMatAttrSettingAndPlanStrategyDetail id:ListMatAttrSettingAndPlanStrategyDetail_21
{
  #keys: '[414384.0.769370487]'
  BaseType: 'WebList'
  Children:
  [
    Component DataExtractorMatAttrSettingAndPlanStrategyDetail
    {
      #keys: '[414384.0.769370488]'
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'MatAttrSettingAndPlanStrategy'
        ExtractionMode: 'Selected'
        Source: 'FormMatAttrSettingAndPlanStrategy.ListMatAttrSettingAndPlanStrategy'
        Taborder: 0
        Transformation: 'MatAttrSettingAndPlanStrategyDetail'
      ]
    }
    Component DataSetLevelMatAttrSettingAndPlanStrategyDetail
    {
      #keys: '[414384.0.769370489]'
      BaseType: 'WebDataSetLevel'
      Children:
      [
        #child: listContextMenuMatAttrSettingAndPlanStrategyDetail_1
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MatCode","title":"MatCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MatCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductCode","title":"ProductCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StandardLT","title":"StandardLT","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StandardLT"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductDesc","title":"ProductDesc","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductDesc"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Comment","title":"Comment","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Comment"}}]'
        ContextMenu: 'listContextMenuMatAttrSettingAndPlanStrategyDetail'
        SortCriteria: 'MatCode;ProductCode'
        Taborder: 1
      ]
    }
    #child: listActionBarPageMatAttrSettingAndPlanStrategyDetail_1
  ]
  Properties:
  [
    Taborder: 0
  ]
  ResponseDefinitions:
  [
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategyDetail_21_WebMenu_OnClick
    {
      #keys: '[414384.0.769370482]'
      Initiator: 'WebMenu'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument selection
        {
          #keys: '[2651.0.25404553]'
          Binding: 'this.Selection()'
        }
      ]
    }
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategyDetail_21_WebButton_OnClick
    {
      #keys: '[414384.0.769370481]'
      Initiator: 'WebButton'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument selection
        {
          #keys: '[6763.0.7953347]'
          Binding: 'this.Selection()'
        }
      ]
    }
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategyDetail_21_WebMenu_OnClick_737
    {
      #keys: '[414384.0.769370480]'
      Initiator: 'WebMenu'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument checked
        {
          #keys: '[6763.0.7953392]'
          Binding: 'this.Checked()'
        }
      ]
    }
    DelegatedResponseDefinition OnClick id:Responsedef_ListMatAttrSettingAndPlanStrategyDetail_21_WebButton_OnClick_456
    {
      #keys: '[414384.0.769370479]'
      Initiator: 'WebButton'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument checked
        {
          #keys: '[6763.0.7953437]'
          Binding: 'this.Checked()'
        }
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/Component_listActionBarPageMatAttrSettingAndPlanStrategyDetail#1.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component listActionBarPageMatAttrSettingAndPlanStrategyDetail id:listActionBarPageMatAttrSettingAndPlanStrategyDetail_1
{
  #keys: '[414384.0.769370494]'
  BaseType: 'listActionBarPage'
  Properties:
  [
    Taborder: 2
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/Component_listContextMenuMatAttrSettingAndPlanStrategyDetail#1.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component listContextMenuMatAttrSettingAndPlanStrategyDetail id:listContextMenuMatAttrSettingAndPlanStrategyDetail_1
{
  #keys: '[414384.0.769370490]'
  BaseType: 'listContextMenu'
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormMatAttrSettingAndPlanStrategyDetail/_ROOT_Component_FormMatAttrSettingAndPlanStrategyDetail.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent FormMatAttrSettingAndPlanStrategyDetail
{
  #keys: '[414384.0.769370336]'
  BaseType: 'WebForm'
  Children:
  [
    #child: ListMatAttrSettingAndPlanStrategyDetail_21
  ]
  Properties:
  [
    Description: '物料属性标签设定&物料计划策略'
    Title: '物料关联产品'
  ]
}