Xiaopeng Zhang 5 mesi fa
parent
commit
2f18b24965
3 ha cambiato i file con 8 aggiunte e 7 eliminazioni
  1. 2 2
      src/Service.js
  2. 1 1
      src/editor.js
  3. 5 4
      src/utils.js

+ 2 - 2
src/Service.js

@@ -1662,7 +1662,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
                 for(let j = 1; j < de['rcjdg'].length; j++) {
                     let origin = Number(de['rcjdg'][j][10]);
                     for(let i = 0; i < de['fuzhu'].length; i++) {
-                        let selected = de['fuzhu'][i];
+                        let selected = de['fuzhu'][i];//selected is 结构化的处理信息
                         let target = selected[0];
                         
                         
@@ -2032,7 +2032,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
     }
 
 
-    updateBeizhu(row, selected, xuhao) {//xuhao is for rename
+    updateBeizhu(row, selected, xuhao) {//xuhao is for rename, selected is 结构化的处理信息
         let qd = this.cache.filter(x=>x["_children"].filter(y=>y['key']==row).length > 0)[0];
         if (!qd) return [null, null];
         this.updateFootprint(qd['key']);

+ 1 - 1
src/editor.js

@@ -125,7 +125,7 @@ export const handleRcjbc = (derow, rcjbc ) => {
 
 };
 
-export const handleBeizhu = (beizhuFK, derow, fuzhuSelect, fuzhu ) => {
+export const handleBeizhu = (beizhuFK/**辅库json */, derow, fuzhuSelect/*被选中的序号*/, fuzhu/*页面展示的附注文本*/  ) => {
     console.log(beizhuFK);
     let bianma = [];
     let xuhao = [];

+ 5 - 4
src/utils.js

@@ -106,22 +106,23 @@ export const extractFuzhu = (debm) => {
 };
 
 export const match_target = (input ,target) => {
+    if (target == '000000') return true;//全部定额
     if (target == '000001') {//普世的人工费
-        if(input.startsWith("0001")) {
+        if(input.startsWith("000")) {
             return true;
         } else {
             return false;
         }
     } else if (target == 'J00000') {//普世机械费
-        if (input.startsWith('99')) {
+        if (input.startsWith('99') || input.startsWith('98') || input.startsWith('J')) {
             return true;
         } else {
             return false;
         }
     } else if (target == '100000') {//全部材料
-        if (input.startsWith('99')) {
+        if (input.startsWith('99')|| input.startsWith('98') || input.startsWith('J')) {
             return false;
-        } else if (input.startsWith("0001")) {
+        } else if (input.startsWith("000")) {
             return false;
         } else {
             return true;