瀏覽代碼

Merge branch 'master' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost

zhangweicheng 7 年之前
父節點
當前提交
e3c1eb6103

+ 24 - 5
web/building_saas/main/js/models/calc_base.js

@@ -476,7 +476,7 @@ let baseFigureTemplate = {
                 }
             }
         }
-        return 0;
+        return rst;
     },
     'JSCSXMQDDEJJZJGCF': function () {
         return (this['JSCSXMDEJJRGF']() + this['JSCSXMDEJJCLF']() + this['JSCSXMDEJJJXF']()).toDecimal(decimalObj.bills.totalPrice);
@@ -776,9 +776,7 @@ let baseFigureTemplate = {
         let projGljs = calcBase.project.projectGLJ.datas.gljList;
         for(let glj of projGljs){
             if(baseMachineTypes.includes(glj.type) && glj.ratio_data.length === 0 && glj.supply === supplyType.JDYG){
-                console.log(glj);
                 rst = (rst + parseFloat(glj.quantity * glj.unit_price.market_price).toDecimal(2)).toDecimal(2);
-                console.log(rst);
             }
         }
         return rst;
@@ -938,8 +936,8 @@ let baseFigureMap = {
     '其他项目费': {base: 'QTXMF',  fixedFlag: fixedFlag.OTHER},
     '规费': {base: 'GF', fixedFlag: fixedFlag.CHARGE},
     '税金': {base: 'SJ', fixedFlag: fixedFlag.TAX},
-    '税前工程造价': {base: 'SQGCZJ', fixedFlag: fixedFlag.SAFETY_CONSTRUCTION},//安全文明施工专项费用使用
     //不于清单直接关联==========
+    '税前工程造价': {base: 'SQGCZJ'},//安全文明施工专项费用使用
     '人材机价差': {base: 'RCJJC'},
     '人工价差': {base: 'RGJC'},
     '材料价差': {base: 'CLJC'},
@@ -1164,8 +1162,19 @@ let cbParser = {
         let rst = [];
         let cnRex = /[^\u4e00-\u9fa5]/;
         let temp = expr.split(cnRex);
+        //暂估材料费特殊处理:CN(CN)
+        let isZG = false;
         for(let i = 0, len = temp.length; i < len; i++){
             if(temp[i] !== '' && rst.indexOf(temp[i]) === -1){
+                if(temp[i] === '暂估材料费'){//处理暂估材料基数
+                    isZG = true;
+                    continue;
+                }
+                if(isZG){//上一个是暂估材料费
+                    //拼接成完整的暂估材料费(CN);
+                    temp[i] = `${temp[i-1]}(${temp[i]})`;
+                    isZG = false;
+                }
                 rst.push(temp[i]);
             }
         }
@@ -1278,7 +1287,17 @@ let cbParser = {
         v = v.replace(/[{, }]/g, '');
         for(let i = 0, len = exps.length;i < len; i++){
             exps[i].compileExp = '$CBC.base(\'' + exps[i].orgExp + '\')';
-            v = v.replace(new RegExp(exps[i].orgExp, 'g'), exps[i].compileExp);
+            //暂估材料费作特殊处理
+            if(exps[i].orgExp === '暂估材料费(从子目汇总)' || exps[i].orgExp === '暂估材料费(从工料机汇总表汇总)'){
+                let reCount = v.split(exps[i].orgExp).length - 1;
+                while (reCount > 0){
+                    v = v.replace(exps[i].orgExp, exps[i].compileExp);
+                    reCount --;
+                }
+            }
+            else {
+                v = v.replace(new RegExp(exps[i].orgExp, 'g'), exps[i].compileExp);
+            }
         }
         //行引用
         let fidArr = this.getFIDArr(v);

+ 3 - 0
web/building_saas/main/js/views/project_view.js

@@ -247,6 +247,9 @@ var projectObj = {
 
     },
     updateRationCode: function (node, value) {
+        if(!isDef(node.data.code) && (!isDef(value) || value.toString().trim() == '')){
+            return;
+        }
         if (projectInfoObj.projectInfo.engineeringInfo.ration_lib.length === 0) {
             alert('当前项目无定额库,请添加定额库。');
             this.mainController.refreshTreeNode([node], false);

+ 0 - 2
web/building_saas/pm/html/project-management.html

@@ -122,7 +122,6 @@
                 <table class="table table-bordered table-hover table-sm" id="summary-project-table">
                     <thead>
                     <tr>
-                        <th rowspan="2"></th>
                         <th rowspan="2" style="text-align:center;vertical-align:middle;">序号</th>
                         <th rowspan="2" style="text-align:center;vertical-align:middle;">单位工程名称</th>
                         <th rowspan="2" style="text-align:center;vertical-align:middle;">金额(元)</th>
@@ -167,7 +166,6 @@
                 <table class="table table-bordered table-hover table-sm" id="summary-engineering-table">
                     <thead>
                     <tr>
-                        <th rowspan="2"></th>
                         <th rowspan="2" style="text-align:center;vertical-align:middle">序号</th>
                         <th rowspan="2" style="text-align:center;vertical-align:middle">单位工程名称</th>
                         <th rowspan="2" style="text-align:center;vertical-align:middle">金额(元)</th>

+ 3 - 0
web/building_saas/pm/js/pm_gc.js

@@ -162,6 +162,9 @@ let gcTreeSetting = {
 
 $(document).ready(function () {
     $('#tab_pm_gc').on('show.bs.tab', function () {
+        //侧滑隐藏
+        $('.slide-sidebar').removeClass('open');
+        $('.slide-sidebar').css('width', '0');
         $('#gc_waiting').show();
         gc_init();
         Tree = null;

+ 1 - 2
web/building_saas/pm/js/pm_main.js

@@ -1806,7 +1806,6 @@ function setDataToSideBar() {
 
         html += '<tr>' +
             '<td>'+ (counter + 1) +'</td>' +
-            '<td> </td>' +
             '<td>合计</td>' +
             '<td style="text-align:right">'+ selectedItem.data.summaryFees.totalFee + '</td>' +
             '<td style="text-align:right">'+ selectedItem.data.summaryFees.estimateFee + '</td>' +
@@ -2003,7 +2002,7 @@ function set_file_table(target, poj_tenders, fileList, type){
             + '</span>'
             + '</div></td>';
         let fileTypeStr = type === fileType.unitPriceFile ? '单价文件' : '费率文件';
-        let fileHtml = '<tr><td>' + fileCounter + '</td><td id="file_' + fileId + '"><div>' + fileList[i].name + fileTypeStr + hoverHtml + renHtml + usedHtml + '</tr>';
+        let fileHtml = '<tr><td>' + fileCounter + '</td><td id="file_' + fileId + '"><div>' + fileList[i].name + hoverHtml + renHtml + usedHtml + '</tr>';
         fileCounter++;
         let targetBody = type === fileType.unitPriceFile ? target + '-unit-price-table tbody' : target + '-fee-table tbody';
         $(targetBody).append(fileHtml);