|
@@ -25,7 +25,9 @@ type
|
|
|
FNameCol: Integer;
|
|
|
FUnitsCol: Integer;
|
|
|
FPriceCol: Integer;
|
|
|
- FQuantityCol: Integer;
|
|
|
+ FOrgQuantityCol: Integer;
|
|
|
+ FMisQuantityCol: Integer;
|
|
|
+ FOthQuantityCol: Integer;
|
|
|
FDgnQuantity1Col: Integer;
|
|
|
FDgnQuantity2Col: Integer;
|
|
|
FDrawingCol: Integer;
|
|
@@ -59,7 +61,7 @@ implementation
|
|
|
|
|
|
uses
|
|
|
Forms, Controls, ProgressHintFrm, ConstUnit, UtilMethods, ExcelImport,
|
|
|
- SysUtils, mDataRecord;
|
|
|
+ SysUtils, mDataRecord, XLSAdapter;
|
|
|
|
|
|
{ Tdei_CustomBills }
|
|
|
|
|
@@ -240,18 +242,22 @@ begin
|
|
|
FNameCol := -1;
|
|
|
FUnitsCol := -1;
|
|
|
FPriceCol := -1;
|
|
|
- FQuantityCol := -1;
|
|
|
+ FOrgQuantityCol := -1;
|
|
|
+ FMisQuantityCol := -1;
|
|
|
+ FOthQuantityCol := -1;
|
|
|
FDgnQuantity1Col := -1;
|
|
|
FDgnQuantity2Col := -1;
|
|
|
FDrawingCol := -1;
|
|
|
FMemoCol := -1;
|
|
|
- for iCol := 1 to Excel.XlsFile.MaxRow do
|
|
|
+ FLevelCol := -1;
|
|
|
+
|
|
|
+ for iCol := 1 to Excel.XlsFile.MaxCol do
|
|
|
begin
|
|
|
sColName := GetCellTrimStr(Excel.XlsFile, FCurRow, iCol);
|
|
|
|
|
|
- if (sColName = '预算项目节') or (sColName = '项目节编号') then
|
|
|
+ if Pos('项目节', sColName) > 0 then
|
|
|
FCodeCol := iCol
|
|
|
- else if (sColName = '清单子目号') or (sColName = '清单编号') then
|
|
|
+ else if (sColName = '清单编号') or (Pos('子目号', sColName) > 0) then
|
|
|
FB_CodeCol := iCol
|
|
|
else if sColName = '名称' then
|
|
|
FNameCol := iCol
|
|
@@ -259,8 +265,12 @@ begin
|
|
|
FUnitsCol := iCol
|
|
|
else if sColName = '单价' then
|
|
|
FPriceCol := iCol
|
|
|
- else if (sColName = '清单数量') or (sColName = '工程量') or (sColName = '数量') then
|
|
|
- FQuantityCol := iCol
|
|
|
+ else if (sColName = '清单数量') or (sColName = '工程量') or (sColName = '数量') or (sColName = '施工图数量') then
|
|
|
+ FOrgQuantityCol := iCol
|
|
|
+ else if (sColName = '设计错漏数量') then
|
|
|
+ FMisQuantityCol := iCol
|
|
|
+ else if (sColName = '其他错漏数量') then
|
|
|
+ FOthQuantityCol := iCol
|
|
|
else if (sColName = '设计数量1') or (sColName = '数量1') then
|
|
|
FDgnQuantity1Col := iCol
|
|
|
else if (sColName = '设计数量2') or (sColName = '数量2') then
|
|
@@ -334,7 +344,9 @@ begin
|
|
|
Node.Name := sName;
|
|
|
Node.Units := GetCellTrimStr(Excel.XlsFile, FCurRow, FUnitsCol);
|
|
|
Node.Price := GetCellFloat(Excel.XlsFile, FCurRow, FPriceCol);
|
|
|
- Node.Quantity := GetCellFloat(Excel.XlsFile, FCurRow, FQuantityCol);
|
|
|
+ Node.OrgQuantity := GetCellFloat(Excel.XlsFile, FCurRow, FOrgQuantityCol);
|
|
|
+ Node.MisQuantity := GetCellFloat(Excel.XlsFile, FCurRow, FMisQuantityCol);
|
|
|
+ Node.OthQuantity := GetCellFloat(Excel.XlsFile, FCurRow, FOthQuantityCol);
|
|
|
Node.DgnQuantity1 := GetCellFloat(Excel.XlsFile, FCurRow, FDgnQuantity1Col);
|
|
|
Node.DgnQuantity2 := GetCellFloat(Excel.XlsFile, FCurRow, FDgnQuantity2Col);
|
|
|
Node.DrawingCode := GetCellTrimStr(Excel.XlsFile, FCurRow, FDrawingCol);
|
|
@@ -376,7 +388,9 @@ begin
|
|
|
Rec.Name.AsString := ANode.Name;
|
|
|
Rec.Units.AsString := ANode.Units;
|
|
|
Rec.Price.AsFloat := PriceRoundTo(ANode.Price);
|
|
|
- Rec.OrgQuantity.AsFloat := QuantityRoundTo(ANode.Quantity);
|
|
|
+ Rec.OrgQuantity.AsFloat := QuantityRoundTo(ANode.OrgQuantity);
|
|
|
+ Rec.MisQuantity.AsFloat := QuantityRoundTo(ANode.MisQuantity);
|
|
|
+ Rec.OthQuantity.AsFloat := QuantityRoundTo(ANode.OthQuantity);
|
|
|
Rec.DgnQuantity1.AsFloat := QuantityRoundTo(ANode.DgnQuantity1);
|
|
|
Rec.DgnQuantity2.AsFloat := QuantityRoundTo(ANode.DgnQuantity2);
|
|
|
Rec.DrawingCode.AsString := ANode.DrawingCode;
|