ソースを参照

Merge branch 'master' into 定额优化

zhangweicheng 5 年 前
コミット
4057643dad

+ 12 - 4
modules/glj/models/glj_list_model.js

@@ -318,13 +318,21 @@ class GLJListModel extends BaseModel {
             }
             let condition={
                 code: data.code,
-                project_id: data.project_id,
-                name:data.name,
+                project_id: data.project_id
+               /*  name:data.name,
                 specs:data.specs,
                 type:data.type,
-                unit:data.unit
+                unit:data.unit */
             };
-            let projectGljData = await this.findDataByCondition(condition);
+            let projectGljData = null;
+            let pList = await this.findDataByCondition(condition,null,false);
+            //规格 型号 null undefind "" 问题
+            for(let p of pList){
+                if(this.getIndex(data) == this.getIndex(p)){
+                  projectGljData = p;
+                  break;
+                }
+            }
             let isAddProjectGLJ = false;
 
             // 获取标段对应的单价文件id

+ 2 - 1
modules/pm/facade/pm_facade.js

@@ -1423,10 +1423,11 @@ async function doDownLoadAndImport(privateDownloadUrl,info) {
         try {
             let data = fs.readFileSync(stream.path,'utf-8');
             let result = await importProject(data,{session:info.session},info.updateData);
-            doc.projectID = result.constructionProjectID;
             if(result.error == 1){
                 doc.errorMsg = result.msg;
                 doc.status = "error";
+            } else {
+                doc.projectID = result.constructionProjectID;
             }
         }catch (error){
             console.log(error);

+ 2 - 1
modules/reports/controllers/rpt_controller.js

@@ -553,6 +553,7 @@ function getGljSummaryReportPages(user_id, prjIds, rpt_id, pageSize, orientation
             let rptDataUtil = new rptDataExtractor();
             rptDataUtil.initialize((rptTpl._doc)?rptTpl._doc:rptTpl);
             try {
+                // fsUtil.writeObjToFile(summaryRawDataRst, "D:/GitHome/temp/summaryRawDataRstRawData.jsp");
                 let tplData = rptDataUtil.assembleData(summaryRawDataRst);
                 let printCom = JpcEx.createNew();
                 if (pageSize) rptTpl[JV.NODE_MAIN_INFO][JV.NODE_PAGE_INFO][JV.PROP_PAGE_SIZE] = pageSize;
@@ -576,7 +577,7 @@ function getGljSummaryReportPages(user_id, prjIds, rpt_id, pageSize, orientation
                     cb('Have errors while on going...', null);
                 }
             } catch (ex) {
-                console.log("报表数据异常: userId " + user_id + ", project id: " + prj_id);
+                // console.log("报表数据异常: userId " + user_id + ", project id: " + prj_id);
                 console.log(ex);
                 cb('Exception occurs while on going...', null);
             }

+ 2 - 1
modules/reports/util/rpt_yanghu_data_util.js

@@ -273,7 +273,8 @@ class Rpt_Data_Extractor {
         }
         //还有汇总的...
         if (rawDataObj.hasOwnProperty(`Construct`) || rawDataObj.hasOwnProperty(`ConstructDetail`) || rawDataObj.hasOwnProperty(`Segment`) || rawDataObj.hasOwnProperty(`SegmentDetail`)
-            || rawDataObj.hasOwnProperty(`SummaryAudit`) || rawDataObj.hasOwnProperty(`SummaryAuditDetail`)) {
+            || rawDataObj.hasOwnProperty(`SummaryAudit`) || rawDataObj.hasOwnProperty(`SummaryAuditDetail`)
+            || rawDataObj.hasOwnProperty(`SummaryGljAudit`) || rawDataObj.hasOwnProperty(`SummaryGljAuditDetail`)) {
             $PROJECT.SUMMARY = {};
             if (rawDataObj.Construct) {
                 setupMainFunc($PROJECT.SUMMARY, `Construct`, rawDataObj.Construct);

+ 1 - 1
public/web/gljUtil.js

@@ -562,5 +562,5 @@ let gljUtil = {
     },
     hasCompMaterial:[202, 203, 204],//有组成物的材料
     hasCompMachine:[301],//有组成物的机械
-    machineComposition:[302,303]//可以做为机械组成物的类型
+    machineComposition:[201,302,303]//可以做为机械组成物的类型
 }

ファイルの差分が大きいため隠しています
+ 415 - 415
web/building_saas/css/main.css


+ 1 - 0
web/building_saas/main/js/models/calc_program.js

@@ -1765,6 +1765,7 @@ class CalcProgram {
         else if (treeNode.calcType == treeNodeCalcType.ctNull){
             delete treeNode.data.gljList;
             deleteProperties(treeNode, ['calcBase', 'calcBaseValue', 'tenderCalcBaseValue', 'programID']);
+            deleteUselessFees(treeNode, ['common', 'rationCommon']);
 
             if (treeNode.data.feesIndex && treeNode.data.feesIndex.common){
                 let uf, tf;

+ 1 - 1
web/building_saas/main/js/views/project_glj_view.js

@@ -682,7 +682,7 @@ projectGljObject={
     },
     displayTypeFilter:function (item) {
         let me = this;
-        if(item.quantity !== 0 && item.quantity !== '0'&& item.code != '80CCS'){//过滤掉消耗量为0的工料机和车船税
+        if(item.quantity !== 0 && item.quantity !== '0'){//过滤掉消耗量为0的工料机
             if(me.displayType == filterType.ALL){//所有工料机
                 return true;
             }else if(filterTypeArray.indexOf(me.displayType) != -1){//人工、材料、机械、主材、设备

+ 4 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -862,10 +862,13 @@ const projTreeObj = {
             const nodeIndent = node ? (node.depth() + 1) * indent +  node.depth() * levelIndent + imgWidth + 5 : 0;
             const cellWidth = context.sheet.getCell(-1, context.col).width();
             const textLength = this.getAutoFitWidth(...arguments);
-            const lineNum = Math.ceil(textLength / (cellWidth - nodeIndent));
+            const tempNum = textLength / (cellWidth - nodeIndent);
+            const lineNum = tempNum % 1 > 0.92 ? Math.ceil(tempNum + 1) : Math.ceil(tempNum); // 不这么处理的话有些行高算出来不对
+            //const lineNum = Math.ceil(textLength / (cellWidth - nodeIndent));
             return lineNum * defaultHeight;
         };
         TreeNodeCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
+            if(style.backColor == undefined) style.backColor = "white"
             if (style.backColor) {
                 ctx.save();
                 ctx.fillStyle = style.backColor;

+ 2 - 2
web/users/html/user-buy.html

@@ -51,7 +51,7 @@
                             <div class="col-sm-4 mb-5">
                                 <div class="card free-version">
                                   <div class=" card-body">
-                                    <h3 class="card-title text-white">免费版 </h3>
+                                    <h3 class="card-title">免费版 </h3>
                                       <p class="card-text">
                                     <!--  <ul class="pl-3">
                                           <li>只可创建 50 个单位工程</li>
@@ -76,7 +76,7 @@
                             <div class="col-sm-4 mb-5">
                                 <div class="card pro-version">
                                   <div class=" card-body">
-                                    <h3 class="card-title text-white">
+                                    <h3 class="card-title">
                                       <img src="/web/building_saas/img/vip.png">
                                       专业版
                                     </h3>