Kaynağa Gözat

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

qinlaiqiao 5 yıl önce
ebeveyn
işleme
4c85088f92

+ 1 - 1
types/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@sc/types",
   "name": "@sc/types",
-  "version": "1.0.27",
+  "version": "1.0.28",
   "description": "共用类型文件",
   "description": "共用类型文件",
   "main": "./dist/index.cjs.js",
   "main": "./dist/index.cjs.js",
   "module": "./dist/index.esm.js",
   "module": "./dist/index.esm.js",

+ 6 - 5
types/src/interface/bill.ts

@@ -2,7 +2,7 @@ import { BRType, ITreeScm } from './base';
 import { IQuantityDetail } from './quantityDetail';
 import { IQuantityDetail } from './quantityDetail';
 
 
 export interface IJobContent {
 export interface IJobContent {
-  serialNo: number;
+  seq: number;
   content: string;
   content: string;
   isChecked: boolean;
   isChecked: boolean;
 }
 }
@@ -11,9 +11,10 @@ export interface IEigenvalue {
   isSelected: boolean;
   isSelected: boolean;
 }
 }
 export interface IItemCharacter {
 export interface IItemCharacter {
-  serialNo: number;
+  seq: number;
   character: string;
   character: string;
-  eigenvalue: IEigenvalue[];
+  eigenvalueList: string[]; // 特征值下拉项(以前需要,现在暂时取消了下拉。保留以扩展)
+  eigenvalue: string;
   isChecked: boolean;
   isChecked: boolean;
 }
 }
 // 书签
 // 书签
