|
@@ -14,8 +14,8 @@
|
|
|
* 1.0 2021.02.19 eskim 최초 작성
|
|
* 1.0 2021.02.19 eskim 최초 작성
|
|
|
*******************************************************************************
|
|
*******************************************************************************
|
|
|
-->
|
|
-->
|
|
|
-<div class="modalPopup" data-width="900" data-height="870" id="popupBrandGroup">
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
|
|
+<div class="modalPopup" data-width="920" id="popupBrandGroup">
|
|
|
|
|
+ <div class="panelStyle" style="max-height:700px;overflow-y:scroll;">
|
|
|
<!-- TITLE -->
|
|
<!-- TITLE -->
|
|
|
<div class="panelTitle">
|
|
<div class="panelTitle">
|
|
|
<strong>브랜드 그룹 목록</strong>
|
|
<strong>브랜드 그룹 목록</strong>
|
|
@@ -24,7 +24,7 @@
|
|
|
<!-- //TITLE -->
|
|
<!-- //TITLE -->
|
|
|
|
|
|
|
|
<!-- 검색 조건 -->
|
|
<!-- 검색 조건 -->
|
|
|
- <div class="panelContent" >
|
|
|
|
|
|
|
+ <div class="panelContent" >
|
|
|
<form id="searchBrandGroupForm" name="searchBrandGroupForm" action="#" th:action="@{'/business/brand/group/list'}" >
|
|
<form id="searchBrandGroupForm" name="searchBrandGroupForm" action="#" th:action="@{'/business/brand/group/list'}" >
|
|
|
|
|
|
|
|
<table class="frmStyle" aria-describedby="검색조건">
|
|
<table class="frmStyle" aria-describedby="검색조건">
|
|
@@ -38,11 +38,11 @@
|
|
|
<tr>
|
|
<tr>
|
|
|
<th>브랜드그룹코드<i class="required" title="필수"></i></th>
|
|
<th>브랜드그룹코드<i class="required" title="필수"></i></th>
|
|
|
<td>
|
|
<td>
|
|
|
- <textarea class="textareaR3" name="searchBrandGroupNo" id="searchBrandGroupNo"></textarea>
|
|
|
|
|
|
|
+ <textarea class="textareaR2" name="searchBrandGroupNo" id="searchBrandGroupNo"></textarea>
|
|
|
</td>
|
|
</td>
|
|
|
<th>브랜드그룹명<i class="required" title="필수"></i></th>
|
|
<th>브랜드그룹명<i class="required" title="필수"></i></th>
|
|
|
<td>
|
|
<td>
|
|
|
- <textarea class="textareaR3" name="searchBrandGroupNm" id="searchBrandGroupNm"></textarea>
|
|
|
|
|
|
|
+ <textarea class="textareaR2" name="searchBrandGroupNm" id="searchBrandGroupNm"></textarea>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
@@ -67,6 +67,7 @@
|
|
|
<div class="panelContent">
|
|
<div class="panelContent">
|
|
|
<form id="brandGroupForm" name="searchBrandGroupForm" action="#" th:action="@{'/business/brand/group/save'}">
|
|
<form id="brandGroupForm" name="searchBrandGroupForm" action="#" th:action="@{'/business/brand/group/save'}">
|
|
|
<input type="hidden" name="mode" value="N"/>
|
|
<input type="hidden" name="mode" value="N"/>
|
|
|
|
|
+ <input type="hidden" name="uploadDefaultUrl" id="uploadDefaultUrl" th:value="${@environment.getProperty('upload.default.view')}"/>
|
|
|
<table class="frmStyle" aria-describedby="등록/수정 폼">
|
|
<table class="frmStyle" aria-describedby="등록/수정 폼">
|
|
|
<colgroup>
|
|
<colgroup>
|
|
|
<col style="width:10%;"/>
|
|
<col style="width:10%;"/>
|
|
@@ -110,18 +111,33 @@
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr style="height:100px">
|
|
<tr style="height:100px">
|
|
|
- <th>브랜드이미지</th>
|
|
|
|
|
|
|
+ <th>브랜드이미지(칼라)</th>
|
|
|
<td colspan="3">
|
|
<td colspan="3">
|
|
|
<div class="uFile w300">
|
|
<div class="uFile w300">
|
|
|
- <input id="file" name="file" type="file" class="uFileInput w300"/>
|
|
|
|
|
- <label for="file" class="uFileLabel">파일선택</label>
|
|
|
|
|
|
|
+ <input id="file1" name="file" type="file" class="uFileInput w300"/>
|
|
|
|
|
+ <label for="file1" class="uFileLabel">파일선택</label>
|
|
|
<input type="hidden" name="logoFileNm" id="logoFileNm"/>
|
|
<input type="hidden" name="logoFileNm" id="logoFileNm"/>
|
|
|
- <input type="hidden" name="sysFileNm" id="sysFileNm"/>
|
|
|
|
|
- <input type="hidden" name="newSysFileNm" id="newSysFileNm"/>
|
|
|
|
|
|
|
+ <input type="hidden" name="sysFileNm1" id="sysFileNm1"/>
|
|
|
|
|
+ <input type="hidden" name="newSysFileNm1" id="newSysFileNm1"/>
|
|
|
</div>
|
|
</div>
|
|
|
- <input type="hidden" name="uploadDefaultUrl" id="uploadDefaultUrl" th:value="${@environment.getProperty('upload.default.view')}"/>
|
|
|
|
|
- <span id="imgView" class="off">
|
|
|
|
|
- <img id="bannerPreViewUrl" src="" style="width:100px"/>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <span id="imgView1" class="off">
|
|
|
|
|
+ <img id="bannerPreViewUrl1" src="" style="width:100px"/>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr style="height:100px">
|
|
|
|
|
+ <th>브랜드이미지(흑백)</th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <div class="uFile w300">
|
|
|
|
|
+ <input id="file2" name="file" type="file" class="uFileInput w300"/>
|
|
|
|
|
+ <label for="file2" class="uFileLabel">파일선택</label>
|
|
|
|
|
+ <input type="hidden" name="bwLogoFileNm" id="bwLogoFileNm"/>
|
|
|
|
|
+ <input type="hidden" name="sysFileNm2" id="sysFileNm2"/>
|
|
|
|
|
+ <input type="hidden" name="newSysFileNm2" id="newSysFileNm2"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <span id="imgView2" class="off">
|
|
|
|
|
+ <img id="bannerPreViewUrl2" src="" style="width:100px"/>
|
|
|
</span>
|
|
</span>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
@@ -167,7 +183,7 @@
|
|
|
gridOptionsBrandGroupList.onCellClicked = function(event) {
|
|
gridOptionsBrandGroupList.onCellClicked = function(event) {
|
|
|
if (event.colDef.field != 'brandGroupNo')
|
|
if (event.colDef.field != 'brandGroupNo')
|
|
|
return;
|
|
return;
|
|
|
-
|
|
|
|
|
|
|
+ debugger;
|
|
|
$("#brandGroupForm input[name=mode]").val("U");
|
|
$("#brandGroupForm input[name=mode]").val("U");
|
|
|
$("#brandGroupForm input[name=brandGroupNo]").val(event.data.brandGroupNo);
|
|
$("#brandGroupForm input[name=brandGroupNo]").val(event.data.brandGroupNo);
|
|
|
$("#brandGroupForm input[name=brandGroupEnm]").val(event.data.brandGroupEnm);
|
|
$("#brandGroupForm input[name=brandGroupEnm]").val(event.data.brandGroupEnm);
|
|
@@ -177,18 +193,32 @@
|
|
|
$("#brandGroupForm input:radio[name=defaultCateYn]:input[value=" + event.data.defaultCateYn + "]").click();
|
|
$("#brandGroupForm input:radio[name=defaultCateYn]:input[value=" + event.data.defaultCateYn + "]").click();
|
|
|
$("#brandGroupForm input[name=brandCateNo]").val(event.data.brandCateNo);
|
|
$("#brandGroupForm input[name=brandCateNo]").val(event.data.brandCateNo);
|
|
|
|
|
|
|
|
- var brandImg = event.data.logoFileNm;
|
|
|
|
|
- if(!gagajf.isNull(brandImg)){
|
|
|
|
|
- $("#logoFileNm").val(brandImg);
|
|
|
|
|
- $("#bannerPreViewUrl").attr('src', $("#uploadDefaultUrl").val()+brandImg);
|
|
|
|
|
- $("#imgView").removeClass("off").addClass("on");
|
|
|
|
|
|
|
+ var brandImg1 = event.data.logoFileNm;
|
|
|
|
|
+ if(!gagajf.isNull(brandImg1)){
|
|
|
|
|
+ $("#logoFileNm").val(brandImg1);
|
|
|
|
|
+ $("#bannerPreViewUrl1").attr('src', $("#uploadDefaultUrl").val()+brandImg1);
|
|
|
|
|
+ $("#imgView1").removeClass("off").addClass("on");
|
|
|
}else {
|
|
}else {
|
|
|
- $("#logoFileNm").val('');
|
|
|
|
|
- $("#orgFileNm").val('');
|
|
|
|
|
- $("#bannerPreViewUrl").attr('src', '');
|
|
|
|
|
|
|
+ $("#logoFileNm1").val('');
|
|
|
|
|
+ $("#orgFileNm1").val('');
|
|
|
|
|
+ $("#bannerPreViewUrl1").attr('src', '');
|
|
|
|
|
+ $("#imgView1").removeClass("on").addClass("off");
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var brandImg2 = event.data.bwLogoFileNm;
|
|
|
|
|
+ if(!gagajf.isNull(brandImg2)){
|
|
|
|
|
+ $("#bwLogoFileNm").val(brandImg2);
|
|
|
|
|
+ $("#bannerPreViewUrl2").attr('src', $("#uploadDefaultUrl").val()+brandImg2);
|
|
|
|
|
+ $("#imgView2").removeClass("off").addClass("on");
|
|
|
|
|
+ }else {
|
|
|
|
|
+ $("#logoFileNm2").val('');
|
|
|
|
|
+ $("#orgFileNm2").val('');
|
|
|
|
|
+ $("#bannerPreViewUrl2").attr('src', '');
|
|
|
$("#imgView").removeClass("on").addClass("off");
|
|
$("#imgView").removeClass("on").addClass("off");
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
$('#brandGroupForm input[name=file]').closest('div').find('label').text('파일선택');
|
|
$('#brandGroupForm input[name=file]').closest('div').find('label').text('파일선택');
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -235,12 +265,38 @@
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
//이미지 클릭시 미리보기
|
|
//이미지 클릭시 미리보기
|
|
|
- $("#bannerPreViewUrl").click(function(){
|
|
|
|
|
- cfnOpenImagePreViewPopup('bannerPreimgView',$('#bannerPreViewUrl').attr('src'));
|
|
|
|
|
|
|
+ $("#bannerPreViewUrl1").click(function(){
|
|
|
|
|
+ cfnOpenImagePreViewPopup('bannerPreimgView',$('#bannerPreViewUrl1').attr('src'));
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $("#bannerPreViewUrl2").click(function(){
|
|
|
|
|
+ cfnOpenImagePreViewPopup('bannerPreimgView',$('#bannerPreViewUrl2').attr('src'));
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ // 파일첨부 선택 시
|
|
|
|
|
+ $('#file1').on('change', function() { fnChooseFile(this, 1); });
|
|
|
|
|
+ $('#file2').on('change', function() { fnChooseFile(this, 2); });
|
|
|
|
|
+
|
|
|
|
|
+ var fnChooseFile = function(obj, fileNo) {
|
|
|
|
|
+ // multiple 속성이 있으면 files에는 다수의 객체가 할당됨
|
|
|
|
|
+ var file = obj.files[0];
|
|
|
|
|
+
|
|
|
|
|
+ // 파일 업로드
|
|
|
|
|
+ gagajf.ajaxFileUpload('/common/file/upload?subDir=/contents/brand'
|
|
|
|
|
+ , file
|
|
|
|
|
+ , function(result) {
|
|
|
|
|
+ $('#brandGroupForm').find('#newSysFileNm' + fileNo).val(result.newFileName);
|
|
|
|
|
+ $('#brandGroupForm').find('#sysFileNm' + fileNo).val(result.newFileName);
|
|
|
|
|
+ $('#bannerPreViewUrl' + fileNo).attr('src', $("#uploadDefaultUrl").val()+"/contents/brand/"+result.newFileName);
|
|
|
|
|
+ $('#imgView' + fileNo).removeClass("off").addClass("on");
|
|
|
|
|
+ }
|
|
|
|
|
+ , 'image'
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//첨부파일 등록
|
|
//첨부파일 등록
|
|
|
- $('#brandGroupForm input[name=file]').on('change', function() {
|
|
|
|
|
|
|
+ /* $('#brandGroupForm input[name=file]').on('change', function() {
|
|
|
var file = this.files[0];
|
|
var file = this.files[0];
|
|
|
file.name = 'test';
|
|
file.name = 'test';
|
|
|
if (typeof(file) == 'undefined'){
|
|
if (typeof(file) == 'undefined'){
|
|
@@ -250,14 +306,14 @@
|
|
|
gagajf.ajaxFileUpload('/common/file/upload?subDir=/contents'
|
|
gagajf.ajaxFileUpload('/common/file/upload?subDir=/contents'
|
|
|
, file
|
|
, file
|
|
|
, function(result) {
|
|
, function(result) {
|
|
|
- $('#brandGroupForm input[name=newSysFileNm]').val(result.newFileName);
|
|
|
|
|
- $('#brandGroupForm input[name=sysFileNm]').val(result.newFileName);
|
|
|
|
|
|
|
+ $('#brandGroupForm input[name=newSysFileNm2]').val(result.newFileName);
|
|
|
|
|
+ $('#brandGroupForm input[name=sysFileNm2]').val(result.newFileName);
|
|
|
$("#bannerPreViewUrl").attr('src', $("#uploadDefaultUrl").val()+"/contents/brand/"+result.newFileName);
|
|
$("#bannerPreViewUrl").attr('src', $("#uploadDefaultUrl").val()+"/contents/brand/"+result.newFileName);
|
|
|
- $("#imgView").removeClass("off").addClass("on");
|
|
|
|
|
|
|
+ //$("#imgView").removeClass("off").addClass("on");
|
|
|
}
|
|
}
|
|
|
, 'image'
|
|
, 'image'
|
|
|
);
|
|
);
|
|
|
- });
|
|
|
|
|
|
|
+ }); */
|
|
|
|
|
|
|
|
// 저장
|
|
// 저장
|
|
|
$("#btnBrandGroupSave").on("click", function() {
|
|
$("#btnBrandGroupSave").on("click", function() {
|
|
@@ -290,7 +346,23 @@
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ debugger;
|
|
|
|
|
+ // 이미지 체크
|
|
|
|
|
+ if (!gagajf.isNull($("#brandGroupForm input[name=logoFileNm]").val()) || !gagajf.isNull($("#brandGroupForm input[name=sysFileNm1]").val())){
|
|
|
|
|
+ if (gagajf.isNull($("#brandGroupForm input[name=bwLogoFileNm]").val()) && gagajf.isNull($("#brandGroupForm input[name=sysFileNm2]").val())){
|
|
|
|
|
+ mcxDialog.alert("브랜드 흑백 이미지를 등록 해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ if (!gagajf.isNull($("#brandGroupForm input[name=bwLogoFileNm]").val()) || !gagajf.isNull($("#brandGroupForm input[name=sysFileNm2]").val())){
|
|
|
|
|
+ if (gagajf.isNull($("#brandGroupForm input[name=logoFileNm]").val()) && gagajf.isNull($("#brandGroupForm input[name=sysFileNm1]").val())){
|
|
|
|
|
+ mcxDialog.alert("브랜드 칼라이미지를 등록 해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
mcxDialog.confirm('저장하시겠습니까?', {
|
|
mcxDialog.confirm('저장하시겠습니까?', {
|
|
|
cancelBtnText: "취소",
|
|
cancelBtnText: "취소",
|
|
@@ -307,11 +379,16 @@
|
|
|
$("#btnBrandGroupNew").on("click", function() {
|
|
$("#btnBrandGroupNew").on("click", function() {
|
|
|
$("#brandGroupForm")[0].reset();
|
|
$("#brandGroupForm")[0].reset();
|
|
|
$("#brandGroupForm input[name=mode]").val("N");
|
|
$("#brandGroupForm input[name=mode]").val("N");
|
|
|
- $("#bannerPreViewUrl").attr('src', '');
|
|
|
|
|
- $('#brandGroupForm input[name=newSysFileNm]').val('');
|
|
|
|
|
- $('#brandGroupForm input[name=sysFileNm]').val('');
|
|
|
|
|
|
|
+ $("#bannerPreViewUrl1").attr('src', '');
|
|
|
|
|
+ $("#bannerPreViewUrl2").attr('src', '');
|
|
|
|
|
+ $('#brandGroupForm input[name=newSysFileNm1]').val('');
|
|
|
|
|
+ $('#brandGroupForm input[name=sysFileNm1]').val('');
|
|
|
|
|
+ $('#brandGroupForm input[name=newSysFileNm2]').val('');
|
|
|
|
|
+ $('#brandGroupForm input[name=sysFileNm2]').val('');
|
|
|
$('#brandGroupForm input[name=logoFileNm]').val('');
|
|
$('#brandGroupForm input[name=logoFileNm]').val('');
|
|
|
- $("#imgView").removeClass("on").addClass("off");
|
|
|
|
|
|
|
+ $('#brandGroupForm input[name=bwLogoFileNm]').val('');
|
|
|
|
|
+ $("#imgView1").removeClass("on").addClass("off");
|
|
|
|
|
+ $("#imgView2").removeClass("on").addClass("off");
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|