|
@@ -7,7 +7,7 @@ uses
|
|
|
PhaseCompareDm, DealPaymentDm, SearchDm, DealBillsDm, MainDataListDm,
|
|
|
BillsGatherDm, BGLDm, StaffDm, BillsCompileDm, BillsMeasureDm,
|
|
|
BillsBookmarkDm, UpFileManageUnit, ProjectGLDm, PriceMarginBillsDm,
|
|
|
- DetailGLDm,
|
|
|
+ DetailGLDm, OtherMeasureOnceDm,
|
|
|
Classes, SysUtils, ADODB, sdDB, Checker;
|
|
|
|
|
|
type
|
|
@@ -46,6 +46,8 @@ type
|
|
|
FDetailGLData: TDetailGLData;
|
|
|
FPriceMarginBillsData: TPriceMarginBillsData;
|
|
|
|
|
|
+ FOtherMeasureOnceData: TOtherMeasureOnceData;
|
|
|
+
|
|
|
FCanUnlockInfo: Boolean;
|
|
|
|
|
|
FWebID: Integer;
|
|
@@ -128,6 +130,8 @@ type
|
|
|
procedure OpenForReport2(const AFileName: string);
|
|
|
{OpenForReport3: OpenForReport2的基础上打开最后一个审核人数据,打开BillsMeasureTree不打开BillsCompileTree,链接BillsMeasureTree跟StageData}
|
|
|
procedure OpenForReport3(const AFileName: string);
|
|
|
+ {OpenForGather: BillsData, BillsMeasureTree, DealPaymentData, BGLData, PhaseData(根据PhaseIndex指定打开)}
|
|
|
+ procedure OpenForGather(const AFileName: string; APhaseIndex: Integer = -1);
|
|
|
//----------------------- End ---后台打开 ------------------------
|
|
|
|
|
|
procedure SaveDebugFile(const AFileName: string);
|
|
@@ -209,6 +213,8 @@ type
|
|
|
property DetailGLData: TDetailGLData read FDetailGLData;
|
|
|
property PriceMarginBillsData: TPriceMarginBillsData read FPriceMarginBillsData;
|
|
|
|
|
|
+ property OtherMeasureOnceData: TOtherMeasureOnceData read FOtherMeasureOnceData;
|
|
|
+
|
|
|
// 台账、合同支付
|
|
|
property AllowInsert: Boolean read GetAllowInsert;
|
|
|
property BaseDataReadOnly: Boolean read GetBaseDataReadOnly;
|
|
@@ -289,6 +295,7 @@ begin
|
|
|
FProjectGLData := TProjectGLData.Create(Self);
|
|
|
FDetailGLData := TDetailGLData.Create(Self);
|
|
|
FPriceMarginBillsData := TPriceMarginBillsData.Create(Self);
|
|
|
+ FOtherMeasureOnceData := TOtherMeasureOnceData.Create(Self);
|
|
|
FAttachmentData := TUpFiles.Create;
|
|
|
FPhaseIndex := 0;
|
|
|
end;
|
|
@@ -309,6 +316,7 @@ destructor TProjectData.Destroy;
|
|
|
begin
|
|
|
try
|
|
|
FCheckers.Free;
|
|
|
+ FOtherMeasureOnceData.Free;
|
|
|
FPriceMarginBillsData.Free;
|
|
|
FDetailGLData.Free;
|
|
|
FProjectGLData.Free;
|
|
@@ -449,6 +457,7 @@ begin
|
|
|
|
|
|
//FBillsGatherData.RefreshBills;
|
|
|
FMainListData.Open(FConnection.Connection);
|
|
|
+ FOtherMeasureOnceData.Open(FConnection.Connection);
|
|
|
UpdateSysProgress(200, '就绪');
|
|
|
|
|
|
if _IsDebugView then
|
|
@@ -493,6 +502,9 @@ begin
|
|
|
FBillsCompileData.ReLockBaseData;
|
|
|
UpdateSysProgress(110, '正在保存数据');
|
|
|
FBillsData.Save;
|
|
|
+ UpdateSysProgress(165, '正在保存数据');
|
|
|
+
|
|
|
+ FOtherMeasureOnceData.Save;
|
|
|
UpdateSysProgress(170, '正在保存数据');
|
|
|
|
|
|
FProjProperties.AuditCompany := FStaffData.FinalStaffCompany;
|
|
@@ -1737,12 +1749,21 @@ procedure TProjectData.ResetFloatDigitView;
|
|
|
FBGLData.cdsBGBillsViewUsedQuantity.DisplayFormat := FProjProperties.QuantityFormat;
|
|
|
end;
|
|
|
|
|
|
+ procedure SetOtherMeasureDigit;
|
|
|
+ begin
|
|
|
+ with FOtherMeasureOnceData.sdvOnce do
|
|
|
+ begin
|
|
|
+ Columns.FindColumn('TotalPrice').DisplayFormat := FProjProperties.TotalPriceFormat;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
begin
|
|
|
SetBillsCompileDigit;
|
|
|
SetBillsMeasureDigit;
|
|
|
SetDealPaymentDigit;
|
|
|
SetBillsGatherDigit;
|
|
|
SetBGLDigit;
|
|
|
+ SetOtherMeasureDigit;
|
|
|
end;
|
|
|
|
|
|
function TProjectData.GetStageDataReadOnly: Boolean;
|
|
@@ -1955,4 +1976,28 @@ begin
|
|
|
Result := False;
|
|
|
end;
|
|
|
|
|
|
+procedure TProjectData.OpenForGather(const AFileName: string;
|
|
|
+ APhaseIndex: Integer = -1);
|
|
|
+begin
|
|
|
+ FProjectID := -1;
|
|
|
+ UnZipFile(AFileName, TempPath);
|
|
|
+ FConnection.Open(MainFileName);
|
|
|
+ UpdateProjectDataBase;
|
|
|
+ FProjProperties.Open(FConnection.Connection);
|
|
|
+ UpdateOldData;
|
|
|
+ FBillsData.Open(FConnection.Connection);
|
|
|
+ FBillsCompileData.Open;
|
|
|
+ FDealPaymentData.Open(FConnection.Connection);
|
|
|
+ FBGLData.Open(FConnection.Connection);
|
|
|
+ if ProjProperties.PhaseCount > 0 then
|
|
|
+ begin
|
|
|
+ if (APhaseIndex <= ProjProperties.PhaseCount) and (APhaseIndex > 0) then
|
|
|
+ FPhaseIndex := APhaseIndex
|
|
|
+ else
|
|
|
+ FPhaseIndex := ProjProperties.PhaseCount;
|
|
|
+ FPhaseData.SimpleOpen2(Format('%sPhase%d.dat', [TempPath, FPhaseIndex]));
|
|
|
+ end;
|
|
|
+ FBillsMeasureData.ResetTreeNodeStageRec;
|
|
|
+end;
|
|
|
+
|
|
|
end.
|