Просмотр исходного кода

接口同步基本信息等数据
项目特征,特征描述分开显示

zhongzewei 6 лет назад
Родитель
Сommit
6638fe2eec

+ 15 - 15
web/building_saas/main/js/models/exportStandardInterface.js

@@ -179,13 +179,13 @@ const XMLStandard = (function () {
                 {name: '工程所在地', value: _util.getValueByKey(source.basicInformation, 'projLocation'), required: true},
                 {name: '工程地址', value: _util.getValueByKey(source.basicInformation, 'projAddress'), required: true},
                 {name: '施工单位', value: _util.getValueByKey(source.basicInformation, 'buildingUnit')},
-                {name: '编制单位', value: _util.getValueByKey(source.basicInformation, 'establishmentUnit'), required: true},
+                {name: '编制单位', value: _util.getValueByKey(source.basicInformation, 'establishUnit'), required: true},
                 {name: '审核单位', value: _util.getValueByKey(source.basicInformation, 'auditUnit')},
-                {name: '编制人', value: _util.getValueByKey(source.basicInformation, 'buildingUnitAuthor'), required: true},
+                {name: '编制人', value: _util.getValueByKey(source.basicInformation, 'establishUnitAuthor'), required: true},
                 {name: '审核人', value: _util.getValueByKey(source.basicInformation, 'auditUnitAuditor')},
                 {name: '开工日期', value: _util.getValueByKey(source.basicInformation, 'commencementDate'), type: _config.TYPE.DATE},
                 {name: '竣工日期', value: _util.getValueByKey(source.basicInformation, 'completionDate'), type: _config.TYPE.DATE},
-                {name: '编制日期', value: _util.getValueByKey(source.basicInformation, 'establishDate'), type: _config.TYPE.DATE, required: true},
+                {name: '编制日期', value: _util.getValueByKey(source.basicInformation, 'essentialEstablishDate'), type: _config.TYPE.DATE, required: true},
                 {name: '审核日期', value: _util.getValueByKey(source.basicInformation, 'auditDate'), type: _config.TYPE.DATE},
                 {name: '材料价格期', value: _util.getValueByKey(source.basicInformation, 'materialPricePeriod'), required: true},
                 {name: '合同价类型', value: _util.getValueByKey(source.basicInformation, 'contractPriceType')},
@@ -198,9 +198,9 @@ const XMLStandard = (function () {
             //控制总价: 如果文件类型是“控制价”,则导出建设项目的工程造价;如果是“招标”、“投标”,则取0
             let attrs = [
                 {name: '招标代理机构', value: _util.getValueByKey(source.basicInformation, 'agency')},
-                {name: '造价工程师', value: _util.getValueByKey(source.basicInformation, 'tenderCostEngineer'), required: true},
-                {name: '造价工程师注册证号', value: _util.getValueByKey(source.basicInformation, 'tenderCostEngineerNo'), required: true},
-                {name: '招标工期', value: _util.getValueByKey(source.basicInformation, 'tenderPeriod'), required: true, type: _config.TYPE.INT},
+                {name: '造价工程师', value: _util.getValueByKey(source.basicInformation, 'tenderingCostEngineer'), required: true},
+                {name: '造价工程师注册证号', value: _util.getValueByKey(source.basicInformation, 'tenderingRegistrationCertificateNumber'), required: true},
+                {name: '招标工期', value: _util.getValueByKey(source.basicInformation, 'tenderingPeriod'), required: true, type: _config.TYPE.INT},
                 {name: '控制总价', value: exportKind === _config.EXPORT_KIND.Control ? source.summaryInfo.engineeringCost : '0',
                     required: true, type: _config.TYPE.NUM2},
             ];
@@ -211,9 +211,9 @@ const XMLStandard = (function () {
             let attrs = [
                 {name: '投标人', value: _util.getValueByKey(source.basicInformation, 'bidder'), required: true},
                 {name: '造价工程师', value: _util.getValueByKey(source.basicInformation, 'bidCostEngineer'), required: true},
-                {name: '造价工程师注册证号', value: _util.getValueByKey(source.basicInformation, 'bidCostEngineerNo'), required: true},
+                {name: '造价工程师注册证号', value: _util.getValueByKey(source.basicInformation, 'bidRegistrationCertificateNumber'), required: true},
                 {name: '项目经理', value: _util.getValueByKey(source.basicInformation, 'projectManager')},
-                {name: '投标工期', value: _util.getValueByKey(source.basicInformation, 'biddingPeriod')},
+                {name: '投标工期', value: _util.getValueByKey(source.basicInformation, 'bidPeriod')},
                 {name: '投标保证金', value: _util.getValueByKey(source.basicInformation, 'biddingMargin'), type: _config.TYPE.NUM2},
                 {name: '质量承诺', value: _util.getValueByKey(source.basicInformation, 'qualityCommitment')},
                 {name: '担保类型', value: _util.getValueByKey(source.basicInformation, 'guaranteeType'), enumeration: ['支票', '现金', '电汇', '汇票']},
@@ -1297,16 +1297,16 @@ const XMLStandard = (function () {
                 //创建项目特征节点
                 if (feature.length > 0) {
                     let itemChac = new ItemCharacter();
-                    //let reg = /(.{0,}):(.{0,})/;
+                    let reg = /(.{0,}):(.{0,})/;
                     for (let f of feature) {
-                        /*let source = {name: '', value: ''};
+                        let source = {name: '', value: ''};
                         let execRst = reg.exec(f);
                         if (execRst) {
                            source.name = execRst[1].replace(/^\d+\.{1}/, '').trim();  //去除开头(1.)序号,首位空格
                            source.value = execRst[2].trim();
                         }
-                        let featureEle = new Feature(source);*/
-                        let featureEle = new Feature({name: f.trim(), value: ''});
+                        let featureEle = new Feature(source);
+                        //let featureEle = new Feature({name: f.trim(), value: ''});
                         itemChac.children.push(featureEle);
                     }
                     bills.children.push(itemChac);
@@ -1315,9 +1315,9 @@ const XMLStandard = (function () {
                 if (job.length > 0) {
                     let jobContent = new JobContent();
                     for (let j of job) {
-                        /*let data = j.replace(/^\d+\.{1}/, '').trim();
-                        let content = new Content(data);*/
-                        let content = new Content(j.trim());
+                        let data = j.replace(/^\d+\.{1}/, '').trim();
+                        let content = new Content(data);
+                        //let content = new Content(j.trim());
                         jobContent.children.push(content);
                     }
                     bills.children.push(jobContent);

+ 17 - 7
web/building_saas/main/js/models/importStandardInterface.js

@@ -217,22 +217,32 @@ const ImportXML = (() => {
                 info.push({key: 'projLocation', value: getValue(projInfoSrc, ['_工程所在地'])});
                 info.push({key: 'projAddress', value: getValue(projInfoSrc, ['_工程地址'])});
                 info.push({key: 'buildingUnit', value: getValue(projInfoSrc, ['_施工单位'])});
-                info.push({key: 'establishmentUnit', value: getValue(projInfoSrc, ['_编制单位'])});
+                info.push({key: 'establishUnit', value: getValue(projInfoSrc, ['_编制单位'])});
                 info.push({key: 'auditUnit', value: getValue(projInfoSrc, ['_审核单位'])});
-                info.push({key: 'buildingUnitAuthor', value: getValue(projInfoSrc, ['_编制人'])});
+                info.push({key: 'establishUnitAuthor', value: getValue(projInfoSrc, ['_编制人'])});
                 info.push({key: 'auditUnitAuditor', value: getValue(projInfoSrc, ['_审核人'])});
                 info.push({key: 'commencementDate', value: getValue(projInfoSrc, ['_开工日期'])});
                 info.push({key: 'completionDate', value: getValue(projInfoSrc, ['_竣工日期'])});
-                info.push({key: 'establishDate', value: getValue(projInfoSrc, ['_编制日期'])});
+                info.push({key: 'essentialEstablishDate', value: getValue(projInfoSrc, ['_编制日期'])});
                 info.push({key: 'auditDate', value: getValue(projInfoSrc, ['_审核日期'])});
                 info.push({key: 'materialPricePeriod', value: getValue(projInfoSrc, ['_材料价格期'])});
                 info.push({key: 'contractPriceType', value: getValue(projInfoSrc, ['_合同价类型'])});
                 //招标信息
-                info.push({key: 'tenderingAgency', value: getValue(projInfoSrc, ['招标信息', '_招标代理机构'])});
-                info.push({key: 'tenderCostEngineer', value: getValue(projInfoSrc, ['招标信息', '_造价工程师'])});
-                info.push({key: 'tenderCostEngineerNo', value: getValue(projInfoSrc, ['招标信息', '_造价工程师注册证号'])});
-                info.push({key: 'tenderPeriod', value: getValue(projInfoSrc, ['招标信息', '_招标工期'])});
+                info.push({key: 'agency', value: getValue(projInfoSrc, ['招标信息', '_招标代理机构'])});
+                info.push({key: 'tenderingCostEngineer', value: getValue(projInfoSrc, ['招标信息', '_造价工程师'])});
+                info.push({key: 'tenderingRegistrationCertificateNumber', value: getValue(projInfoSrc, ['招标信息', '_造价工程师注册证号'])});
+                info.push({key: 'tenderingPeriod', value: getValue(projInfoSrc, ['招标信息', '_招标工期'])});
                 info.push({key: 'engineeringCost', value: getValue(projInfoSrc, ['招标信息', '_控制总价'])});
+                //投标信息
+                info.push({key: 'bidder', value: getValue(projInfoSrc, ['投标信息', '_投标人'])});
+                info.push({key: 'bidCostEngineer', value: getValue(projInfoSrc, ['投标信息', '_造价工程师'])});
+                info.push({key: 'bidRegistrationCertificateNumber', value: getValue(projInfoSrc, ['投标信息', '_造价工程师注册证号'])});
+                info.push({key: 'projectManager', value: getValue(projInfoSrc, ['投标信息', '_项目经理'])});
+                info.push({key: 'bidPeriod', value: getValue(projInfoSrc, ['投标信息', '_投标工期'])});
+                info.push({key: 'biddingMargin', value: getValue(projInfoSrc, ['投标信息', '_投标保证金'])});
+                info.push({key: 'qualityCommitment', value: getValue(projInfoSrc, ['投标信息', '_质量承诺'])});
+                info.push({key: 'guaranteeType', value: getValue(projInfoSrc, ['投标信息', '_担保类型'])});
+                info.push({key: 'engineeringCost', value: getValue(projInfoSrc, ['投标信息', '_投标总价'])});
                 let firstEng = arrayValue(source, ['标段', '单项工程'])[0];
                 if (firstEng) {
                     let firstTender = arrayValue(firstEng, ['单位工程'])[0];

+ 0 - 2
web/building_saas/pm/js/pm_import.js

@@ -438,8 +438,6 @@ const importView = (() => {
                 }
                 //console.log(xmlObj);
                 $('#importInterface').modal('hide');
-                /*let importData = await importXML.transformData(xmlObj);
-                console.log(importData);*/
                 pr.start('导入文件', '正在生成文件,请稍候……');
                 let importData = await importXML.transformData(xmlObj);
                 let blob = new Blob([JSON.stringify(importData)], {type: 'text/plain;charset=utf-8'});