unit DataBaseTables;

{ Temp.dat is Empty. All Field Must Define And Add By This Unit.
  So, DataBaseTables is The Data Dictionary of Measure's File.  }
// 该单元字段应严格按功能分块

interface

type
  TScMDBFieldType = (ftString, ftByte, ftSmallint, ftInteger, ftBoolean, ftSingle, ftDouble,
    ftCurrency, ftDateTime, ftMemo, ftOLEObject, ftFMTBCD);

  TScFieldDef = record
    FieldName: string;
    FieldType: TScMDBFieldType;
    Size: Integer;
    Precision: Integer;
    NotNull: Boolean;
    PrimaryKey: Boolean;
    ForceUpdate: Boolean;
  end;

  PScFieldDef = ^TScFieldDef;

//  (FieldName: ; FieldType: ; Size: ; Precision: 0; NotNull: ; PrimaryKey: ; ForceUpdate: )

const
  {ProjectManagerData}
  {项目管理}
  SProjectsInfo = 'ProjectsInfo';
  tdProjectsInfo: array [0..26] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'ParentID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'NextSiblingID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    // (项目)名称
    (FieldName: 'Name'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 类型（0: 分类 1: 标段）
    (FieldName: 'Type'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 0号台账合同总金额
    (FieldName: 'DealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期完成总金额
    (FieldName: 'PhaseTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止本期合同计量总金额
    (FieldName: 'EndDealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止本期变更计量总金额（累计数量变更+累计单价变更）
    (FieldName: 'EndChangeTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止本期完成总金额
    (FieldName: 'EndTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期完成总金额
    (FieldName: 'PreTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期应付总金额
    (FieldName: 'PhasePay'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计量(总)期数
    (FieldName: 'PhaseCount'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 审核状态
    (FieldName: 'AuditStatus'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // (路径下保存)文件名称
    (FieldName: 'FileName'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建日期
    (FieldName: 'CreateDate'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额小数
    (FieldName: 'CommonDigit'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'DealPayDigit'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 关联网络用的ID。标段和文件夹都有
    (FieldName: 'WebID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 业主
    (FieldName: 'WebOwnerID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 编制人（原始作者）
    (FieldName: 'WebAuthorID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 文件的MD5码
    (FieldName: 'WebMD5'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 文件下载到本地，该字段填上当前用户的ID，用来标识该文件只属于这个用户。多用户使用同一台电脑时，靠这个字段过滤出自己的文件……
    (FieldName: 'WebUserID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 网络文件夹层次。本地结点是一张表存放的树结构。但服务器上，三层结点分成三张表存放，传到本地合并后ID会重复。所以加多一个字段进行区分。
    (FieldName: 'WebFolderLevel'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 用QQ传来传去的那个字符串Key码
    (FieldName: 'WebKey'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 备份文件夹名称
    (FieldName: 'BackupFolder'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令+0号台账合同
    (FieldName: 'Deal_BGLTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {标段信息}
  STenderProperty = 'TenderProperty';
  tdTenderProperty: array [0..4] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'ProjectID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PropID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PropName'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PropValue'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {标段备份数据信息}
  STenderBackup = 'TenderBackup';
  tdTenderBackup: array [0..4] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'ProjectID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Type'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'FileName'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'CreateDateTime'; FieldType: ftDateTime; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {ProjectData}

  {清单数据 -- 台账编辑界面}
  SBills = 'Bills';
  tdBills: array [0..88] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'ParentID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'NextSiblingID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    // --------- Begin 报表专用 -------
    // 排序
    (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 是否最底层节点
    (FieldName: 'IsLeaf'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 最底层项目节父节点ID
    (FieldName: 'LeafXmjParentID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 项
    (FieldName: 'XiangCode'; FieldType: ftString; Size: 10; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 目
    (FieldName: 'MuCode'; FieldType: ftString; Size: 10; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 节
    (FieldName: 'JieCode'; FieldType: ftString; Size: 10; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 细目
    (FieldName: 'XiMuCode'; FieldType: ftString; Size: 30; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 工程量清单排序编号
    (FieldName: 'IndexCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 章级父项ID
    (FieldName: 'ChapterParentID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 节点层次
    (FieldName: 'NodeLevel'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //
    (FieldName: 'B_CodeChapter'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // --------- End   报表专用 -------
    (FieldName: 'Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'B_Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Units'; FieldType: ftstring; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 合同单价
    (FieldName: 'Price'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更单价
    (FieldName: 'NewPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // ---------- Begin 0号台账 ----------
    // 施工图原设计 -- 数量
    (FieldName: 'OrgQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 施工图原设计 -- 金额
    (FieldName: 'OrgTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 施工图原设计 -- 公式
    (FieldName: 'OrgFormula'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 设计错漏增减 -- 数量
    (FieldName: 'MisQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 设计错漏增减 -- 金额
    (FieldName: 'MisTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 施工图原设计 -- 公式
    (FieldName: 'MisFormula'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 其他原因增减 -- 数量
    (FieldName: 'OthQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 其他原因增减 -- 金额
    (FieldName: 'OthTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 施工图原设计 -- 公式
    (FieldName: 'OthFormula'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 合同 - 数量
    (FieldName: 'Quantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 合同 - 金额
    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计算 - 标志
    // 0: 数量单价模式/无  1: 金额模式/无  主要作用于计算（数量、单价、金额可否输入不以此为依据）
    (FieldName: 'CalcType'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 合同 - 计算标识
    // 0: 无任何公式计算; 1: 数量列有计算式; 2: 金额列有计算式;
    // 2015-6-12 作废
    (FieldName: 'QtyFlag'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 合同 - 计算式
    // 2015-6-12 作废
    (FieldName: 'QtyFormula'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // ----------  End  0号台账 ----------
    // 累计合同计量 - 数量
    (FieldName: 'AddDealQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计合同计量 - 金额
    (FieldName: 'AddDealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计数量变更计量 - 数量
    (FieldName: 'AddQcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计数量变更计量 - 金额
    (FieldName: 'AddQcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计单价变更计量 - 变更令
    (FieldName: 'AddQcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计单价变更计量 - 变更数量
    (FieldName: 'AddQcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计单价变更计量 - 数量
    (FieldName: 'AddPcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计单价变更计量 - 金额
    (FieldName: 'AddPcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计单价变更计量 - 变更令
    (FieldName: 'AddPcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计单价变更计量 - 变更数量
    (FieldName: 'AddPcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计完成计量 - 数量
    (FieldName: 'AddGatherQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计完成计量 - 金额
    (FieldName: 'AddGatherTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定层次结构
    (FieldName: 'LockedLevel'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定项目节编号、清单编号、名称、单位、清单单价
    (FieldName: 'LockedInfo'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定变更单价
    (FieldName: 'LockedNewPrice'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建期数
    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 是否为变更清单
    (FieldName: 'IsMeasureAdd'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 桩号
    (FieldName: 'Peg'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 图(册)号
    (FieldName: 'DrawingCode'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 备注
    (FieldName: 'MemoStr'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 相关变更令（变更令处点击应用，则添加）
    (FieldName: 'RelaBGL'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // ---------Begin 概算控制 ---------------------  该部分数据作废
    // 初步设计 -- 数量 (Preliminary Design)
    (FieldName: 'PDQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 初步设计 -- 金额
    (FieldName: 'PDTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 施工图设计 -- 数量 (Construction Drawing Design)
    (FieldName: 'CDDQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 施工图设计 -- 金额
    (FieldName: 'CDDTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 0号台账合同 -- 数量 (Ledger Contract)
    (FieldName: 'LCQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更 -- 数量 (Change)
    (FieldName: 'CQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更 -- 金额
    (FieldName: 'CTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 决算 -- 数量 (Final)
    (FieldName: 'FQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 工程数量调整情况
    (FieldName: 'QuantityDiffer'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 工程费用调整情况
    (FieldName: 'TotalPriceDiffer'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 备注 (Estimate MemoStr)
    (FieldName: 'EMemoStr'; FieldType: ftDouble; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // ---------End 概算控制 ---------------------
    // 设计数量1
    (FieldName: 'DgnQuantity1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 设计数量2
    (FieldName: 'DgnQuantity2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 设计数量1 - 合同
    (FieldName: 'DealDgnQuantity1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 设计数量2 - 合同
    (FieldName: 'DealDgnQuantity2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 设计数量1 - 变更
    (FieldName: 'CDgnQuantity1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 设计数量2 - 变更
    (FieldName: 'CDgnQuantity2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 书签
    (FieldName: 'HasBookMark'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 书签批注
    (FieldName: 'MarkMemo'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 附件
    (FieldName: 'HasAttachment'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 合同编号
    (FieldName: 'DealCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 合同签订单位
    (FieldName: 'DealCompany'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // ------------------- Begin 合同属性 -------------------
    // 合同类别
    (FieldName: 'DealType'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计应扣款
    (FieldName: 'AddCutTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计已付款
    (FieldName: 'AddPayTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // ------------------- End   合同属性 -------------------
    // 别名
    (FieldName: 'Alias'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计完成率
    (FieldName: 'AddCompleteRate'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 经济指标
    (FieldName: 'DgnPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计经济指标
    (FieldName: 'AddDgnPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    {------------------- Begin reports -----------------------}
    // 签约清单数量
    (FieldName: 'GclDealQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 签约清单金额
    (FieldName: 'GclDealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    {------------------ End Reports --------------------------}
    (FieldName: 'PM_AddTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 批复编号
    (FieldName: 'ApprovalCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计量汇总，生成中间计量时，是否汇总其下所有工程量清单
    (FieldName: 'IsGatherZJJL'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {合同支付}
  SDealPayment = 'DealPayment';
  tdDealPayment: array [0..20] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计算类型
    // 0: 一般项
    // 1: 本期应付 -- 汇总所有的一般项
    // 2: 本期实付 -- 输入项
    (FieldName: 'CalcType'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 是否为扣款项
    (FieldName: 'IsMinus'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计算式（仅用于复制数据）
    (FieldName: 'Formula'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计金额
    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 起扣金额
    (FieldName: 'StartedPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 起扣金额 -- 公式
    (FieldName: 'SFormula'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 限额
    (FieldName: 'RangePrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 限额 -- 公式
    (FieldName: 'RFormula'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计提期限 -- 方式 0:无 1:计量期数 2:计量金额
    (FieldName: 'PlanType'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计提期限 -- 子方式(计量金额)  0:累计完成计量金额 1: 累计合同计量金额 2: 累计变更计量金额
    (FieldName: 'PlanSubType'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计提期限 -- 截止限定
    (FieldName: 'PlanDeadline'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计提期限 -- 截止限定 -- 计算公式
    (FieldName: 'PDFormula'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定
    (FieldName: 'Locked'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建期数
    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 排序字段
    (FieldName: 'SerialNo'; FieldType: ftInteger; Size:0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 预定义
    (FieldName: 'PreDefined'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定公式
    (FieldName: 'LockedFormula'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 支付扣款项拼接ID -- 报表专用
    (FieldName: 'LinkSerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 缓存停用数据
    (FieldName: 'StopCalc'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {变更令}
  SBGL = 'BGL';
  tdBGL: array [0..11] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 变更令号
    (FieldName: 'Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 名称
    (FieldName: 'Name'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更部位及原因
    (FieldName: 'Pos_Reason'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更工程量说明
    (FieldName: 'Direction'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定 -- 废弃，不再使用
    (FieldName: 'Locked'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更图号
    (FieldName: 'DrawingCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 批准文号
    (FieldName: 'ApprovalCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建期数
    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 已执行
    (FieldName: 'ExecutionRate'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令类型：一般、较大、重大
    (FieldName: 'BGLType'; FieldType: ftString; Size: 10; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  SBGBills = 'BGBills';
  tdBGBills: array [0..9] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'BGID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    // 清单编号
    (FieldName: 'B_Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 名称
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 单位
    (FieldName: 'Units'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 单价
    (FieldName: 'Price'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 数量
    (FieldName: 'Quantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 已变更数量
    (FieldName: 'UsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定 -- 废弃，不再使用
    (FieldName: 'Locked'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {项目属性}
  SProjProperties = 'ProjProperties';
  tdProjProperties: array [0..2] of TScFieldDef = (
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PropValue'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {计量参与人}
  SStaff = 'Staff';
  tdStaff: array [0..6] of TScFieldDef =(
    (FieldName: 'PhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'StageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'Company'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Role'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Locked'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Enable'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {签约合同清单--工程量清单}
  SDealBills = 'DealBills';
  tdDealBills: array [0..7] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'B_Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Units'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 签约单价
    (FieldName: 'Price'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 签约合同 -- 数量
    (FieldName: 'Quantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 签约合同 -- 金额
    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 编号索引
    (FieldName: 'IndexCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {调差工料}
  SProjectGL = 'ProjectGL';
  tdProjectGL: array [0..28] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 工料机编号
    (FieldName: 'Code'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 名称
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 单位
    (FieldName: 'Units'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 规格
    (FieldName: 'Specs'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 基准价
    (FieldName: 'BasePrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 风险幅度
    (FieldName: 'RiskRange'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定期号: 取值范围0~50, 0表示未锁定, 1~50表示在第1~50期锁定
    (FieldName: 'LockedPhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建期号: 取值范围0~50(台账编制, 1期~50期)
    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    {--------------------Begin 当期缓存数据----------------------}
    // 信息价
    (FieldName: 'InfoPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 信息价时间
    (FieldName: 'InfoDate'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 价差
    (FieldName: 'DeltaPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 有效价差
    (FieldName: 'ValidDeltaPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期 -- 调差数量
    (FieldName: 'PM_PreQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期 -- 调差金额
    (FieldName: 'PM_PreTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 当前阶段 -- 调差数量
    (FieldName: 'PM_Quantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 当期阶段 -- 调差金额
    (FieldName: 'PM_TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 截止上期实耗 -- 数量
    (FieldName: 'PreUsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期实耗 -- 金额
    (FieldName: 'PreUsedTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期消耗盈亏 -- 数量盈亏       盈亏 -- 工料损耗 -- 数量
    (FieldName: 'PrePAL_UsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期消耗盈亏 -- 数量盈亏金额   盈亏 -- 工料损耗 -- 金额
    (FieldName: 'PrePAL_UsedTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期消耗盈亏 -- 价差盈亏       盈亏 -- 价差盈亏
    (FieldName: 'PrePAL_DeltaPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期消耗盈亏 -- 合计盈亏       盈亏 -- 合计
    (FieldName: 'PrePAL_Total'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 本期实耗 -- 数量
    (FieldName: 'UsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期实耗 -- 金额
    (FieldName: 'UsedTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期消耗盈亏 -- 数量盈亏       本期盈亏 -- 工料损耗 -- 数量
    (FieldName: 'PAL_UsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期消耗盈亏 -- 数量盈亏金额   本期盈亏 -- 工料损耗 -- 金额
    (FieldName: 'PAL_UsedTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期消耗盈亏 -- 价差盈亏       本期盈亏 -- 价差盈亏
    (FieldName: 'PAL_DeltaPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期消耗盈亏 -- 合计盈亏       本期盈亏 -- 合计
    (FieldName: 'PAL_Total'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
    {--------------------End 当期缓存数据----------------------}
  );

  {调差工料--价格信息及计算}
  SGLPrice = 'GLPrice';
  tdGLPrice: array [0..111] of TScFieldDef =(
    // 工料ID
    (FieldName: 'GLID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 期号
    (FieldName: 'PhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 信息价
    (FieldName: 'InfoPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 信息价--时间
    (FieldName: 'InfoDate'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 价差
    (FieldName: 'DeltaPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 有效价差
    (FieldName: 'ValidDeltaPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 截止上期 -- 数量
    (FieldName: 'PreUsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期 -- 金额
    (FieldName: 'PreUsedTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期实耗 -- 数量
    (FieldName: 'UsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期实耗 -- 金额
    (FieldName: 'UsedTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 截止上期
    (FieldName: 'PM_PreQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_PreTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 消耗盈亏 -- 数量盈亏       盈亏 -- 工料损耗 -- 数量
    (FieldName: 'PrePAL_UsedQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 消耗盈亏 -- 数量盈亏金额   盈亏 -- 工料损耗 -- 金额
    (FieldName: 'PrePAL_UsedTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 消耗盈亏 -- 价差盈亏       盈亏 -- 价差盈亏
    (FieldName: 'PrePAL_DeltaPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 消耗盈亏 -- 合计盈亏       盈亏 -- 合计
    (FieldName: 'PrePAL_Total'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期 -- 原报
    (FieldName: 'PM_Quantity0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期 -- 1审~14审
    (FieldName: 'PM_Quantity1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    (FieldName: 'PM_Quantity14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期 -- 终审数据（当前文件中最后一人的数据）-- 数据缓存
    (FieldName: 'PM_Quantity_F'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PM_TotalPrice_F'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedQuantity_F'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_UsedTotalPrice_F'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_DeltaPrice_F'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PAL_Total_F'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {清单使用的工料}
  SDetailGL = 'DetailGL';
  tdDetailGL: array [0..7] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 清单ID
    (FieldName: 'BillsID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    // 工料ID
    (FieldName: 'GLID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    // 工料机编号
    (FieldName: 'Code'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 消耗量
    (FieldName: 'Quantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建期号
    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 最新一期最新一阶段的清单计量信息 -- 数据缓存
    (FieldName: 'LastBillsQuantity'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 锁定期号
    (FieldName: 'LockedPhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {各期总数据 -- 为更新项目管理而储存的缓存数据}
  SMainDataList = 'MainDataList';
  tdMainDataList: array [0..15] of TScFieldDef =(
    // 第几期
    (FieldName: 'PhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // [本期]合同计量
    (FieldName: 'DealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [本期]数量变更计量
    (FieldName: 'QcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [本期]单价变更计量
    (FieldName: 'PcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [本期]完成
    (FieldName: 'GatherTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止本期]合同计量
    (FieldName: 'EndDealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止本期]数量变更计量
    (FieldName: 'EndQcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止本期]单价变更计量
    (FieldName: 'EndPcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止本期]完成
    (FieldName: 'EndGatherTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止上期]合同计量
    (FieldName: 'PreDealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止上期]数量变更计量
    (FieldName: 'PreQcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止上期]单价变更计量
    (FieldName: 'PrePcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止上期]完成
    (FieldName: 'PreGatherTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [本期]实付
    (FieldName: 'PhasePay'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止本期]实付
    (FieldName: 'EndPhasePay'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // [截止上期]实付
    (FieldName: 'PrePhasePay'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {其他台账 -- 全额计量}
  SOtherMeasureOnce = 'OtherMeasureOnce';
  tdOtherMeasureOnce: array [0..9] of TScFieldDef = (
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 排序
    (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 编号
    (FieldName: 'Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 名称
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 台账类型
    (FieldName: 'MType'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 备注
    (FieldName: 'MemoStr'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建期数
    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建审核人
    (FieldName: 'CreateStageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 日期
    (FieldName: 'OmDateTime'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {其他台账 -- 分期计量}
  SOtherMeasurePhase = 'OtherMeasurePhase';
  tdOtherMeasurePhase: array [0..15] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 排序
    (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 编号
    (FieldName: 'Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 名称
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 台账类型
    (FieldName: 'MType'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 台账金额
    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 备注
    (FieldName: 'MemoStr'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建期数
    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 创建审核人
    (FieldName: 'CreateStageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 以下为根据期数缓存DetailMeasure中数据
    // 本期计量
    (FieldName: 'CurTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期计量
    (FieldName: 'PreTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止本期计量
    (FieldName: 'EndTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 累计计量
    (FieldName: 'AddTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 是否删除
    (FieldName: 'Deleted'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 删除期数
    (FieldName: 'DeletePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 删除审核人
    (FieldName: 'DeleteStageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  SOMPhaseDetail = 'OMPhaseDetail';
  tdOMPhaseDetail: array [0..5] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'PhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'StageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'PreTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'CurTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  {PhaseData}

  // Refer  : 原报
  // Audit1 : 1审
  // Audit2 : 2审
  // Audit3 : 3审
  // ......
  SRefer = 'Refer';
  SAudit = 'Audit';
  tdRefer_Audit: array [0..46] of TScFieldDef = (
    (FieldName: 'BillsID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    //------------------   本期合同计量  ----------------
    // 数量
    (FieldName: 'DealQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'DealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计算标识 -- 0: 无任何公式计算; 1: 数量列有计算式; 2: 金额列有计算式;
    (FieldName: 'DealFlag'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 数量公式
    (FieldName: 'DealFormula'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //------------------ 本期数量变更计量 ----------------
    // 数量
    (FieldName: 'QcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'QcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计算标识 -- 0: 无任何公式计算; 1: 数量列有计算式; 2: 金额列有计算式;
    (FieldName: 'QcFlag'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 数量公式
    (FieldName: 'QcFormula'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令
    (FieldName: 'QcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令数量
    (FieldName: 'QcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //------------------ 本期单价变更计量 ----------------
    // 数量
    (FieldName: 'PcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'PcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计算标识 --  0: 无任何公式计算; 1: 数量列有计算式; 2: 金额列有计算式;
    (FieldName: 'PcFlag'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 数量公式
    (FieldName: 'PcFormula'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令
    (FieldName: 'PcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令数量
    (FieldName: 'PcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //------------------ 本期完成变更计量 ----------------
    // 数量
    (FieldName: 'GatherQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'GatherTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //------------------ 截止本期合同计量 ----------------
    // 数量
    (FieldName: 'EndDealQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'EndDealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //---------------- 截止本期数量变更计量 ----------------
    // 数量
    (FieldName: 'EndQcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'EndQcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令
    (FieldName: 'EndQcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令数量
    (FieldName: 'EndQcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //---------------- 截止本期单价变更计量 ----------------
    // 数量
    (FieldName: 'EndPcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'EndPcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令
    (FieldName: 'EndPcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令数量
    (FieldName: 'EndPcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //------------------ 截止本期完成计量 ----------------
    // 数量
    (FieldName: 'EndGatherQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'EndGatherTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //------------------ 截止上期合同计量 ----------------
    // 数量
    (FieldName: 'PreDealQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'PreDealTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //---------------- 截止上期数量变更计量 ----------------
    // 数量
    (FieldName: 'PreQcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'PreQcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令
    (FieldName: 'PreQcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令数量
    (FieldName: 'PreQcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //---------------- 截止上期单价变更计量 ----------------
    // 数量
    (FieldName: 'PrePcQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'PrePcTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令
    (FieldName: 'PrePcBGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 变更令数量
    (FieldName: 'PrePcBGLNum'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //------------------ 截止上期完成计量 ----------------
    // 数量
    (FieldName: 'PreGatherQuantity'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 金额
    (FieldName: 'PreGatherTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    //----------------------------------------------------
    // 书签
    (FieldName: 'HasBookMark'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 附件 暂时不用，用台帐的
//    (FieldName: 'HasAttachment'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 书签批注
    (FieldName: 'MarkMemo'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期材料调差
    (FieldName: 'PM_PreTotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期材料调差
    (FieldName: 'PM_TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  // 计量期合同支付
  SPhasePay = 'PhasePay';
  tdPhasePay: array [0..61] of TScFieldDef =(
    // 与DealPayment一一对应
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 本期金额 0：原报，1..14:1..14审
    (FieldName: 'TotalPrice0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 本期公式
    (FieldName: 'Formula0'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止本期金额
    (FieldName: 'EndTotalPrice0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 截止上期金额
    (FieldName: 'PreTotalPrice0'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula1'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice1'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula2'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice2'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula3'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice3'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula4'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice4'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula5'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice5'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula6'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice6'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula7'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice7'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula8'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice8'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula9'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice9'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula10'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice10'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula11'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice11'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula12'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice12'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula13'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice13'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'TotalPrice14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Formula14'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'EndTotalPrice14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PreTotalPrice14'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 是否停用：0、False--否，-1、True--是
    (FieldName: 'StopCalc'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  // 计量期属性表
  SPhaseProperty = 'PhaseProperty';
  tdPhaseProperty: array [0..2] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'PropValue'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  // 中间计量表 -- 见文件“计量\需求\变更令\计量支付窗口主界面结构示意.doc”
  SZJJL = 'ZJJL';
  tdZJJL: array [0..19] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 所属项目节ID -- 仅允许在最底层项目节输入
    (FieldName: 'BillsID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    // 中间计量表号
    (FieldName: 'Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 中间交工证书
    (FieldName: 'CertificateCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 所属项目节
    (FieldName: 'BillsCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计算式说明
    (FieldName: 'FormulaMemo'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 草图
    (FieldName: 'RelaFile'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // Type -- 真的是有病！！！
    (FieldName: 'Type'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 变更令号
    (FieldName: 'BGLCode'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 部位：取了个这么奇葩的名字。。原来这玩意叫桩号; 后来非要把部位拼过来，就变成桩号或部位; 现在变成只有部位。。
    (FieldName: 'PegName'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 分布分项
    (FieldName: 'FBFXName'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 起始桩号
    (FieldName: 'BeginPeg'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 终止桩号
    (FieldName: 'EndPeg'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计量单元
    (FieldName: 'UnitName'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 图号
    (FieldName: 'DrawingCode'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

    // 计量汇总模式特有
    (FieldName: 'GatherBillsID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'B_Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Units'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Price'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  SZJJL_Detail = 'ZJJL_Detail';
  tdZJJL_Detail: array [0..1] of TScFieldDef = (
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'BillsID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False)
  );

  SZJJL_History = 'ZJJL_History';
  tdZJJL_History: array [0..8] of TScFieldDef =(
    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    (FieldName: 'BillsID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Type'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'FieldName'; FieldType: ftString; Size: 50; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'FieldValue'; FieldType: ftMemo; Size: 60535; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    // 计量汇总模式特有
    (FieldName: 'B_Code'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Units'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Price'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

  // 报表数据
  // 用于特殊的需要跟用户交互的报表，其中的部分数据可以用户自定义
  SReportData = 'ReportData';
  tdReportData: array [0..5] of TScFieldDef =(
    // 通过如下两个分类确定唯一一张报表
    // 分类1
    (FieldName: 'Flag'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 分类2 -- 在分类1的基础上分类
    (FieldName: 'SubFlag'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 顺序 -- 特殊报表中，通常需要存储的数据不止一条
    (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
    // 其中 Select: 用户选择这张报表时的默认选择，Result保存根据用户的选择存储的数据，使用编号是为了以后扩充
    // 具体每张报表中Select与Result的含义，在制作单张报表时特别约定
    (FieldName: 'Select1'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Result1'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
    (FieldName: 'Result2'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
  );

implementation

end.