@@ -45,9 +46,9 @@ export interface IBill {
   quantityDetails?: IQuantityDetail[]; // 工程量明细 -- 原先保存在另外的表中
   quantityDetails?: IQuantityDetail[]; // 工程量明细 -- 原先保存在另外的表中
   recharge?: string; // 补注
   recharge?: string; // 补注
   ruleText?: string; // 工程量计算规则
   ruleText?: string; // 工程量计算规则
-  jobContent?: IJobContent[]; // 工作内容
+  jobContents?: IJobContent[]; // 工作内容
   jobContentText?: string;
   jobContentText?: string;
-  itemCharacter?: IItemCharacter[]; // 项目特征
+  itemCharacters?: IItemCharacter[]; // 项目特征
   itemCharacterText?: string;
   itemCharacterText?: string;
   formula?: string; // 基数计算
   formula?: string; // 基数计算
   formulaValue?: number; // 基数计算的值
   formulaValue?: number; // 基数计算的值

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

@@ -144,7 +144,7 @@ export interface IProjectGlj {
   materialIndexUnit?: string; // 工料指标单位
   materialIndexUnit?: string; // 工料指标单位
   materialIndexCoe: number; // 单位转换系数
   materialIndexCoe: number; // 单位转换系数
   isMainMaterial: boolean; // 是否主要材料 (0为否 1为是) { type: boolean; default: false };
   isMainMaterial: boolean; // 是否主要材料 (0为否 1为是) { type: boolean; default: false };
-  remark?: string;
+  remark?: string; // 备注
   originPlace?: string; // 产地
   originPlace?: string; // 产地
   vender?: string; // 厂家
   vender?: string; // 厂家
   qualityGrade?: string; // 质量等级
   qualityGrade?: string; // 质量等级

+ 10 - 2
types/src/interface/ration.ts

@@ -120,6 +120,7 @@ export interface IRationCoe {
   originalCode?: string;
   originalCode?: string;
   optionList?: IOptionList[];
   optionList?: IOptionList[];
   optionCodes?: string; // 可选人材机编码
   optionCodes?: string; // 可选人材机编码
+  selectCode?: string; // 选中的人材机编码
   isAdjust: boolean; // 默认 false
   isAdjust: boolean; // 默认 false
   coes: IStdCoe[];
   coes: IStdCoe[];
 }
 }
@@ -242,8 +243,9 @@ export interface IGljQtyCoe {
 
 
 // 实际保存到项目中的辅助定额数据
 // 实际保存到项目中的辅助定额数据
 export interface IRationAss extends IStdRationAss {
 export interface IRationAss extends IStdRationAss {
+  ID: string;
   actualValue?: number;
   actualValue?: number;
-  isAdjust?: boolean; // 是否调整
+  isAdjust: boolean; // 是否调整
   groupList?: IRationAss[]; // 当有分组的时候用这个
   groupList?: IRationAss[]; // 当有分组的时候用这个
   // 这里辅助定额直接保存工料机的数据,用的时候不用再获取
   // 这里辅助定额直接保存工料机的数据,用的时候不用再获取
   rationGljList?: IRationGlj[]; // 定额工料机
   rationGljList?: IRationGlj[]; // 定额工料机
@@ -325,7 +327,7 @@ export interface IRation {
   customQuantity?: string; // 自定义消耗
   customQuantity?: string; // 自定义消耗
   model?: number; // 机型
   model?: number; // 机型
   adjCoe?: number;
   adjCoe?: number;
-  remark?: string;
+  remark?: string; // 备注
   bookmarkBackground?: string; // 书签背景色
   bookmarkBackground?: string; // 书签背景色
   bookmarkAnnotation?: string; // 批注
   bookmarkAnnotation?: string; // 批注
   overHeight?: string; // 超高降效
   overHeight?: string; // 超高降效
@@ -350,3 +352,9 @@ export interface IStdRationsAndGljs {
   rations: (IStdRation | ICptRation)[];
   rations: (IStdRation | ICptRation)[];
   rationGljs: (IStdRationGlj | ICptRationGlj)[];
   rationGljs: (IStdRationGlj | ICptRationGlj)[];
 }
 }
+
+export enum RationListType {
+  ASS = 'rationAssList',
+  COE = 'rationCoeList',
+  GLJ = 'rationGLJList',
+}

+ 1 - 1
util/package.json

@@ -20,8 +20,8 @@
   "devDependencies": {
   "devDependencies": {
     "@commitlint/cli": "^11.0.0",
     "@commitlint/cli": "^11.0.0",
     "@commitlint/config-conventional": "^11.0.0",
     "@commitlint/config-conventional": "^11.0.0",
+    "@sc/types": "^1.0.28",
     "@types/chai": "^4.2.14",
     "@types/chai": "^4.2.14",
-    "@sc/types": "^1.0.10",
     "@types/mocha": "^8.0.4",
     "@types/mocha": "^8.0.4",
     "@types/ms": "^0.7.31",
     "@types/ms": "^0.7.31",
     "@typescript-eslint/eslint-plugin": "^4.4.1",
     "@typescript-eslint/eslint-plugin": "^4.4.1",

+ 7 - 7
util/src/bill.ts

@@ -48,14 +48,14 @@ export const getJobsAndCharacterText = (
 
 
 export const getJobContents = (
 export const getJobContents = (
   stdBill: IStdBill,
   stdBill: IStdBill,
-  stdJobContenMap: IJobContentMap
+  stdJobContentMap: IJobContentMap
 ): IJobContent[] => {
 ): IJobContent[] => {
   const jobs: IJobContent[] = [];
   const jobs: IJobContent[] = [];
   let i = 1;
   let i = 1;
   for (const j of stdBill.jobs) {
   for (const j of stdBill.jobs) {
-    const job = stdJobContenMap[j.id];
+    const job = stdJobContentMap[j.id];
     if (job) {
     if (job) {
-      jobs.push({ serialNo: i + 1, content: job.content, isChecked: true });
+      jobs.push({ seq: i + 1, content: job.content, isChecked: true });
       i += 1;
       i += 1;
     }
     }
   }
   }
@@ -73,15 +73,15 @@ export const getItemCharacters = (
     const character = itemCharacterMap[item.id];
     const character = itemCharacterMap[item.id];
     if (character) {
     if (character) {
       const newItem: IItemCharacter = {
       const newItem: IItemCharacter = {
-        serialNo: i + 1,
+        seq: i + 1,
         character: character.content,
         character: character.content,
-        eigenvalue: [],
+        eigenvalueList: [],
+        eigenvalue: '',
         isChecked: false,
         isChecked: false,
       };
       };
       const eigenvalues = character.itemValue;
       const eigenvalues = character.itemValue;
       for (let j = 0; j < eigenvalues.length; j += 1) {
       for (let j = 0; j < eigenvalues.length; j += 1) {
-        const newValue = { value: eigenvalues[j].value, isSelected: false };
-        newItem.eigenvalue.push(newValue);
+        newItem.eigenvalueList.push(eigenvalues[j].value);
       }
       }
       characters.push(newItem);
       characters.push(newItem);
       i += 1;
       i += 1;

+ 1 - 0
util/src/math.ts

@@ -24,6 +24,7 @@ export const innerRound = (
   return (value / 10 ** decimal) * pre;
   return (value / 10 ** decimal) * pre;
 };
 };
 
 
+// 4舍5入
 export const roundForObj = (
 export const roundForObj = (
   obj: string | number | undefined | null,
   obj: string | number | undefined | null,
   decimal: number
   decimal: number