|
|
@@ -0,0 +1,267 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko"
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : BasicEnvsetForm.html
|
|
|
+ * @desc : 기본환경설정 Page
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2020.10.21 gagamel 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+ <div id="main">
|
|
|
+ <!-- 메인타이틀 영역 -->
|
|
|
+ <div class="main-title">
|
|
|
+ </div>
|
|
|
+ <!-- //메인타이틀 영역 -->
|
|
|
+
|
|
|
+ <!-- 메뉴 설명 -->
|
|
|
+ <div class="infoBox menu-desc">
|
|
|
+ </div>
|
|
|
+ <!-- //메뉴 설명 -->
|
|
|
+
|
|
|
+ <!-- 검색조건 영역 -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <table class="frmStyle" aria-describedby="검색조건">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col/>
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th>사이트</th>
|
|
|
+ <td>
|
|
|
+ <select name="siteCd" class="w150" onchange="fnSearch();">
|
|
|
+ <option th:if="${siteList}" th:each="oneData, status : ${siteList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <!-- 검색조건 영역 -->
|
|
|
+
|
|
|
+ <div class="panelStyle">
|
|
|
+ <h4>쇼핑몰Meta정보</h4>
|
|
|
+ <button type="button" class="btn btn-success btn-ssm" onclick="fnSave('B10');">저장</button>
|
|
|
+ <button type="button" class="btn btn-info btn-ssm" onclick="fnOpenEnvsetPopup('B10', '쇼핑몰Meta정보');">이력보기</button>
|
|
|
+
|
|
|
+ <table class="frmStyle" aria-describedby="쇼핑몰Meta정보">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width: 15%;"/>
|
|
|
+ <col/>
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>웹브라우저Title</th>
|
|
|
+ <td>
|
|
|
+ <input name="b10StrSetVal1" type="text" class="w500" maxlength="200"/>
|
|
|
+ <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>웹 브라우저 상단에 노출되는 사이트 소개 문구입니다.</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>쇼핑몰Title(og:title)</th>
|
|
|
+ <td>
|
|
|
+ <input name="b10StrSetVal2" type="text" class="w500" maxlength="200"/>
|
|
|
+ <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>오픈그래프 Title입니다. 영문/한글/숫자만 입력하세요.</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>쇼핑몰설명(og:description)</th>
|
|
|
+ <td>
|
|
|
+ <input name="b10StrSetVal3" type="text" class="w500" maxlength="200"/>
|
|
|
+ <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>오픈그래프 Description입니다. 200자 이내의 영문/한글/숫자만 입력하세요.</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>쇼핑몰이미지(og:image)</th>
|
|
|
+ <td>
|
|
|
+ <div class="uFile w500">
|
|
|
+ <input type="file" id="b10StrSetVal4" name="b10StrSetVal4" class="uFileInput"/>
|
|
|
+ <label for="b10StrSetVal4" class="uFileLabel">쇼핑몰이미지 선택</label>
|
|
|
+ <input type="hidden" name="b10StrSetVal4OrgFileNm"/>
|
|
|
+ <input type="hidden" name="b10StrSetVal4SysFileNm"/>
|
|
|
+ </div>
|
|
|
+ <a id="b10StrSetVal4FileDownload" href="#" style="display: none;" onclick="fnDownloadFile('b10StrSetVal4');"></a>
|
|
|
+ <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>오픈그래프 Image입니다</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>키워드(Keywords)</th>
|
|
|
+ <td>
|
|
|
+ <input name="b10StrSetVal5" type="text" class="w500" maxlength="70"/>
|
|
|
+ <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>70자 이내로 작성하시고 같은 단어는 3회 이상 반복하시면 안 됩니다.</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>파비콘이미지</th>
|
|
|
+ <td>
|
|
|
+ <div class="uFile w500">
|
|
|
+ <input type="file" id="b10StrSetVal6" name="b10StrSetVal6" class="uFileInput"/>
|
|
|
+ <label for="b10StrSetVal6" class="uFileLabel">파비콘이미지 선택</label>
|
|
|
+ <input type="hidden" name="b10StrSetVal6OrgFileNm"/>
|
|
|
+ <input type="hidden" name="b10StrSetVal6SysFileNm"/>
|
|
|
+ </div>
|
|
|
+ <a id="b10StrSetVal6FileDownload" href="#" style="display: none;" onclick="fnDownloadFile('b10StrSetVal6');"></a>
|
|
|
+ <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>16x16 사이즈의 아이콘 이미지(확장자:ico)</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <h4>기본설정</h4>
|
|
|
+ <button type="button" class="btn btn-success btn-ssm" onclick="fnSave('B11');">저장</button>
|
|
|
+ <button type="button" class="btn btn-info btn-ssm" onclick="fnOpenEnvsetPopup('B11', '기본설정');">이력보기</button>
|
|
|
+ <table class="frmStyle" aria-describedby="기본설정">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width: 15%;"/>
|
|
|
+ <col/>
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>탈퇴후재가입불가기간(일)</th>
|
|
|
+ <td><input name="b11StrSetVal1" type="text" class="w50 aR" maxlength="3" data-valid-type="integer" data-valid-name="탈퇴후재가입불가기간"/><span class="cRed">개월</span> 동안 탈퇴 후 재가입 불가합니다.</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>휴면회원선정기간(일)</th>
|
|
|
+ <td><input name="b11StrSetVal2" type="text" class="w50 aR" maxlength="3" data-valid-type="integer" data-valid-name="휴면회원선정기간"/><span class="cRed">일</span> 동안 사이트에 로그인 하지 않은 회원을 휴면회원으로 선정합니다.</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>휴면회원전환기간(일)</th>
|
|
|
+ <td><input name="b11StrSetVal3" type="text" class="w50 aR" maxlength="3" data-valid-type="integer" data-valid-name="휴면회원전환기간"/><span class="cRed">일</span> 동안 사이트에 로그인 하지 않은 회원을 휴면회원으로 전환합니다.</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>회원등급산정기간</th>
|
|
|
+ <td>직전월 이전 <input name="b11StrSetVal4" type="text" class="w50 aR" maxlength="3" data-valid-type="integer" data-valid-name="회원등급산정기간"/><span class="cRed">개월</span> 기간동안의 매출금액을 기준으로 월초에 산정합니다. <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>0으로 설정하면 회원별등급산정을 하지 않습니다.</span></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>무료배송비최소주문금액</th>
|
|
|
+ <td>최소주문금액이 <input name="b11StrSetVal5" type="text" class="w100 aR" maxlength="6" data-valid-type="integer" data-valid-name="무료배송비최소주문금액"/> 원 이상이면 배송비가 무료입니다. <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>이 값은 기본값이며 공급업체별로 다르게 설정할 수도 있습니다.</span></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+<script th:inline="javascript">
|
|
|
+/*<![CDATA[*/
|
|
|
+ // 조회
|
|
|
+ var fnSearch = function() {
|
|
|
+ var siteCd = $('select[name=siteCd]').val();
|
|
|
+ var actionUrl = '/envset/' + siteCd;
|
|
|
+
|
|
|
+ // 쇼핑몰Meta정보
|
|
|
+ $.getJSON(actionUrl + '/B10'
|
|
|
+ , function(result, status) {
|
|
|
+ if (status === 'success') {
|
|
|
+ if (!gagajf.isNull(result)) {
|
|
|
+ $('input[name=b10StrSetVal1]').val(result.strSetVal1);
|
|
|
+ $('input[name=b10StrSetVal2]').val(result.strSetVal2);
|
|
|
+ $('input[name=b10StrSetVal3]').val(result.strSetVal3);
|
|
|
+
|
|
|
+ if (!gagajf.isNull(result.strSetVal4)) {
|
|
|
+ $('input[name=b10StrSetVal4SysFileNm]').val(result.strSetVal4);
|
|
|
+ $('#b10StrSetVal4FileDownload').html(result.strSetVal4);
|
|
|
+ $('#b10StrSetVal4FileDownload').show();
|
|
|
+ }
|
|
|
+
|
|
|
+ $('input[name=b10StrSetVal5]').val(result.strSetVal5);
|
|
|
+
|
|
|
+ if (!gagajf.isNull(result.strSetVal6)) {
|
|
|
+ $('input[name=b10StrSetVal6SysFileNm]').val(result.strSetVal6);
|
|
|
+ $('#b10StrSetVal6FileDownload').html(result.strSetVal6);
|
|
|
+ $('#b10StrSetVal6FileDownload').show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 기본설정
|
|
|
+ $.getJSON(actionUrl + '/B11'
|
|
|
+ , function(result, status) {
|
|
|
+ if (status === 'success') {
|
|
|
+ if (!gagajf.isNull(result)) {
|
|
|
+ $('input[name=b11StrSetVal1]').val(result.strSetVal1);
|
|
|
+ $('input[name=b11StrSetVal2]').val(result.strSetVal2);
|
|
|
+ $('input[name=b11StrSetVal3]').val(result.strSetVal3);
|
|
|
+ $('input[name=b11StrSetVal4]').val(result.strSetVal4);
|
|
|
+ $('input[name=b11StrSetVal5]').val(gagajf.isNull(result.strSetVal5) ? result.strSetVal5 : result.strSetVal5.addComma());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 파일첨부 선택 시
|
|
|
+ $('#b10StrSetVal4').on('change', function() { fnChooseFile(this); });
|
|
|
+ $('#b10StrSetVal6').on('change', function() { fnChooseFile(this); });
|
|
|
+
|
|
|
+ var fnChooseFile = function(obj) {
|
|
|
+ // multiple 속성이 있으면 files에는 다수의 객체가 할당됨
|
|
|
+ var file = obj.files[0];
|
|
|
+
|
|
|
+ // 파일 업로드
|
|
|
+ gagajf.ajaxFileUpload('/common/file/upload?subDir=/envset'
|
|
|
+ , file
|
|
|
+ , function(result) {
|
|
|
+ // 업로드한 파일명 설정
|
|
|
+ $('input[name=' + obj.name + 'OrgFileNm]').val(result.oldFileName);
|
|
|
+ $('input[name=' + obj.name + 'SysFileNm]').val(result.newFileName);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ // 파일다운로드
|
|
|
+ var fnDownloadFile = function(id) {
|
|
|
+ $('#' + id + 'FileDownload').attr({
|
|
|
+ href : _uploadDefaultUrl + '/envset/' + $('input[name=' + id + 'SysFileNm]').val(),
|
|
|
+ target: '_blank'
|
|
|
+ }).get(0).click();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 저장 처리
|
|
|
+ var fnSave = function(envsetType) {
|
|
|
+ var params = new Object();
|
|
|
+ params.siteCd = $('select[name=siteCd]').val();
|
|
|
+ params.envsetType = envsetType;
|
|
|
+
|
|
|
+ if (envsetType == 'B10') { // 쇼핑몰Meta정보
|
|
|
+ params.envsetNm = '쇼핑몰Meta정보';
|
|
|
+ params.strSetVal1 = $('input[name=b10StrSetVal1]').val();
|
|
|
+ params.strSetVal2 = $('input[name=b10StrSetVal2]').val();
|
|
|
+ params.strSetVal3 = $('input[name=b10StrSetVal3]').val();
|
|
|
+ params.strSetVal4 = $('input[name=b10StrSetVal4SysFileNm]').val();
|
|
|
+ params.strSetVal5 = $('input[name=b10StrSetVal5]').val();
|
|
|
+ params.strSetVal6 = $('input[name=b10StrSetVal6SysFileNm]').val();
|
|
|
+ } else if (envsetType == 'B11') { // 기본설정
|
|
|
+ params.envsetNm = '기본설정';
|
|
|
+ params.strSetVal1 = $('input[name=b11StrSetVal1]').val();
|
|
|
+ params.strSetVal2 = $('input[name=b11StrSetVal2]').val();
|
|
|
+ params.strSetVal3 = $('input[name=b11StrSetVal3]').val();
|
|
|
+ params.strSetVal4 = $('input[name=b11StrSetVal4]').val();
|
|
|
+ params.strSetVal5 = $('input[name=b11StrSetVal5]').val().removeComma();
|
|
|
+ params.strSetVal6 = $('input[name=b10StrSetVal6SysFileNm]').val();
|
|
|
+ }
|
|
|
+
|
|
|
+ var jsonData = JSON.stringify(params);
|
|
|
+ gagajf.ajaxJsonSubmit('/envset/create', jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 환경설정 이력보기 팝업
|
|
|
+ var fnOpenEnvsetPopup = function(envsetType, envsetTypeNm) {
|
|
|
+ var actionUrl = '/envset/history/form'
|
|
|
+ + '?siteCd=' + $('select[name=siteCd]').val()
|
|
|
+ + '&envsetType=' + envsetType
|
|
|
+ + '&envsetTypeNm=' + encodeURIComponent(envsetTypeNm);
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupEnvset');
|
|
|
+ }
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ $('select[name=siteCd]').trigger('change');
|
|
|
+ });
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
+
|
|
|
+</html>
|