zhangweicheng преди 7 години
родител
ревизия
22ceacaefd

+ 6 - 0
modules/pm/facade/pm_facade.js

@@ -403,6 +403,12 @@ async function copyRationSubList(originalPID,newProjectID,billIDMap,rationIDMap,
         s._doc.billID&&billIDMap[s._doc.billID]?s._doc.billID = billIDMap[s._doc.billID]:'';
         s._doc.billsItemID&&billIDMap[s._doc.billsItemID]?s._doc.billsItemID = billIDMap[s._doc.billsItemID]:'';
         s._doc.projectGLJID&&projectGLJIDMap[s._doc.projectGLJID]?s._doc.projectGLJID = projectGLJIDMap[s._doc.projectGLJID]:'';
+        if(s._doc.templateList && s._doc.templateList.length > 0 ){
+            for(let t of s._doc.templateList){
+                if(t.billID && billIDMap[t.billID]) t.billID =  billIDMap[t.billID];
+                if(t.fxID && billIDMap[t.fxID]) t.fxID =  billIDMap[t.fxID];
+            }
+        }
         newList.push(s._doc);
     }
     await insertMany(newList,model);

+ 2 - 2
modules/ration_glj/facade/glj_calculate_facade.js

@@ -373,13 +373,13 @@ function getCalculateResult(quantify,c,coe,gljList,decimal) {
         case '+*' :
             o_glj = getCoeSelectedGLJ(gljList,coe.original_code,coe.select_code);
             if(o_glj){
-              q = q +  c.amount * scMathUtil.roundForObj(o_glj.quantity,decimal);
+              q = q +  c.amount * scMathUtil.roundForObj(o_glj.rationItemQuantity,decimal);
             }
             break;
         case '-*' :
             o_glj = getCoeSelectedGLJ(gljList,coe.original_code,coe.select_code);
             if(o_glj){
-                q = q -  c.amount * scMathUtil.roundForObj(o_glj.quantity,decimal);
+                q = q -  c.amount * scMathUtil.roundForObj(o_glj.rationItemQuantity,decimal);
             }
             break;
         case '=' :

+ 3 - 3
web/building_saas/main/js/views/glj_col.js

@@ -8,7 +8,7 @@ let gljCol = {
             {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String",cellType:'tipsCell'},
             {headerName: "规格型号", headerWidth: 120, dataCode: "specs", dataType: "String", hAlign: "left",cellType:'tipsCell'},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", dataType: "String", hAlign: "center"},
-            {headerName: "市场价", headerWidth: 65, dataCode: "marketPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
+            {headerName: "预算价", headerWidth: 65, dataCode: "marketPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
             {headerName: "调整价", headerWidth: 65, dataCode: "adjustPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"1
             {headerName: "自定消耗", headerWidth: 65, dataCode: "customQuantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity"},
             {headerName: "消耗量", headerWidth: 65, dataCode: "quantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity"},
@@ -38,7 +38,7 @@ let gljCol = {
             {headerName: "规格型号", headerWidth: 120, dataCode: "specs", hAlign: "left", dataType: "String",cellType:'tipsCell'},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", hAlign: "center", dataType: "String"},
             {headerName: "类型", headerWidth: 45, dataCode: "short_name", hAlign: "center", dataType: "String"},
-            {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
+            {headerName: "预算价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
             {headerName: "调整价", headerWidth: 70, dataCode: "adjustPrice", hAlign: "right", dataType: "Number"},//,decimalField:"glj.unitPrice"
             {headerName: "定额价", headerWidth: 70, dataCode: "basePrice", hAlign: "right", dataType: "Number",validator:"number"},//decimalField:'glj.unitPrice',
             {headerName: "总消耗量", headerWidth: 90, dataCode: "quantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},
@@ -67,7 +67,7 @@ let gljCol = {
             {headerName: "类型", headerWidth: 45, dataCode: "short_name", hAlign: "center", dataType: "String"},
             {headerName: "定额价", headerWidth: 80, dataCode: "basePrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'glj.unitPrice'
             {headerName: "调整价", headerWidth: 80, dataCode: "adjustPrice", hAlign: "right", dataType: "Number"},//,decimalField:"glj.unitPrice"
-            {headerName: "市场价", headerWidth: 80, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
+            {headerName: "预算价", headerWidth: 80, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
             {headerName: "消耗量", headerWidth: 80, dataCode: "consumption", hAlign: "right", dataType: "Number",decimalField:"glj.quantity",validator:"number"}
         ],
         view: {

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

@@ -28,7 +28,7 @@ projectGljObject={
             {headerName: "规格型号", headerWidth: 160, dataCode: "specs", hAlign: "left", dataType: "String"},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", hAlign: "center", dataType: "String"},
             {headerName: "定额价", headerWidth: 70, dataCode: "basePrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'glj.unitPrice'
-            {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
+            {headerName: "预算价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
             {headerName: "总消耗量", headerWidth: 70, dataCode: "quantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},
             {headerName: "三材系数", headerWidth: 70, dataCode: "materialCoe", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'material'
             {headerName: "三材量", headerWidth: 100, dataCode: "materialQuantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},