Browse Source

상품별 카테고리 수정중

bin2107 5 years ago
parent
commit
3952a0f9ba
1 changed files with 26 additions and 31 deletions
  1. 26 31
      src/main/webapp/WEB-INF/views/display/GoodsCategoryForm.html

+ 26 - 31
src/main/webapp/WEB-INF/views/display/GoodsCategoryForm.html

@@ -28,6 +28,7 @@
 		<!-- 검색조건 영역 -->
 		<div class="panelStyle">
 			<form id="goodsCateForm" name="goodsCateForm" action="#" th:action="@{'/display/goods/category/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
+				<input type="hidden" id="searchGb" name="searchGb" />
 				<table class="frmStyle" aria-describedby="검색조건">
 					<colgroup>
 						<col width="7%"/>
@@ -185,39 +186,12 @@
 			<div id="gridList" style="width: 100%; height: 500px;" class="ag-theme-balham lh60"></div>
 			<ul class="panelBar">
 				<li class="center">
-					<div class="tablePaging" id="goodsListPagination"></div>
+					<div class="tablePaging" id="goodsCateListPagination"></div>
 				</li>
 			</ul>
 		</div>
 		<!-- //리스트 영역 -->
-		
-		<!-- 등록/수정 -->
-		<div class="panelStyle">
-			<form id="detailForm" name="detailForm" action="#" th:action="@{'/display/category/save'}">
-				<table class="frmStyle" aria-describedby="등록/수정 폼">
-					<colgroup>
-						<col style="width:10%;"/>
-						<col style="width:23%;"/>
-						<col style="width:10%;"/>
-						<col style="width:23%;"/>
-						<col style="width:10%;"/>
-						<col/>
-					</colgroup>
 
-				</table>
-			</form>
-			
-			<!-- 버튼 배치 영역 -->
-			<ul class="panelBar">
-				<li class="right">
-					<button type="button" class="btn btn-info btn-lg" id="btnNew">신규</button>
-					<button type="button" class="btn btn-success btn-lg" id="btnSave">저장</button>
-					<button type="button" class="btn btn-base btn-lg" id="btnRefresh4Srch" th:if="${sessionInfo.roleCd == 'G001_0000'}">4SRCH 갱신</button>
-				</li>
-			</ul>
-			<!-- //버튼 배치 영역 -->
-		</div>
-		<!-- 등록/수정 -->
 	</div>
 
 <script th:inline="javascript">
@@ -226,7 +200,7 @@
 	columnDefs = [
 		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{headerName: 'No', width: 60, cellClass: 'text-center',
-			valueGetter: function(params) { return cfnGridNumner('searchForm',params.node.rowIndex, 'A');}
+			valueGetter: function(params) { return cfnGridNumner('goodsCateForm',params.node.rowIndex, 'A');}
 		},
 		{headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
 			,cellRenderer: function(params) {
@@ -239,12 +213,13 @@
 			}
 		},
 		{headerName: "상품명", field: "goodsNm", width: 200, cellClass: 'text-left'},
-		{headerName: "품목명", field: "itemkindNm", width: 250, cellClass: 'text-left'},
+		{headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' }
+		/*{headerName: "품목명", field: "itemkindNm", width: 250, cellClass: 'text-left'},
 		{headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' },
 		{headerName: "변경품목코드", field: "itemkindCdNew", width: 150, cellClass: 'text-center', editable : true,
 			cellEditor: 'textCellEditor',
 			cellEditorParams: { maxlength: 5, required: true, onblur: '$(this).val($(this).val().toUpperCase())' }
-		}
+		}*/
 	];
 
 	// Get GridOptions
@@ -257,6 +232,26 @@
 
 	gridOptions.stopEditingWhenGridLosesFocus = true;
 
+	// 조회
+	$('#btnSearch').on('click', function() {
+		// 검색조건 추가해야함 ㅠㅠ
+
+		$("#goodsCateForm input[name=searchGb]").val("BASIC");
+		fnSearch();
+	});
+
+	$("#pageSize").on("change", function(){
+		var rowCnt = gridOptions.api.getDisplayedRowCount();
+		if(rowCnt > 0){
+			fnSearch();
+		}
+	});
+
+	var fnSearch = function(){
+		gagaPaging.init('goodsCateForm', fnSearchCallBack, 'goodsCateListPagination', $('#goodsCateForm').find('#pageSize').val());
+		gagaPaging.load(1);
+	};
+
 	// 업체변경시
 	$('#goodsCateForm select[name=supplyCompCd]').on('change', function() {
 		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();