Sfoglia il codice sorgente

价差,价格类,小数位数一定为3位。

MaiXinRong 9 anni fa
parent
commit
40cdd6fdb5
3 ha cambiato i file con 51 aggiunte e 46 eliminazioni
  1. 47 44
      Forms/ProjectPropertiesFrm.dfm
  2. 1 0
      Units/CalcDecimal.pas
  3. 3 2
      Units/ProjectProperty.pas

+ 47 - 44
Forms/ProjectPropertiesFrm.dfm

@@ -215,6 +215,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           Width = 438
           Height = 247
           HorzScrollBar.Range = 401
+          VertScrollBar.Position = 758
           VertScrollBar.Range = 1005
           Align = alClient
           AutoScroll = False
@@ -232,7 +233,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           OnVScroll = msbBaseVScroll
           object lblDealInfo: TLabel
             Left = 7
-            Top = 4
+            Top = -754
             Width = 48
             Height = 12
             Caption = #21512#21516#20449#24687
@@ -245,28 +246,28 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblBuilder: TLabel
             Left = 34
-            Top = 108
+            Top = -650
             Width = 60
             Height = 12
             Caption = #24314#35774#21333#20301#65306
           end
           object lblConstructor: TLabel
             Left = 34
-            Top = 192
+            Top = -566
             Width = 60
             Height = 12
             Caption = #25215#21253#21333#20301#65306
           end
           object lblSupervisor: TLabel
             Left = 34
-            Top = 276
+            Top = -482
             Width = 60
             Height = 12
             Caption = #30417#29702#21333#20301#65306
           end
           object lblTechParameters: TLabel
             Left = 7
-            Top = 371
+            Top = -387
             Width = 48
             Height = 12
             Caption = #25216#26415#21442#25968
@@ -279,14 +280,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblLoadLevel: TLabel
             Left = 34
-            Top = 393
+            Top = -365
             Width = 60
             Height = 12
             Caption = #20844#36335#31561#32423#65306
           end
           object lblDealPayTitle: TLabel
             Left = 7
-            Top = 531
+            Top = -227
             Width = 48
             Height = 12
             Caption = #21512#21516#25903#20184
@@ -299,7 +300,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblSafeTitel: TLabel
             Left = 7
-            Top = 635
+            Top = -123
             Width = 48
             Height = 12
             Caption = #25991#20214#23433#20840
@@ -312,14 +313,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblUnlockPassword: TLabel
             Left = 36
-            Top = 659
+            Top = -99
             Width = 84
             Height = 12
             Caption = #35299#38145#33410#28857#23494#30721#65306
           end
           object lblPasswordHint: TLabel
             Left = 128
-            Top = 660
+            Top = -98
             Width = 90
             Height = 12
             Caption = 'lblPasswordHint'
@@ -333,7 +334,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblCalcParametersTitel: TLabel
             Left = 7
-            Top = 763
+            Top = 5
             Width = 48
             Height = 12
             Caption = #35745#31639#21442#25968
@@ -346,14 +347,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object Label1: TLabel
             Left = 36
-            Top = 787
+            Top = 29
             Width = 84
             Height = 12
             Caption = #20445#30041#23567#25968#20301#25968#65306
           end
           object pnlDealInfoBar: TPanel
             Left = 62
-            Top = 9
+            Top = -749
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -361,7 +362,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leProjectName: TLabeledEdit
             Left = 33
-            Top = 36
+            Top = -722
             Width = 330
             Height = 18
             Ctl3D = False
@@ -373,7 +374,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealName: TLabeledEdit
             Left = 33
-            Top = 76
+            Top = -682
             Width = 152
             Height = 18
             Ctl3D = False
@@ -385,7 +386,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealIndex: TLabeledEdit
             Left = 195
-            Top = 76
+            Top = -682
             Width = 80
             Height = 18
             Ctl3D = False
@@ -397,7 +398,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leBName: TLabeledEdit
             Left = 101
-            Top = 123
+            Top = -635
             Width = 261
             Height = 18
             Ctl3D = False
@@ -409,7 +410,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leBLegal: TLabeledEdit
             Left = 101
-            Top = 164
+            Top = -594
             Width = 137
             Height = 18
             Ctl3D = False
@@ -421,7 +422,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leBDate: TLabeledEdit
             Left = 245
-            Top = 164
+            Top = -594
             Width = 119
             Height = 18
             Ctl3D = False
@@ -433,7 +434,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leCName: TLabeledEdit
             Left = 101
-            Top = 207
+            Top = -551
             Width = 262
             Height = 18
             Ctl3D = False
@@ -445,7 +446,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leCLegal: TLabeledEdit
             Left = 101
-            Top = 248
+            Top = -510
             Width = 137
             Height = 18
             Ctl3D = False
@@ -457,7 +458,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leCDate: TLabeledEdit
             Left = 245
-            Top = 248
+            Top = -510
             Width = 119
             Height = 18
             Ctl3D = False
@@ -469,7 +470,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSName: TLabeledEdit
             Left = 101
-            Top = 291
+            Top = -467
             Width = 262
             Height = 18
             Ctl3D = False
@@ -481,7 +482,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSLegal: TLabeledEdit
             Left = 101
-            Top = 331
+            Top = -427
             Width = 137
             Height = 18
             Ctl3D = False
@@ -493,7 +494,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSDate: TLabeledEdit
             Left = 245
