Przeglądaj źródła

Merge branch '3.1.3.3' of http://192.168.1.12:3000/maixinrong/measure into 3.1.3.3

builder 9 lat temu
rodzic
commit
363ebc22ed

+ 1 - 0
DataModules/PriceMarginBillsDm.dfm

@@ -217,6 +217,7 @@ object PriceMarginBillsData: TPriceMarginBillsData
     AfterDeleteRecord = sdvDetailGLAfterDeleteRecord
     AfterValueChanged = sdvDetailGLAfterValueChanged
     OnFilterRecord = sdvDetailGLFilterRecord
+    OnSetText = sdvDetailGLSetText
     Left = 264
     Top = 136
   end

+ 12 - 1
DataModules/PriceMarginBillsDm.pas

@@ -4,7 +4,7 @@ interface
 
 uses
   SysUtils, Classes, sdDB, sdProvider, BillsTree, mDataRecord,
-  GclBillsGatherModel;
+  GclBillsGatherModel, DB;
 
 type
   TPriceMarginBillsData = class(TDataModule)
@@ -28,6 +28,8 @@ type
     procedure sdvDetailGLAfterDeleteRecord(ARecord: TsdDataRecord);
     procedure sdvGclBillsGetText(var Text: String; ARecord: TsdDataRecord;
       AValue: TsdValue; AColumn: TsdViewColumn; DisplayText: Boolean);
+    procedure sdvDetailGLSetText(var Text: String; ARecord: TsdDataRecord;
+      AValue: TsdValue; AColumn: TsdViewColumn; var Allow: Boolean);
   private
     FProjectData: TObject;
     procedure WriteGclBillsData(AGcls: TList);
@@ -374,4 +376,13 @@ begin
   end;
 end;
 
+procedure TPriceMarginBillsData.sdvDetailGLSetText(var Text: String;
+  ARecord: TsdDataRecord; AValue: TsdValue; AColumn: TsdViewColumn;
+  var Allow: Boolean);
+begin
+  if AValue.DataType in [ftInteger, ftFloat] then
+    if not CheckNumeric(Text) then
+      Text := '';
+end;
+
 end.

+ 5 - 1
DataModules/ProjectGLDm.pas

@@ -74,7 +74,7 @@ implementation
 
 uses
   ProjectData, UtilMethods, DB, Variants, PhaseData, DetailGLDm,
-  BillsMeasureDm, BillsTree, sdIDTree, PhasePayDm, DateUtils;
+  BillsMeasureDm, BillsTree, sdIDTree, PhasePayDm, DateUtils, ZhAPI;
 
 {$R *.dfm}
 
@@ -493,6 +493,10 @@ begin
     if iPhaseID > 0 then
       DataSetErrorMessage(Allow, Format('该工料在第%d期已进行调差计算,不可修改基础数据。', [iPhaseID]));
   end;
+
+  if AValue.DataType in [ftInteger, ftFloat] then
+    if not CheckNumeric(Text) then
+      Text := '';
 end;
 
 procedure TProjectGLData.LoadStagePM_CalcData;

+ 2 - 2
Dprs/CSL/Measure_Cloud.dof

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

BIN
Dprs/CSL/Measure_Cloud.res


+ 1 - 1
Forms/DealPayPlanFrm.dfm

@@ -142,7 +142,7 @@ object DealPayPlanForm: TDealPayPlanForm
       Ctl3D = False
       EditLabel.Width = 66
       EditLabel.Height = 12
-      EditLabel.Caption = #38480#21046#37329#39069#65306' '
+      EditLabel.Caption = #38480#21046#26399#25968#65306' '
       LabelPosition = lpLeft
       ParentCtl3D = False
       TabOrder = 0

+ 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.

+ 9 - 5
Frames/ProjectFme.pas

@@ -572,7 +572,7 @@ procedure TProjectFrame.dxsbViewControlItemClick(Sender: TObject;
     vPM_Node := FProjectData.BillsCompileData.BillsCompileTree.FindNode(iPriceMarginID);
     if not Assigned(vPM_Node) then
     begin
-      ErrorMessage('台账中无预定义价差节点,不可使用价差功能');
+      ErrorMessage('台账中无预定义价差节点,不可使用价差功能');
       dxsbViewControl.SelectedItem := dxsbViewControl.ActiveGroup.Items[jpsMain.ActivePageIndex];
       Abort;
     end
@@ -585,11 +585,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;
@@ -597,6 +598,9 @@ begin
     4: DisplayCompare;
     5: DisplayReports;
   end;
+
+  if bCloseCompare then
+    CloseCompare;
 end;
 
 procedure TProjectFrame.CreateBillsFrame;
@@ -633,8 +637,8 @@ end;
 
 procedure TProjectFrame.dxpmExpandBillsPopup(Sender: TObject);
 begin
-  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);