Ver código fonte

Merge branch 'master' of http://192.168.1.12:3000/MaiXinRong/Measure

CSL 9 anos atrás
pai
commit
14deb937b4

+ 19 - 10
DataModules/BillsCompileDm.pas

@@ -226,8 +226,10 @@ procedure TBillsCompileData.sdvBillsCompileAfterValueChanged(
   end;
 
 var
-  stnNode: TsdIDTreeNode;
+  vNode: TBillsIDTreeNode;
 begin
+  vNode := TBillsIDTreeNode(BillsCompileTree.FindNode(AValue.Owner.ValueByName('ID').AsInteger));
+
   if SameText(AValue.FieldName, 'OrgQuantity') or
       SameText(AValue.FieldName, 'OrgTotalPrice') then
     CalculateOrg(AValue.Owner.ValueByName('ID').AsInteger)
@@ -237,15 +239,13 @@ begin
   else if SameText(AValue.FieldName, 'OthQuantity') or
       SameText(AValue.FieldName, 'OthTotalPrice') then
     CalculateOth(AValue.Owner.ValueByName('ID').AsInteger)
-  else if SameText(AValue.FieldName, 'Price') or
-      SameText(AValue.FieldName, 'DgnQuantity1') then
-    CalculateTotal(AValue.Owner.ValueByName('ID').AsInteger);
+  else if SameText(AValue.FieldName, 'Price') then
+    CalculateTotal(AValue.Owner.ValueByName('ID').AsInteger)
+  else if SameText(AValue.FieldName, 'DgnQuantity1') then
+    CalculateDesignPrice(vNode);
 
   if (AValue.FieldName = 'LockedInfo') then
-  begin
-    stnNode := BillsCompileTree.FindNode(AValue.Owner.ValueByName('ID').AsInteger);
-    ResetChildrenLockedInfo(stnNode, AValue.AsBoolean);
-  end;
+    ResetChildrenLockedInfo(vNode, AValue.AsBoolean);
 
   if (AValue.FieldName = 'B_Code') then
   begin
@@ -556,7 +556,10 @@ procedure TBillsCompileData.sdvBillsCompileSetText(var Text: String;
   begin
     sPre := StringReplace(AFieldName, 'Quantity', '', [rfIgnoreCase, rfReplaceAll]);
     if CheckStringNull(Text) or CheckNumeric(Text) then
-      Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)))
+    begin
+      ARecord.ValueByName(sPre + 'Formula').AsString := '';
+      Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)));
+    end
     else
     begin
       ARecord.ValueByName(sPre + 'Formula').AsString := Text;
@@ -571,7 +574,10 @@ procedure TBillsCompileData.sdvBillsCompileSetText(var Text: String;
   begin
     sPre := StringReplace(AFieldName, 'TotalPrice', '', [rfIgnoreCase, rfReplaceAll]);
     if CheckStringNull(Text) or CheckNumeric(Text) then
-      Text := FloatToStr(TotalPriceRoundTo(StrToFloatDef(Text, 0)))
+    begin
+      ARecord.ValueByName(sPre + 'Formula').AsString := '';
+      Text := FloatToStr(TotalPriceRoundTo(StrToFloatDef(Text, 0)));
+    end
     else
     begin
       ARecord.ValueByName(sPre + 'Formula').AsString := Text;
@@ -885,6 +891,7 @@ begin
             OrgQuantity.AsFloat + MisQuantity.AsFloat + OthQuantity.AsFloat);
         TotalPrice.AsFloat := TotalPriceRoundTo(
             OrgTotalPrice.AsFloat + MisTotalPrice.AsFloat + OthTotalPrice.AsFloat);
+        CacheMisTP := MisTotalPrice.AsFloat;
       end;
     end;
   end;
@@ -921,6 +928,7 @@ begin
             OrgQuantity.AsFloat + MisQuantity.AsFloat + OthQuantity.AsFloat);
         TotalPrice.AsFloat := TotalPriceRoundTo(
             OrgTotalPrice.AsFloat + MisTotalPrice.AsFloat + OthTotalPrice.AsFloat);
