admin
2024-10-09 3bf31c5cd7f27d710ad70e07ec97b65c359daf50
长春料架优化
已修改2个文件
已添加2个文件
90 ■■■■ 文件已修改
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bImport_OnClick.def 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
@@ -16,7 +16,7 @@
    firstColumn := xmlDOM.CreateElement( "column" );
    firstName   := xmlDOM.CreateElement( "name" );
    firstType   := xmlDOM.CreateElement( "type" );
    firstName.TextContent( "" );
    firstName.TextContent( "*" );
    firstType.TextContent( "String" );
    firstColumn.AppendChild( firstName );
    firstColumn.AppendChild( firstType );
@@ -40,7 +40,7 @@
    secondColumn := xmlDOM.CreateElement( "column" );
    secondName   := xmlDOM.CreateElement( "name" );
    secondType   := xmlDOM.CreateElement( "type" );
    secondName.TextContent( "" );
    secondName.TextContent( "*" );
    secondType.TextContent( "String" );
    secondColumn.AppendChild( secondName );
    secondColumn.AppendChild( secondType );
@@ -66,43 +66,43 @@
      cells := selectsortedset( cerc, CC_EngineRackCell, tempCELL, true, tempCELL.CC_EngineRackRow().Name() );
      traverse ( cells, Elements, c ) {
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks() ); // æ–™æž¶æ€»æ•°é‡
        cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks().Round( 0 ) ); // æ–™æž¶æ€»æ•°é‡
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves() ); // ç©ºæ–™æž¶æ•°é‡
        cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves().Round( 0 ) ); // ç©ºæ–™æž¶æ•°é‡
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses() ); // å¤–租库入库费用
        cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses().Round( 0 ) ); // å¤–租库入库费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses() ); // å¤–租库出库费用
        cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses().Round( 0 ) ); // å¤–租库出库费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts() ); // å¤–租库运输费用
        cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // å¤–租库运输费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees() ); // å¤–租库仓储费用
        cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees().Round( 0 ) ); // å¤–租库仓储费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.CleaningCost() ); // æ¸…洗费用
        cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // æ¸…洗费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.EstimatedTotalCost() ); // é¢„计总费用
        cell.SetAttribute( "value", [String]c.EstimatedTotalCost().Round( 0 ) ); // é¢„计总费用
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.Coefficient() ); // ç³»æ•°
        cell.SetAttribute( "value", [String]c.Coefficient().Round( 0 ) ); // ç³»æ•°
        cellColumn.AppendChild( cell );
        
        cell := xmlDOM.CreateElement( "cell" );
        cell.SetAttribute( "value", [String]c.TotalCost() ); // æ€»è´¹ç”¨
        cell.SetAttribute( "value", [String]c.TotalCost().Round( 0 ) ); // æ€»è´¹ç”¨
        cellColumn.AppendChild( cell );
      }
      tableElement.AppendChild( cellColumn );
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Import (
  MacroPlan macroPlan,
  GeneralExcelImportAndExportDataTable table
)
{
  TextBody: '//traverse ('
}
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def
@@ -22,6 +22,18 @@
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 2
      ]
    }
    Component bImport
    {
      #keys: '[415754.0.345743565]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'IMPORT1'
        Label: '导入'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bImport_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
Quintiq file version 2.0
#parent: pHeader/bImport
Response OnClick () id:Response_pHeader_bImport_OnClick
{
  #keys: '[415754.0.345782016]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      try {
        uploadJsonString := Application.GetFile();
        if ( uploadJsonString <> "" ) {
          uploadJson := JSON::Parse( uploadJsonString );
          Archive::VerifyTheFileName( uploadJson );
          fileName := uploadJson.Get( "name" ).GetString();
          base64String := uploadJson.Get( "data" ).GetString();
          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
          generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( RecycleBin, webFileBinaryData, fileName );
          generalExcelImportAndExportDataSource.ReadStructure();
          selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
          CC_EngineRackCell::Import( MacroPlan, selection );
          // åŽç»­åˆ é™¤
          generalExcelImportAndExportDataSource.Delete();
          WebMessageBox::Success( Translations::A_VWED_Success() );
        }
      } onerror {
        WebMessageBox::Error( e.GeneralInformation() );
      }
    *]
    GroupServerCalls: false
  }
}