Browse Source

1、进度条:用标签联动替换Memo,以解决进度频繁时界面不刷新问题。
2、改进审核人不一致逻辑(打回,原报重新开始,上报前):
①其它审核人无法打开问题。
②提示原报不能删除本项目或更换电脑操作。
③其它审核人进入主界面后,审核人列表会带来歧义:提示“本期重新开始"。

CSL 9 years ago
parent
commit
76795cb5c7

+ 2 - 2
Dprs/CSL/Measure_Cloud.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=3
-Build=1062
+Build=1064
 Debug=0
 PreRelease=0
 Special=0
@@ -126,4 +126,4 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化云版
-FileVersion=3.1.3.1062
+FileVersion=3.1.3.1064

BIN
Dprs/CSL/Measure_Cloud.res


+ 25 - 20
Forms/mProgressProFrm.dfm

@@ -1,10 +1,10 @@
 object ProgressProForm: TProgressProForm
-  Left = 810
-  Top = 350
+  Left = 853
+  Top = 419
   BorderIcons = []
   BorderStyle = bsNone
   Caption = #25552#31034
-  ClientHeight = 198
+  ClientHeight = 181
   ClientWidth = 428
   Color = clWindow
   Font.Charset = DEFAULT_CHARSET
@@ -21,7 +21,7 @@ object ProgressProForm: TProgressProForm
     Left = 0
     Top = 0
     Width = 428
-    Height = 198
+    Height = 181
     Align = alClient
     Brush.Style = bsClear
     OnMouseDown = Shape1MouseDown
@@ -54,6 +54,27 @@ object ProgressProForm: TProgressProForm
     Font.Style = []
     ParentFont = False
   end
+  object lblHint1: TLabel
+    Left = 16
+    Top = 120
+    Width = 395
+    Height = 17
+    AutoSize = False
+  end
+  object lblHint2: TLabel
+    Left = 16
+    Top = 136
+    Width = 395
+    Height = 17
+    AutoSize = False
+  end
+  object lblHint3: TLabel
+    Left = 16
+    Top = 152
+    Width = 395
+    Height = 17
+    AutoSize = False
+  end
   object lblPercent: TLabel
     Left = 336
     Top = 84
@@ -69,20 +90,4 @@ object ProgressProForm: TProgressProForm
     Font.Style = [fsBold]
     ParentFont = False
   end
-  object mmTask: TMemo
-    Left = 16
-    Top = 125
-    Width = 393
-    Height = 68
-    TabStop = False
-    BorderStyle = bsNone
-    Font.Charset = DEFAULT_CHARSET
-    Font.Color = clGray
-    Font.Height = -12
-    Font.Name = #24494#36719#38597#40657
-    Font.Style = []
-    ParentFont = False
-    ReadOnly = True
-    TabOrder = 0
-  end
 end

+ 56 - 14
Forms/mProgressProFrm.pas

@@ -21,7 +21,9 @@ type
     Gauge1: TGauge;
     lblTitle: TLabel;
     lblPercent: TLabel;
-    mmTask: TMemo;
+    lblHint1: TLabel;
+    lblHint2: TLabel;
+    lblHint3: TLabel;
     procedure Shape1MouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
   private
@@ -35,8 +37,8 @@ type
 
 procedure ProgressProCreate(AMaxValue: Integer = 100; ATitle: string = '正在处理请稍候>>>');
 procedure ProgressProFree;
-procedure ProgressProRun(AMemoValue: string; APosValue: Integer = 10;
-                         AMemoType: TProgressMemoType = pmtAdd; APosType: TProgressPosType = pptAdd);
+procedure ProgressProRun(AText: string; APos: Integer = 10;
+                         ATextType: TProgressMemoType = pmtAdd; APosType: TProgressPosType = pptAdd);
 procedure ProgressProTitle(ATitle: string);
 function ProgressProHandle: THandle;
 
@@ -80,33 +82,73 @@ begin
   end;
 end;
 
