Procházet zdrojové kódy

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/SCCommon

qinlaiqiao před 5 roky
rodič
revize
7e9c1b1e4f

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 4335 - 0
tree/package-lock.json


+ 1 - 1
tree/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@sc/tree",
-  "version": "1.0.2",
+  "version": "1.0.3",
   "description": "a template for npm package coding",
   "main": "./dist/index.cjs.js",
   "module": "./dist/index.esm.js",

+ 1 - 1
tree/src/nodeCtx.ts

@@ -47,7 +47,7 @@ export class NodeContext {
   visible(): boolean {
     let parent = this.parent();
     while (parent) {
-      if (parent.getCtx().expanded) {
+      if (!parent.getCtx().expanded) {
         return false;
       }
       parent = parent.getCtx().parent();

+ 1 - 1
tree/tests/nodeCtx.ts

@@ -51,7 +51,7 @@ describe('NodeCtx', () => {
         expect(visibleA).to.equal(false);
         node.getCtx().expanded = false;
         const visibleB = testNode.getCtx().visible();
-        expect(visibleB).to.equal(true);
+        expect(visibleB).to.equal(false);
       }
     }
   });

+ 48 - 4
types/src/interface/Compliation.ts

@@ -1,5 +1,7 @@
 /* eslint-disable camelcase */
 import { ELockInfo } from './User';
+import { TaxType, IGLJCol } from './project';
+import { IFileRef } from './base';
 
 export interface ICptItem {
   ID: string;
@@ -7,10 +9,52 @@ export interface ICptItem {
   description: string;
 }
 
-export interface IbillValuation {
-  engineering_list: any;
+export interface IProgramLib extends IFileRef {
+  displayName: string;
+}
+
+export interface ITaxGroup {
+  programLib: IProgramLib;
+  templateLib: IFileRef;
+  colLib: IFileRef;
+  feeLib: IFileRef;
+  taxType: TaxType;
+}
+
+// 工程专业
+export interface IEngineering {
+  ID: string;
+  name: string;
+  feeName: string;
+  engineering: number;
+  projectEngineering: number;
+  valuationID: string;
+  // 显示设置
+  isAreaIncrease?: boolean; // 显示面积增加费
+  isItemIncrease?: boolean; // 显示子目增加费
+  isInstall?: boolean; // 显示安装增加费
+  gljCol?: IGLJCol;
+  overHeightLib?: IFileRef[];
+  economicLib?: IFileRef[];
+  mainQuantityLib?: IFileRef[];
+  materialLib?: IFileRef[];
+  engineerFeatureLib?: IFileRef[];
+  engineerInfoLib?: IFileRef[];
+  infoLib?: IFileRef[];
+  featureLib?: IFileRef[];
+  artificialLib?: IFileRef[];
+  billLib?: IFileRef[];
+  billsGuidanceLib?: IFileRef[];
+  gljLib?: IFileRef[];
+  rationLib?: IFileRef[];
+  progressiveLib?: IFileRef[];
+  taxGroup: ITaxGroup[];
+}
+
+export interface IValuation {
+  engineeringList: IEngineering[];
   enable: boolean;
-  id: string;
+  ID: string;
   name: string;
 }
 
@@ -24,7 +68,7 @@ export interface ICompilation {
   name: string;
   description: string;
   rationValuations?: any;
-  billValuations?: IbillValuation[];
+  billValuations?: IValuation[];
   version?: versionType; // 版本
   versionText?: string; // 版本对应的显示文字:免费版,学习版,专业版
   lockInfo?: ELockInfo; //

+ 1 - 1
types/src/interface/base.ts

@@ -9,7 +9,7 @@ export interface ITreeScm {
 }
 
 export interface IFileRef {
-  id: string;
+  ID: string;
   name: string;
 }
 

+ 32 - 17
types/src/interface/project.ts

@@ -66,18 +66,6 @@ export enum OverHeightOption {
   SPECIFIC, // 指定具体位置,显示分部分项以及措施项目的树结构显示叶子清单(分项)供勾选
 }
 
-// 工程特征、基本信息
-export interface IInfoItem {
-  key: string;
-  dispName: string;
-  value?: string;
-  required?: string;
-  readonly?: string;
-  options?: string;
-  cellType?: string;
-  items?: IInfoItem[];
-}
-
 // 承包人材料调整类型
 export enum GLJAdjustType {
   PRICE_INFO = 'priceInfo', // 造价信息差额调整法
@@ -92,8 +80,34 @@ export enum TaxType {
 
 // 文件类型
 export enum FileType {
-  BID_SUBMISSION = 1, // 投标
-  BID_INVITATION, // 招标
+  SUBMISSION = 1, // 投标
+  INVITATION, // 招标
+  CONTROL, // 控制价
+}
+
+export enum FileTypeName {
+  SUBMISSION = '投标',
+  INVITATION = '招标',
+  CONTROL = '控制价',
+}
+
+export const FileTypeMap = {
+  [FileType.SUBMISSION]: FileTypeName.SUBMISSION,
+  [FileType.INVITATION]: FileTypeName.SUBMISSION,
+  [FileType.CONTROL]: FileTypeName.CONTROL,
+};
+
+// 工程特征、基本信息
+export interface IInfoItem {
+  key: string;
+  dispName: string;
+  value?: string;
+  required?: string;
+  readonly?: string;
+  options?: string;
+  cellType?: string;
+  fileKind?: FileTypeName;
+  items?: IInfoItem[];
 }
 
 // 项目属性
@@ -101,12 +115,13 @@ export interface IProperty {
   rootProjectID?: string; // 建设项目ID
   valuationID?: string; // 计价规则
   engineeringID?: string; // 工程专业
-  taxType?: number; // 计税方式
+  fileType?: FileType; // 文件类型
+  taxType?: TaxType; // 计税方式
   rationFeeType?: number; // 定额取费专业
   unitFeeType?: number; // 单位工程取费专业
   calcProgram?: IFileRef; // 计算程序
-  colLibID?: number; // 列设置
-  templateLibID?: number; // 清单模板
+  colLibID?: string; // 列设置
+  templateLibID?: string; // 清单模板
   unitPriceFile?: IFileRef; // 单价文件
   feeFile?: IFileRef; // 费率文件
   region?: string;