|
@@ -79,7 +79,8 @@
|
|
|
<li><a href="#goodstab3">상품상세정보</a></li>
|
|
<li><a href="#goodstab3">상품상세정보</a></li>
|
|
|
<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
|
<li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
|
|
<li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
|
|
|
- <li><a href="#goodstab6">변경이력</a></li>
|
|
|
|
|
|
|
+ <li id="goodsSafeTab"><a href="#goodstab6">안전인증</a></li>
|
|
|
|
|
+ <li><a href="#goodstab7">변경이력</a></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- //TABS NAVI -->
|
|
<!-- //TABS NAVI -->
|
|
@@ -554,9 +555,74 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- //TAB6 CONTENTS AREA -->
|
|
<!-- //TAB6 CONTENTS AREA -->
|
|
|
</li>
|
|
</li>
|
|
|
- <!-- //TAB7 : 추가정보 -->
|
|
|
|
|
- <!-- TAB5 : 이력정보 -->
|
|
|
|
|
|
|
+ <!-- //TAB5 : 구성정보 -->
|
|
|
|
|
+ <!-- TAB6 : 안전인증 -->
|
|
|
<li class="tab" id="goodstab6">
|
|
<li class="tab" id="goodstab6">
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col width="22%"/>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col width="22%"/>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>인증대상</th>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <input type="text" class="w200" id="certNum" name="certNum" maxlength="20"/>
|
|
|
|
|
+ <input type="hidden" id="certNumOrg" name="certNumOrg"/>
|
|
|
|
|
+
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>인증상태</th>
|
|
|
|
|
+ <td><span id="certStateTxt"></span></td>
|
|
|
|
|
+ <th>인증기관</th>
|
|
|
|
|
+ <td><span id="certOrganNameTxt"></span></td>
|
|
|
|
|
+ <th>인증일</th>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- TAB7 : 이력정보 -->
|
|
|
|
|
+ <li class="tab" id="goodstab7">
|
|
|
<!-- TAB8 CONTENTS AREA -->
|
|
<!-- TAB8 CONTENTS AREA -->
|
|
|
<div class="panelStyle">
|
|
<div class="panelStyle">
|
|
|
<!-- 내용 삽입 -->
|
|
<!-- 내용 삽입 -->
|
|
@@ -901,11 +967,13 @@
|
|
|
if ("G056_S" == result.goodsType){
|
|
if ("G056_S" == result.goodsType){
|
|
|
if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
|
|
+ $('#goodsDetailForm #goodsSafeTab').css('display','none');
|
|
|
$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
$('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
|
|
$('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
|
|
|
}else if ("G056_D" == result.goodsType){
|
|
}else if ("G056_D" == result.goodsType){
|
|
|
if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
|
|
+ $('#goodsDetailForm #goodsSafeTab').css('display','none');
|
|
|
$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -925,8 +993,9 @@
|
|
|
//정보고시
|
|
//정보고시
|
|
|
fnGoodsDetailNotiInfoSearch(params);
|
|
fnGoodsDetailNotiInfoSearch(params);
|
|
|
//구매등급
|
|
//구매등급
|
|
|
- fnGoodsDetailOrderGradeSearch(params);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // fnGoodsDetailOrderGradeSearch(params);
|
|
|
|
|
+ //안전인증
|
|
|
|
|
+ fnGoodsDetailSafeNoSearch();
|
|
|
//구성상품
|
|
//구성상품
|
|
|
if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
|
fnGoodsComposeListSearch(params);
|
|
fnGoodsComposeListSearch(params);
|
|
@@ -955,6 +1024,12 @@
|
|
|
var fnGoodsDetailHstSearch = function() {
|
|
var fnGoodsDetailHstSearch = function() {
|
|
|
gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions);
|
|
gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions);
|
|
|
}
|
|
}
|
|
|
|
|
+ //안전인증
|
|
|
|
|
+ var fnGoodsDetailSafeNoSearch = function() {
|
|
|
|
|
+ var params = new Object();
|
|
|
|
|
+ params.goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
+ cfnAjaxSubmit("/goods/detail/safe", "json", fnGoodsDetailSafeNoSearchCallback, params);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
//정보고시 콜백
|
|
//정보고시 콜백
|
|
|
var fnGoodsDetailNotiInfoSearchCallback = function(result) {
|
|
var fnGoodsDetailNotiInfoSearchCallback = function(result) {
|
|
@@ -982,6 +1057,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") : '');
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//구매등급 콜백
|
|
//구매등급 콜백
|
|
|
/* var fnGoodsDetailOrderGradeSearchCallback = function(result) {
|
|
/* var fnGoodsDetailOrderGradeSearchCallback = function(result) {
|
|
|
if (result == null) return;
|
|
if (result == null) return;
|
|
@@ -1931,28 +2033,75 @@
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-
|
|
|
|
|
// 안전인증
|
|
// 안전인증
|
|
|
$("#btnGoodsSafetyCertNum").on("click", function(){
|
|
$("#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: "취소",
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
sureBtnClick: function(){
|
|
|
var data = { goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
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()
|
|
, certNum : $("#goodsDetailForm input[name=certNum]").val()
|
|
|
};
|
|
};
|
|
|
var jsonData = JSON.stringify(data);
|
|
var jsonData = JSON.stringify(data);
|
|
|
- gagajf.ajaxJsonSubmit('/goods/detail/certNum/save', jsonData ); //, fnGoodsDeailSearch
|
|
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/detail/certNum/save', jsonData, fnGoodsDetailSafeNoSearch);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ var fnGoodsSafetyCertNumCheck = function(){
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm input[name=certTargetGb]:checked").val())){
|
|
|
|
|
+ mcxDialog.alert("인증대상을 선택해 주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 인증대상이 아니면 스킵
|
|
|
|
|
+ if ("G083_1" != $("#goodsDetailForm input[name=selCertTargetGb]:checked").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;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//엑셀 상품 조회
|
|
//엑셀 상품 조회
|
|
|
$('#btnGoodsDealSearchExcel').on('click', function() {
|
|
$('#btnGoodsDealSearchExcel').on('click', function() {
|
|
|
cfnExcelUploadPopup('goodsDetailExcelUpload', 'goodsDetailExcelUpload');
|
|
cfnExcelUploadPopup('goodsDetailExcelUpload', 'goodsDetailExcelUpload');
|