Xiaopeng Zhang 5 달 전
부모
커밋
c50016b0a1
4개의 변경된 파일1192개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 1
      src/App2.js
  2. 49 3
      src/Service.js
  3. 1 1
      src/editor.js
  4. 1140 0
      src/utils.js

+ 2 - 1
src/App2.js

@@ -488,7 +488,8 @@ function a11yProps(index) {
           'newBianhao': A.row['编号'],
           'newName': A.row['名称'],
           'newJia': A.row['单价'],
-          'old' : tihuanRowRef.current
+          'old' : tihuanRowRef.current,
+          'zhuanye': zhuanye
         };
         setTihuanClick(JSON.stringify(state));
         setDopen(false);

+ 49 - 3
src/Service.js

@@ -1,4 +1,4 @@
-import {copy, danxiangdinge_index, danxiangdinge_index_djcs, renameDingE, extractFuzhu, match_target, azfy} from './utils';
+import {copy, danxiangdinge_index, danxiangdinge_index_djcs, renameDingE, extractFuzhu, match_target, azfy, addChildren} from './utils';
 import { v4 as uuidv4 } from 'uuid';
 class Service{
     
@@ -1628,6 +1628,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
         console.log("data updated");
         //处理附注
         let huan = false;//换
+        let huankey = [];
         let qd = this.cache.filter(x=>x["_children"].filter(y=>y['key']==row).length > 0)[0];
         let de = qd["_children"].filter(x=>x['key'] == row)[0];
         if (de.hasOwnProperty("rcjdg")) {//新数据
@@ -1647,8 +1648,9 @@ async generateQingdanTuijian(name, bh, bt, bm) {
                         if (de['rcjdg'][i][2] == data[j][2]) {//更新名称
                     
                         } else {
-                            
+                             //if (de['rcjdg'][i][18] == 'false')
                              huan = true;
+                             huankey.push(de['rcjdg'][i][16]);
                         }
                     }
                 }
@@ -1865,6 +1867,9 @@ async generateQingdanTuijian(name, bh, bt, bm) {
 
         if (de['dercj'][0].length > 18)
         de['dercj'] = de['dercj'].filter(x=>x[18]!='true').map(x=>[x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], x[17]]);
+        let keyleft = de['dercj'].map(x=>x[16]);
+        huankey = huankey.filter(x=>keyleft.includes(x));
+        if (huankey.length == 0)huan = false;
         de['dercj'] = de['dercj'].filter(x=>!x[1].includes('10000F') && x[17] != 'true');//补充
         de['dercj'] = de['dercj'].map(x=>[x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], '']);
         for(let i = 0; i < rcjbc.length; i++) {
@@ -2085,11 +2090,52 @@ async generateQingdanTuijian(name, bh, bt, bm) {
 
     }
 
-    huan(old_index, new_bianhao, new_name, new_jia, row) {
+    huan(old_index, new_bianhao, new_name, new_jia, zhuanye, row) {
         let qd = this.cache.filter(x=>x["_children"].filter(y=>y['key']==row).length > 0)[0];
         this.updateFootprint(qd['key']);
         let de = qd["_children"].filter(x=>x['key'] == row)[0];
         let rcj = copy(de['dercj']);
+        /*
+        let dg = copy(de['rcjdg']);
+        if (dg == null && dg.length == 0) {
+
+        } else {
+        let children = [];
+        
+        for(let i = 1; i < dg.length; i++) {
+            if (dg[i][16] == rcj[old_index][16]) {
+                if (dg[i][20].length > 0) {
+                    children = dg[i][20];
+                    
+                }
+            }
+        }
+        let newdg = dg.filter(x=>!children.includes(x['16']));
+        let added = addChildren(zhuanye, new_bianhao, rcj[old_index][10], rcj[old_index][16]);
+        if (added.length == 0) {
+            for(let i = 1; i < newdg.length; i++) {
+                if (newdg[i][16] == rcj[old_index][16]) {
+                    newdg[i][18] = 'false';
+                      
+                }
+            }
+        }
+        else {
+            let childid = [];
+            for(let i = 0; i < added.length; i++) {
+                newdg.push(added[i]);
+                childid.push(added[i][16]);
+            }
+            for(let i = 1; i < newdg.length; i++) {
+                if (newdg[i][16] == rcj[old_index][16]) {
+                    newdg[i][20] = childid;
+                      
+                }
+            }
+
+        }
+        de['rcjdg'] = newdg;
+        }*/
         rcj[old_index][1] = new_bianhao;
         rcj[old_index][2] = new_name;
         rcj[old_index][5] = new_jia;

+ 1 - 1
src/editor.js

@@ -74,7 +74,7 @@ export const updateDercj_djcs = (row, data) => {
 
 export const huan = (replaceState, row) => {
    
-    return Service.huan(replaceState['old'],replaceState['newBianhao'],replaceState['newName'], replaceState['newJia'], row);
+    return Service.huan(replaceState['old'],replaceState['newBianhao'],replaceState['newName'], replaceState['newJia'], replaceState['zhuanye'],row);
 
 };
 

+ 1140 - 0
src/utils.js

@@ -1,3 +1,5 @@
+import { v4 as uuidv4 } from 'uuid';
+
 export const danxiangdinge_index = (data) => {
     let max = 0;
     for(let i = 0;  i< data.length; i++) {
@@ -52,6 +54,8 @@ export const copy = (input) => {
 };
 
 
+
+
 export const renameDingE = (oldname, xuhao, huan) => {
     let index = oldname.indexOf('附注', 0);
     let raw = oldname;
@@ -67,6 +71,9 @@ export const renameDingE = (oldname, xuhao, huan) => {
     if (huan && raw.indexOf('换') == -1) {
         raw = raw.concat('换');
     }
+    else if (!huan && raw.indexOf('换') > -1) {
+        raw = raw.replace('换', '');
+    }
     
     return raw;
 };
@@ -534,3 +541,1136 @@ export const azfy = (debh, gclmc) => {
 
 
 };
+
+const tjpbsj = ['80010103',
+'80010104',
+'80010105',
+'80010106',
+'80050103',
+'80050104',
+'80050105',
+'80050106',
+'80010121',
+'80010122',
+'80010123',
+'80010124',
+'80010125',
+'80010161',
+'80070303',
+'80070304',
+'80070305',
+'80070306',
+'80010142',
+'80050120',
+'80050121',
+'80050122',
+'80050123',
+'80050124',
+'80050125',
+'80050126',
+'80050312',
+'80050127',
+'80050311',
+'80050128',
+'80050130',
+'80050317',
+'80050129',
+'80050133',
+'80030103',
+'80030104',
+'80030105',
+'80030106',
+'80030121',
+'80050503',
+'80071505',
+'80071506',
+'80070905',
+'80070906',
+'80070907',
+'80090325',
+'80090326',
+'80071521',
+'80071511',
+'80070721',
+'80090324',
+'80071307',
+'80071331',
+'80090314',
+'80090315',
+'80071321',
+'80050108',
+'80050111',
+'80010341'];
+const tjpbsjchai = [['80010103', 202.0, 273],
+['80010103', 1.61, 277],
+['80010103', 0.3, 1173],
+['80010104', 217.0, 273],
+['80010104', 1.61, 277],
+['80010104', 0.3, 1173],
+['80010105', 223.0, 273],
+['80010105', 1.61, 277],
+['80010105', 0.3, 1173],
+['80010106', 253.0, 273],
+['80010106', 1.61, 277],
+['80010106', 0.3, 1173],
+['80050103', 174.0, 273],
+['80050103', 1.61, 277],
+['80050103', 0.1, 1369],
+['80050103', 0.3, 1173],
+['80050104', 202.0, 273],
+['80050104', 1.61, 277],
+['80050104', 0.08, 1369],
+['80050104', 0.3, 1173],
+['80050105', 230.0, 273],
+['80050105', 1.61, 277],
+['80050105', 0.05, 1369],
+['80050105', 0.3, 1173],
+['80050106', 258.0, 273],
+['80050106', 1.61, 277],
+['80050106', 0.03, 1369],
+['80050106', 0.3, 1173],
+['80010121', 765.0, 273],
+['80010121', 1.007, 277],
+['80010121', 0.3, 1173],
+['80010122', 644.0, 273],
+['80010122', 1.272, 277],
+['80010122', 0.3, 1173],
+['80010123', 557.0, 273],
+['80010123', 1.464, 277],
+['80010123', 0.3, 1173],
+['80010124', 490.0, 273],
+['80010124', 1.611, 277],
+['80010124', 0.3, 1173],
+['80010125', 408.0, 273],
+['80010125', 1.611, 277],
+['80010125', 0.3, 1173],
+['80010161', 359.0, 273],
+['80010161', 1.611, 277],
+['80010161', 0.15, 1173],
+['80070303', 765.0, 273],
+['80070303', 1.007, 277],
+['80070303', 38.25, 1371],
+['80070303', 0.3, 1173],
+['80070304', 644.0, 273],
+['80070304', 1.272, 277],
+['80070304', 32.2, 1371],
+['80070304', 0.3, 1173],
+['80070305', 557.0, 273],
+['80070305', 1.464, 277],
+['80070305', 27.85, 1371],
+['80070305', 0.3, 1173],
+['80070306', 490.0, 273],
+['80070306', 1.611, 277],
+['80070306', 24.5, 1371],
+['80070306', 0.3, 1173],
+['80010142', 644.0, 274],
+['80010142', 1.28, 277],
+['80010142', 0.3, 1173],
+['80050120', 185.0, 273],
+['80050120', 1.48, 277],
+['80050120', 0.31, 1369],
+['80050120', 0.6, 1173],
+['80050121', 130.0, 273],
+['80050121', 1.56, 277],
+['80050121', 0.32, 1369],
+['80050121', 0.6, 1173],
+['80050122', 340.0, 273],
+['80050122', 0.46, 277],
+['80050122', 0.56, 1369],
+['80050122', 0.6, 1173],
+['80050123', 306.0, 273],
+['80050123', 1.63, 277],
+['80050123', 0.13, 1369],
+['80050123', 0.6, 1173],
+['80050124', 382.0, 273],
+['80050124', 1.01, 277],
+['80050124', 0.32, 1369],
+['80050124', 0.6, 1173],
+['80050125', 204.0, 273],
+['80050125', 1.63, 277],
+['80050125', 0.17, 1369],
+['80050125', 0.6, 1173],
+['80050126', 466.0, 273],
+['80050126', 1.52, 277],
+['80050126', 0.04, 1369],
+['80050126', 0.6, 1173],
+['80050312', 371.0, 273],
+['80050312', 1.48, 277],
+['80050312', 0.15, 1369],
+['80050312', 0.6, 1173],
+['80050127', 278.0, 273],
+['80050127', 1.48, 277],
+['80050127', 0.23, 1369],
+['80050127', 0.6, 1173],
+['80050311', 453.0, 273],
+['80050311', 1.2, 277],
+['80050311', 0.19, 1369],
+['80050311', 0.6, 1173],
+['80050128', 510.0, 273],
+['80050128', 1.36, 277],
+['80050128', 0.08, 1369],
+['80050128', 0.6, 1173],
+['80050130', 583.0, 273],
+['80050130', 0.77, 277],
+['80050130', 0.24, 1369],
+['80050130', 0.6, 1173],
+['80050317', 467.0, 273],
+['80050317', 0.62, 277],
+['80050317', 0.39, 1369],
+['80050317', 0.6, 1173],
+['80050129', 391.0, 273],
+['80050129', 1.56, 277],
+['80050129', 0.1, 1369],
+['80050129', 0.6, 1173],
+['80050133', 242.0, 273],
+['80050133', 1.61, 277],
+['80050133', 0.1, 1369],
+['80050133', 0.6, 1173],
+['80030103', 1.47, 277],
+['80030103', 0.47, 1369],
+['80030103', 0.6, 1173],
+['80030104', 1.61, 277],
+['80030104', 0.4, 1369],
+['80030104', 0.6, 1173],
+['80030105', 1.61, 277],
+['80030105', 0.36, 1369],
+['80030105', 0.6, 1173],
+['80030106', 1.61, 277],
+['80030106', 0.25, 1369],
+['80030106', 0.6, 1173],
+['80030121', 1.63, 277],
+['80030121', 0.34, 1369],
+['80030121', 0.6, 1173],
+['80030121', 16.6, 114],
+['80050503', 224.0, 273],
+['80050503', 1.18, 277],
+['80050503', 0.37, 1369],
+['80050503', 0.6, 1173],
+['80050503', 26.63, 1381],
+['80071505', 1.56, 277],
+['80071505', 530.0, 292],
+['80071505', 275.0, 838],
+['80071506', 1.69, 277],
+['80071506', 468.0, 292],
+['80071506', 244.0, 838],
+['80070905', 312.96, 273],
+['80070905', 1.18, 1362],
+['80070905', 0.4, 1173],
+['80070906', 340.1, 273],
+['80070906', 1.14, 1362],
+['80070906', 0.4, 1173],
+['80070907', 411.48, 273],
+['80070907', 1.04, 1362],
+['80070907', 0.4, 1173],
+['80090325', 391.0, 293],
+['80090325', 0.672, 280],
+['80090325', 68.0, 1359],
+['80090325', 1129.0, 1380],
+['80090326', 1085.0, 273],
+['80090326', 0.32, 275],
+['80090326', 1650.0, 1358],
+['80090326', 0.4, 1173],
+['80071521', 408.0, 838],
+['80071521', 1.23, 1360],
+['80071521', 219.0, 1377],
+['80071521', 224.0, 1379],
+['80071511', 543.0, 293],
+['80071511', 1.547, 280],
+['80071511', 280.0, 838],
+['80070721', 458.0, 293],
+['80070721', 1.082, 280],
+['80070721', 0.416, 1370],
+['80070721', 412.0, 1541],
+['80070721', 70.0, 900],
+['80090324', 490.0, 273],
+['80090324', 2.467, 1361],
+['80090324', 0.4, 1173],
+['80071307', 668.0, 293],
+['80071307', 1.336, 280],
+['80071307', 337.0, 1372],
+['80071307', 167.0, 905],
+['80071307', 67.0, 906],
+['80071331', 663.0, 293],
+['80071331', 1.324, 280],
+['80071331', 233.49, 1372],
+['80071331', 17.0, 905],
+['80071331', 46.7, 906],
+['80071331', 108.0, 813],
+['80090314', 585.0, 293],
+['80090314', 1.138, 280],
+['80090314', 23.0, 909],
+['80090314', 325.3, 815],
+['80090314', 10.0, 879],
+['80090314', 10.0, 1375],
+['80090315', 599.0, 293],
+['80090315', 1.164, 280],
+['80090315', 332.6, 1373],
+['80090315', 23.5, 909],
+['80090315', 10.0, 879],
+['80090315', 10.0, 1375],
+['80071321', 655.0, 293],
+['80071321', 1.31, 280],
+['80071321', 165.0, 1372],
+['80071321', 14.0, 905],
+['80071321', 14.0, 906],
+['80071321', 33.0, 903],
+['80071321', 166.0, 894],
+['80050111', 731.0, 1526],
+['80050111', 0.95, 1527],
+['80050111', 0.4, 1173],
+['80050108', 466.0, 1526],
+['80050108', 1.03, 1527],
+['80050108', 0.4, 1173]];
+const tjpbcl = [['02290501', '麻刀', 'kg', 2.4, 114],
+['04010611', '水泥 32.5级', 'kg', 0.31, 273],
+['04010701', '白水泥', 'kg', 0.7, 274],
+['04030100', '黄砂', 't', 74.0, 275],
+['04030107', '中砂', 't', 69.37, 277],
+['04030133', '石英砂', 't', 180.0, 280],
+['04090602', '滑石粉', 'kg', 0.62, 292],
+['04090700', '石英粉', 'kg', 0.35, 293],
+['11410319', '呋喃树脂', 'kg', 18.0, 813],
+['11410324', '邻苯型不饱和聚酸树脂', 'kg', 20.0, 815],
+['11550105', '石油沥青 30#', 'kg', 5.5, 838],
+['11593507', '过氧化环乙酮二丁酯糊 50%', 'kg', 16.0, 879],
+['12060323', '煤焦油', 'kg', 2.8, 894],
+['12300325', '氟硅酸钠', 'kg', 2.8, 900],
+['12310303', '二甲苯', 'kg', 5.9, 903],
+['12310307', '乙二胺', 'kg', 15.0, 905],
+['12310308', '丙酮', 'kg', 6.0, 906],
+['12310317', '苯乙烯', 'kg', 9.7, 909],
+['31150101', '水', 'm3', 4.7, 1173],
+['01650104', '钢屑', 'kg', 2.4, 1358],
+['02070404', '聚硫橡胶', 'kg', 30.0, 1359],
+['04030121', '白云石砂 4#', 't', 133.0, 1360],
+['04030129', '重晶石砂', 't', 330.0, 1361],
+['04030139', '轻质砂', 'm3', 70.0, 1362],
+['04090120', '石灰膏', 'm3', 216.0, 1369],
+['04090605', '铸石粉', 't', 712.5, 1370],
+['04230108', '防水剂', 'kg', 5.0, 1371],
+['11410305', '环氧树脂 E42', 'kg', 19.95, 1372],
+['11410325', '双酚A不饱和聚脂树脂', 'kg', 19.0, 1373],
+['12310329', '环烷酸钴苯乙烯液', 'kg', 12.0, 1375],
+['13010102', '温石棉', 'kg', 7.79, 1377],
+['13160303', '硅藻土', 'kg', 0.38, 1379],
+['31052502', '硫磺', 'kg', 1.8, 1380],
+['31132509', '纸筋', 'kg', 1.5, 1381],
+['04010611', '复合硅酸盐水泥  32.5级', 'kg', 0.31, 1526],
+['04030107', '中(粗)砂', 't', 69.37, 1527],
+['12413531', '水玻璃', 'kg', 0.85, 1541]];
+
+const ylpbsj = ['62532',
+    '62542',
+    '62552',
+    '62562',
+    '62572',
+    '62582',
+    '62592',
+    '62602',
+    '62612',
+    '62622',
+    '62632',
+    '62643',
+    '62653',
+    '62662',
+    '62672',
+    '62682',
+    '62692',
+    '62702',
+    '62712',
+    '62722',
+    '62732',
+    '62742',
+    '62754',
+    '62762',
+    '62772',
+    '62792',
+    '62802',
+    '62812',
+    '62822',
+    '62832',
+    '62842',
+    '62852',
+    '62862',
+    '62863',
+    '62872',
+    '62882',
+    '62892',
+    '62902',
+    '62912',
+    '62922',
+    '62932',
+    '62944',
+    '63152',
+    '63162',
+    '63172',
+    '63332',
+    '63333']; 
+const ylpbsjchai =   [['62532', 0.3, 30181],
+['62532', 202.0, 29596],
+['62532', 1.61, 29714],
+['62542', 0.3, 30181],
+['62542', 217.0, 29596],
+['62542', 1.61, 29714],
+['62552', 0.3, 30181],
+['62552', 223.0, 29596],
+['62552', 1.61, 29714],
+['62562', 0.3, 30181],
+['62562', 253.0, 29596],
+['62562', 1.61, 29714],
+['62572', 0.3, 30181],
+['62572', 174.0, 29596],
+['62572', 1.61, 29714],
+['62572', 0.1, 29677],
+['62582', 0.3, 30181],
+['62582', 202.0, 29596],
+['62582', 1.61, 29714],
+['62582', 0.08, 29677],
+['62592', 0.3, 30181],
+['62592', 230.0, 29596],
+['62592', 1.61, 29714],
+['62592', 0.05, 29677],
+['62602', 0.3, 30181],
+['62602', 258.0, 29596],
+['62602', 1.61, 29714],
+['62602', 0.03, 29677],
+['62612', 0.3, 30181],
+['62612', 765.0, 29596],
+['62612', 1.007, 29714],
+['62622', 0.3, 30181],
+['62622', 644.0, 29596],
+['62622', 1.272, 29714],
+['62632', 0.3, 30181],
+['62632', 557.0, 29596],
+['62632', 1.464, 29714],
+['62643', 0.3, 30181],
+['62643', 490.0, 29596],
+['62643', 1.611, 29714],
+['62653', 0.3, 30181],
+['62653', 408.0, 29596],
+['62653', 1.611, 29714],
+['62662', 0.15, 30181],
+['62662', 359.0, 29596],
+['62662', 1.611, 29714],
+['62672', 0.3, 30181],
+['62672', 765.0, 29596],
+['62672', 1.007, 29714],
+['62672', 38.25, 29983],
+['62682', 0.3, 30181],
+['62682', 644.0, 29596],
+['62682', 1.272, 29714],
+['62682', 32.2, 29983],
+['62692', 0.3, 30181],
+['62692', 557.0, 29596],
+['62692', 1.464, 29714],
+['62692', 27.85, 29983],
+['62702', 0.3, 30181],
+['62702', 490.0, 29596],
+['62702', 1.611, 29714],
+['62702', 24.5, 29983],
+['62712', 0.3, 30181],
+['62712', 1.28, 29714],
+['62712', 644.0, 29595],
+['62722', 0.6, 30181],
+['62722', 185.0, 29596],
+['62722', 1.48, 29714],
+['62722', 0.31, 29677],
+['62732', 0.6, 30181],
+['62732', 130.0, 29596],
+['62732', 1.56, 29714],
+['62732', 0.32, 29677],
+['62742', 0.6, 30181],
+['62742', 340.0, 29596],
+['62742', 0.46, 29714],
+['62742', 0.56, 29677],
+['62754', 0.6, 30181],
+['62754', 306.0, 29596],
+['62754', 1.63, 29714],
+['62754', 0.13, 29677],
+['62762', 0.6, 30181],
+['62762', 382.0, 29596],
+['62762', 1.01, 29714],
+['62762', 0.32, 29677],
+['62772', 0.6, 30181],
+['62772', 204.0, 29596],
+['62772', 1.63, 29714],
+['62772', 0.17, 29677],
+['62792', 0.6, 30181],
+['62792', 371.0, 29596],
+['62792', 1.48, 29714],
+['62792', 0.15, 29677],
+['62802', 0.6, 30181],
+['62802', 278.0, 29596],
+['62802', 1.48, 29714],
+['62802', 0.23, 29677],
+['62812', 0.6, 30181],
+['62812', 453.0, 29596],
+['62812', 1.2, 29714],
+['62812', 0.19, 29677],
+['62822', 0.6, 30181],
+['62822', 510.0, 29596],
+['62822', 1.36, 29714],
+['62822', 0.08, 29677],
+['62832', 0.6, 30181],
+['62832', 583.0, 29596],
+['62832', 0.77, 29714],
+['62832', 0.24, 29677],
+['62842', 0.6, 30181],
+['62842', 467.0, 29596],
+['62842', 0.62, 29714],
+['62842', 0.39, 29677],
+['62852', 0.6, 30181],
+['62852', 391.0, 29596],
+['62852', 1.56, 29714],
+['62852', 0.1, 29677],
+['62862', 0.6, 30181],
+['62862', 242.0, 29596],
+['62862', 1.61, 29714],
+['62862', 0.1, 29677],
+['62863', 0.6, 30181],
+['62863', 466.0, 29596],
+['62863', 1.52, 29714],
+['62863', 0.04, 29677],
+['62872', 0.6, 30181],
+['62872', 1.47, 29714],
+['62872', 0.47, 29677],
+['62882', 0.6, 30181],
+['62882', 1.61, 29714],
+['62882', 0.4, 29677],
+['62892', 0.6, 30181],
+['62892', 1.61, 29714],
+['62892', 0.36, 29677],
+['62902', 0.6, 30181],
+['62902', 1.61, 29714],
+['62902', 0.25, 29677],
+['62912', 0.3, 30181],
+['62912', 945.0, 29596],
+['62912', 1.19, 29611],
+['62922', 0.3, 30181],
+['62922', 709.0, 29596],
+['62922', 1.38, 29611],
+['62932', 0.3, 30181],
+['62932', 567.0, 29596],
+['62932', 1.52, 29611],
+['62944', 0.3, 30181],
+['62944', 473.0, 29596],
+['62944', 1.6, 29611],
+['63152', 0.6, 30181],
+['63152', 1.63, 29714],
+['63152', 16.6, 30165],
+['63152', 0.34, 29677],
+['63162', 0.6, 30181],
+['63162', 224.0, 29596],
+['63162', 26.63, 30188],
+['63162', 1.18, 29714],
+['63162', 0.37, 29677],
+['63172', 0.5, 30181],
+['63172', 998.23, 29596],
+['63172', 24.21, 30188],
+['63172', 0.34, 29677],
+['63172', 0.005, 31054],
+['63332', 1.56, 29714],
+['63332', 275.0, 30140],
+['63332', 530.0, 30134],
+['63333', 1.69, 29714],
+['63333', 244.0, 30140],
+['63333', 468.0, 30134]];
+const ylpbcl = [['0430061', '白水泥', 'kg', 0.52, 29595],
+['0430080', '水泥 32.5级', 'kg', 0.3, 29596],
+['0530135', '白石子', 't', 106.3, 29611],
+['0530490', '石灰膏', 'm3', 118.0, 29677],
+['0530720', '中砂', 't', 36.5, 29714],
+['1730060', '防水剂', 'kg', 1.52, 29983],
+['2230080', '滑石粉', 'kg', 0.45, 30134],
+['2230131', '石油沥青 30#', 'kg', 3.69, 30140],
+['2330290', '麻刀', 'kg', 2.0, 30165],
+['2330450', '水', 'm3', 4.1, 30181],
+['2330520', '纸筋', 'kg', 0.5, 30188],
+['2359999', '其它材料费(调整)', '元', 1.0, 31054]];
+
+const xsazpbsj = ['304912001',
+    '304912002',
+    '304912003',
+    '304912004',
+    '304912005',
+    '304912006',
+    '304912007',
+    '304912008',
+    '304913001',
+    '304913002',
+    '304913003',
+    '304913004',
+    '304913005',
+    '304913006',
+    '304913007',
+    '304913008',
+    '304913009',
+    '304913010',
+    '304913012',
+    '304913013',
+    '304913014',
+    '304913015',
+    '304913016',
+    '304913017',
+    '304913018',
+    '304913019',
+    '304913020',
+    '304913021',
+    '304913022',
+    '304913023',
+    '304913024',
+    '304913025',
+    '304913026',
+    '304913027',
+    '304913028',
+    '304913029',
+    '304913030',
+    '304913031',
+    '304913071',
+    '304913072',
+    '304914008',
+    '304914009',
+    '304914015',
+    '304913011',
+    '304916001',
+    '304916002',
+    '304916003',
+    '304916004',
+    '304916005',
+    '304916006',
+    '304916007'];
+
+const xsazpbsjchai = [['304912001', 202.0, 263],
+['304912001', 1.61, 5],
+['304912001', 0.3, 353],
+['304912002', 217.0, 263],
+['304912002', 1.61, 5],
+['304912002', 0.3, 353],
+['304912003', 223.0, 263],
+['304912003', 1.61, 5],
+['304912003', 0.3, 353],
+['304912004', 253.0, 263],
+['304912004', 1.61, 5],
+['304912004', 0.3, 353],
+['304912005', 174.0, 263],
+['304912005', 1.61, 5],
+['304912005', 0.1, 38],
+['304912005', 0.3, 353],
+['304912006', 202.0, 263],
+['304912006', 1.61, 5],
+['304912006', 0.08, 38],
+['304912006', 0.3, 353],
+['304912007', 230.0, 263],
+['304912007', 1.61, 5],
+['304912007', 0.05, 38],
+['304912007', 0.3, 353],
+['304912008', 258.0, 263],
+['304912008', 1.61, 5],
+['304912008', 0.03, 38],
+['304912008', 0.3, 353],
+['304913001', 765.0, 263],
+['304913001', 1.007, 5],
+['304913001', 0.3, 353],
+['304913002', 644.0, 263],
+['304913002', 1.272, 5],
+['304913002', 0.3, 353],
+['304913003', 557.0, 263],
+['304913003', 1.464, 5],
+['304913003', 0.3, 353],
+['304913004', 490.0, 263],
+['304913004', 1.611, 5],
+['304913004', 0.3, 353],
+['304913005', 408.0, 263],
+['304913005', 1.611, 5],
+['304913005', 0.3, 353],
+['304913006', 359.0, 263],
+['304913006', 1.611, 5],
+['304913006', 0.15, 353],
+['304913012', 644.0, 266],
+['304913012', 1.28, 5],
+['304913012', 0.3, 353],
+['304913013', 185.0, 263],
+['304913013', 0.31, 38],
+['304913013', 1.48, 5],
+['304913013', 0.3, 353],
+['304913014', 130.0, 263],
+['304913014', 0.32, 38],
+['304913014', 1.56, 5],
+['304913014', 0.3, 353],
+['304913015', 340.0, 263],
+['304913015', 0.56, 38],
+['304913015', 0.46, 5],
+['304913015', 0.3, 353],
+['304913016', 306.0, 263],
+['304913016', 0.13, 38],
+['304913016', 1.63, 5],
+['304913016', 0.3, 353],
+['304913017', 382.0, 263],
+['304913017', 0.32, 38],
+['304913017', 1.01, 5],
+['304913017', 0.3, 353],
+['304913018', 204.0, 263],
+['304913018', 0.17, 38],
+['304913018', 1.63, 5],
+['304913018', 0.3, 353],
+['304913019', 466.0, 263],
+['304913019', 0.04, 38],
+['304913019', 1.52, 5],
+['304913019', 0.3, 353],
+['304913020', 371.0, 263],
+['304913020', 0.15, 38],
+['304913020', 1.48, 5],
+['304913020', 0.3, 353],
+['304913021', 278.0, 263],
+['304913021', 0.23, 38],
+['304913021', 1.48, 5],
+['304913021', 0.3, 353],
+['304913022', 453.0, 263],
+['304913022', 0.19, 38],
+['304913022', 1.2, 5],
+['304913022', 0.3, 353],
+['304913023', 510.0, 263],
+['304913023', 0.08, 38],
+['304913023', 1.36, 5],
+['304913023', 0.3, 353],
+['304913024', 583.0, 263],
+['304913024', 0.24, 38],
+['304913024', 0.77, 5],
+['304913024', 0.3, 353],
+['304913025', 467.0, 263],
+['304913025', 0.39, 38],
+['304913025', 0.62, 5],
+['304913025', 0.3, 353],
+['304913026', 391.0, 263],
+['304913026', 0.1, 38],
+['304913026', 1.56, 5],
+['304913026', 0.3, 353],
+['304913027', 242.0, 263],
+['304913027', 0.1, 38],
+['304913027', 1.61, 5],
+['304913027', 0.3, 353],
+['304913028', 0.47, 38],
+['304913028', 1.47, 5],
+['304913028', 0.3, 353],
+['304913029', 0.4, 38],
+['304913029', 1.61, 5],
+['304913029', 0.3, 353],
+['304913030', 0.36, 38],
+['304913030', 1.61, 5],
+['304913030', 0.3, 353],
+['304913031', 0.25, 38],
+['304913031', 1.61, 5],
+['304913031', 0.3, 353],
+['304913071', 0.34, 38],
+['304913071', 1.63, 5],
+['304913071', 16.6, 1198],
+['304913071', 0.3, 353],
+['304913072', 224.0, 263],
+['304913072', 0.37, 38],
+['304913072', 1.18, 5],
+['304913072', 26.63, 47],
+['304913072', 0.3, 353],
+['304914008', 1.56, 5],
+['304914008', 275.0, 1085],
+['304914008', 530.0, 41],
+['304914009', 1.69, 5],
+['304914009', 244.0, 1085],
+['304914009', 468.0, 41],
+['304914015', 1085.0, 263],
+['304914015', 0.32, 6],
+['304914015', 1650.0, 864],
+['304914015', 0.4, 353],
+['304913007', 765.0, 263],
+['304913007', 1.007, 5],
+['304913007', 38.25, 1305],
+['304913007', 0.3, 353],
+['304913008', 644.0, 263],
+['304913008', 1.272, 5],
+['304913008', 32.2, 1305],
+['304913008', 0.3, 353],
+['304913009', 557.0, 263],
+['304913009', 1.464, 5],
+['304913009', 27.85, 1305],
+['304913009', 0.3, 353],
+['304913010', 490.0, 263],
+['304913010', 1.611, 5],
+['304913010', 24.5, 1305],
+['304913010', 0.3, 353],
+['304913011', 408.0, 263],
+['304913011', 1.611, 5],
+['304913011', 0.3, 353],
+['304913011', 20.4, 1305],
+['304916001', 312.96, 263],
+['304916001', 1.18, 12],
+['304916001', 0.4, 353],
+['304916002', 340.1, 263],
+['304916002', 1.14, 12],
+['304916002', 0.4, 353],
+['304916003', 411.48, 263],
+['304916003', 1.04, 12],
+['304916003', 0.4, 353],
+['304916004', 180.46, 263],
+['304916004', 1.13, 12],
+['304916004', 0.12, 38],
+['304916004', 0.4, 353],
+['304916005', 262.65, 263],
+['304916005', 0.99, 12],
+['304916005', 0.13, 38],
+['304916005', 0.4, 353],
+['304916006', 281.51, 263],
+['304916006', 0.94, 12],
+['304916006', 0.14, 38],
+['304916006', 0.4, 353],
+['304916007', 312.96, 263],
+['304916007', 0.92, 12],
+['304916007', 0.13, 38],
+['304916007', 0.4, 353]];
+
+const xsazpbcl = [['0101020201', '中砂', 't', 68.5, 5],
+['0101020401', '砂', 't', 59.0, 6],
+['0101070501', '轻质砂 JML', 'm3', 70.0, 12],
+['0105010201', '石灰膏', 'm3', 160.0, 38],
+['0105050201', '滑石粉', 'kg', 0.45, 41],
+['0105060402', '纸筋', 'kg', 0.5, 47],
+['0301010102', '水泥 32.5级', 'kg', 0.31, 263],
+['0301030100', '白水泥', 'kg', 0.58, 266],
+['0612070102', '水', 'm3', 4.1, 353],
+['0512010304', '钢屑', 'kg', 0.76, 864],
+['0604010302', '石油沥青30#', 'kg', 3.69, 1085],
+['0608013501', '麻刀', 'kg', 2.0, 1198],
+['0609100611', '防水剂', 'kg', 1.52, 1305]];
+
+const xstjpbsj = ['304912001',
+    '304912002',
+    '304912003',
+    '304912004',
+    '304912005',
+    '304912006',
+    '304912007',
+    '304912008',
+    '304913001',
+    '304913002',
+    '304913003',
+    '304913004',
+    '304913005',
+    '304913006',
+    '304913007',
+    '304913008',
+    '304913009',
+    '304913010',
+    '304913012',
+    '304913013',
+    '304913014',
+    '304913015',
+    '304913016',
+    '304913017',
+    '304913018',
+    '304913019',
+    '304913020',
+    '304913021',
+    '304913022',
+    '304913023',
+    '304913024',
+    '304913025',
+    '304913026',
+    '304913027',
+    '304913028',
+    '304913029',
+    '304913030',
+    '304913031',
+    '304913071',
+    '304913072',
+    '304914008',
+    '304914009',
+    '304914015',
+    '304913011',
+    '304916001',
+    '304916002',
+    '304916003',
+    '304916004',
+    '304916005',
+    '304916006',
+    '304916007'];
+
+const xstjpbsjchai = [['304912001', 202.0, 263],
+['304912001', 1.61, 5],
+['304912001', 0.3, 353],
+['304912002', 217.0, 263],
+['304912002', 1.61, 5],
+['304912002', 0.3, 353],
+['304912003', 223.0, 263],
+['304912003', 1.61, 5],
+['304912003', 0.3, 353],
+['304912004', 253.0, 263],
+['304912004', 1.61, 5],
+['304912004', 0.3, 353],
+['304912005', 174.0, 263],
+['304912005', 1.61, 5],
+['304912005', 0.1, 38],
+['304912005', 0.3, 353],
+['304912006', 202.0, 263],
+['304912006', 1.61, 5],
+['304912006', 0.08, 38],
+['304912006', 0.3, 353],
+['304912007', 230.0, 263],
+['304912007', 1.61, 5],
+['304912007', 0.05, 38],
+['304912007', 0.3, 353],
+['304912008', 258.0, 263],
+['304912008', 1.61, 5],
+['304912008', 0.03, 38],
+['304912008', 0.3, 353],
+['304913001', 765.0, 263],
+['304913001', 1.007, 5],
+['304913001', 0.3, 353],
+['304913002', 644.0, 263],
+['304913002', 1.272, 5],
+['304913002', 0.3, 353],
+['304913003', 557.0, 263],
+['304913003', 1.464, 5],
+['304913003', 0.3, 353],
+['304913004', 490.0, 263],
+['304913004', 1.611, 5],
+['304913004', 0.3, 353],
+['304913005', 408.0, 263],
+['304913005', 1.611, 5],
+['304913005', 0.3, 353],
+['304913006', 359.0, 263],
+['304913006', 1.611, 5],
+['304913006', 0.15, 353],
+['304913012', 644.0, 266],
+['304913012', 1.28, 5],
+['304913012', 0.3, 353],
+['304913013', 185.0, 263],
+['304913013', 0.31, 38],
+['304913013', 1.48, 5],
+['304913013', 0.3, 353],
+['304913014', 130.0, 263],
+['304913014', 0.32, 38],
+['304913014', 1.56, 5],
+['304913014', 0.3, 353],
+['304913015', 340.0, 263],
+['304913015', 0.56, 38],
+['304913015', 0.46, 5],
+['304913015', 0.3, 353],
+['304913016', 306.0, 263],
+['304913016', 0.13, 38],
+['304913016', 1.63, 5],
+['304913016', 0.3, 353],
+['304913017', 382.0, 263],
+['304913017', 0.32, 38],
+['304913017', 1.01, 5],
+['304913017', 0.3, 353],
+['304913018', 204.0, 263],
+['304913018', 0.17, 38],
+['304913018', 1.63, 5],
+['304913018', 0.3, 353],
+['304913019', 466.0, 263],
+['304913019', 0.04, 38],
+['304913019', 1.52, 5],
+['304913019', 0.3, 353],
+['304913020', 371.0, 263],
+['304913020', 0.15, 38],
+['304913020', 1.48, 5],
+['304913020', 0.3, 353],
+['304913021', 278.0, 263],
+['304913021', 0.23, 38],
+['304913021', 1.48, 5],
+['304913021', 0.3, 353],
+['304913022', 453.0, 263],
+['304913022', 0.19, 38],
+['304913022', 1.2, 5],
+['304913022', 0.3, 353],
+['304913023', 510.0, 263],
+['304913023', 0.08, 38],
+['304913023', 1.36, 5],
+['304913023', 0.3, 353],
+['304913024', 583.0, 263],
+['304913024', 0.24, 38],
+['304913024', 0.77, 5],
+['304913024', 0.3, 353],
+['304913025', 467.0, 263],
+['304913025', 0.39, 38],
+['304913025', 0.62, 5],
+['304913025', 0.3, 353],
+['304913026', 391.0, 263],
+['304913026', 0.1, 38],
+['304913026', 1.56, 5],
+['304913026', 0.3, 353],
+['304913027', 242.0, 263],
+['304913027', 0.1, 38],
+['304913027', 1.61, 5],
+['304913027', 0.3, 353],
+['304913028', 0.47, 38],
+['304913028', 1.47, 5],
+['304913028', 0.3, 353],
+['304913029', 0.4, 38],
+['304913029', 1.61, 5],
+['304913029', 0.3, 353],
+['304913030', 0.36, 38],
+['304913030', 1.61, 5],
+['304913030', 0.3, 353],
+['304913031', 0.25, 38],
+['304913031', 1.61, 5],
+['304913031', 0.3, 353],
+['304913071', 0.34, 38],
+['304913071', 1.63, 5],
+['304913071', 16.6, 1198],
+['304913071', 0.3, 353],
+['304913072', 224.0, 263],
+['304913072', 0.37, 38],
+['304913072', 1.18, 5],
+['304913072', 26.63, 47],
+['304913072', 0.3, 353],
+['304914008', 1.56, 5],
+['304914008', 275.0, 1085],
+['304914008', 530.0, 41],
+['304914009', 1.69, 5],
+['304914009', 244.0, 1085],
+['304914009', 468.0, 41],
+['304914015', 1085.0, 263],
+['304914015', 0.32, 6],
+['304914015', 1650.0, 864],
+['304914015', 0.4, 353],
+['304913007', 765.0, 263],
+['304913007', 1.007, 5],
+['304913007', 38.25, 1305],
+['304913007', 0.3, 353],
+['304913008', 644.0, 263],
+['304913008', 1.272, 5],
+['304913008', 32.2, 1305],
+['304913008', 0.3, 353],
+['304913009', 557.0, 263],
+['304913009', 1.464, 5],
+['304913009', 27.85, 1305],
+['304913009', 0.3, 353],
+['304913010', 490.0, 263],
+['304913010', 1.611, 5],
+['304913010', 24.5, 1305],
+['304913010', 0.3, 353],
+['304913011', 408.0, 263],
+['304913011', 1.611, 5],
+['304913011', 0.3, 353],
+['304913011', 20.4, 1305],
+['304916001', 312.96, 263],
+['304916001', 1.18, 12],
+['304916001', 0.4, 353],
+['304916002', 340.1, 263],
+['304916002', 1.14, 12],
+['304916002', 0.4, 353],
+['304916003', 411.48, 263],
+['304916003', 1.04, 12],
+['304916003', 0.4, 353],
+['304916004', 180.46, 263],
+['304916004', 1.13, 12],
+['304916004', 0.12, 38],
+['304916004', 0.4, 353],
+['304916005', 262.65, 263],
+['304916005', 0.99, 12],
+['304916005', 0.13, 38],
+['304916005', 0.4, 353],
+['304916006', 281.51, 263],
+['304916006', 0.94, 12],
+['304916006', 0.14, 38],
+['304916006', 0.4, 353],
+['304916007', 312.96, 263],
+['304916007', 0.92, 12],
+['304916007', 0.13, 38],
+['304916007', 0.4, 353]];
+
+const xstjpbcl = [['0101020201', '中砂', 't', 68.5, 5],
+['0101020401', '砂', 't', 59.0, 6],
+['0101070501', '轻质砂 JML', 'm3', 70.0, 12],
+['0105010201', '石灰膏', 'm3', 160.0, 38],
+['0105050201', '滑石粉', 'kg', 0.45, 41],
+['0105060402', '纸筋', 'kg', 0.5, 47],
+['0301010102', '水泥 32.5级', 'kg', 0.31, 263],
+['0301030100', '白水泥', 'kg', 0.58, 266],
+['0612070102', '水', 'm3', 4.1, 353],
+['0512010304', '钢屑', 'kg', 0.76, 864],
+['0604010302', '石油沥青30#', 'kg', 3.69, 1085],
+['0608013501', '麻刀', 'kg', 2.0, 1198],
+['0609100611', '防水剂', 'kg', 1.52, 1305]];
+   
+export const addChildren = (zhuanye, bianhao, hl, parent) => {
+    if (zhuanye == 40) {
+        if (ylpbsj.includes(bianhao)) {
+            let result = [];
+            for (let i = 0; i < ylpbsjchai.length; i++) {
+                if (ylpbsjchai[i][0] == bianhao) {
+                   let  rcjid = ylpbsjchai[i][2];
+                   let sl = ylpbsjchai[i][1];
+                   for(let j = 0; j < ylpbcl.length; j++ ) {
+                    if (ylpbcl[j][4] == rcjid) {
+                        result.push(['', ylpbcl[j][0], ylpbcl[j][1], '', ylpbcl[j][2], ylpbcl[j][3], '', '', '2', '', Number(hl) * Number(sl),
+                        Number(hl) * Number(sl) * Number(ylpbcl[j][3]), '', '', '', '', uuidv4(), '', 'false', [parent], [] ]);
+                    }
+                   }
+                }
+            }
+            return result;
+        } else {
+            return [];
+        }
+    }
+    else if (zhuanye == 50) {
+        if (xstjpbsj.includes(bianhao)) {
+            let result = [];
+            for (let i = 0; i < xstjpbsjchai.length; i++) {
+                if (xstjpbsjchai[i][0] == bianhao) {
+                   let  rcjid = xstjpbsjchai[i][2];
+                   let sl = xstjpbsjchai[i][1];
+                   for(let j = 0; j < xstjpbcl.length; j++ ) {
+                    if (xstjpbcl[j][4] == rcjid) {
+                        result.push(['', xstjpbcl[j][0], xstjpbcl[j][1], '', xstjpbcl[j][2], xstjpbcl[j][3], '', '', '2', '', Number(hl) * Number(sl),
+                        Number(hl) * Number(sl) * Number(xstjpbcl[j][3]), '', '', '', '', uuidv4(), '', 'false', [parent], [] ]);
+                    }
+                   }
+                }
+            }
+            return result;
+        } else {
+            return [];
+        }
+    }
+    else if (zhuanye == 60) {
+        if (xsazpbsj.includes(bianhao)) {
+            let result = [];
+            for (let i = 0; i < xsazpbsjchai.length; i++) {
+                if (xsazpbsjchai[i][0] == bianhao) {
+                   let  rcjid = xsazpbsjchai[i][2];
+                   let sl = xsazpbsjchai[i][1];
+                   for(let j = 0; j < xsazpbcl.length; j++ ) {
+                    if (xsazpbcl[j][4] == rcjid) {
+                        result.push(['', xsazpbcl[j][0], xsazpbcl[j][1], '', xsazpbcl[j][2], xsazpbcl[j][3], '', '', '2', '', Number(hl) * Number(sl),
+                        Number(hl) * Number(sl) * Number(xsazpbcl[j][3]), '', '', '', '', uuidv4(), '', 'false', [parent], [] ]);
+                    }
+                   }
+                }
+            }
+            return result;
+        } else {
+            return [];
+        }
+    }
+    else {
+        if (tjpbsj.includes(bianhao)) {
+            let result = [];
+            for (let i = 0; i < tjpbsjchai.length; i++) {
+                if (tjpbsjchai[i][0] == bianhao) {
+                   let  rcjid = tjpbsjchai[i][2];
+                   let sl = tjpbsjchai[i][1];
+                   for(let j = 0; j < tjpbcl.length; j++ ) {
+                    if (tjpbcl[j][4] == rcjid) {
+                        result.push(['', tjpbcl[j][0], tjpbcl[j][1], '', tjpbcl[j][2], tjpbcl[j][3], '', '', '2', '', Number(hl) * Number(sl),
+                        Number(hl) * Number(sl) * Number(tjpbcl[j][3]), '', '', '', '', uuidv4(), '', 'false', [parent], [] ]);
+                    }
+                   }
+                }
+            }
+            return result;
+        } else {
+            return [];
+        }
+    }
+};