| | |
| | | Body: |
| | | [* |
| | | try { |
| | | uploadJsonString := Application.GetFile(); |
| | | uploadJsonString := Application.GetFile(); |
| | | if ( uploadJsonString <> "" ) { |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | uploadJson := JSON::Parse( uploadJsonString ); |
| | | Archive::VerifyTheFileName( uploadJson ); |
| | | |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | fileName := uploadJson.Get( "name" ).GetString(); |
| | | base64String := uploadJson.Get( "data" ).GetString(); |
| | | |
| | | webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); |
| | | webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); |
| | | |
| | | source := FinancialSalesSource::Upload( MacroPlan, webFileBinaryData, fileName ); |
| | | source := FinancialSalesSource::Upload( MacroPlan, webFileBinaryData, fileName ); |
| | | source.ReadStructure(); |
| | | //如果存在计划开始后的日期数据需要点击确认 |
| | | if( not source.IsExistFutureMonthData() or |
| | | ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){ |
| | | FinancialSalesSource::InitializeNew( MacroPlan ); |
| | | source.AfterImport(); |
| | | DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) ); |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) |
| | | and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) |
| | | and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() ); |
| | | |
| | | table := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, table.IsShow() ); |
| | | table.Generate( dhSearch.Data(), dhFactorys.Data(), productids ); |
| | | DataHolderTable.Data( table ); |
| | | // DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) ); |
| | | } |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |