|
@@ -62,6 +62,8 @@ const importXML = (() => {
|
|
|
FEE: 2,
|
|
|
// 费率、指数、比例(%)类小数精度
|
|
|
RATE: 3,
|
|
|
+ // 默认、中间过程
|
|
|
+ PROCESS: 6
|
|
|
};
|
|
|
// 根据上方精度要求得到的项目属性,小数位数的值
|
|
|
const tenderPropertyDecimal = {
|
|
@@ -115,9 +117,9 @@ const importXML = (() => {
|
|
|
}
|
|
|
// 从xml对象中提取基本信息相关
|
|
|
function extractBasicInfo(projectSrc) {
|
|
|
- const projectInfo = getValue(projectSrc, ['ProjectInfo']); // 估概预算信息
|
|
|
- const tendereeInfo = getValue(projectSrc, ['TendereeInfo']); // 招标信息
|
|
|
- const bidderInfo = getValue(projectSrc, ['BidderInfo']); // 投标信息
|
|
|
+ const projectInfo = getValue(projectSrc, ['ConstructionInfo', 'ProjectInfo']); // 估概预算信息
|
|
|
+ const tendereeInfo = getValue(projectSrc, ['ConstructionInfo', 'TendereeInfo']); // 招标信息
|
|
|
+ const bidderInfo = getValue(projectSrc, ['ConstructionInfo', 'BidderInfo']); // 投标信息
|
|
|
return [
|
|
|
{ key: 'projNum', value: getValue(projectSrc, ['_Number']) }, // 编码
|
|
|
{ key: 'projectCategory', value: getValue(projectSrc, ['_ProjectCategory']) }, // 工程类别
|
|
@@ -518,7 +520,7 @@ const importXML = (() => {
|
|
|
}
|
|
|
}
|
|
|
// 提取措施项目
|
|
|
- function extractCSXM(tenderSrc) {
|
|
|
+ /* function extractCSXM(tenderSrc) {
|
|
|
const csxmSrc = getValue(tenderSrc, ['Preliminaries']);
|
|
|
const fields = [['DivisionalWorks'], ['WorkElement']];
|
|
|
const fees = getFeesFromBasicCost(csxmSrc); // 措施项目的汇总价
|
|
@@ -533,6 +535,22 @@ const importXML = (() => {
|
|
|
fees,
|
|
|
items
|
|
|
};
|
|
|
+ } */
|
|
|
+ function extractCSXM(tenderSrc) {
|
|
|
+ const csxmSrc = getValue(tenderSrc, ['Preliminaries']);
|
|
|
+ const fields = [['DivisionalWorks'], ['WorkElement']];
|
|
|
+ const fees = getFeesFromBasicCost(csxmSrc); // 措施项目的汇总价
|
|
|
+ const items = extractItemsRecur(csxmSrc, fields, (itemSrc, curField) => {
|
|
|
+ if (curField[0] === fields[0][0]) {
|
|
|
+ return extractDivisionalWorks(itemSrc, billType.BILL);
|
|
|
+ } else {
|
|
|
+ return extractWorkElement(itemSrc, billType.BILL);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return {
|
|
|
+ fees,
|
|
|
+ items
|
|
|
+ };
|
|
|
}
|
|
|
// 提取其他项目
|
|
|
function extractOther(tenderSrc) {
|
|
@@ -555,9 +573,9 @@ const importXML = (() => {
|
|
|
specialty: extractData(sundry, 'SpecialtyProvisionalPrice', [['SpecialtyProvisionalPriceGroup'], ['SpecialtyProvisionalPriceItem']],
|
|
|
{ engineeringContent: ['_Content'] }, { engineeringContent: ['_Content'] }),
|
|
|
dayWork: extractData(sundry, 'DayWorkRate', [['DayWorkRateGroup'], ['DayWorkRateItem']]),
|
|
|
- mainContractor: extractData(sundry, 'MainContractorAttendance', [['MainContractorAttendanceGroup'], ['MainContractorAttendanceItem']], { serviceContent: ['_Content'] }),
|
|
|
- claim: extractData(sundry, 'ClaimsCost', [['ClaimsCostGroup'], ['ClaimsCostItem']]),
|
|
|
- visa: extractData(sundry, 'SiteInstructionCost', [['SiteInstructionCostGroup'], ['SiteInstructionCostItem']]),
|
|
|
+ mainContractor: extractData(sundry, 'MainContractorAttendance', [['MainContractorAttendanceGroup'], ['MainContractorAttendanceItem']], { serviceContent: ['_Content'] }, { serviceContent: ['_Content'] }),
|
|
|
+ claim: extractData(sundry, 'ClaimsCost', [['ClaimsCostGroup'], ['ClaimsCostItem']], { claimVisa: ['_Reason'] }, { claimVisa: ['_Reason'] }),
|
|
|
+ visa: extractData(sundry, 'SiteInstructionCost', [['SiteInstructionCostGroup'], ['SiteInstructionCostItem']], { claimVisa: ['_Reason'] }, { claimVisa: ['_Reason'] }),
|
|
|
};
|
|
|
// 提取标题和明细
|
|
|
function extractGroupOrItem(itemSrc, isGroup = true, extendAttrs = null, field) {
|
|
@@ -675,8 +693,15 @@ const importXML = (() => {
|
|
|
}
|
|
|
const type = getValue(gljSrc, ['_Kind']);
|
|
|
switch (type) {
|
|
|
+ case '1':
|
|
|
+ return { type: 1, shorName: '人' };
|
|
|
+ case '4':
|
|
|
+ return { type: 4, shortName: '主' };
|
|
|
+ case '5':
|
|
|
+ return { type: 5, shortName: '设' }
|
|
|
case '6':
|
|
|
return { type: 202, shorName: '砼' };
|
|
|
+ case '3':
|
|
|
case '7':
|
|
|
return { type: 301, shorName: '机' };
|
|
|
case '15':
|
|
@@ -989,7 +1014,6 @@ const importXML = (() => {
|
|
|
// 合并大项费用
|
|
|
function mergeWorkSummary(workSummary) {
|
|
|
// 首层数据与清单模板根据费用字典进行匹配,匹配到的则赋值一些属性,匹配不到则将其及其所有子数据插入到模板最末大项费用
|
|
|
- debugger;
|
|
|
workSummary.forEach(summaryBills => {
|
|
|
const matched = roots.find(root => FlagFeeCodeMap[getFlag(root)] === summaryBills.feeCode);
|
|
|
if (matched) {
|
|
@@ -1382,7 +1406,7 @@ const importXML = (() => {
|
|
|
return '0';
|
|
|
} else {
|
|
|
const tempQuantity = ration.quantity / bills.quantity;
|
|
|
- return isFinite(tempQuantity) ? scMathUtil.roundForObj(tempQuantity, Decimal.QUANTITY) : '0';
|
|
|
+ return isFinite(tempQuantity) ? scMathUtil.roundForObj(tempQuantity, Decimal.PROCESS) : '0';
|
|
|
}
|
|
|
}
|
|
|
// 转换定额人材机
|