-procedure ProgressProRun(AMemoValue: string; APosValue: Integer;
-                         AMemoType: TProgressMemoType; APosType: TProgressPosType);
+procedure ProgressProRun(AText: string; APos: Integer;
+                         ATextType: TProgressMemoType; APosType: TProgressPosType);
 begin
   if ProgressProForm = nil then Exit;
   with ProgressProForm do
   begin
     if APosType = pptAdd then
-      Gauge1.Progress := Gauge1.Progress + APosValue
+      Gauge1.Progress := Gauge1.Progress + APos
     else if APosType = pptSet then
-      Gauge1.Progress := APosValue;
+      Gauge1.Progress := APos;
 
     if Gauge1.Progress > Gauge1.MaxValue then     // 如果算得不对,缩回5格
       Gauge1.Progress := Gauge1.MaxValue - 2;
 
     lblPercent.Caption := IntToStr(Gauge1.PercentDone) + '%';
 
-    if (AMemoType <> pmtNo) or (AMemoValue <> '') then
+    if (ATextType <> pmtNo) or (AText <> '') then
     begin
-      with mmTask.Lines do
+      if ATextType = pmtAdd then
       begin
-        if (AMemoType = pmtEdit) and (Count > 0) then
-          Delete(Count - 1);
-        Add(AMemoValue);
+        if lblHint1.Caption = '' then
+        begin
+          lblHint1.Caption := AText;
+          lblHint1.Update;
+        end
+        else if lblHint2.Caption = '' then
+        begin
+          lblHint2.Caption := AText;
+          lblHint2.Update;
+        end
+        else if lblHint3.Caption = '' then
+        begin
+          lblHint3.Caption := AText;
+          lblHint3.Update;
+        end
+        else
+        begin
+          lblHint1.Caption := lblHint2.Caption;
+          lblHint2.Caption := lblHint3.Caption;
+          lblHint3.Caption := AText;
+          lblHint1.Update;
+          lblHint2.Update;
+          lblHint3.Update;
+        end;
+      end
+      else if ATextType = pmtEdit then
+      begin
+        if (lblHint1.Caption = '') or (lblHint2.Caption = '') then
+        begin
+          lblHint1.Caption := AText;
+          lblHint1.Update;
+        end
+        else if lblHint3.Caption = '' then
+        begin
+          lblHint2.Caption := AText;
+          lblHint2.Update;
+        end
+        else
+        begin
+          lblHint3.Caption := AText;
+          lblHint3.Update;
+        end;
       end;
+
     end;
 
-    Update;
+//    Update;
   end;
 end;
 
@@ -116,7 +158,7 @@ begin
   with ProgressProForm do
   begin
     lblTitle.Caption := ATitle;
-    Update;
+    lblTitle.Update;
   end;
 end;
 

+ 2 - 3
Frames/ProjectFme.dfm

@@ -2704,11 +2704,11 @@ object ProjectFrame: TProjectFrame
       object pnlProjectCheckStatus: TPanel
         Left = 526
         Top = 0
-        Width = 82
+        Width = 88
         Height = 21
         Align = alLeft
         BevelOuter = bvNone
-        Caption = #26412#26399#24050#23436#25104
+        Caption = #26412#26399#24050#23436#25104#21862
         Font.Charset = ANSI_CHARSET
         Font.Color = clGreen
         Font.Height = -13
@@ -2717,7 +2717,6 @@ object ProjectFrame: TProjectFrame
         ParentColor = True
         ParentFont = False
         TabOrder = 4
-        Visible = False
       end
     end
     object jpsAssistant: TJimPages

+ 37 - 10
Frames/ProjectFme.pas

@@ -149,6 +149,7 @@ type
     function CheckersHint: string;
     procedure SetUpFileManageView(const Value: TUpFileManageView);
     procedure CheckUpFile;
+    procedure ShowPhaseHint;
   public
     constructor Create(AProjectData: TProjectData);
     destructor Destroy; override;
