zhangweicheng 6 tahun lalu
induk
melakukan
aea5a1a17a

+ 2 - 3
modules/main/facade/ration_facade.js

@@ -73,10 +73,10 @@ async function getSameSectionRations(data,userId){
     let sectionId,rations=[];
     if(from == 'std'){
         let ration = await rationItemModel.findOne({rationRepId:libID,code:code},['sectionId']);
-        sectionId = ration.sectionId
+        sectionId = ration? ration.sectionId:null;
     }else {
         let ration = await complementaryGljModel.findOne({userId:userId,code:code},['sectionId']);
-        sectionId = ration.sectionId
+        sectionId = ration?ration.sectionId:null;
     }
     if(sectionId){
         //{
@@ -106,7 +106,6 @@ async function  updateSerialNo(serialNoUpdate){
         tasks.push(task);
     }
     await ration_model.model.bulkWrite(tasks);
-
 }
 
 async function insertNewRation(newData,defaultLibID,std,calQuantity) {//插入新的定额

+ 1 - 2
public/web/tree_sheet/tree_sheet_helper.js

@@ -306,8 +306,7 @@ var TREE_SHEET_HELPER = {
         let levelIndent = -5;
         let halfBoxLength = 5;
         let halfExpandLength = 3;
-        let isRationNode = sheet.name()=="mainSheet" && initNode.sourceType == ModuleNames.ration;
-
+        let isRationNode = sheet.name()=="mainSheet" && initNode.sourceType == ModuleNames.ration&&initNode.data.type == rationType.ration;
 
         let TreeNodeCellType = function () {
             this.clickDropDown = false; //如果是点击下拉框的三角形的时候,默认展开下拉框

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

@@ -6,7 +6,7 @@ let gljCol = {
         header: [
             {headerName: "编码", headerWidth: 130, dataCode: "code", dataType: "String", formatter: "@"},
             {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String",cellType:'tipsCell'},
-            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", dataType: "String", hAlign: "left",cellType:'tipsCell'},
+            {headerName: "规格型号", headerWidth: 160, 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: "adjustPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"1

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

@@ -10,7 +10,7 @@ let MainTreeCol = {
                 // CSL, 2017-11-29
             } else if (node.sourceType === projectObj.project.Ration.getSourceType()) {
                 if (node.data.type == 1 || node.data.type == undefined)    // 兼容旧定额
-                    return '定'
+                    return '定';
                 else if (node.data.type == 2) {    // 量价
                     return volumePriceMaps[node.data.subType];
                 }

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

@@ -539,8 +539,8 @@ projectGljObject={
         let q_decimal = getDecimal("glj.quantity");
         let GC = {id:'GC',name:materialType[materialTypeMap.GC],code:'GC',unit:'t',ParentID:-1,NextSiblingID:'MC'};
         let GJ = {id:'GJ',name:materialType[materialTypeMap.GJ],code:'GJ',unit:'t',ParentID:'GC',NextSiblingID:-1};
-        let MC = {id:'MC',name:materialType[materialTypeMap.MC],code:'MC',unit:'t',ParentID:-1,NextSiblingID:'SN'};
-        let SN = {id:'SN',name:materialType[materialTypeMap.SN],code:'SN',unit:'m3',ParentID:-1,NextSiblingID:'SZ'};
+        let MC = {id:'MC',name:materialType[materialTypeMap.MC],code:'MC',unit:'m3',ParentID:-1,NextSiblingID:'SN'};
+        let SN = {id:'SN',name:materialType[materialTypeMap.SN],code:'SN',unit:'t',ParentID:-1,NextSiblingID:'SZ'};
         let SZ = {id:'SZ',name:materialType[materialTypeMap.SZ],code:'BZZ',unit:'千块',ParentID:-1,NextSiblingID:-1};
         let rootDatas= [GC,GJ,MC,SN,SZ];
         let parentMap = {};