Browse Source

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/ConstructionCost

laiguoran 4 years ago
parent
commit
6ac3970133

+ 0 - 1
config/gulpConfig.js

@@ -238,7 +238,6 @@ module.exports = {
         'web/building_saas/complementary_ration_lib/js/explanatory.js',
         'web/building_saas/complementary_ration_lib/js/explanatory.js',
         'web/building_saas/complementary_ration_lib/js/jobContent.js',
         'web/building_saas/complementary_ration_lib/js/jobContent.js',
         'web/building_saas/complementary_ration_lib/js/annotation.js',
         'web/building_saas/complementary_ration_lib/js/annotation.js',
-        'public/web/scMathUtil.js',
         'public/web/common_ajax.js',
         'public/web/common_ajax.js',
         'public/web/ztree_common.js',
         'public/web/ztree_common.js',
         'public/web/ration_glj_units.js',
         'public/web/ration_glj_units.js',

+ 0 - 4
gulpfile.js

@@ -116,7 +116,6 @@ let compleRation_rationOptions = {
     injectList: [
     injectList: [
         'web/dest/scripts/compleRation_ration.all.min.' + version + '.js',
         'web/dest/scripts/compleRation_ration.all.min.' + version + '.js',
         'web/dest/css/compleRation_ration.all.min.' + version + '.css',
         'web/dest/css/compleRation_ration.all.min.' + version + '.css',
-        'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
         'web/dest/css/common.all.min.' + version + '.css'
     ]
     ]
 };
 };
@@ -133,7 +132,6 @@ let compleRation_gljOptions = {
     injectList: [
     injectList: [
         'web/dest/scripts/compleRation_glj.all.min.' + version + '.js',
         'web/dest/scripts/compleRation_glj.all.min.' + version + '.js',
         'web/dest/scripts/compleRation_glj.all.min.' + version + '.css',
         'web/dest/scripts/compleRation_glj.all.min.' + version + '.css',
-        'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
         'web/dest/css/common.all.min.' + version + '.css'
     ]
     ]
 };
 };
@@ -150,7 +148,6 @@ let compleRation_coeOptions = {
     injectList: [
     injectList: [
         'web/dest/scripts/compleRation_coe.all.min.' + version + '.js',
         'web/dest/scripts/compleRation_coe.all.min.' + version + '.js',
         'web/dest/scripts/compleRation_coe.all.min.' + version + '.css',
         'web/dest/scripts/compleRation_coe.all.min.' + version + '.css',
-        'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
         'web/dest/css/common.all.min.' + version + '.css'
     ]
     ]
 };
 };
@@ -167,7 +164,6 @@ let compleRation_instOptions = {
     injectList: [
     injectList: [
         'web/dest/scripts/compleRation_inst.all.min.' + version + '.js',
         'web/dest/scripts/compleRation_inst.all.min.' + version + '.js',
         'web/dest/scripts/compleRation_inst.all.min.' + version + '.css',
         'web/dest/scripts/compleRation_inst.all.min.' + version + '.css',
-        'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
         'web/dest/css/common.all.min.' + version + '.css'
     ]
     ]
 }
 }

+ 1 - 1
modules/users/models/user_model.js

@@ -358,7 +358,7 @@ class UserModel extends BaseModel {
             });
             });
             if (compilationInfo !== undefined && compilationInfo.isUpgrade === true) {
             if (compilationInfo !== undefined && compilationInfo.isUpgrade === true) {
                 version = '大司空云计价(专业版)';
                 version = '大司空云计价(专业版)';
-                if (compilationInfo.lock !== undefined && compilationInfo.lock !== 0) {
+                if (compilationInfo.lock !== undefined && compilationInfo.lock !== '') {
                     lock = compilationInfo.lock;
                     lock = compilationInfo.lock;
                 }
                 }
             }
             }

+ 2 - 2
public/web/sheet/sheet_common.js

