Explorar el Código

上个人没改数据直接审批通过,文件没变,下个人本地文件跟线上文件完全一样,不下载不更新,不会高显示。

chenshilong hace 6 años
padre
commit
41dd091ff5
Se han modificado 4 ficheros con 51 adiciones y 3 borrados
  1. 2 1
      Dprs/CSL/Measure_Cloud.dpr
  2. 2 2
      Forms/LoginFrm.pas
  3. 1 0
      Frames/ProjectFme.pas
  4. 46 0
      Frames/ProjectManagerFme.pas

+ 2 - 1
Dprs/CSL/Measure_Cloud.dpr

@@ -246,7 +246,8 @@ uses
   stgSubGatherFile in '..\..\SubTenderGather\stgSubGatherFile.pas',
   stgSubGatherFileDm in '..\..\SubTenderGather\stgSubGatherFileDm.pas' {stgSubGatherData: TDataModule},
   stgTables in '..\..\SubTenderGather\stgTables.pas',
-  rmZhongKaiDm in '..\..\DataModules\ReportMemoryDm\rmZhongKaiDm.pas' {rmZhongKaiData: TDataModule};
+  rmZhongKaiDm in '..\..\DataModules\ReportMemoryDm\rmZhongKaiDm.pas' {rmZhongKaiData: TDataModule},
+  BillsPosTree in '..\..\Units\BillsPosTree.pas';
 
 {$R *.res}
 

+ 2 - 2
Forms/LoginFrm.pas

@@ -165,8 +165,8 @@ begin
 
   if G_IsTest then
   begin
-    cbUser.Text := '1014149875@qq.com';
-    edtPW.Text := '123456';
+    cbUser.Text := '1971614655@qq.com';
+    edtPW.Text := '3850888';
   end;
 end;
 

+ 1 - 0
Frames/ProjectFme.pas

@@ -413,6 +413,7 @@ begin
 
       ButtonControl_NewPhase;
       ButtonControl_UpToWeb;
+      MainForm.ProjectManagerFrame.HighlightProject(FProjectData.WebID);
     end;
 
     Result := True;

+ 46 - 0
Frames/ProjectManagerFme.pas

@@ -182,6 +182,8 @@ type
     // AType: -2 繁忙; -1 正常读取; 0 第0期; 1 第1期。
     procedure ShowProjectInfoTop(AType: Integer = -1);
     function Rec(AProjectID: Integer): TsdDataRecord;
+    function RecByWebID(AWebID: Integer): TsdDataRecord;
+    function HighlightProject(AWebID: Integer): Boolean;
     function CurRec: TsdDataRecord;
     function CurRecAttachmentPath: string;
     function AttachmentFileCountsWithoutManageFile(ANode: TsdIDTreeNode): Integer;
@@ -1365,6 +1367,11 @@ begin
             end;
 
             if not FileDownAndReceive(sURL, 1, (FWebCheckStatusMy = csChecking)) then Exit;
+          end
+          else      //   上个人没改数据直接审批通过,文件没变,下个人本地文件跟线上文件完全一样,不下载不更新,不会高显示。这里强制高亮
+          begin
+            if (FWebCheckStatusMy = csChecking) then
+              HighlightProject(FWebID);
           end;
         end;
 
@@ -2073,4 +2080,43 @@ begin
 //  end;
 end;
 
+function TProjectManagerFrame.RecByWebID(AWebID: Integer): TsdDataRecord;
+var i: Integer;
+  vTree: TsdIDTree;
+  vRec: TsdDataRecord;
+begin
+  Result := nil;
+
+  if (CurRec <> nil) and
+    (CurRec.ValueByName('WebUserID').AsInteger = PHPWeb.UserID) and
+    (CurRec.ValueByName('WebID').AsInteger = AWebID) and
+    (CurRec.ValueByName('Type').AsInteger = 1) then
+  begin
+    Result := CurRec;
+    Exit;
+  end;
+
+  vTree := stdProjects.IDTree;
+  for i := 0 to vTree.Count - 1 do
+  begin
+    vRec := vTree.Items[i].Rec;
+    if (vRec.ValueByName('WebUserID').AsInteger = PHPWeb.UserID) and
+      (vRec.ValueByName('WebID').AsInteger = AWebID) and
+      (vRec.ValueByName('Type').AsInteger = 1) then
+    begin
+      Result := vRec;
+      Break;
+    end;
+  end;
+end;
+
+function TProjectManagerFrame.HighlightProject(AWebID: Integer): Boolean;
+var vRec: TsdDataRecord;
+begin
+  vRec := RecByWebID(AWebID);
+  vRec.BeginUpdate;
+  vRec.ValueByName('WebMeWorking').AsBoolean := True;
+  vRec.EndUpdate;
+end;
+
 end.