| 
					
				 | 
			
			
				@@ -60,7 +60,7 @@ ProjectGLJSpread.prototype.init = function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ,width:60 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         {name: '供货方式', field: 'supply', visible: true, cellType: selectBox,width:80}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        {name: '甲供数量', field: 'supply_quantity', visible: true,width:100}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        {name: '甲供数量', field: 'supply_quantity',validator:'number', visible: true,width:100}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         {name: '交货方式', field: 'delivery', visible: true,width:90}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         {name: '送达地点', field: 'delivery_address', visible: true,width:100}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -106,6 +106,7 @@ ProjectGLJSpread.prototype.init = function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.sheetObj.setStyle(-1, basePriceColumn, rightStyleSetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.sheetObj.setStyle(-1, adjustPriceColumn, rightStyleSetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.sheetObj.setStyle(-1, marketPriceColumn, rightStyleSetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.sheetObj.setStyle(-1, supplyColumn, rightStyleSetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 设置可编辑列 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.sheetObj.setColumnEditable(marketPriceColumn); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -204,6 +205,9 @@ ProjectGLJSpread.prototype.updateProjectGLJField = function(info, callback) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         value = this.supplyType.indexOf(value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         extend.supply_quantity = this.getSupplyQuantity(value, activeSheet, info); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if(field === 'supply_quantity'){//修改数量需做4舍5入 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        value= value.toDecimal(getDecimal('glj.quantity')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     extend = Object.keys(extend).length > 0 ?  JSON.stringify(extend) : ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $.ajax({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -229,6 +233,9 @@ ProjectGLJSpread.prototype.updateProjectGLJField = function(info, callback) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (parentMarketPrice !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     info.parentMarketPrice = parentMarketPrice; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(field !== 'supply'){ //供货方式需做转换才能直接设置值, 这里设置值是为了早点更新数据,等getdata返回数据再刷新的话会有比较大的延时 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    activeSheet.setValue(row, column, value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 callback(field, info); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -466,6 +473,7 @@ ProjectGLJSpread.prototype.getSupplyQuantity = function(supplyType, activeSheet, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let quantity = activeSheet.getValue(info.row, quantityColumn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 自行采购和甲定乙供则把甲供数量设置为0,其余情况则设置为当前总消耗量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let supplyQuantity = supplyType === 0 || supplyType === 3 ? 0 : quantity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    supplyQuantity = parseFloat(supplyQuantity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return supplyQuantity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 |