|
|
@@ -78,7 +78,7 @@
|
|
|
<li><a href="#goodstab3">상품상세정보</a></li>
|
|
|
<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
|
<li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
|
|
|
- <!-- <li><a href="#goodstab6">안전인증</a></li> -->
|
|
|
+ <li><a href="#goodstab6">안전인증</a></li>
|
|
|
<li><a href="#goodstab7">변경이력</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -571,48 +571,70 @@
|
|
|
<!-- //TAB6 CONTENTS AREA -->
|
|
|
</li>
|
|
|
<!-- TAB6 : 이력정보 -->
|
|
|
- <!-- <li class="tab" id="goodstab6">
|
|
|
- TAB8 CONTENTS AREA
|
|
|
+ <li class="tab" id="goodstab6">
|
|
|
<div class="panelStyle">
|
|
|
- <table class="frmStyle" th:with="uploadGoodsUrl=${@environment.getProperty('upload.goods.view')},uxImgUrl=${@environment.getProperty('domain.uximage')}">
|
|
|
+ <table class="frmStyle">
|
|
|
<colgroup>
|
|
|
- <col width="10%"/>
|
|
|
- <col width="40%"/>
|
|
|
- <col width="10%"/>
|
|
|
+ <col width="11%"/>
|
|
|
+ <col width="22%"/>
|
|
|
+ <col width="11%"/>
|
|
|
+ <col width="22%"/>
|
|
|
+ <col width="11%"/>
|
|
|
<col/>
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
<th>인증대상</th>
|
|
|
- <td colspan="3"></td>
|
|
|
+ <td colspan="5">
|
|
|
+ <label class="rdoBtn" th:if="${certTargetGbList}" th:each="oneData, status : ${certTargetGbList}">
|
|
|
+ <input type="radio" name="certTargetGb" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
|
|
|
+ </label>
|
|
|
+ <input type="hidden" id="orgCertTargetGb" name="orgCertTargetGb"/>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>인증형태</th>
|
|
|
- <td colspan="3"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
+ <td>
|
|
|
+ <select name="certFormGb" id="certFormGb" >
|
|
|
+ <option value="">[선택]</option>
|
|
|
+ <option th:if="${certFormGbList}" th:each="oneData, status : ${certFormGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ <input type="hidden" id="orgCertformGb" name="orgCertformGb"/>
|
|
|
+ </td>
|
|
|
<th>인증타입</th>
|
|
|
- <td colspan="3"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
+ <td>
|
|
|
+ <select name="certType" id="certType" >
|
|
|
+ <option value="">[선택]</option>
|
|
|
+ <option th:if="${certTypeList}" th:each="oneData, status : ${certTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ <input type="hidden" id="orgCertType" name="orgCertType"/>
|
|
|
+ </td>
|
|
|
<th>인증번호</th>
|
|
|
- <td colspan="3"></td>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w200" id="certNum" name="certNum" maxlength="20"/>
|
|
|
+ <input type="hidden" id="certNumOrg" name="certNumOrg"/>
|
|
|
+
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>인증상태</th>
|
|
|
- <td></td>
|
|
|
- <th>인증구분</th>
|
|
|
- <td></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
+ <td><span id="certStateTxt"></span></td>
|
|
|
<th>인증기관</th>
|
|
|
- <td></td>
|
|
|
+ <td><span id="certOrganNameTxt"></span></td>
|
|
|
<th>인증일</th>
|
|
|
- <td></td>
|
|
|
+ <td><span id="certDtTxt"></span></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>인증구분</th>
|
|
|
+ <td colspan="5"><span id="certDivTxt"></span></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
+ <ul class="panelBar marT10">
|
|
|
+ <li class="right">
|
|
|
+ <button type="button" class="btn btn-success btn-lg" id="btnGoodsSafetyCertNum">안전인증</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
- //TAB5 CONTENTS AREA
|
|
|
- </li> -->
|
|
|
+ </li>
|
|
|
<!-- //TAB7 : 이력정보 -->
|
|
|
<li class="tab" id="goodstab7">
|
|
|
<!-- TAB8 CONTENTS AREA -->
|
|
|
@@ -1136,7 +1158,8 @@
|
|
|
fnGoodsDetailNotiInfoSearch(params);
|
|
|
//구매등급
|
|
|
fnGoodsDetailOrderGradeSearch(params);
|
|
|
-
|
|
|
+ //안전인증
|
|
|
+ fnGoodsDetailSafeNoSearch(params);
|
|
|
//구성상품
|
|
|
if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
|
fnGoodsComposeListSearch(params);
|
|
|
@@ -1167,6 +1190,11 @@
|
|
|
cfnAjaxSubmit("/goods/detail/order/grade/list", "json", fnGoodsDetailOrderGradeSearchCallback, params);
|
|
|
}
|
|
|
|
|
|
+ //안전인증
|
|
|
+ var fnGoodsDetailSafeNoSearch = function(params) {
|
|
|
+ cfnAjaxSubmit("/goods/detail/safe", "json", fnGoodsDetailSafeNoSearchCallback, params);
|
|
|
+ }
|
|
|
+
|
|
|
//구성상품
|
|
|
var fnGoodsComposeListSearch = function(params) {
|
|
|
if ("G056_S" == params.goodsType){ //세트
|
|
|
@@ -1229,6 +1257,33 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ //안전인증 콜백
|
|
|
+ var fnGoodsDetailSafeNoSearchCallback = function(result){
|
|
|
+ if (result == null) return;
|
|
|
+
|
|
|
+ if (result.certTargetGb == "G083_1"){
|
|
|
+ $("#goodsDetailForm input:radio[name=certTargetGb]:input[value='G083_1']").trigger('click');
|
|
|
+ }else if (result.certTargetGb == "G083_2"){
|
|
|
+ $("#goodsDetailForm input:radio[name=certTargetGb]:input[value='G083_2']").trigger('click');
|
|
|
+ }else if (result.certTargetGb == "G083_3"){
|
|
|
+ $("#goodsDetailForm input:radio[name=certTargetGb]:input[value='G083_3']").trigger('click');
|
|
|
+ }
|
|
|
+ $("#goodsDetailForm input[name=orgCertTargetGb]").val(result.certTargetGb);
|
|
|
+ $("#goodsDetailForm select[name=certFormGb]").val(result.certFormGb);
|
|
|
+ $("#goodsDetailForm input[name=orgCertFormGb]").val(result.certFormGb);
|
|
|
+ $("#goodsDetailForm select[name=certType]").val(result.certType);
|
|
|
+ $("#goodsDetailForm input[name=orgCertType]").val(result.certType);
|
|
|
+ $("#goodsDetailForm input[name=certNum]").val(result.certNum);
|
|
|
+ $("#goodsDetailForm input[name=orgCertNum]").val(result.certNum);
|
|
|
+ $('#goodsDetailForm').find('#certStateTxt').html(result.certState);
|
|
|
+ $('#goodsDetailForm').find('#certTargetGbTxt').html(result.certTargetGb);
|
|
|
+
|
|
|
+ $('#goodsDetailForm').find('#certOrganNameTxt').html(result.certOrganName);
|
|
|
+ $('#goodsDetailForm').find('#certDivTxt').html(result.certDiv);
|
|
|
+ $('#goodsDetailForm').find('#certDtTxt').html(!gagajf.isNull(result.certDt) ? result.certDt.toDate("YYYYMMDD").format("YYYY-MM-DD") : '');
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
//상품명 길이표시
|
|
|
$("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
fnDataLengthCheck('goodsNm',200);
|
|
|
@@ -2302,25 +2357,73 @@
|
|
|
|
|
|
// 안전인증
|
|
|
$("#btnGoodsSafetyCertNum").on("click", function(){
|
|
|
-/*
|
|
|
- if($("#goodsDetailForm input[name=certNum]").val() == $("#goodsDetailForm input[name=certNumOrg]").val()){
|
|
|
- mcxDialog.alert("안전인증번호가 변경되지 않았습니다.");
|
|
|
- return false;
|
|
|
- }
|
|
|
-*/
|
|
|
- mcxDialog.confirm('안전인증번호를 변경 하시겠습니까?', {
|
|
|
+
|
|
|
+ if (!fnGoodsSafetyCertNumCheck()) return false;
|
|
|
+
|
|
|
+ mcxDialog.confirm('안전인증정보(API)를 변경 하시겠습니까?', {
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
|
var data = { goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
+ , certTargetGb : $("#goodsDetailForm input[name=certTargetGb]:checked").val()
|
|
|
+ , certFormGb : $("#goodsDetailForm select[name=certFormGb]").val()
|
|
|
+ , certType : $("#goodsDetailForm select[name=certType]").val()
|
|
|
, certNum : $("#goodsDetailForm input[name=certNum]").val()
|
|
|
};
|
|
|
var jsonData = JSON.stringify(data);
|
|
|
- gagajf.ajaxJsonSubmit('/goods/detail/certNum/save', jsonData ); //, fnGoodsDeailSearch
|
|
|
+ // gagajf.ajaxJsonSubmit('/goods/detail/certNum/save', jsonData ); //, fnGoodsDeailSearch
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ var fnGoodsSafetyCertNumCheck = function(){
|
|
|
+
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm input[name=certTargetGb]").val())){
|
|
|
+ mcxDialog.alert("인증대상을 선택해 주세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 인증대상이 아니면 스킵
|
|
|
+ if ("G083_1" != $("#goodsDetailForm input[name=certTargetGb]").val()){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=certFormGb]").val())){
|
|
|
+ mcxDialog.alertC("인증형태를 선택해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm select[name=certFormGb]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=certType]").val())){
|
|
|
+ mcxDialog.alertC("인증타입를 선택해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm select[name=certType]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //인증타입이 공급자적합성일 경우 인증번호 미입력
|
|
|
+ if( "G081_3" != $("#goodsDetailForm select[name=certType]").val()){
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm input[name=certNum]").val())){
|
|
|
+ mcxDialog.alertC("인증번호를 선택해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=certNum]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
// 상품구매등급
|
|
|
var fnGoodsOrderGrade = function(){
|
|
|
|