@@ -1422,7 +1422,7 @@ var sheetCommonObj = {
         ctx.restore();
         ctx.restore();
     },
     },
     drawLine : function (ctx, x1, y1, x2, y2, color) {
     drawLine : function (ctx, x1, y1, x2, y2, color) {
-        let l_color = color?color:"gray";
+        let l_color = color?color:"#ababab";
         ctx.save();
         ctx.save();
         ctx.translate(0.5, 0.5);
         ctx.translate(0.5, 0.5);
         ctx.beginPath();
         ctx.beginPath();
@@ -1461,7 +1461,7 @@ var sheetCommonObj = {
         let t_step = step?step:6;
         let t_step = step?step:6;
         offset += t_step;
         offset += t_step;
         ctx.save();
         ctx.save();
-        ctx.strokeStyle = "gray";
+        ctx.strokeStyle = "#ababab";
         ctx.translate(0.5, 0.5);
         ctx.translate(0.5, 0.5);
         ctx.beginPath();
         ctx.beginPath();
         ctx.moveTo(x + offset, y);
         ctx.moveTo(x + offset, y);

+ 5 - 4
public/web/tree_sheet/tree_sheet_helper.js

@@ -386,19 +386,20 @@ var TREE_SHEET_HELPER = {
             let x1 = centerX + indent / 2;
             let x1 = centerX + indent / 2;
             let centerY = Math.floor((y + (y + h)) / 2);
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
             let y1;
+            const lineColor = '#ababab';
             // Draw Sibling Line
             // Draw Sibling Line
             if (showTreeLine) {
             if (showTreeLine) {
                 // Draw Horizontal Line
                 // Draw Horizontal Line
                 if (centerX < x + w) {
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                 }
                 }
                 // Draw Vertical Line
                 // Draw Vertical Line
                 if (centerX < x + w) {
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent) {
                     if (node.isFirst() && !node.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                     }
                 }
                 }
             }
             }
@@ -412,7 +413,7 @@ var TREE_SHEET_HELPER = {
                 while (parent) {
                 while (parent) {
                     if (!parent.isLast()) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                         }
                     }
                     }
                     parent = parent.parent;
                     parent = parent.parent;

+ 2 - 2
web/building_saas/complementary_ration_lib/html/gongliao.html

@@ -11,9 +11,9 @@
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">
+    <!--endinject-->
     <!--zTree-->
     <!--zTree-->
   	<link rel="stylesheet" href="/lib/ztree/css/zTreeStyle.css" type="text/css">
   	<link rel="stylesheet" href="/lib/ztree/css/zTreeStyle.css" type="text/css">
-    <!--endinject-->
     <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
     <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
     <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
     <style type="text/css">
@@ -226,13 +226,13 @@
         </div>
         </div>
     </div>
     </div>
     <!-- JS. -->
     <!-- JS. -->
-    <script src="/public/web/PerfectLoad.js"></script>
     <script src = "/lib/spreadjs/sheets/gc.spread.sheets.all.11.1.2.min.js"></script>
     <script src = "/lib/spreadjs/sheets/gc.spread.sheets.all.11.1.2.min.js"></script>
     <script>GC.Spread.Sheets.LicenseKey =  '<%- LicenseKey %>';</script>
     <script>GC.Spread.Sheets.LicenseKey =  '<%- LicenseKey %>';</script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.core.js"></script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.core.js"></script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.excheck.js"></script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.excheck.js"></script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.exedit.js"></script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.exedit.js"></script>
     <!--inject:js-->
     <!--inject:js-->
+    <script src="/public/web/PerfectLoad.js"></script>
     <script type="text/javascript" src="/web/building_saas/complementary_ration_lib/js/global.js"></script>
     <script type="text/javascript" src="/web/building_saas/complementary_ration_lib/js/global.js"></script>
     <!-- zTree -->
     <!-- zTree -->
     <script type="text/javascript" src="/public/web/common_ajax.js"></script>
     <script type="text/javascript" src="/public/web/common_ajax.js"></script>

+ 4 - 0
web/building_saas/css/custom.css

@@ -505,4 +505,8 @@ margin-right: 100px !important;
 
 
 .info-checkbox {
 .info-checkbox {
   margin-right: 20px;
   margin-right: 20px;
+}
+
+.top-msg{
+  top:35px !important;
 }
 }

+ 47 - 16
web/building_saas/main/js/controllers/block_controller.js

@@ -29,8 +29,22 @@ let BlockController = {
         if(blockData == null){
         if(blockData == null){
             return true;
             return true;
         }
         }
-        if(blockData.firstNodeType != blockType.RATION && blockData.isFBFX !=  Bills.isFBFX(selected)){//除了复制定额外,焦点行和复制的块不是来自同一个地方(分部分项工其它)
-            return true;
+        if(blockData.firstNodeType != blockType.RATION ){//复制的不是定额
+          //&& blockData.isFBFX !=  Bills.isFBFX(selected)  
+          if (this.blockIsFB(blockData.firstNodeType) && !Bills.isFBFX(selected)) return true; //第一层是分部,不允许复制到非分部分项
+          //分项\补项不允许粘贴到“施工组织措施项目”下
+          if (this.blockIsFXorBX(blockData.firstNodeType) && Bills.isOrgMeasure(selected)) return true;
+          
+          if (blockData.firstNodeType == blockType.BILL && Bills.isFBFX(selected) ) { //如果是清单 到分部分项          
+            for (let d of blockData.datas) { 
+               //如果清单有多层,不允许复制 
+              if (!this.blockIsLeaveBills(d)) return true;
+              ///如果有清单基数,不允许复制
+              if (this.ifCalcBase(d.calcBase)) return true;
+               //如果清单有费率引用,不允许复制
+              if (gljUtil.isNotEmpty(d.feeRateID)) return true;
+            }
+          }
         }
         }
         if(this.blockIsFXorBX(blockData.firstNodeType) && this.isFB(selected)){//复制块的第一层是分项或补项,焦点行是分部,且分部有子项并且子项不是分项或补项,则无效。
         if(this.blockIsFXorBX(blockData.firstNodeType) && this.isFB(selected)){//复制块的第一层是分项或补项,焦点行是分部,且分部有子项并且子项不是分项或补项,则无效。
             if(selected.children.length && !this.isFXorBX(selected.children[0])){
             if(selected.children.length && !this.isFXorBX(selected.children[0])){
@@ -80,10 +94,13 @@ let BlockController = {
         return false;
         return false;
     },
     },
     haveCalcBase : function (node) {
     haveCalcBase : function (node) {
-        if(node.data.calcBase ==null||node.data.calcBase ==undefined|| node.data.calcBase == ""){
-            return false;
-        }
-        return true;
+      return this.ifCalcBase(node.data.calcBase);
+    },
+    ifCalcBase: function (calcBase) {
+      if (calcBase == null || calcBase == undefined || calcBase == "") {
+        return false;
+      }
+      return true;
     },
     },
     isDXFYorMainEq:function (node) {//焦点行是大项费用或定额下的主材设备
     isDXFYorMainEq:function (node) {//焦点行是大项费用或定额下的主材设备
         if(node.sourceType == ModuleNames.bills && node.data.type == billType.DXFY){//焦点行是大项费用则无效;
         if(node.sourceType == ModuleNames.bills && node.data.type == billType.DXFY){//焦点行是大项费用则无效;
@@ -227,8 +244,8 @@ let BlockController = {
                 //默认为当前行的后项,可选前项,子项灰显不可选。
                 //默认为当前行的后项,可选前项,子项灰显不可选。
                 setRadioProp('sub_node',{checked:false,disabled:true});
                 setRadioProp('sub_node',{checked:false,disabled:true});
             }
             }
-            //复制块的第一层是分项,焦点行是分部,且分部下无子项或者子项是分项
-            if(this.blockIsFXorBX(blockData.firstNodeType)&& this.isFB(selected)){
+            //复制块的第一层是分项,清单,焦点行是分部,且分部下无子项或者子项是分项
+            if((blockData.firstNodeType ==blockType.BILL||  this.blockIsFXorBX(blockData.firstNodeType))&& this.isFB(selected)){
                 if(selected.children.length == 0 || this.isFXorBX(selected.children[0])){
                 if(selected.children.length == 0 || this.isFXorBX(selected.children[0])){
                     return 'sub';//不弹出选择窗口,直接粘贴为子项。
                     return 'sub';//不弹出选择窗口,直接粘贴为子项。
                 }
                 }
@@ -315,7 +332,7 @@ let BlockController = {
                 billUpdate = {type:blockData.datas[0].sourceType,query:{ID:pre.getID()},doc:{NextSiblingID:blockData.datas[0].ID}};
                 billUpdate = {type:blockData.datas[0].sourceType,query:{ID:pre.getID()},doc:{NextSiblingID:blockData.datas[0].ID}};
             }
             }
         }
         }
-        let dataMap = this.preparePasteData(blockData.datas,billsIDMap,firstParentID,lastNextID);
+        let dataMap = this.preparePasteData(blockData.datas,billsIDMap,firstParentID,lastNextID,selected);
         if(billUpdate){
         if(billUpdate){
             billUpdate.doc.NextSiblingID = billsIDMap[billUpdate.doc.NextSiblingID];
             billUpdate.doc.NextSiblingID = billsIDMap[billUpdate.doc.NextSiblingID];
             updateData.push(billUpdate);
             updateData.push(billUpdate);
@@ -456,7 +473,7 @@ let BlockController = {
 
 
     },
     },
 
 
-    preparePasteData : function (datas,billsIDMap,firstParentID,lastNextID) {
+    preparePasteData : function (datas,billsIDMap,firstParentID,lastNextID,selected) {
         let me = this;
         let me = this;
         me.datas = _.cloneDeep(projectObj.project.Bills.datas);
         me.datas = _.cloneDeep(projectObj.project.Bills.datas);
         let bills = [],rations=[],ration_gljs = [],ration_coes = [],quantity_details = [],ration_installations = [],ration_templates=[];
         let bills = [],rations=[],ration_gljs = [],ration_coes = [],quantity_details = [],ration_installations = [],ration_templates=[];
@@ -469,7 +486,7 @@ let BlockController = {
                     lastBillID =  datas[i].ID
                     lastBillID =  datas[i].ID
                 }
                 }
             }
             }
-            eachData(datas[i]);
+            eachData(datas[i],selected);
         }
         }
         for(let f of firstBillIDs){
         for(let f of firstBillIDs){
             firstIDMap[billsIDMap[f]]  = f //反向映射
             firstIDMap[billsIDMap[f]]  = f //反向映射
@@ -491,9 +508,9 @@ let BlockController = {
 
 
         return {bills:bills,rations:rations,ration_gljs:ration_gljs,ration_coes:ration_coes,quantity_details:quantity_details,ration_installations:ration_installations,ration_templates:ration_templates};
         return {bills:bills,rations:rations,ration_gljs:ration_gljs,ration_coes:ration_coes,quantity_details:quantity_details,ration_installations:ration_installations,ration_templates:ration_templates};
 
 
-        function eachData(data) {
+        function eachData(data,selected) {
             if(data.sourceType == 'bills'){
             if(data.sourceType == 'bills'){
-                let tem_b = createBillsData(data);
+                let tem_b = createBillsData(data,selected);
                 bills.push(tem_b);
                 bills.push(tem_b);
                 for(let d of data.quantity_details){
                 for(let d of data.quantity_details){
                     quantity_details.push(createQuantityDetails(d,tem_b,'bills'));
                     quantity_details.push(createQuantityDetails(d,tem_b,'bills'));
@@ -598,7 +615,8 @@ let BlockController = {
 
 
         }
         }
 
 
-        function createBillsData(billsData) { //ID、重新生成code
+      function createBillsData(billsData, selected) { //ID、重新生成code
+            let Bills = projectObj.project.Bills;
             let temData = _.cloneDeep(billsData);
             let temData = _.cloneDeep(billsData);
             //删除旧数据
             //删除旧数据
             if(temData.children && temData.children.length>0){//如果是有子项,说明是计算得到的,要删除重新计算,没有子项,但是fees有值,说明是自已输入的,值要一起粘贴
             if(temData.children && temData.children.length>0){//如果是有子项,说明是计算得到的,要删除重新计算,没有子项,但是fees有值,说明是自已输入的,值要一起粘贴
@@ -611,8 +629,12 @@ let BlockController = {
             delete  temData.__v;
             delete  temData.__v;
             delete  temData.sourceType;
             delete  temData.sourceType;
             delete  temData.quantityCoe;
             delete  temData.quantityCoe;
-            delete  temData.rationQuantityCoe;
-
+            delete temData.rationQuantityCoe;
+            //从分项、补项 到清单
+            if ((temData.type == billType.FX || temData.type == billType.BX) && !Bills.isFBFX(selected)) temData.type = billType.BILL;
+            //从清单到分部分项
+            if (temData.type == billType.BILL && Bills.isFBFX(selected)) temData.type = billType.FX;
+          
             temData.projectID = projectObj.project.ID();
             temData.projectID = projectObj.project.ID();
             let newID = uuid.v1(); //新的清单ID
             let newID = uuid.v1(); //新的清单ID
             billsIDMap[temData.ID] = newID;
             billsIDMap[temData.ID] = newID;
@@ -709,9 +731,18 @@ let BlockController = {
     isFXorBX:function (selected) {//是分项或者补项
     isFXorBX:function (selected) {//是分项或者补项
         return projectObj.project.Bills.isFXorBX(selected);
         return projectObj.project.Bills.isFXorBX(selected);
     },
     },
+    blockIsFB: function (type) { 
+      return type == blockType.FB
+    },
     blockIsFXorBX: function (type) {
     blockIsFXorBX: function (type) {
         return type == blockType.FX||type == blockType.BX;
         return type == blockType.FX||type == blockType.BX;
     },
     },
+    blockIsLeaveBills: function (bills) { 
+      if (bills.children && bills.children.length > 0) { 
+        return bills.children[0].sourceType == "ration" //如果子节点是定额,则说明是页子清单
+      }
+      return true;
+    },
     removeBlock:function () {
     removeBlock:function () {
         removeLocalCache('project_block');
         removeLocalCache('project_block');
     }
     }

+ 16 - 1
web/building_saas/main/js/models/bills.js

@@ -622,7 +622,22 @@ var Bills = {
                 }
                 }
             }
             }
             return techMeasureCheck(node);
             return techMeasureCheck(node);
-        };
+    };
+    bills.prototype.isOrgMeasure = function (node) {//判读是否属于施工组织措施项目部分
+      let OrgMeasureCheck = function (checkNode) {
+          if(isFlag(checkNode.data)&&checkNode.data.flagsIndex.fixed.flag==fixedFlag.CONSTRUCTION_ORGANIZATION){
+              return true;
+          }else {
+              if(checkNode.parent){
+                  return OrgMeasureCheck(checkNode.parent);
+              }else {
+                  return false;
+              }
+          }
+      }
+      return OrgMeasureCheck(node);
+    };
+
         // 相关固定类别清单部分,【不】允许清单自身计算得到合价: “数量 * 单价 = 合价”
         // 相关固定类别清单部分,【不】允许清单自身计算得到合价: “数量 * 单价 = 合价”
         // 删除【不】允许通过自身数据计算的清单的定额时,该清单价格【会清空】
         // 删除【不】允许通过自身数据计算的清单的定额时,该清单价格【会清空】
         // 这种清单的单价和合价都是只读的
         // 这种清单的单价和合价都是只读的

+ 1 - 1
web/building_saas/main/js/models/exportStdInterfaceBase.js

@@ -319,7 +319,7 @@ const XML_EXPORT_BASE = (() => {
     function isDef(v) {
     function isDef(v) {
         return typeof v !== 'undefined' && v !== null;
         return typeof v !== 'undefined' && v !== null;
     }
     }
-    function hasValue(v) {
+    function /*  */hasValue(v) {
         // v是否有值,不为undefined、null、''
         // v是否有值,不为undefined、null、''
         return typeof v !== 'undefined' && v !== null && v !== '';
         return typeof v !== 'undefined' && v !== null && v !== '';
     }
     }

+ 5 - 5
web/building_saas/main/js/views/block_lib.js

@@ -222,11 +222,11 @@ var blockLibObj = {
             let x1 = centerX + indent / 2;
             let x1 = centerX + indent / 2;
             let centerY = Math.floor((y + (y + h)) / 2);
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
             let y1;
-
+            const lineColor = '#ababab';
             // Draw Horizontal Line、Image、sibling Vertical Line
             // Draw Horizontal Line、Image、sibling Vertical Line
             if (centerX < x + w) {
             if (centerX < x + w) {
                 // Draw Horizontal Line
                 // Draw Horizontal Line
-                drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
 
 
                 // Draw Image
                 // Draw Image
                 let imgId;
                 let imgId;
@@ -241,9 +241,9 @@ var blockLibObj = {
                 // Draw Vertical Line
                 // Draw Vertical Line
                 y1 = node.isLast() ? centerY : y + h;
                 y1 = node.isLast() ? centerY : y + h;
                 if (node.isFirst() && !node.parent/*.parent*/) {
                 if (node.isFirst() && !node.parent/*.parent*/) {
-                    drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                    drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                 } else {
                 } else {
-                    drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                    drawLine(ctx, centerX, y, centerX, y1, lineColor);
                 }
                 }
             }
             }
 
 
@@ -257,7 +257,7 @@ var blockLibObj = {
             while (curNode) {
             while (curNode) {
                 if (!curNode.isLast()) {
                 if (!curNode.isLast()) {
                     if (parentCenterX < x + w) {
                     if (parentCenterX < x + w) {
-                        drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                        drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                     }
                     }
                 }
                 }
                 curNode = curNode.parent;
                 curNode = curNode.parent;

+ 5 - 4
web/building_saas/pm/js/pm_gc.js

@@ -252,10 +252,11 @@ const gcTreeObj = {
             let centerY = Math.floor((y + (y + h)) / 2);
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
             let y1;
             // Draw Sibling Line
             // Draw Sibling Line
+            const lineColor = '#ababab';
             if (showTreeLine) {
             if (showTreeLine) {
                 // Draw Horizontal Line
                 // Draw Horizontal Line
                 if (centerX < x + w) {
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                     let img;
                     let img;
                     if(node.data.projType === projectType.folder){
                     if(node.data.projType === projectType.folder){
                         img = document.getElementById('folder_open_pic');
                         img = document.getElementById('folder_open_pic');
@@ -279,9 +280,9 @@ const gcTreeObj = {
                 if (centerX < x + w) {
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent.parent) {
                     if (node.isFirst() && !node.parent.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                     }
                 }
                 }
             }
             }
@@ -295,7 +296,7 @@ const gcTreeObj = {
                 while (parent.parent) {
                 while (parent.parent) {
                     if (!parent.isLast()) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                         }
                     }
                     }
                     parent = parent.parent;
                     parent = parent.parent;

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

@@ -1024,10 +1024,11 @@ const projTreeObj = {
             let centerY = Math.floor((y + (y + h)) / 2);
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
             let y1;
             // Draw Sibling Line
             // Draw Sibling Line
+            const lineColor = '#ababab';
             if (showTreeLine) {
             if (showTreeLine) {
                 // Draw Horizontal Line
                 // Draw Horizontal Line
                 if (centerX < x + w) {
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                     let img;
                     let img;
                     if(node.data.projType === projectType.folder){
                     if(node.data.projType === projectType.folder){
                         img = document.getElementById('folder_open_pic');
                         img = document.getElementById('folder_open_pic');
@@ -1052,9 +1053,9 @@ const projTreeObj = {
                 if (centerX < x + w) {
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent.parent) {
                     if (node.isFirst() && !node.parent.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                     }
                 }
                 }
             }
             }
@@ -1068,7 +1069,7 @@ const projTreeObj = {
                 while (parent.parent) {
                 while (parent.parent) {
                     if (!parent.isLast()) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                         }
                     }
                     }
                     parent = parent.parent;
                     parent = parent.parent;

+ 5 - 4
web/building_saas/pm/js/pm_share.js

@@ -280,11 +280,12 @@ const pmShare = (function () {
             let x1 = centerX + indent / 2;
             let x1 = centerX + indent / 2;
             let centerY = Math.floor((y + (y + h)) / 2);
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
             let y1;
+            const lineColor = '#ababab';
             // Draw Sibling Line
             // Draw Sibling Line
             if (showTreeLine) {
             if (showTreeLine) {
                 // Draw Horizontal Line
                 // Draw Horizontal Line
                 if (centerX < x + w) {
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                     let img;
                     let img;
                     if(node.data.projType === projectType.folder){
                     if(node.data.projType === projectType.folder){
                         img = document.getElementById('folder_open_pic');
                         img = document.getElementById('folder_open_pic');
@@ -308,9 +309,9 @@ const pmShare = (function () {
                 if (centerX < x + w) {
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent.parent) {
                     if (node.isFirst() && !node.parent.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                     }
                 }
                 }
             }
             }
@@ -324,7 +325,7 @@ const pmShare = (function () {
                 while (parent.parent) {
                 while (parent.parent) {
                     if (!parent.isLast()) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                         }
                     }
                     }
                     parent = parent.parent;
                     parent = parent.parent;

+ 1 - 1
web/building_saas/unit_price_file/index.js

@@ -253,7 +253,7 @@ let unitPriceObj = {
   },
   },
   showSubDatas:function(){
   showSubDatas:function(){
     let parentData = this.getSelectedUnitPrice();
     let parentData = this.getSelectedUnitPrice();
-    this.mixRatioList = mixRatioMap[gljUtil.getIndex(parentData)];
+    this.mixRatioList = parentData?mixRatioMap[gljUtil.getIndex(parentData)]:[];
     this.mixRatioList = this.mixRatioList?this.mixRatioList:[];
     this.mixRatioList = this.mixRatioList?this.mixRatioList:[];
     this.setMixRatioData(this.mixRatioList);
     this.setMixRatioData(this.mixRatioList);
     let sel = this.subSheet.getSelections()[0];
     let sel = this.subSheet.getSelections()[0];

+ 1 - 1
web/common/html/header.html

@@ -80,7 +80,7 @@
                     <!--<a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=userGuide" target="_blank">用户手册</a>
                     <!--<a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=userGuide" target="_blank">用户手册</a>
                     <a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=upgradeGuide" target="_blank">升级说明</a>-->
                     <a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=upgradeGuide" target="_blank">升级说明</a>-->
                     <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/dsk_yhsc" target="_blank">用户手册</a>
                     <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/dsk_yhsc" target="_blank">用户手册</a>
-                    <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/dasikongupdate/dasikongupdate-1c6lsks1552q8" target="_blank">升级说明</a>
+                    <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/dasikongupdate" target="_blank">升级说明</a>
                     <a class="dropdown-item" href="http://zhzdwk.com/special/detail/36" target="_blank">计价依据</a>
                     <a class="dropdown-item" href="http://zhzdwk.com/special/detail/36" target="_blank">计价依据</a>
                     <a class="dropdown-item" href="https://smartcost.com.cn/" target="_blank">纵横官网</a>
                     <a class="dropdown-item" href="https://smartcost.com.cn/" target="_blank">纵横官网</a>
                     <!--  <a class="dropdown-item" href="#">动画教程</a>-->
                     <!--  <a class="dropdown-item" href="#">动画教程</a>-->

+ 1 - 1
web/users/html/index.html

@@ -33,7 +33,7 @@
       <!--banner-->
       <!--banner-->
       <div class="hero bg-dark section " style="background-image: url(/web/users/images/bg_01.png);" id="home">
       <div class="hero bg-dark section " style="background-image: url(/web/users/images/bg_01.png);" id="home">
          <div class="container text-center">
          <div class="container text-center">
-            <h1 class="text-white mb-4 f-50 ">大司空市政计价,正版软件永久免费</h1>
+            <h1 class="text-white mb-4 f-50 ">市政计价免费公用版免费的正版软件</h1>
             <p class="lead text-white mb-5">跨平台,打开浏览器即可使用,全新在线计价体验。
             <p class="lead text-white mb-5">跨平台,打开浏览器即可使用,全新在线计价体验。
             <div class="btn_hero">
             <div class="btn_hero">
                <a href="/login" class="btn btn-danger mr-2">登录软件</a>
                <a href="/login" class="btn btn-danger mr-2">登录软件</a>

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

@@ -75,16 +75,16 @@
                             </div>
                             </div>
                             <div class="col-sm-5 mb-5">
                             <div class="col-sm-5 mb-5">
                                 <div class="card pro-version">
                                 <div class="card pro-version">
-                                  <div class="card-body d-flex justify-content-between">
-                                      <h3 class="card-title">专业版</h3>
-                                      <div>
-                                          <div class="d-inline-block mr-3">
-                                            <img width="24" src="/web/building_saas/img/vip.png">购买
-                                          </div>
-                                          <div class="d-inline-block">
-                                              <img width="24" src="/web/building_saas/img/vip2.png">借用
-                                          </div>
-                                      </div>
+                                    <div class="card-body d-flex justify-content-between">
+                                        <h3 class="card-title">专业版</h3>
+                                        <div>
+                                            <div class="d-inline-block mr-3">
+                                                <img width="24" src="/web/building_saas/img/vip.png">购买
+                                            </div>
+                                            <div class="d-inline-block">
+                                                <img width="24" src="/web/building_saas/img/vip2.png">借用
+                                            </div>
+                                        </div>
                                       <!--<p class="card-text">-->
                                       <!--<p class="card-text">-->
                                       <!--&lt;!&ndash;<ul class="pl-3">-->
                                       <!--&lt;!&ndash;<ul class="pl-3">-->
                                           <!--<li>创建单位工程无限制</li>-->
                                           <!--<li>创建单位工程无限制</li>-->
@@ -105,13 +105,13 @@
                                                 <% } %>
                                                 <% } %>
                                             </div>
                                             </div>
                                             <div class="ml-auto text-right">
                                             <div class="ml-auto text-right">
-                                            <% if (compilation.isUpgrade === undefined || compilation.isUpgrade !== true) { %>
-                                            <a href="javascript:void(0);" class="btn btn-primary btn-sm getcategory" data-upgrade="<%= compilation.isUpgrade %>" data-category="<%= compilation.categoryID %>">立即激活</a>
-                                            <% if (compilation.deadline !== undefined && compilation.deadline !== '') { %><span class="d-block text-danger">已到期:<%= compilation.deadline %></span><% } %>
-                                            <% } else { %>
-                                            <a href="javascript:void(0);" class="btn btn-outline-secondary btn-sm getcategory" data-title="<%= compilation.name %>" data-upgrade="<%= compilation.isUpgrade %>" data-category="<%= compilation.categoryID %>"><i class="fa fa-check"></i> 已激活</a>
-                                            <% if (compilation.deadline !== undefined && compilation.deadline !== '') { %><span class="d-block text-muted">期:<%= compilation.deadline %></span><% } %>
-                                            <% } %>
+                                                <% if (compilation.isUpgrade === undefined || compilation.isUpgrade !== true) { %>
+                                                <a href="javascript:void(0);" class="btn btn-primary btn-sm getcategory" data-upgrade="<%= compilation.isUpgrade %>" data-category="<%= compilation.categoryID %>">立即激活</a>
+                                                <% if (compilation.deadline !== undefined && compilation.deadline !== '') { %><span class="d-block text-danger">已到期:<%= compilation.deadline %></span><% } %>
+                                                <% } else { %>
+                                                <a href="javascript:void(0);" class="btn btn-outline-secondary btn-sm getcategory" data-title="<%= compilation.name %>" data-upgrade="<%= compilation.isUpgrade %>" data-category="<%= compilation.categoryID %>"><i class="fa fa-check"></i> 已激活</a>
+                                                <% if (compilation.deadline !== undefined && compilation.deadline !== '') { %><span class="d-block text-muted">期:<%= compilation.deadline %></span><% } %>
+                                                <% } %>
                                             </div>
                                             </div>
                                         </li>
                                         </li>
                                         <% }) %>
                                         <% }) %>

BIN
web/users/images/favicon.ico


+ 7 - 7
web/users/js/login.js

@@ -278,7 +278,7 @@ function login() {
             // $("#captcha-box").html('正在加载验证码');
             // $("#captcha-box").html('正在加载验证码');
         },
         },
         success: function(response) {
         success: function(response) {
-            // $("#captcha-box").html('');
+            $("#captcha-box").html('');
             if (response.success === 0) {
             if (response.success === 0) {
                 alert('验证码初始化失败!');
                 alert('验证码初始化失败!');
                 return false;
                 return false;
@@ -307,14 +307,14 @@ function login() {
                     var result = catpchaObj.getValidate();
                     var result = catpchaObj.getValidate();
                     if (!result) {return alert('请完成验证');}
                     if (!result) {return alert('请完成验证');}
                     $('#login').attr('disabled', true);
                     $('#login').attr('disabled', true);
-                    // let geetest_challenge = $('input[name="geetest_challenge"]').val();
-                    // let geetest_validate = $('input[name="geetest_validate"]').val();
-                    // let geetest_seccode = $('input[name="geetest_seccode"]').val();
+                    let geetest_challenge = $('input[name="geetest_challenge"]').val();
+                    let geetest_validate = $('input[name="geetest_validate"]').val();
+                    let geetest_seccode = $('input[name="geetest_seccode"]').val();
 
 
                     const postData = {
                     const postData = {
-                        geetest_challenge: result.geetest_challenge,
-                        geetest_validate: result.geetest_validate,
-                        geetest_seccode: result.geetest_seccode,
+                        geetest_challenge: geetest_challenge,
+                        geetest_validate: geetest_validate,
+                        geetest_seccode: geetest_seccode,
                     };
                     };
                     if ($('#changeLogin').attr('data-status') === 'user') {
                     if ($('#changeLogin').attr('data-status') === 'user') {
                         let account = $("#inputEmail").val();
                         let account = $("#inputEmail").val();