+        CacheOrgTP := OrgTotalPrice.AsFloat;
       end;
     end;
   end;
@@ -957,6 +965,7 @@ begin
             OrgQuantity.AsFloat + MisQuantity.AsFloat + OthQuantity.AsFloat);
         TotalPrice.AsFloat := TotalPriceRoundTo(
             OrgTotalPrice.AsFloat + MisTotalPrice.AsFloat+ OthTotalPrice.AsFloat);
+        CacheOthTP := OthTotalPrice.AsFloat;
       end;
     end;
   end;

+ 8 - 10
DataModules/BillsDm.pas

@@ -193,7 +193,7 @@ procedure TBillsData.Save;
             stnNode.Rec.SerialNo.AsInteger := stnNode.MajorIndex;
 
           // 秊綾쌘듐
-          stnNode.Rec.SetBoolValue(stnNode.Rec.IsLeaf, stnNode.HasChildren);
+          stnNode.Rec.SetBoolValue(stnNode.Rec.IsLeaf, not stnNode.HasChildren);
 
           // 離뒀淃커쌘만쌘듐ID
           if (stnNode.Rec.B_Code.AsString <> '') then
@@ -209,6 +209,7 @@ procedure TBillsData.Save;
           // 묏넋좆헌데탤埼Code
           if (stnNode.Rec.B_Code.AsString <> '') then
           begin
+            sIndexCode := B_CodeToIndexCode(stnNode.Rec.B_Code.AsString);
             stnNode.Rec.SetStrValue(stnNode.Rec.IndexCode, sIndexCode);
           end;
         end;
@@ -422,16 +423,15 @@ end;
 procedure TBillsData.LockedBaseData;
 var
   iIndex: Integer;
+  Rec: TBillsRecord;
 begin
   sddBills.BeginUpdate;
   for iIndex := 0 to sddBills.RecordCount - 1 do
   begin
-    if not sddBills.Records[iIndex].ValueByName('LockedLevel').AsBoolean then
-      sddBills.Records[iIndex].ValueByName('LockedLevel').AsBoolean := True;
-    if not sddBills.Records[iIndex].ValueByName('LockedInfo').AsBoolean then
-      sddBills.Records[iIndex].ValueByName('LockedInfo').AsBoolean := True;
-    if sddBills.Records[iIndex].ValueByName('NewPrice').AsFloat <> 0 then
-      sddBills.Records[iIndex].ValueByName('LockedNewPrice').AsBoolean := True;
+    Rec := TBillsRecord(sddBills.Records[iIndex]);
+    Rec.SetBoolValue(Rec.LockLevel, True);
+    Rec.SetBoolValue(Rec.LockInfo, True);
+    Rec.SetBoolValue(Rec.LockNewPrice, Rec.NewPrice.AsFloat <> 0);
   end;
   sddBills.EndUpdate;
 end;
@@ -514,13 +514,11 @@ end;
 procedure TBillsData.DisableEvents;
 begin
   sddBills.BeforeValueChange := nil;
-  sddBills.AfterValueChanged := nil;
 end;
 
 procedure TBillsData.EnableEvents;
 begin
-  {sddBills.BeforeValueChange := sddBillsBeforeValueChange;
-  sddBills.AfterValueChanged := sddBillsAfterValueChanged;}
+  sddBills.BeforeValueChange := sddBillsBeforeValueChange;
 end;
 
 procedure TBillsData.UnLockedBaseData;

+ 20 - 14
DataModules/BillsMeasureDm.pas

