소스 검색

Audit Completed Phase, show Report BackgroundMark according to options

MaiXinRong 8 년 전
부모
커밋
c32fb066c1
2개의 변경된 파일4개의 추가작업 그리고 24개의 파일을 삭제
  1. 2 1
      Forms/ReportsFrm.pas
  2. 2 23
      Forms/SignOnlineReportsFrm.pas

+ 2 - 1
Forms/ReportsFrm.pas

@@ -786,7 +786,8 @@ begin
   APrintCom.BackgroundMarkStr := FProjectData.ProjProperties.ReportShading;}
   if FProjectData.ProjProperties.ReportShowState then
   begin
-    if FProjectData.ProjProperties.ReportShowStateWithoutReply and (FProjectData.ProjProperties.AuditStatus = -1) then
+    if FProjectData.ProjProperties.ReportShowStateWithoutReply and
+        ((FProjectData.ProjProperties.AuditStatus = -1) or (FProjectData.PhaseIndex < FProjectData.ProjProperties.PhaseCount)) then
       APrintCom.ShowBackgroundMark := False
     else
       APrintCom.ShowBackgroundMark := True;

+ 2 - 23
Forms/SignOnlineReportsFrm.pas

@@ -845,7 +845,8 @@ begin
 
   if FProjectData.ProjProperties.ReportShowState then
   begin
-    if FProjectData.ProjProperties.ReportShowStateWithoutReply and (FProjectData.ProjProperties.AuditStatus = -1) then
+    if FProjectData.ProjProperties.ReportShowStateWithoutReply and
+        ((FProjectData.ProjProperties.AuditStatus = -1) or (FProjectData.PhaseIndex < FProjectData.ProjProperties.PhaseCount)) then
       APrintCom.ShowBackgroundMark := False
     else
       APrintCom.ShowBackgroundMark := True;
@@ -1047,27 +1048,6 @@ begin
 end;
 
 procedure TSignOnlineReportsForm.pbGenerateClick(Sender: TObject);
-
-  function GetWidthHeight(APrintCom: TPrintComXML): string;
-  var
-    iHeight, iWidth: Integer;
-  begin
-    if APrintCom.PrintPageSizeIdx = DMPAPER_A3 then
-    begin
-      if APrintCom.PrintHeight > APrintCom.PrintWidth then
-        result := Format('%d_%d', [297, 420])
-      else
-        result := Format('%d_%d', [420, 297]);
-    end
-    else if APrintCom.PrintPageSizeIdx = DMPAPER_A4 then
-    begin
-      if APrintCom.PrintHeight > APrintCom.PrintWidth then
-        result := Format('%d_%d', [210, 297])
-      else
-        result := Format('%d_%d', [297, 210]);
-    end;
-  end;
-
 var
   sReportName, sZipFile, sPdfFile, sErrorMessage: string;
   vInFields, vInValues: array [0..5] of string;
@@ -1088,7 +1068,6 @@ begin
     vInFields[4] := 'ownuid';
     vInValues[4] := IntToStr(PHPWeb.UserID);
     vInFields[5] := 'widhei';
-    //vInValues[5] := GetWidthHeight(PreviewComXML);
     vInValues[5] := Format('%d_%d', [Round(PreviewComXML.ReportSizeDou.X * 10), Round(PreviewComXML.ReportSizeDou.Y * 10)]);
 
     vUpFileFields[0] := 'upfile';