| 
					
				 | 
			
			
				@@ -4,6 +4,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   showTag: 'ration', //mixRatio/machine 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   showMixRatioMark: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  commonInfoPriceID:'', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   displayType: filterType.ALL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mixRatioType: [gljType.CONCRETE, gljType.MORTAR, gljType.MIX_RATIO, gljType.MAIN_MATERIAL], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   machineType: [gljType.GENERAL_MACHINE], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -221,7 +222,7 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     sheetCommonObj.spreadDefaultStyle(this.infoPriceSpread); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.infoPriceSheet = this.infoPriceSpread.getSheet(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.initSheet(this.infoPriceSheet, this.infoPriceSetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    this.infoPriceSheet.bind(GC.Spread.Sheets.Events.TopRowChanged, _.debounce(this.onInfoTopRowChanged, 100)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.infoPriceSheet.bind(GC.Spread.Sheets.Events.TopRowChanged, _.debounce(this.onInfoTopRowChanged, 100));  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.infoPriceSheet.bind(GC.Spread.Sheets.Events.CellDoubleClick, this.onInfoPriceDoubleClick); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.infoPriceSheet.name('infoPriceSheet'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.infoPriceSheet.setRowCount(0); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -534,6 +535,15 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     sheetCommonObj.showData(me.infoPriceSheet, me.infoPriceSetting, datas); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     me.infoPriceSheet.setRowCount(datas.length); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  autoShowInfoPriceData: function () {  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!$('#info-nav').hasClass('active')) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    let projectGLJData = this.getProjectGLJSelected(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#info_search_name').val(projectGLJData.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    let code = projectGLJData.code.substr(0, 4); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#info_glj_name').val(projectGLJData.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#info_glj_code').val(code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.searchInfoPrice(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   getMixRatioSheetData: function (glj) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       id: glj.id, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -647,6 +657,7 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     sel.colCount = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     me.showMixRatioData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     me.showRelatedRationDatas(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    me.autoShowInfoPriceData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   rightClickCallback: function (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let me = projectGljObject; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1625,6 +1636,7 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     for (let o of opts) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (isArea == true) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         str += `<option value="${o.ID}">${o.name}</option>` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (o.name == "通用") this.commonInfoPriceID = o.ID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         str += `<option value="${o}">${o}</option>` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1642,16 +1654,17 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log(bottomRow); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       me.infoPriceLastLoadingRow = me.infoPriceData.length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      me.searchInfoPrice(me.infoPriceData[me.infoPriceData.length - 1]._id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      //只有在空的搜索条件下才执行分页查询,其它情况无法分页 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if ($('#info_search_name').val() == "") me.searchInfoPrice(me.infoPriceData[me.infoPriceData.length - 1]._id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   searchInfoPrice: async function (objectID) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let year = $('#info_year').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let month = $('#info_month').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let areaID = $('#info_area').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let keyWord = $('#info_search_name').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    let name =  $('#info_glj_name').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    let code =  $('#info_glj_code').val(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let me = projectGljObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (year != "" && month != "" && areaID != "") { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1659,11 +1672,14 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           period: year + "-" + month, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           areaID: areaID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (projectGljObject.addCommonInfoPriceID) projectGljObject.addCommonInfoPriceID(condition); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           condition: condition 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (keyWord != "") data.keyWord = keyWord; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (name !="") data.keyWord = name; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (objectID) data.lastID = objectID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (code !="" ) data.code = code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         let result = await ajaxPost("/infoPrice/getDataByCondition", data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (objectID) { //分页查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           sheetCommonObj.appendData(me.infoPriceSheet, me.infoPriceData.length, 0, me.infoPriceSetting, result.items); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1672,6 +1688,11 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           me.infoPriceTotalSize = result.totalSize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           me.infoPriceLastLoadingRow = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           me.showInforPriceData(result.items); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (result.totalSize == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $("#info-warning").text("当前材料没有信息价! "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } else {  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $("#info-warning").text(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } else { //当有任意一个为空时,都清空表格 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         me.infoPriceTotalSize = 0; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1727,6 +1748,10 @@ let projectGljObject = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   getInfoMarketPrice: function (info) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let taxType = projectObj.project.property.taxType; //1: 一般计税 2: 简易计税 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return gljUtil.getInfoMarketPrice(info, taxType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  refreshInfoPrice: function () {  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#info_price_sheet').height($("#mix_ratio_sheet").height() - $("#infoToolDiv").height()-10); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    projectGljObject.initInfoPriceSpread(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1787,8 +1812,6 @@ function loadProjectGljSize() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //信息价相关 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $('#info_price_sheet').height($("#mix_ratio_sheet").height() - $("#infoToolDiv").height()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ($('#info_price_sheet').is(':visible')) me.initInfoPriceSpread(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1845,6 +1868,7 @@ $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   SlideResize.verticalSlide(pojGljResizeEles.eleObj, pojGljResizeEles.limit, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     projectGljObject.projectGljSpread.refresh(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     projectGljObject.mixRatioSpread ? projectGljObject.mixRatioSpread.refresh() : ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    projectGljObject.refreshInfoPrice(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   let tr = getConficMaterialResizeEles(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2109,10 +2133,8 @@ $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     projectGljObject.showRelatedRationDatas(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $("#info-nav").on('shown.bs.tab', function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    $('#info_price_sheet').height($("#mix_ratio_sheet").height() - $("#infoToolDiv").height()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    projectGljObject.initInfoPriceSpread(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    /*   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     projectGljObject.showRelatedRationDatas(); */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    projectGljObject.refreshInfoPrice(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    projectGljObject.autoShowInfoPriceData();  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $('#info_year').change(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let periodMap = projectGljObject.infoPriceOptions.periodMap; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2135,12 +2157,17 @@ $(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     projectGljObject.searchInfoPrice(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $('#info_search_name').on('keypress', function (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $("#info-warning").text(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (e.keyCode === 13) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      $('#info_glj_name').val(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      $('#info_glj_code').val(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       projectGljObject.searchInfoPrice(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   $('#info_search_btn').on('click', function (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#info_glj_name').val(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#info_glj_code').val(""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     projectGljObject.searchInfoPrice(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |