|
@@ -330,50 +330,9 @@ const importBills = (function(){
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
- //excel数据与标准库数据匹配,根据清单前九位编码匹配,匹配成功则获取标准清单对应的工程专业、特征及内容
|
|
|
- /*function matchStdBill(excelBill, stdData){
|
|
|
- let isMatch = false;
|
|
|
- let regExp = /^\d{12}$/g;
|
|
|
- if(regExp.test(excelBill.code)){
|
|
|
- let nineCode = excelBill.code.substr(0, 9);
|
|
|
- for(let stdBill of stdData.stdBills){
|
|
|
- //set programID
|
|
|
- if(nineCode == stdBill.code){
|
|
|
- isMatch = true;
|
|
|
- excelBill.programID = stdBill.engineering ? stdBill.engineering : null;
|
|
|
- excelBill.billsLibId = stdBill.billsLibId ? stdBill.billsLibId : null;
|
|
|
- //set jobContent and itemCharacter
|
|
|
- let tempJob = [], tempCharacter = [];
|
|
|
- for(let billJob of stdBill.jobs){
|
|
|
- for(let stdJob of stdData.stdJobs) {
|
|
|
- if (billJob.id == stdJob.id) {
|
|
|
- tempJob.push({isChecked: false, serialNo: billJob.serialNo, content: stdJob.content});
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- for(let billCharacter of stdBill.items){
|
|
|
- for(let stdCharacter of stdData.stdCharacters){
|
|
|
- if(billCharacter.id == stdCharacter.id){
|
|
|
- let eigenvalue = [];
|
|
|
- for(let eValue of stdCharacter.itemValue){
|
|
|
- eigenvalue.push({isSelected: false, value: eValue.value});
|
|
|
- }
|
|
|
- tempCharacter.push({isChecked: false, serialNo: billCharacter.serialNo, character: stdCharacter.content, eigenvalue: eigenvalue});
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- excelBill.jobContent = tempJob;
|
|
|
- excelBill.itemCharacter = tempCharacter;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if(!isMatch && excelBill.type === billType.FX){//分项不为空,同时在标准清单中不匹配,则识别为补项
|
|
|
- excelBill.type = billType.BX;
|
|
|
- }
|
|
|
- }*/
|
|
|
+ let preData = null;
|
|
|
for(let r = 0; r < validData.length; r++){
|
|
|
- let preData = validData[r-1],
|
|
|
- rData = validData[r];
|
|
|
+ let rData = validData[r];
|
|
|
if(flag == fixedFlag.CONSTRUCTION_TECH && rData[colMapping.name] && rData[colMapping.name]['value'] === '施工技术措施项目'
|
|
|
|| flag == fixedFlag.CONSTRUCTION_ORGANIZATION && rData[colMapping.name] && rData[colMapping.name]['value'] === '施工组织措施项目'){
|
|
|
continue;
|
|
@@ -388,7 +347,7 @@ const importBills = (function(){
|
|
|
//合并续数据
|
|
|
preBill.code += rData[colMapping.code] && rData[colMapping.code]['value'] ? rData[colMapping.code]['value'] : '';
|
|
|
preBill.name += rData[colMapping.name] && rData[colMapping.name]['value'] ? rData[colMapping.name]['value'] : '';
|
|
|
- preBill.itemCharacterText += rData[colMapping.itemCharacterText] && rData[colMapping.itemCharacterText]['value'] ? rData[colMapping.itemCharacterText]['value'] : '';
|
|
|
+ preBill.itemCharacterText += rData[colMapping.itemCharacterText] && rData[colMapping.itemCharacterText]['value'] ? '\n' + rData[colMapping.itemCharacterText]['value'] : '';
|
|
|
preBill.unit += rData[colMapping.unit] && rData[colMapping.unit]['value'] ? rData[colMapping.unit]['value'] : '';
|
|
|
preBill.quantity += rData[colMapping.quantity] && rData[colMapping.quantity]['value'] ? rData[colMapping.quantity]['value'] : '';
|
|
|
}
|
|
@@ -438,6 +397,7 @@ const importBills = (function(){
|
|
|
preRootID = isRoot(rData) ? newID : preRootID;
|
|
|
preLeafID = isLeaf(rData) ? newID : preLeafID;
|
|
|
}
|
|
|
+ preData = rData;
|
|
|
}
|
|
|
for(let i in billIdx){
|
|
|
rst.push(billIdx[i]);
|