Przeglądaj źródła

feat(wise-cost-util): 别名编码位数改为5

zhangweicheng 4 lat temu
rodzic
commit
10ee6529b6
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      wise-cost-util/src/material.ts

+ 2 - 2
wise-cost-util/src/material.ts

@@ -4,7 +4,7 @@ import evaluate from 'evaluator.js';
 // 关键字组
 export interface IKeywordItem {
   optionCode: string; // 选项号
-  coe: string;
+  coe: string; // 系数 *1.29
 }
 
 export interface IInfoPriceMain {
@@ -25,7 +25,7 @@ const replaceAll = (FindText: RegExp | string, RepText: string, str: string): st
  * keywordItems : 关键字列表
  */
 export const calcMaterialExp = (infoPrice: IInfoPriceMain, keywordItems: IKeywordItem[]) => {
-  const preCodeLength = 4; // 别名编码位数,可能要改成5位或6位
+  const preCodeLength = 5; // 别名编码位数,可能要改成5位或6位
   const decimal = 2; // 小数位数
   const groupStr = infoPrice.classCode.substr(preCodeLength);
   let { expString } = infoPrice; // 计算式