Jelajahi Sumber

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

vian 5 tahun lalu
induk
melakukan
cc1120d80f
3 mengubah file dengan 43 tambahan dan 20 penghapusan
  1. 2 0
      types/src/interface/base.ts
  2. 18 4
      types/src/interface/ration.ts
  3. 23 16
      types/src/interface/user.ts

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

@@ -152,6 +152,8 @@ export enum ActionName {
   addStdRations = 'addStdRations', // 添加标准定额
   resetColMetas = 'resetColMetas', // 重置默认列设置
   updateIndexKey = 'updateIndexKey', // 修改定额工料机的名称,规格,单位
+  addRationGljs = 'addRationGljs', // 添加定额工料机(多个)
+  replaceRationGlj = 'replaceRationGlj', // 替换定额工料机(单个)
 }
 
 export interface IBaseFilter {

+ 18 - 4
types/src/interface/ration.ts

@@ -76,8 +76,22 @@ export interface ICoeList {
   ID: number;
   no: number;
 }
+
+export enum CoeType {
+  RATION = '定额',
+  LABOUR = '人工',
+  MATERIAL = '材料',
+  MACHINE = '机械',
+  TOOL = '施工机具',
+  MAIN = '主材',
+  EQUIPMENT = '设备',
+  SINGLE = '单个工料机',
+  REPLACE = '替换人材机',
+  SELECT = '所选人材机',
+}
+
 export interface IStdCoe {
-  coeType: string; // 系数类型,指作用范围:
+  coeType: CoeType; // 系数类型,指作用范围:
   // 单个(如:111量0.001)、人工类、材料类、机械类、全部(如:定额×0.925)。
   gljID?: number; // 要调整的工料机ID(当coeType=0时有效)
   operator: string; // 运算符(*、+、-、=)
@@ -203,8 +217,8 @@ export interface IRationGlj {
   repositoryID?: number;
   name: string;
   code: string;
-  originalCode: string; // 原始的编码
-  rcode?: string; // 替换工料机后记录原来的工料机编码,要做判断
+  originalCode: string; // 原始的编码 不带 “-”的
+  beforeReplaceCode?: string; // 替换工料机后记录原来的工料机编码,要做判断 有可能带“-”
   specs?: string;
   unit: string;
   type: GljType;
@@ -356,5 +370,5 @@ export interface IStdRationsAndGljs {
 export enum RationListType {
   ASS = 'rationAssList',
   COE = 'rationCoeList',
-  GLJ = 'rationGLJList',
+  GLJ = 'rationGljList',
 }

+ 23 - 16
types/src/interface/user.ts

@@ -6,12 +6,10 @@ export enum ELockInfo {
   BUY = 2, // 销售
 }
 
-export interface IUpgradeInfo {
+export interface IUpgradeItemInfo {
   compilationID: string;
   isUpgrade: boolean;
   lock?: ELockInfo;
-
-  [key: string]: any;
 }
 
 // 实体类型
@@ -19,7 +17,7 @@ export enum EntityType {
   // 个人
   PERSON = 1,
   // 企业
-  ENTERPRISE,
+  ENTERPRISE = 2,
 }
 
 export enum UserType {
@@ -35,17 +33,27 @@ export interface IUsed {
   compilationId: string;
 }
 
+export interface ISpecifyCptItem {
+  accountType: string;
+  enterpriseID?: string;
+  cptID: string;
+}
+
 // user 表原始字段
 export interface IRawUser {
+  enterpriseID?: string;
   _id?: string;
   qq?: string;
   real_name?: string;
   avatar?: string;
+  // 职位
   position?: string;
   company?: string;
   province?: number;
   company_type?: number;
   company_scale?: number;
+  // 指定的编办
+  specifyCpt?: string;
   latest_login?: number;
   user_type?: string;
   contacts?: IContact[];
@@ -56,24 +64,29 @@ export interface IRawUser {
   mobile?: string;
   create_time?: string;
   isUserActive?: number;
-  upgrade_list?: IUpgradeInfo[];
+  upgrade_list?: IUpgradeItemInfo[];
   used_list?: IUsed[];
   latest_used?: string;
-
-  [key: string]: any;
 }
 
 // 返回给前端的字段
 export interface IUser {
+  enterpriseID?: string;
   ID?: string;
   qq?: string;
   realName?: string;
   avatar?: string;
+  // 职位
   position?: string;
-  company?: string;
-  province?: number;
+  // 公司名
+  companyName?: string;
+  // 省(个人账户只需要精确到省)
+  companyLocation?: number;
+  // 公司类型
   companyType?: number;
   companyScale?: number;
+  // 指定的编办
+  specifyCpt?: string;
   latestLogin?: number;
   userType?: string;
   contacts?: IContact[];
@@ -84,15 +97,9 @@ export interface IUser {
   mobile?: string;
   createTime?: string;
   isUserActive?: number;
-  upgradeList?: IUpgradeInfo[];
+  upgradeList?: IUpgradeItemInfo[];
   usedList?: IUsed[];
   latestUsed?: string;
-
-  [key: string]: any;
-}
-
-export interface IUserSession extends IUser {
-  enterpriseID: string; // 企业ID
 }
 
 // 最近联系人