-            Top = 331
+            Top = -427
             Width = 119
             Height = 18
             Ctl3D = False
@@ -505,7 +506,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlTechParametersBar: TPanel
             Left = 62
-            Top = 376
+            Top = -382
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -513,7 +514,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leStartPeg: TLabeledEdit
             Left = 34
-            Top = 451
+            Top = -307
             Width = 132
             Height = 18
             Ctl3D = False
@@ -525,7 +526,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leEndPeg: TLabeledEdit
             Left = 176
-            Top = 451
+            Top = -307
             Width = 131
             Height = 18
             Ctl3D = False
@@ -537,7 +538,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leLength: TLabeledEdit
             Left = 34
-            Top = 491
+            Top = -267
             Width = 132
             Height = 18
             Ctl3D = False
@@ -549,7 +550,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leLaneCount: TLabeledEdit
             Left = 176
-            Top = 491
+            Top = -267
             Width = 132
             Height = 18
             Ctl3D = False
@@ -561,7 +562,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object cbLoadLevel: TComboBox
             Left = 34
-            Top = 410
+            Top = -348
             Width = 132
             Height = 20
             Ctl3D = False
@@ -578,7 +579,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlDealPayBar: TPanel
             Left = 62
-            Top = 537
+            Top = -221
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -586,7 +587,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leContractPrice: TLabeledEdit
             Left = 133
-            Top = 552
+            Top = -206
             Width = 117
             Height = 18
             BiDiMode = bdLeftToRight
@@ -604,7 +605,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leStartedSubsist: TLabeledEdit
             Left = 133
-            Top = 579
+            Top = -179
             Width = 118
             Height = 18
             Ctl3D = False
@@ -618,7 +619,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leMaterialSubsist: TLabeledEdit
             Left = 133
-            Top = 605
+            Top = -153
             Width = 119
             Height = 18
             Ctl3D = False
@@ -632,7 +633,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlSafeBar: TPanel
             Left = 62
-            Top = 641
+            Top = -117
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -640,7 +641,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlUnlockPassword: TPanel
             Left = 40
-            Top = 673
+            Top = -85
             Width = 361
             Height = 85
             BevelOuter = bvNone
@@ -868,7 +869,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealType: TLabeledEdit
             Left = 283
-            Top = 76
+            Top = -682
             Width = 80
             Height = 18
             Ctl3D = False
@@ -880,7 +881,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlCalcParametersBar: TPanel
             Left = 62
-            Top = 769
+            Top = 11
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -888,7 +889,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leQuantityDigit: TLabeledEdit
             Left = 100
-            Top = 804
+            Top = 46
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -900,7 +901,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leTotalPriceDigit: TLabeledEdit
             Left = 264
-            Top = 804
+            Top = 46
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -912,7 +913,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udQuantity: TUpDown
             Left = 187
-            Top = 804
+            Top = 46
             Width = 16
             Height = 18
             Associate = leQuantityDigit
@@ -922,7 +923,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udTotalPrice: TUpDown
             Left = 351
-            Top = 804
+            Top = 46
             Width = 16
             Height = 18
             Associate = leTotalPriceDigit
@@ -931,11 +932,12 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object gbPM_Digit: TGroupBox
             Left = 52
-            Top = 830
+            Top = 72
             Width = 349
             Height = 49
             Caption = #20215#24046
             TabOrder = 31
+            Visible = False
             object lePM_PriceDigit: TLabeledEdit
               Left = 49
               Top = 19
@@ -946,6 +948,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
               EditLabel.Caption = #21333#20215#65306
               LabelPosition = lpLeft
               TabOrder = 0
+              Text = '0'
             end
             object udPM_PriceDigit: TUpDown
               Left = 136

+ 1 - 0
Units/CalcDecimal.pas

@@ -172,6 +172,7 @@ begin
     Price.AddLinkViewCol(Columns.FindColumn('DeltaPrice'));
     Price.AddLinkViewCol(Columns.FindColumn('ValidDeltaPrice'));
   end;
+  Price.RefreshLinkViewColsFormat;
 end;
 
 { TDecimalManager }

+ 3 - 2
Units/ProjectProperty.pas

@@ -74,6 +74,7 @@ type
     FPriceFormat: string;
 
     FUpdateFlag: Integer;
+    FPriceMarginStartPhaseID: Integer;
 
     function GetBoolPropertyDef(const AName: string; ADef: Boolean): Boolean;
     function GetIntPropertyDef(const AName: string; ADef: Integer): Integer;
@@ -431,7 +432,7 @@ begin
   begin
     PriceMargin.Quantity.Digit := Common.Quantity.Digit;
     PriceMargin.TotalPrice.Digit := Common.TotalPrice.Digit;
-    PriceMargin.Price.Digit := GetIntPropertyDef('PM_PriceDigit', Common.Price.Digit);
+    PriceMargin.Price.Digit := 3;//GetIntPropertyDef('PM_PriceDigit', Common.Price.Digit);
   end;
 end;
 
@@ -499,7 +500,7 @@ begin
     FPropertyInqurity.Value['QuantityDigit1'] := Compile.Quantity.Digit;
     FPropertyInqurity.Value['TotalPriceDigit1'] := Compile.TotalPrice.Digit;}
     
-    FPropertyInqurity.Value['PM_PriceDigit'] := PriceMargin.Price.Digit;
+    //FPropertyInqurity.Value['PM_PriceDigit'] := PriceMargin.Price.Digit;
   end;
 end;