Преглед изворни кода

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

zhangweicheng пре 3 година
родитељ
комит
8878239cef

+ 1 - 0
types/src/interface/business.ts

@@ -5,6 +5,7 @@ export interface ICostInfo {
   orgFee: string; // 原报金额
   conclusionFee: string; // 报审金额
   billCheckPercentOfPass: string; // 清单检测合格率
+  isBillCheckPassed: boolean; // 清单检测是否通过(可能是多项目)
 }
 
 export enum ShowBusinessType {

+ 1 - 18
types/src/interface/executor.ts

@@ -1,18 +1,6 @@
 import { BusinessTypeKey } from './gather';
-import { IExecutorApprovaledPermission } from './gatherExecutor';
 
-// export interface member {
-//   ID: string;
-//   approvalStatus: string;
-//   approvalTime: string;
-// }
-
-// export interface IExecutorApprovaledPermission {
-//     ID: string;
-//     permission: string[];
-// }
-
-// // 执行者
+// 执行者
 export interface IExecutor {
   ID: string;
   subjectID: string;
@@ -20,10 +8,5 @@ export interface IExecutor {
   setType: string;
   name: string;
   participantMode: string;
-  approvaledPermission: IExecutorApprovaledPermission[];
   members: string[];
 }
-// // 拷贝后的数据表
-// export interface ISubjectExecutor extends IExecutor {
-//   businessID: string;
-// }

+ 1 - 0
types/src/interface/financialProject.ts

@@ -28,6 +28,7 @@ export interface IFinancialProject {
   name: string;
   code?: string;
   gatherID?: string;
+  approvalID?: string; // 流程名称
   businessType?: string;
   status?: string;
   created: string; // 创建人名称

+ 0 - 6
types/src/interface/gatherExecutor.ts

@@ -1,10 +1,5 @@
 import { BusinessTypeKey } from './gather';
 
-export interface IExecutorApprovaledPermission {
-  ID: string;
-  permission: string[];
-}
-
 export interface IGatherExecutor {
   ID: string;
   dataID: string;
@@ -13,7 +8,6 @@ export interface IGatherExecutor {
   setType: string;
   businessType: BusinessTypeKey;
   participantMode: string;
-  approvaledPermission: IExecutorApprovaledPermission[];
   businessID: string;
   members: string[];
 }

+ 1 - 0
types/src/interface/glj.ts

@@ -388,6 +388,7 @@ export interface ICptGlj extends IBaseRationGlj {
   constructionID?: string; // 建设项目ID
   engineeringID?: string; // 工程专业ID
   engineeringName?: string; // 工程专业名称
+  weight?: number; // 排序权重
 }
 
 // 新增补充人材机接口传输的数据接口

+ 12 - 0
types/src/interface/matter.ts

@@ -48,6 +48,7 @@ export interface IStepMatter {
   costPermission: string[];
   profilePermission: string[];
   auditCommentsPermission: string[];
+  settlementPermission: string[];
 }
 
 export interface IGatherStepMatter extends IStepMatter {
@@ -93,6 +94,8 @@ export interface IProcessComponentPermission {
   editable: boolean;
   // 是否可查看
   viewable: boolean;
+  // 能否创建项目
+  createProject?: boolean;
 }
 
 // 步骤里的的组件
@@ -121,3 +124,12 @@ export interface IMatterNode {
   name: string;
   components: IProcessComponent[];
 }
+
+export const ComponentNameMap: Record<string, string> = {
+  dataProfile: '送审资料',
+  form: '表单',
+  costProfile: '造价文件',
+  auditAmountSummary: '审核金额汇总',
+  auditComments: '审核意见',
+  settlement: '造价文件',
+};

+ 2 - 0
types/src/interface/message.ts

@@ -108,4 +108,6 @@ export enum IMessageStatus {
   APPROVALCOMPLETED = 'approvalCompleted',
   /** 退回 */
   RETURN = 'return',
+  /** 业务被删除 */
+  DELETE = 'delete',
 }

+ 76 - 3
types/src/interface/process.ts

@@ -1,7 +1,6 @@
 import { ReportTree } from './report';
 import { CptModelName, SubModelName, ActionType } from './base';
 import { BusinessTypeKey } from './gather';
-import { IExecutorApprovaledPermission } from './gatherExecutor';
 import { executorMember } from './approvalStatus';
 import { IProcessMatter, IStepMatter } from './matter';
 
@@ -50,6 +49,7 @@ export enum RolePermission {
   ZBK_EDIT = 'zbkEdit', // 指标库-编辑
   CJK_ENABLE = 'cjkEnable', // 材价库-启用
   CJK_EDIT = 'cjkEdit', // 材价库-编辑
+  BACK_STAGE_ENABLE = 'backstageEnable', // 小后台权限
   // TODO 指标库 区间对数
 }
 
@@ -141,9 +141,9 @@ export interface IProcessExecutor {
   businessType: BusinessTypeKey;
   gatherID: string;
   setType: string;
+  participantMode: string;
   name: string;
   reportTime?: string; // 三合一审批流程第一位的上报时间
-  approvaledPermission: string[];
   scope?: string;
   members?: Members[];
   // 事项中组件及其权限
@@ -200,6 +200,7 @@ export interface IProcedureParticipantInfo {
     configure: string[];
     members?: Members[];
     reportTime?: string;
+    approvaledPermission?: string[]; // 事项后原始数据
     inProcessMatters?: IProcessMatter[];
     afterProcessMatters?: IProcessMatter[];
   };
@@ -210,6 +211,7 @@ export interface IProcedureParticipantInfo {
 
 // 3合1分支判断信息
 export interface IConditionItem {
+  ID: string;
   field: string;
   type: string;
   symbol: string;
@@ -280,7 +282,19 @@ export enum ApprovalStatus {
   APPROVED = 'approved', // 审批通过
 }
 
+// 审核费用类型
+export enum AuditMoneyType {
+  // 建设项目相关费用
+  CONSTRUCTION = 'construction',
+  // 费用项
+  FEE_ITEM = 'feeItem',
+}
+
 export interface IProcessAuditMoney {
+  ID: string;
+  type: AuditMoneyType;
+  // 来源ID,有的数据是基于某条数据拷贝而来的,sourceID为被拷贝数据的ID,方便查找源数据
+  sourceID?: string;
   processID: string;
   data: any[];
 }
@@ -349,7 +363,7 @@ export interface IApprovalTodoData {
   approvalID: string; // 流程 id
   processID: string; // 环节 id
   financialProjectID: string; // 项目 ID
-  constructionID: string; // 建设项目 ID
+  constructionID?: string; // 建设项目 ID
   projectName?: string; // 项目名称
   reporterID?: string; // 发起人ID
   reporterName?: string; // 发起人名称
@@ -567,3 +581,62 @@ export interface IAuditCommentHistory {
   // 审批状态
   status: ProcessStatus;
 }
+
+// 传统结算未上报数据
+export interface ISettlementItem {
+  // 建设项目ID
+  constructionID: string;
+  // 名称
+  name: string;
+  // 项目原报金额
+  orgFee: string;
+  // 当前步骤审核金额
+  curFee: string;
+  // 清单检测合格率
+  billCheckRate: string;
+  // 费用项ID
+  feeID?: string;
+  // 费用类型
+  type?: AuditMoneyType;
+  // 备注
+  remark?: string;
+}
+
+// 传统结算已上报审核数据
+export interface ISettlementAuditItem {
+  // 唯一标识,table渲染需要
+  ID: string;
+  // 建设项目ID
+  constructionID?: string;
+  // 名称
+  name: string;
+  // 起始金额
+  beginFee?: string;
+  // 结束金额
+  endFee?: string;
+  // 增减金额
+  incFee?: string;
+  decFee?: string;
+  // 增减率
+  incRate?: string;
+  decRate?: string;
+  // 审核通过时间
+  approvalTime?: string;
+  // 用户信息
+  user?: {
+    name: string;
+    institution: string;
+    executor: string;
+  };
+  // 审核状态
+  approvalStatus?: string;
+  children: ISettlementAuditItem[];
+  // 数据是否是原始数据(有的费用项是从上一步拷贝而来的,不给删除)
+  isOriginal?: boolean;
+  // 费用项ID
+  feeID?: string;
+  // 费用类型
+  type?: AuditMoneyType;
+  // 备注
+  remark?: string;
+}

+ 12 - 0
types/src/interface/project.ts

@@ -309,7 +309,19 @@ export enum PermissionType {
   READONLY = 'readonly',
   EDIT = 'edit',
 }
+
+// 项目业务类型
+export enum ProjectBusinessType {
+  // 预算
+  BUDGET = 'budget',
+  // 概算
+  ESTIMATE = 'estimate',
+  // 结算
+  SETTLEMENT = 'settlement',
+}
+
 export interface IProject extends ITreeScm {
+  businessType?: ProjectBusinessType;
   type: ProjectType;
   compilationID: string;
   ownerID: string; // 拥有者ID(个人或企业)

+ 3 - 0
types/src/interface/user.ts

@@ -99,6 +99,9 @@ export interface IAPUser {
   account: string;
   name: string;
   phone: string;
+  contactMobile: string;
+  officePhone: string;
+  email: string;
   institution: IAPInstitution;
   organizationalStructure: IAPOrganizationalStructure;
   dataID: string;