@@ -471,7 +471,7 @@ procedure TBillsMeasureData.sdvBillsMeasureNeedLookupRecord(
     end;
   end;
 
-  procedure SetQuantityRec(APhaseRec: TsdDataRecord; const AType: string);
+  procedure SetQuantityRec(ANode: TBillsIDTreeNode; APhaseRec: TsdDataRecord; const AType: string);
   var
     bAllow: Boolean;
   begin
@@ -482,7 +482,10 @@ procedure TBillsMeasureData.sdvBillsMeasureNeedLookupRecord(
           APhaseRec, StrToFloatDef(ANewText, 0), AType);
 
     if bAllow then
-    begin
+    begin 
+      if ANode.Rec.CalcType.AsInteger <> 0 then
+        ANode.Rec.CalcType.AsInteger := 0;
+        
       if CheckNumeric(ANewText) then
         APhaseRec.ValueByName(AType + 'Quantity').AsFloat := QuantityRoundTo(StrToFloatDef(ANewText, 0))
       else
@@ -494,9 +497,12 @@ procedure TBillsMeasureData.sdvBillsMeasureNeedLookupRecord(
     end;
   end;
 
-  procedure SetTotalPriceRec(APhaseRec: TsdDataRecord; const AType: string);
-  begin
+  procedure SetTotalPriceRec(ANode: TBillsIDTreeNode; APhaseRec: TsdDataRecord; const AType: string);
+  begin 
+    if ANode.Rec.CalcType.AsInteger <> 1 then
+      ANode.Rec.CalcType.AsInteger := 1;
     APhaseRec.ValueByName(AType + 'Flag').AsInteger := 2;
+
     if CheckNumeric(ANewText) then
       APhaseRec.ValueByName(AType + 'TotalPrice').AsFloat := TotalPriceRoundTo(StrToFloatDef(ANewText, 0))
     else
@@ -506,20 +512,20 @@ procedure TBillsMeasureData.sdvBillsMeasureNeedLookupRecord(
     end;
   end;
 
-  procedure SetNewRecValue(APhaseRec: TsdDataRecord);
+  procedure SetNewRecValue(ANode: TBillsIDTreeNode; APhaseRec: TsdDataRecord);
   begin
     if SameText(AColumn.FieldName, 'CurDealQuantity') then
-      SetQuantityRec(APhaseRec, 'Deal')
+      SetQuantityRec(ANode, APhaseRec, 'Deal')
     else if SameText(AColumn.FieldName, 'CurQcQuantity') then
-      SetQuantityRec(APhaseRec, 'Qc')
+      SetQuantityRec(ANode, APhaseRec, 'Qc')
     else if SameText(AColumn.FieldName, 'CurPcQuantity') then
-      SetQuantityRec(APhaseRec, 'Pc')
+      SetQuantityRec(ANode, APhaseRec, 'Pc')
     else if SameText(AColumn.FieldName, 'CurDealTotalPrice') then
-      SetTotalPriceRec(APhaseRec, 'Deal')
+      SetTotalPriceRec(ANode, APhaseRec, 'Deal')
     else if SameText(AColumn.FieldName, 'CurQcTotalPrice') then
-      SetTotalPriceRec(APhaseRec, 'Qc')
+      SetTotalPriceRec(ANode, APhaseRec, 'Qc')
     else if SameText(AColumn.FieldName, 'CurPcTotalPrice') then
-      SetTotalPriceRec(APhaseRec, 'Pc');
+      SetTotalPriceRec(ANode, APhaseRec, 'Pc');
   end;
 
   function CheckNodeWritable(ANode: TBillsIDTreeNode): Boolean;
@@ -576,13 +582,13 @@ begin
 
   if CheckNeedAddPhaseRecord(vNode) then
   begin
-    if Pos('Quantity', AColumn.FieldName) > 0 then
+    if (Pos('Quantity', AColumn.FieldName) > 0) or (Pos('TotalPrice', AColumn.FieldName) > 0) then
       if HasCardinalNum(ANewText) then
-        raise Exception.Create('数量列公式不可输入参数');
+        raise Exception.Create('公式不可输入参数');
     NewRec := StageData.AddStageRecord(ARecord.ValueByName('ID').AsInteger);
     vNode.StageRec := NewRec;
 
-    SetNewRecValue(NewRec);
+    SetNewRecValue(vNode, NewRec);
   end;
 end;
 

+ 4 - 0
DataModules/SearchDm.pas

@@ -93,6 +93,8 @@ procedure TSearchData.LocateCurrent(ALocateType: TLocateType);
     with TProjectData(FProjectData).BillsCompileData do
     begin
       stnNode := BillsCompileTree.FindNode(cdsSearchID.AsInteger);
+      if not Assigned(stnNode) then Exit;
+
       sdvBillsCompile.LocateInControl(stnNode.Rec);
     end;
   end;
@@ -104,6 +106,8 @@ procedure TSearchData.LocateCurrent(ALocateType: TLocateType);
     with TProjectData(FProjectData).BillsMeasureData do
     begin
       stnNode := BillsMeasureTree.FindNode(cdsSearchID.AsInteger);
+      if not Assigned(stnNode) then Exit;
+
       sdvBillsMeasure.LocateInControl(stnNode.Rec);
     end;
   end;

+ 5 - 9
DataModules/StageDm.pas

@@ -464,18 +464,14 @@ end;
 procedure TStageData.UpdateComplete(ABillsID: Integer; AQuantity,
   ATotalPrice: Double);
 var
-  Rec: TsdDataRecord;
+  Rec: TStageRecord;
 begin
   if ABillsID = -1 then Exit;
   Rec := StageRecord(ABillsID);
-  Rec.ValueByName('GatherQuantity').AsFloat := QuantityRoundTo(
-      Rec.ValueByName('GatherQuantity').AsFloat + AQuantity);
-  Rec.ValueByName('GatherTotalPrice').AsFloat := TotalPriceRoundTo(
-      Rec.ValueByName('GatherTotalPrice').AsFloat + ATotalPrice);
-  Rec.ValueByName('EndGatherQuantity').AsFloat := QuantityRoundTo(
-      Rec.ValueByName('EndGatherQuantity').AsFloat + AQuantity);
-  Rec.ValueByName('EndGatherTotalPrice').AsFloat := TotalPriceRoundTo(
-      Rec.ValueByName('EndGatherTotalPrice').AsFloat + ATotalPrice);
+  Rec.GatherQuantity.AsFloat := QuantityRoundTo(Rec.GatherQuantity.AsFloat + AQuantity);
+  Rec.GatherTotalPrice.AsFloat := TotalPriceRoundTo(Rec.GatherTotalPrice.AsFloat + ATotalPrice);
+  Rec.EndGatherQuantity.AsFloat := QuantityRoundTo(Rec.EndGatherQuantity.AsFloat + AQuantity);
+  Rec.EndGatherTotalPrice.AsFloat := TotalPriceRoundTo(Rec.EndGatherTotalPrice.AsFloat + ATotalPrice);
   // ÊýÁ¿²»ÏòÉÏ»ã×Ü
   UpdateParentRecord(ABillsID, ATotalPrice, 'GatherTotalPrice');
 end;

+ 2 - 2
Dprs/Pro/Measure.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=5
-Build=211
+Build=214
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化专业版
-FileVersion=3.1.5.211
+FileVersion=3.1.5.214
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Pro/Measure.res


+ 2 - 2
Dprs/Pro/Measure_Cloud.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=5
-Build=211
+Build=212
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化云版
-FileVersion=3.1.5.211
+FileVersion=3.1.5.212
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Pro/Measure_Cloud.res


+ 3 - 3
Dprs/Pro/Measure_GuangDong.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=5
-Build=211
+Build=213
 Debug=0
 PreRelease=0
 Special=0
@@ -126,10 +126,10 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化广东专业版
-FileVersion=3.1.5.211
+FileVersion=3.1.5.213
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
-LegalTrademarks=Measur
+LegalTrademarks=Measure
 OriginalFilename=
 ProductName=纵横公路工程结算决算一体化软件
 ProductVersion=3.1.5.2

BIN
Dprs/Pro/Measure_GuangDong.res


+ 2 - 2
Dprs/Pro/Measure_GuangDong_Cloud.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=3
 MinorVer=1
 Release=5
-Build=211
+Build=212
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化广东云版
-FileVersion=3.1.5.211
+FileVersion=3.1.5.212
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

BIN
Dprs/Pro/Measure_GuangDong_Cloud.res


+ 1 - 0
Frames/BillsCompileFme.dfm

@@ -63,6 +63,7 @@ object BillsCompileFrame: TBillsCompileFrame
       Selection.TransparentColor = False
       FrozenCol = 0
       FrozenRow = 0
+      OnCellTextChanged = zgBillsCompileCellTextChanged
       OnCustomPaste = zgBillsCompileCustomPaste
       OnCopy = zgBillsCompileCopy
       OnPaste = zgBillsCompilePaste

+ 19 - 8
Frames/BillsCompileFme.pas

@@ -67,6 +67,8 @@ type
     procedure actnImportGclBillsToXmjUpdate(Sender: TObject);
     procedure actnImportGclBillsToXmjExecute(Sender: TObject);
     procedure actnImportPlaneFxBillsToXmjExecute(Sender: TObject);
+    procedure zgBillsCompileCellTextChanged(Sender: TObject; Col,
+      Row: Integer);
   private
     FBillsCompileData: TBillsCompileData;
     FShowIDField: Boolean;
@@ -227,13 +229,7 @@ begin
     dxpmBillsCompile.PopupFromCursorPos
   else
   begin
-    if CheckExprsColumn then
-      laEdtExprs.Text := zgBillsCompile.CurCell.EditText
-    else
-      laEdtExprs.Text := '';
-    with stdBillsCompile.DataView do
-      if Assigned(Current) then
-        laEdtExprs.ReadOnly := Current.ValueByName('LockedInfo').AsBoolean;
+
   end;
 end;
 
@@ -287,7 +283,10 @@ begin
   iCol := zgBillsCompile.CurCol-zgBillsCompile.FixedColCount;
   Result := (iCol = stdBillsCompile.VisibleCol('OrgQuantity'))
          or (iCol = stdBillsCompile.VisibleCol('MisQuantity'))
-         or (iCol = stdBillsCompile.VisibleCol('OthQuantity'));
+         or (iCol = stdBillsCompile.VisibleCol('OthQuantity'))
+         or (iCol = stdBillsCompile.VisibleCol('OrgTotalPrice'))
+         or (iCol = stdBillsCompile.VisibleCol('MisTotalPrice'))
+         or (iCol = stdBillsCompile.VisibleCol('OthTotalPirce'));
 end;
 
 procedure TBillsCompileFrame.laEdtExprsKeyDown(Sender: TObject;
@@ -610,4 +609,16 @@ begin
   end;
 end;
 
+procedure TBillsCompileFrame.zgBillsCompileCellTextChanged(Sender: TObject;
+  Col, Row: Integer);
+begin
+  if CheckExprsColumn then
+    laEdtExprs.Text := zgBillsCompile.CurCell.EditText
+  else
+    laEdtExprs.Text := '';
+  with stdBillsCompile.DataView do
+    if Assigned(Current) then
+      laEdtExprs.ReadOnly := Current.ValueByName('LockedInfo').AsBoolean;
+end;
+
 end.

+ 1 - 0
Frames/DealPaymentFme.dfm

@@ -330,6 +330,7 @@ object DealPaymentFrame: TDealPaymentFrame
       Caption = #35774#32622#35745#25552#26399#38480
       Hint = #36798#21040#26465#20214#26102#65292#21363#21051#35745#37327#33267#20184'('#25187')'#27454#38480#39069
       OnExecute = actnSetDealPayPlanExecute
+      OnUpdate = actnSetDealPayPlanUpdate
     end
   end
 end

+ 6 - 0
Frames/DealPaymentFme.pas

@@ -45,6 +45,7 @@ type
     procedure actnSetDealPayPlanExecute(Sender: TObject);
     procedure zgDealPaymentShowHint(var HintStr: String;
       var CanShow: Boolean; var HintInfo: THintInfo; const ACoord: TPoint);
+    procedure actnSetDealPayPlanUpdate(Sender: TObject);
   private
     FDealPaymentData: TDealPaymentData;
 
@@ -372,4 +373,9 @@ begin
   end;
 end;
 
+procedure TDealPaymentFrame.actnSetDealPayPlanUpdate(Sender: TObject);
+begin
+  TAction(Sender).Enabled := Assigned(sdDealPayment.DataView.Current);
+end;
+
 end.

+ 21 - 8
Frames/ProjectFme.pas

@@ -568,8 +568,17 @@ procedure TProjectFrame.dxsbViewControlItemClick(Sender: TObject;
   end;
 
   procedure DisplayPriceMargin;
+  var
+    vPM_Node: TsdIDTreeNode;
   begin
-    if ProjectData.ProjProperties.PhaseCount = 0 then
+    vPM_Node := FProjectData.BillsCompileData.BillsCompileTree.FindNode(iPriceMarginID);
+    if not Assigned(vPM_Node) then
+    begin
+      ErrorMessage('台账中无预定义价差节点,不可使用价差功能。');
+      dxsbViewControl.SelectedItem := dxsbViewControl.ActiveGroup.Items[jpsMain.ActivePageIndex];
+      Abort;
+    end
+    else if ProjectData.ProjProperties.PhaseCount = 0 then
     begin
       TipMessage('未计量前不可进行材料调差。');
       dxsbViewControl.SelectedItem := dxsbViewControl.ActiveGroup.Items[jpsMain.ActivePageIndex];
@@ -578,11 +587,12 @@ procedure TProjectFrame.dxsbViewControlItemClick(Sender: TObject;
     ChangeView;
   end;
 
+var
+  bCloseCompare: Boolean;
 begin
   if Item.Tag = jpsMain.ActivePageIndex then Exit;
 
-  if (Item.Tag in [0..3]) and (jpsMain.ActivePageIndex = 4) then
-    CloseCompare;
+  bCloseCompare := (Item.Tag in [0..3]) and (jpsMain.ActivePageIndex = 4);
 
   case Item.Tag of
     0..2: ChangeView;
@@ -590,6 +600,9 @@ begin
     4: DisplayCompare;
     5: DisplayReports;
   end;
+
+  if bCloseCompare then
+    CloseCompare;
 end;
 
 procedure TProjectFrame.CreateBillsFrame;
@@ -627,8 +640,8 @@ end;
 procedure TProjectFrame.dxpmExpandBillsPopup(Sender: TObject);
 begin
   dxpmExpandBills.ItemLinks.Items[8].Visible := G_IsTest;
-  dxpmExpandBills.ItemLinks.Items[7].Visible := jpsMain.ActivePageIndex in [0, 1, 3];
-  dxpmExpandBills.ItemLinks.Items[6].Visible := jpsMain.ActivePageIndex in [1, 3];
+  dxpmExpandBills.ItemLinks.Items[7].Visible := jpsMain.ActivePageIndex in [0, 1, 4];
+  dxpmExpandBills.ItemLinks.Items[6].Visible := jpsMain.ActivePageIndex in [1, 4];
   SetDxBtnAction(actnFirstLevel, MainForm.dxbtnFirstLevel);
   SetDxBtnAction(actnSecondLevel, MainForm.dxbtnSecondLevel);
   SetDxBtnAction(actnThirdLevel, MainForm.dxbtnThirdLevel);
@@ -669,7 +682,7 @@ begin
     case jpsMain.ActivePageIndex of
       0: FBillsCompileFrame.ExpandNodeTo(ALevel);
       1: FBillsMeasureFrame.ExpandNodeTo(ALevel);
-      3: FPhaseCompareFrame.ExpandNodeTo(ALevel);
+      4: FPhaseCompareFrame.ExpandNodeTo(ALevel);
     end;
   finally
     UpdateSysProgress(0, '就绪');
@@ -685,7 +698,7 @@ begin
     case jpsMain.ActivePageIndex of
       0: FBillsCompileFrame.ExpandXmjNode;
       1: FBillsMeasureFrame.ExpandXmjNode;
-      3: FPhaseCompareFrame.ExpandXmjNode;
+      4: FPhaseCompareFrame.ExpandXmjNode;
     end;
   finally
     UpdateSysProgress(0, '就绪');
@@ -1374,7 +1387,7 @@ begin
   try
     case jpsMain.ActivePageIndex of
       1: FBillsMeasureFrame.ExpandCurPhase;
-      3: FPhaseCompareFrame.ExpandCurPhase;
+      4: FPhaseCompareFrame.ExpandCurPhase;
     end;
   finally
     UpdateSysProgress(0, '就绪');