@@ -800,10 +801,7 @@ begin
     btnPass.Left := jcbAudit.Left + jcbAudit.Width + 5;
     btnNotPass.Left := btnPass.Left + btnPass.Width + 1;
   end;
-  if Assigned(CheckerFrame) then
-    pnlProjectCheckStatus.Visible := CheckerFrame.OwnerFrame.CheckStatus = csFinished
-  else
-    pnlProjectCheckStatus.Visible := False;
+  ShowPhaseHint;
 
   if Assigned(FCheckerFrame) then
     FCheckerFrame.RepairDelete(btnSubmit.Visible and btnSubmit.Enabled);
@@ -1036,8 +1034,7 @@ begin
         FCheckerFrame.RepairDelete(False);
         btnPass.Enabled := False;
         btnNotPass.Enabled := btnPass.Enabled;
-        pnlProjectCheckStatus.Visible := CheckerFrame.OwnerFrame.CheckStatus = csFinished;
-
+        ShowPhaseHint;
         TipMessage('^_^ 恭喜!数据已成功上传到云端服务器。', ProgressProHandle);
       end
       else
@@ -1263,10 +1260,10 @@ begin
     else
       Result := (iC = iNo);
   end
-  else
+  else    // 三种情况:①原报阶段,一个状态都没有 ②审核完成 ③审核不通过
   begin
     iNo := FCheckerFrame.CheckNo(csNotPass);
-    if iNo <> -1 then      // 审核不通过
+    if iNo <> -1 then      // 情况③,审核不通过
     begin
       if ProjectData.CurUserIsAuthor then
         Result := ((iC = 1) or (iC = iNo + 1))
@@ -1275,10 +1272,19 @@ begin
     end
     else
     begin
+      // 情况②,审核完成
       if FCheckerFrame.LastChecker.CheckStatus = csFinished then    // 最后一个人是审核完成
         Result := (iC = FCheckerFrame.List.Count + 1)
-      else    // 第一个人是末审核
-        Result := (iC = 1);
+      else
+      // 情况①,原报阶段,一个状态都没有
+      begin
+        if ProjectData.CurUserIsAuthor then   // 如果是原报,则只有一张表
+          Result := (iC = 1)
+        else
+        // 其它人时,原报尚末上传,表的数量是上一期的。
+        // 如果是打回,上一期的数量也是不固定的(中途打回)。反正这里只看不改,不限制。
+          Result := True;
+      end;
     end;
   end;
 end;
@@ -1450,4 +1456,25 @@ begin
   AlignControl(FPriceMarginFrame, jpsMainPriceMargin, alClient);
 end;
 
+procedure TProjectFrame.ShowPhaseHint;
+begin
+  pnlProjectCheckStatus.Caption := '';
+
+  if Assigned(CheckerFrame) then
+  begin
+    if CheckerFrame.FirstChecker.CheckStatus = csNotBegin then
+    begin
+      pnlProjectCheckStatus.Caption := '本期重新开始';
+      pnlProjectCheckStatus.Font.Color := clRed;
+    end
+    else if CheckerFrame.OwnerFrame.CheckStatus = csFinished then
+    begin
+      pnlProjectCheckStatus.Caption := '本期已完成';
+      pnlProjectCheckStatus.Font.Color := clGreen;
+    end;
+  end;
+
+  pnlProjectCheckStatus.Update;
+end;
+
 end.

+ 2 - 1
Frames/ProjectManagerFme.pas

@@ -348,7 +348,8 @@ var
                 Application.MessageBox(PChar('已从云端下载原报上传的无锁文件到本地,但导入失败!请重试。'), '警告', MB_OK + MB_ICONWARNING);
                 Exit;
               end;
-              
+              sHint := '【重要提示】:本期已重新开始,在上报云端之前,原报不能删除该项目或更换电脑操作。';
+              Application.MessageBox(PChar(sHint), '提示', MB_OK + MB_ICONINFORMATION);
               // 导入更新---------------------------------↑↑↑↑↑↑↑↑↑↑↑
             end;