Sfoglia il codice sorgente

권한 설정관련 수정

eskim 5 anni fa
parent
commit
f7c831b95d

+ 1 - 4
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsMassRegisterForm.html

@@ -37,7 +37,6 @@
 									or sessionInfo.roleCd == 'G001_A001' 
 									or sessionInfo.roleCd == 'G001_A100' 
 									or sessionInfo.roleCd == 'G001_A101'
-									or (sessionInfo.roleCd == 'G001_E000' and ( #strings.isEmpty(supplyCompCd) or supplyCompCd =='P'  or supplyCompCd =='T') )
 									}">
 						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF001');">자사상품 등록양식 다운로드</button>
 						<button th:if="${erpSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsSelfCreate" >자사상품 등록</button>
@@ -46,8 +45,7 @@
 									or sessionInfo.roleCd == 'G001_A000' 
 									or sessionInfo.roleCd == 'G001_A001' 
 									or sessionInfo.roleCd == 'G001_A100' 
-									or sessionInfo.roleCd == 'G001_B000' 
-									or (sessionInfo.roleCd == 'G001_E000' and (#strings.isEmpty(supplyCompCd) or (supplyCompCd != 'P' and supplyCompCd != 'T')) )
+									or sessionInfo.roleCd == 'G001_A101'
 									}">
 						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF005');">입점상품 등록양식 다운로드</button>
 						<button th:if="${erpSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsCreate" >입점상품 등록</button>
@@ -59,7 +57,6 @@
 									or sessionInfo.roleCd == 'G001_A001' 
 									or sessionInfo.roleCd == 'G001_A100' 
 									or sessionInfo.roleCd == 'G001_A101'
-									or sessionInfo.roleCd == 'G001_B000' 
 								}" 
 							th:style="'padding-left:80px;'">
 						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF014');">상품대량수정 등록양식 다운로드</button>

+ 3 - 5
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsListForm.html

@@ -52,10 +52,8 @@
 					<tr>
 						<th>업체/브랜드<em class="required" title="필수"></em></th>
 						<td colspan="5">
-							<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnY" value="Y" th:checked="${sessionInfo.roleCd} != 'G001_B000'" th:disabled="${sessionInfo.roleCd == 'G001_B000'}"/>자사</label>
-							<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnN" value="N" th:checked="${sessionInfo.roleCd} == 'G001_B000'" th:disabled="${sessionInfo.roleCd == 'G001_E000'}"/>입점</label>
 							<select name="supplyCompCd" id="supplyCompCd">
-								<option value="" th:if="${sessionInfo.roleCd} != 'G001_B000'">[전체]</option>
+								<option value="" >[전체]</option>
 								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							<span id="multiBrand"></span>
@@ -937,7 +935,7 @@
 	}
 	
 	// 자사/입점 변경여부
