|  | @@ -250,6 +250,10 @@ projectGljObject={
 | 
	
		
			
				|  |  |          }else if(sheet.name() ==  'materialTreeSheet'){
 | 
	
		
			
				|  |  |              data = me.materialTree.selected.data;
 | 
	
		
			
				|  |  |              setting = me.materialSetting;
 | 
	
		
			
				|  |  | +            let notEditId= ['GC','GJ','MC','SN','SZ'];
 | 
	
		
			
				|  |  | +            if(notEditId.indexOf(data.id)!= -1){
 | 
	
		
			
				|  |  | +                return false;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          let dataCode = setting.header[col].dataCode;
 | 
	
		
			
				|  |  |          let lockColumns = setting.view.lockColumns;
 | 
	
	
		
			
				|  | @@ -342,7 +346,7 @@ projectGljObject={
 | 
	
		
			
				|  |  |          if(canChange == false){//恢复原来的值
 | 
	
		
			
				|  |  |              info.sheetName =="materialTreeSheet"?me.showMaterialTreeData():me.showProjectGljData();
 | 
	
		
			
				|  |  |          }else if(info.sheetName =="projectGljSheet"){
 | 
	
		
			
				|  |  | -            me.batchUpdateProjectGLJ(changeInfo);
 | 
	
		
			
				|  |  | +            me.batchUpdateProjectGLJ(changeInfo,info.sheetName);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onMixRatioRangeChange:function (sender,info){
 | 
	
	
		
			
				|  | @@ -376,18 +380,79 @@ projectGljObject={
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    batchUpdateProjectGLJ:function(changeInfo){
 | 
	
		
			
				|  |  | +    batchUpdateProjectGLJ:function(changeInfo,sheetName){
 | 
	
		
			
				|  |  |          let projectGLJ = projectObj.project.projectGLJ;
 | 
	
		
			
				|  |  |          let me = projectGljObject;
 | 
	
		
			
				|  |  | -        me.batchUpdateGLJProperty(changeInfo);
 | 
	
		
			
				|  |  | -        projectGLJ.batchUpdatePrice(changeInfo,function (impactList) {
 | 
	
		
			
				|  |  | -            let selected = me.projectGljSheet.getSelections()[0];
 | 
	
		
			
				|  |  | -            me.showProjectGljData();
 | 
	
		
			
				|  |  | -            me.projectGljSheet.setSelection(selected.row,selected.col,selected.rowCount,selected.colCount);
 | 
	
		
			
				|  |  | +        let propertyCells=[],priceCells=[];
 | 
	
		
			
				|  |  | +        let setting = sheetName =="materialTreeSheet"?me.materialSetting:me.projectGljSetting;
 | 
	
		
			
				|  |  | +        for(let c of changeInfo){
 | 
	
		
			
				|  |  | +            c.dataCode = setting.header[c.col].dataCode;
 | 
	
		
			
				|  |  | +            if(c.dataCode == 'basePrice'||c.dataCode=='marketPrice'){
 | 
	
		
			
				|  |  | +                priceCells.push(c);
 | 
	
		
			
				|  |  | +            }else {
 | 
	
		
			
				|  |  | +                propertyCells.push(c);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        me.batchUpdateGLJProperty(propertyCells,sheetName,function () {
 | 
	
		
			
				|  |  | +            //价格属于单价文件表,如果与项目工料机的其它属性一起的话计算起来会比较复杂,同时出现价格与其它属性一起更新的情况也会比较少;
 | 
	
		
			
				|  |  | +            projectGLJ.batchUpdatePrice(priceCells,sheetName,function (impactList) {
 | 
	
		
			
				|  |  | +                me.refreshBySheetName(sheetName);
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    batchUpdateGLJProperty:function (changeInfo) {
 | 
	
		
			
				|  |  | -        console.log(changeInfo)
 | 
	
		
			
				|  |  | +    refreshBySheetName:function (sheetName) {
 | 
	
		
			
				|  |  | +        let me = projectGljObject;
 | 
	
		
			
				|  |  | +        if(sheetName =="projectGljSheet"){
 | 
	
		
			
				|  |  | +            me.showProjectGljData();
 | 
	
		
			
				|  |  | +        }else if(sheetName =="materialTreeSheet"){
 | 
	
		
			
				|  |  | +            me.showMaterialTreeData();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    batchUpdateGLJProperty:function (changeInfo,sheetName,callback) {
 | 
	
		
			
				|  |  | +        let me = projectGljObject,updateMap = {};
 | 
	
		
			
				|  |  | +        let projectGLJ = projectObj.project.projectGLJ;
 | 
	
		
			
				|  |  | +        for(let c of changeInfo){
 | 
	
		
			
				|  |  | +            let recode = sheetName =="materialTreeSheet"?me.materialTree.items[c.row].data:me.projectGljSheetData[c.row];
 | 
	
		
			
				|  |  | +            if(recode[c.dataCode] == c.value){
 | 
	
		
			
				|  |  | +                continue;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            me.getUpdateData(recode.id,c.value,c.dataCode,c.quantity,updateMap);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(_.isEmpty(updateMap)){
 | 
	
		
			
				|  |  | +            callback?callback():'';
 | 
	
		
			
				|  |  | +            return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        projectGLJ.batchUpdateGLJProperty(updateMap,callback);
 | 
	
		
			
				|  |  | +        console.log(updateMap)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getUpdateData :function (id,value,dataCode,quantity,updateMap) {
 | 
	
		
			
				|  |  | +        let me = projectGljObject;
 | 
	
		
			
				|  |  | +        let data = updateMap[id]?updateMap[id]:{};
 | 
	
		
			
				|  |  | +        // 如果是供货方式则需要处理数据
 | 
	
		
			
				|  |  | +        if (data === 'supply') {
 | 
	
		
			
				|  |  | +            data.supply_quantity = me.getSupplyQuantity(value,quantity);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(dataCode === 'supply_quantity'){//修改数量需做4舍5入
 | 
	
		
			
				|  |  | +            value =  scMathUtil.roundForObj(value,getDecimal('glj.quantity'));
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(dataCode === 'is_evaluate'||dataCode === 'is_adjust_price'||dataCode === 'is_main_material'){
 | 
	
		
			
				|  |  | +            if(value){
 | 
	
		
			
				|  |  | +                value = 1;
 | 
	
		
			
				|  |  | +            }else {
 | 
	
		
			
				|  |  | +                value = 0;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(dataCode === 'materialType' && (value == null || value=="")){//删除三材类别时,清空三材系数
 | 
	
		
			
				|  |  | +            value = null;
 | 
	
		
			
				|  |  | +            data.materialCoe = null;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(dataCode == 'materialCoe'){
 | 
	
		
			
				|  |  | +            value = scMathUtil.roundForObj(value,getDecimal("material"));
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        data[dataCode] = value ;
 | 
	
		
			
				|  |  | +        updateMap[id] = data;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      batchUpdateConsumption:function(changeInfo){
 | 
	
		
			
				|  |  |          let projectGLJ = projectObj.project.projectGLJ;
 |