|
@@ -32,36 +32,39 @@
|
|
|
<div class="panelContent">
|
|
<div class="panelContent">
|
|
|
|
|
|
|
|
<form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/video/list'}">
|
|
<form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/video/list'}">
|
|
|
|
|
+
|
|
|
<table class="frmStyle">
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
<colgroup>
|
|
|
<col style="width:10%;"/>
|
|
<col style="width:10%;"/>
|
|
|
- <col style="width:40%;"/>
|
|
|
|
|
|
|
+ <col style="width:62%;"/>
|
|
|
<col style="width:10%;"/>
|
|
<col style="width:10%;"/>
|
|
|
<col/>
|
|
<col/>
|
|
|
</colgroup>
|
|
</colgroup>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <th>키워드</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="keyWord">
|
|
|
|
|
- <option value="goodsCd">상품코드</option>
|
|
|
|
|
- <option value="goodsNm">상품명</option>
|
|
|
|
|
- <option value="goodsNum">품번</option>
|
|
|
|
|
- <option value="supplyGoodsCd">업체상품코드</option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="text" class="w100" maxlength="20" name="searchTxt" placeholder=""/>
|
|
|
|
|
- <input type="text" class="off" name="goodsCd" id="goodsCd"/>
|
|
|
|
|
- <input type="text" class="off" name="goodsNm" id="goodsNm"/>
|
|
|
|
|
- <input type="text" class="off" name="goodsNum" id="goodsNum"/>
|
|
|
|
|
- <input type="text" class="off" name="supplyGoodsCd" id="supplyGoodsCd"/>
|
|
|
|
|
- </td>
|
|
|
|
|
<th>브랜드명</th>
|
|
<th>브랜드명</th>
|
|
|
<td>
|
|
<td>
|
|
|
- <input type="text" class="w200" name="brandEnm" placeholder="" maxlength="50"/>
|
|
|
|
|
|
|
+ <input type="hidden" name="xxxx" value="xxxx"/> <!-- submit 방지 -->
|
|
|
|
|
+ <input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
|
|
|
|
|
+ <button type="button" class="btn icn" id="btnSearchBrand"><i class="fa fa-search"></i></button>
|
|
|
|
|
+ <span id="brandText"></span>
|
|
|
|
|
+ <input type="hidden" name="brandList"/>
|
|
|
|
|
+
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th rowspan="2">키워드</th>
|
|
|
|
|
+ <td rowspan="2">
|
|
|
|
|
+ <select name="search" id="search">
|
|
|
|
|
+ <option value="searchGoodsCd">상품코드</option>
|
|
|
|
|
+ <option value="searchGoodsNm">상품명</option>
|
|
|
|
|
+ <option value="searchGoodsNum">품번</option>
|
|
|
|
|
+ <option value="searchSupplyGoodsCd">업체상품코드</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <textarea class="textareaR2 w50p" name="condition" id="condition"></textarea>
|
|
|
</td>
|
|
</td>
|
|
|
|
|
+
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
<th>등록일</th>
|
|
<th>등록일</th>
|
|
|
- <td colspan="3" id="sellTerms">
|
|
|
|
|
|
|
+ <td id="sellTerms">
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
@@ -92,7 +95,7 @@
|
|
|
<!-- //리스트 영역 -->
|
|
<!-- //리스트 영역 -->
|
|
|
<!-- 등록/수정 -->
|
|
<!-- 등록/수정 -->
|
|
|
<div class="panelStyle">
|
|
<div class="panelStyle">
|
|
|
- <form id="detailForm" name="detailForm" action="#" >
|
|
|
|
|
|
|
+ <form id="detailForm" name="detailForm">
|
|
|
<table class="frmStyle">
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
<colgroup>
|
|
|
<col style="width:10%;"/>
|
|
<col style="width:10%;"/>
|
|
@@ -266,15 +269,9 @@
|
|
|
|
|
|
|
|
// 조회
|
|
// 조회
|
|
|
$('#btnSearch').on('click', function() {
|
|
$('#btnSearch').on('click', function() {
|
|
|
- $("#goodsCd").val('');
|
|
|
|
|
- $("#goodsNm").val('');
|
|
|
|
|
- $("#goodsNum").val('');
|
|
|
|
|
- $("#supplyGoodsCd").val('');
|
|
|
|
|
- $("#"+$("#searchForm select[name=keyWord]").val()).val($("#searchForm input[name=searchTxt]").val());
|
|
|
|
|
|
|
|
|
|
if(!fnConditionCheck()) return;
|
|
if(!fnConditionCheck()) return;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
// Fetch data
|
|
// Fetch data
|
|
|
gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
|
$("#btnNew").click();
|
|
$("#btnNew").click();
|
|
@@ -282,6 +279,9 @@
|
|
|
|
|
|
|
|
//검색 조건 확인
|
|
//검색 조건 확인
|
|
|
var fnConditionCheck = function(){
|
|
var fnConditionCheck = function(){
|
|
|
|
|
+
|
|
|
|
|
+ if (event.keyCode === 13) return false;
|
|
|
|
|
+
|
|
|
var form = document.searchForm;
|
|
var form = document.searchForm;
|
|
|
|
|
|
|
|
var searchFlag = false;
|
|
var searchFlag = false;
|
|
@@ -290,7 +290,7 @@
|
|
|
for (i = 0; i < form.elements.length; i++ ) {
|
|
for (i = 0; i < form.elements.length; i++ ) {
|
|
|
var el = form.elements[i];
|
|
var el = form.elements[i];
|
|
|
|
|
|
|
|
- if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "pageSize" && el.name != "keyWord")) {
|
|
|
|
|
|
|
+ if ($(el).prop("type") == "text" || $(el).prop("type") == "textarea" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "pageSize")) {
|
|
|
if (!(el.value == null || el.value == "")) {
|
|
if (!(el.value == null || el.value == "")) {
|
|
|
cnt++;
|
|
cnt++;
|
|
|
}
|
|
}
|
|
@@ -315,6 +315,8 @@
|
|
|
// 검색조건 초기화
|
|
// 검색조건 초기화
|
|
|
$('#btnInit').on('click', function() {
|
|
$('#btnInit').on('click', function() {
|
|
|
$("#searchForm")[0].reset();
|
|
$("#searchForm")[0].reset();
|
|
|
|
|
+ $('#searchForm input[name=brandList]').val('');
|
|
|
|
|
+ $('#searchForm').find('#brandText').html('');
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 선택상품 사용안함
|
|
// 선택상품 사용안함
|
|
@@ -334,6 +336,39 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 브랜드 조회 선택시
|
|
|
|
|
+ $('#btnSearchBrand').on('click', function() {
|
|
|
|
|
+ /* if (gagajf.isNull($("#searchForm input[name=searchTxt]").val())){
|
|
|
|
|
+ mcxDialog.alert('브랜드 검색어를 입력하세요.');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ } */
|
|
|
|
|
+ cfnOpenBrandListPopup('fnSetBrandInfo', 'M');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 브랜드 조회 팝업에서 호출
|
|
|
|
|
+ var fnSetBrandInfo = function(result) {
|
|
|
|
|
+ var arrbrandCd = [];
|
|
|
|
|
+ var brandText = "";
|
|
|
|
|
+ var bIndex = 0;
|
|
|
|
|
+ $('#searchForm').find('#brandText').html('');
|
|
|
|
|
+ $('#searchForm input[name=searchTxt]').val('');
|
|
|
|
|
+ result.forEach(function(brand){
|
|
|
|
|
+ bIndex++;
|
|
|
|
|
+ arrbrandCd.push(brand.brandCd);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
|
|
+ if (bIndex == 1) {
|
|
|
|
|
+ $('#searchForm input[name=searchTxt]').val(arrbrandCd[0]);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ brandText = bIndex + " 개";
|
|
|
|
|
+ $('#searchForm').find('#brandText').html(brandText);
|
|
|
|
|
+ }
|
|
|
|
|
+ var jsonData = JSON.stringify(arrbrandCd);
|
|
|
|
|
+ $("#searchForm input[name=brandList]").val(jsonData);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 동영상 저장
|
|
// 동영상 저장
|
|
|
$("#btnSave").on('click', function() {
|
|
$("#btnSave").on('click', function() {
|
|
|
|
|
|