-	$("#searchForm input[name=selfYn]").bind('click change', function () {
+/*	$("#searchForm input[name=selfYn]").bind('click change', function () {
 		var radioValue = $(this).val();
 		var selfGb = "S";	// 자사 공급 업체
 		if (radioValue == "N"){
@@ -952,7 +950,7 @@
 		cfnCreateCombo(actionUrl, $('#searchForm select[name=supplyCompCd]'), "[전체]", "");
 		
 	});
-	
+*/	
 	// 상태일괄변경 업체변경시
 	$('#searchForm select[name=statSupplyCompCd]').on('change', function() {
 		$("#searchForm select[name=delvFeeCdC] option:gt(0)").remove();

+ 4 - 20
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsMassRegisterForm.html

@@ -32,34 +32,18 @@
 			</ul>
 			<ul class="panelBar">
 				<li class="center">
-					<th:block th:if="${sessionInfo.roleCd == 'G001_0000' 
-									or sessionInfo.roleCd == 'G001_A000' 
-									or sessionInfo.roleCd == 'G001_A001' 
-									or sessionInfo.roleCd == 'G001_A100' 
-									or sessionInfo.roleCd == 'G001_A101'
-									or (sessionInfo.roleCd == 'G001_E000' and ( #strings.isEmpty(supplyCompCd) or supplyCompCd =='P'  or supplyCompCd =='T') )
-									}">
+					<th:block th:if="${sessionInfo.roleCd == 'G001_E000'}">
 						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF001');">자사상품 등록양식 다운로드</button>
 						<button th:if="${erpSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsSelfCreate" >자사상품 등록</button>
 					</th:block>
-					<th:block th:if="${sessionInfo.roleCd == 'G001_0000' 
-									or sessionInfo.roleCd == 'G001_A000' 
-									or sessionInfo.roleCd == 'G001_A001' 
-									or sessionInfo.roleCd == 'G001_A100' 
-									or sessionInfo.roleCd == 'G001_B000' 
-									or (sessionInfo.roleCd == 'G001_E000' and (#strings.isEmpty(supplyCompCd) or (supplyCompCd != 'P' and supplyCompCd != 'T')) )
-									}">
+					<th:block th:if="${sessionInfo.roleCd == 'G001_B000'}">
 						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF005');">입점상품 등록양식 다운로드</button>
 						<button th:if="${erpSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsCreate" >입점상품 등록</button>
 					</th:block>
 					<label class="off"><a href="javascript:void(0);" id="excelList" style="display: none;">엑셀다운로드</a></label>
 					<!--  추후 대량 수정 권한-->
-					<span th:if="${sessionInfo.roleCd == 'G001_0000' 
-									or sessionInfo.roleCd == 'G001_A000' 
-									or sessionInfo.roleCd == 'G001_A001' 
-									or sessionInfo.roleCd == 'G001_A100' 
-									or sessionInfo.roleCd == 'G001_A101'
-									or sessionInfo.roleCd == 'G001_B000' 
+					<span th:if="${sessionInfo.roleCd == 'G001_B000' 
+									or sessionInfo.roleCd == 'G001_E000'  
 								}" 
 							th:style="'padding-left:80px;'">
 						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF014');">상품대량수정 등록양식 다운로드</button>

+ 13 - 21
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html

@@ -41,10 +41,8 @@
 				<tr>
 					<th>업체/브랜드<em class="required" title="필수"></em></th>
 					<td colspan="3">
-						<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnY" value="Y"  checked/>자사</label>
-						<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnN" value="N"/>입점</label>
 						<select name="supplyCompCd" id="supplyCompCd">
-							<option value="" th:if="${sessionInfo.roleCd} != 'G001_B000'">[전체]</option>
+							<option value="" >[전체]</option>
 							<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 						</select>
 						<span id="multiBrand"></span>
@@ -338,6 +336,7 @@
 		//$("#goodsPopupForm input[type=radio]").parent("label").removeClass("checked");
 		$("#goodsPopupForm input[type=checkbox]").parent("label").removeClass("checked");
 		$("#goodsPopupForm input[type=radio][checked]").parent("label").addClass("checked");
+		fnSupplyBrandInit();
 	});
 
 	// 조회클릭시
@@ -490,7 +489,7 @@
 			//uiPopupClose('goodsPopupForm');
 		}
 	});
-
+	
 	//업체변경시
 	$('#goodsPopupForm select[name=supplyCompCd]').on('change', function() {
 		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
@@ -504,23 +503,17 @@
 		cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y', null, null, 'goodsPopupForm');
 	});
 	
-	// 자사/입점 변경여부
-	$("#goodsPopupForm input[name=selfYn]").bind('click change', function () {
-		var radioValue = $(this).val();
-		var selfGb = "S";	// 자사 공급 업체
-		if (radioValue == "N"){
-			selfGb = "E";	//입점 공급업체
-		}
-		
-		var actionUrl = '/renderer/supply/company/list/'+ selfGb;
+	// 업체 브랜드 초기화
+	var fnSupplyBrandInit = function(){
+		$("#goodsPopupForm select[name=supplyCompCd]").val([[${sessionInfo.supplyCompCd}]]);
+		//$("#goodsPopupForm select[name=supplyCompCd]").attr("disabled", true);
+		//$("select[disabled]").addClass("formControl");
 
 		$('#goodsPopupForm').find('#multiBrand').empty();
-		//$("#searchForm select[name=brandCd] option:gt(0)").remove();
-
-		cfnCreateCombo(actionUrl, $('#goodsPopupForm select[name=supplyCompCd]'), "[전체]", "");
-		
-	});
-
+		var actionUrl = '/renderer/brand/AuthBrandlist';
+		cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y', null, null, 'goodsPopupForm');
+	}
+	
 	$(document).ready(function() {
 		cfnCreateCalendar('#sellTermsP', 'stDate', 'edDate', true, '등록일', 'X');
 
@@ -537,8 +530,7 @@
 		
 		// 입점 사용자 브랜드 조회 처리
 		if(sessRoleCd == "G001_B000"){
-			actionUrl = '/renderer/brand/AuthBrandlist';
-			cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y', null, null, 'goodsPopupForm');
+			fnSupplyBrandInit();
 		}
 
 	});