Browse Source

리스크점검사유등록 조건에따른 조건 활성화 비활성화 추가

SBK 1 year ago
parent
commit
ff8a720458

+ 3 - 8
src/main/resources/sqlmap/mappers/co/co0102/CO01020001UMapper.xml

@@ -128,14 +128,9 @@
 					<if test="gubun == 'PYRQ'">					
 					<if test="gubun == 'PYRQ'">					
 					   AND NVL(A.SALE_AMT,0) - NVL(B.PYRQ_NAS_AMT,0) <![CDATA[>]]> #{unit}
 					   AND NVL(A.SALE_AMT,0) - NVL(B.PYRQ_NAS_AMT,0) <![CDATA[>]]> #{unit}
 					</if>
 					</if>
-					<if test="gubun == 'all'">
-						<if test="processGap != 0">
-						   <![CDATA[AND ROUND(NVL(A.PROG_ACT_O_RT - A.PROG_ACT_PLAN_O_RT,0),2) <= '-'||#{processGap}]]>
-						</if>
-						<if test="unit != 0">											
-						   AND (D.NON_CTMN <![CDATA[>=]]> #{unit} 
-						     OR (NVL(A.SALE_AMT,0) - NVL(B.PYRQ_NAS_AMT,0)) <![CDATA[>=]]> #{unit} ) 
-						</if>
+					<if test="gubun == 'all'">										
+					   AND (D.NON_CTMN <![CDATA[>=]]> #{unit}
+						    OR (NVL(A.SALE_AMT,0) - NVL(B.PYRQ_NAS_AMT,0)) <![CDATA[>=]]> #{unit} ) 
 					</if>
 					</if>
 					<if test="gubun == 'PAOR'">
 					<if test="gubun == 'PAOR'">
 						<if test="processGap != 0">
 						<if test="processGap != 0">

+ 39 - 8
src/main/webapp/ux/co/co0102/CO01020001U.xml

@@ -116,15 +116,16 @@
 								  ,{"code":"CO007","compID":"selCo007"}	//조회기준 GAP
 								  ,{"code":"CO007","compID":"selCo007"}	//조회기준 GAP
 								  ,{"code":"CO003","compID":""}	//본부조회권한 예외사용자
 								  ,{"code":"CO003","compID":""}	//본부조회권한 예외사용자
         						  ]);
         						  ]);
-        						  
+
+		selCo002.setValue( 0 );
+		selCo007.setValue( 0 );
+		selCo002.setDisabled( true );
+		selCo007.setDisabled( true );      						  
 		udcYm.setValue(dateLib.addDays(dateLib.getCurrentDate('yyyyMMdd'), -15).substring(0, 6));	//기준년월
 		udcYm.setValue(dateLib.addDays(dateLib.getCurrentDate('yyyyMMdd'), -15).substring(0, 6));	//기준년월
 		rdoComplCd.setValue( "01" ); //진행구분
 		rdoComplCd.setValue( "01" ); //진행구분
-		selCo002.setValue( 2 );	//조회기준 금액
-		selCo007.setValue( 1 );	//조회기준 GAP
 		scwin.getComboCcgrp();	//본부조회
 		scwin.getComboCcgrp();	//본부조회
 		chkResn.setValue( '' );
 		chkResn.setValue( '' );
 		ccPop.hideComp(false,false,false,true,true,true);	//현장udc
 		ccPop.hideComp(false,false,false,true,true,true);	//현장udc
-        console.log(document.getElementById("tabc_layout_contents_1811_body_grdData1").clientHeight);
         rightDiv.setSize( null , document.getElementById("tabc_layout_contents_1811_body_grdData1").clientHeight );
         rightDiv.setSize( null , document.getElementById("tabc_layout_contents_1811_body_grdData1").clientHeight );
         scwin.grdSearch();	//조회 
         scwin.grdSearch();	//조회 
         dcdataList1.setRowPosition( 0 );
         dcdataList1.setRowPosition( 0 );
@@ -283,19 +284,35 @@
      * param: 선택 행,열 정보
      * param: 선택 행,열 정보
      ***************************************************************************/
      ***************************************************************************/
 	scwin.rdoOrder_onchange = function() {
 	scwin.rdoOrder_onchange = function() {
-		
+		var dl002 = tabc_layout_contents_1811_body_CO002.getAllJSON();
+		var dl007 = tabc_layout_contents_1811_body_CO007.getAllJSON();    
 		if(rdoOrder.getValue() == "all"){
 		if(rdoOrder.getValue() == "all"){
-			selCo002.setValue( 2 );
+			selCo002.setValue( 0 );
+			selCo007.setValue( 0 );
+			selCo002.setDisabled( true );
+			selCo007.setDisabled( true );
 		}
 		}
 		
 		
 		if(rdoOrder.getValue() == "PYRQ"){
 		if(rdoOrder.getValue() == "PYRQ"){
-			selCo002.setValue( 3 );
+			selCo002.setValue( scwin.getComonDefaultRow(dl002,"ESBS_CD3") );
+			selCo007.setValue( 0 );
+			selCo002.setDisabled( false );
+			selCo007.setDisabled( true );
 		}
 		}
 		
 		
 		if(rdoOrder.getValue() == "CTMN"){
 		if(rdoOrder.getValue() == "CTMN"){
-			selCo002.setValue( 2 );
+			selCo002.setValue( scwin.getComonDefaultRow(dl002,"ESBS_CD4") );
+			selCo007.setValue( 0 );
+			selCo002.setDisabled( false );
+			selCo007.setDisabled( true );
 		}
 		}
 		
 		
+		if(rdoOrder.getValue() == "PAOR"){
+			selCo007.setValue( scwin.getComonDefaultRow(dl007,"ESBS_CD1") );
+			selCo002.setValue( 0 );
+			selCo002.setDisabled( true );
+			selCo007.setDisabled( false );
+		}		
 	};
 	};
 
 
     /**************************************************************************
     /**************************************************************************
@@ -465,6 +482,20 @@
 			scwin.FocusedRow = null;
 			scwin.FocusedRow = null;
 		}, 800);
 		}, 800);
 	};
 	};
+
+    /***************************************************************************
+     * 함수명 : scwin.getComonDefaultRow
+     * Obj:공통코드 Obj
+     * col:공통코드에 등록한 기본값으로 사용할 컬럼명
+     * 기능 : 공통코드에 등록한 기본값 번호 리턴
+     ***************************************************************************/	
+	scwin.getComonDefaultRow = function(Obj,col) {
+        for(var i = 0; i < Obj.length; i++){
+        	if(Obj[i][col] == "Y"){
+        		return Number(i)+1;
+        	}
+        }
+	}
 ]]></script>
 ]]></script>
 	</head>
 	</head>
 	<body>
 	<body>