|
|
@@ -34,7 +34,7 @@
|
|
|
<input type="hidden" id="uploadGoodsUrl" name="uploadGoodsUrl" th:value="${@environment.getProperty('upload.goods.view')}"/>
|
|
|
<input type="hidden" id="goodsType" name="goodsType" />
|
|
|
<input type="hidden" id="extmallGoodsPriceList" name="extmallGoodsPriceList" />
|
|
|
- <input type="hidden" id="goodsExtendList" name="goodsExtendList" />
|
|
|
+ <input type="hidden" id="GoodsComposeList" name="GoodsComposeList" />
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
<col width="11%"/>
|
|
|
@@ -77,7 +77,7 @@
|
|
|
<li><a href="#goodstab3">상품상세정보</a></li>
|
|
|
<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
|
<li id="goodsCodiTab"><a href="#goodstab5">코디상품</a></li>
|
|
|
- <li id="goodsExtendTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
|
|
|
+ <li id="GoodsComposeTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
|
|
|
<li><a href="#goodstab7">변경이력</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -212,9 +212,9 @@
|
|
|
<td><span id="sellFeeRateTxt"></span> %</td>
|
|
|
<th>자사몰 노출여부<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <label class="rdoBtn"><input type="radio" name="dispYn" id="dispYnY" value="Y" checked/>Y</label>
|
|
|
- <label class="rdoBtn"><input type="radio" name="dispYn" id="dispYnn" value="N"/>N</label>
|
|
|
- <input type="hidden" id="dispYnOrg" name="dispYnOrg"/>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" checked/>Y</label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnn" value="N"/>N</label>
|
|
|
+ <input type="hidden" id="selfMallYnOrg" name="selfMallYnOrg"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
@@ -312,13 +312,6 @@
|
|
|
<td><label class="chkBox"><input type="checkbox" name="chkDescKeep" checked="checked" value="Y">정보유지<span></span></label>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <!-- <tr>
|
|
|
- <th>상세</th>
|
|
|
- <td><div class="tabJrContArea">
|
|
|
- <textarea name="goodsDesc" id="goodsDesc" rows="5" cols="50" style="width:1050px; height: 180px;"></textarea>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr> -->
|
|
|
<tr>
|
|
|
<th>상위(PC)</th>
|
|
|
<td><div class="tabJrContArea">
|
|
|
@@ -410,12 +403,12 @@
|
|
|
<!-- TAB6 CONTENTS AREA -->
|
|
|
<div class="panelStyle">
|
|
|
<!-- 내용 삽입 -->
|
|
|
- <div class="padB20 aR" id="goodsExtendBtnArea">
|
|
|
+ <div class="padB20 aR" id="GoodsComposeBtnArea">
|
|
|
<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF003');">양식다운로드</button>
|
|
|
<button type="button" class="btn btn-success btn-lg" id="btnGoodsDealSearchExcel">엑셀조회</button>
|
|
|
<button type="button" class="btn btn-base btn-lg" onclick="fnOpenGoodsDetailPopup()">상품조회</button>
|
|
|
</div>
|
|
|
- <div id="gridGoodsExtendList" style="height: 550px;" class="ag-theme-balham lh60"></div>
|
|
|
+ <div id="gridGoodsComposeList" style="height: 550px;" class="ag-theme-balham lh60"></div>
|
|
|
<!-- 내용 삽입 -->
|
|
|
</div>
|
|
|
<!-- //TAB6 CONTENTS AREA -->
|
|
|
@@ -508,13 +501,13 @@
|
|
|
}
|
|
|
},
|
|
|
{headerName: "재고연동여부", field: "erpStockLinkYn" , width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "자사몰노출여부", field: "dispYn" , width: 120, cellClass: 'text-center'},
|
|
|
+ {headerName: "자사몰노출여부", field: "selfMallYn" , width: 120, cellClass: 'text-center'},
|
|
|
{headerName: "사용자검색어", field: "goodsSnm1" , width: 150, cellClass: 'text-left'},
|
|
|
{headerName: "검색어", field: "goodsSnm" , width: 450, cellClass: 'text-left', tooltipField: "goodsSnm"}
|
|
|
];
|
|
|
|
|
|
// specify the columns - 구성상품
|
|
|
- var columnGoodsExtendDefs = [
|
|
|
+ var columnGoodsComposeDefs = [
|
|
|
{headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center', rowDrag: true },
|
|
|
{headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
|
|
|
//{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
@@ -550,7 +543,7 @@
|
|
|
{headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
|
|
|
,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
},
|
|
|
- {headerName: "상품판매가", field: "extendCurrPrice" , width: 150, cellClass: 'text-right'
|
|
|
+ {headerName: "상품판매가", field: "compsCurrPrice" , width: 150, cellClass: 'text-right'
|
|
|
,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
},
|
|
|
{headerName: "기준여부(품목-카테고리)", field: "baseYn", width: 180, cellClass: 'text-center'},
|
|
|
@@ -634,22 +627,22 @@
|
|
|
gridGoodsHstoryOptions.enableBrowserTooltips = true;
|
|
|
var gridCodiGoodsOptions = gagaAgGrid.getGridOptions(columnCodiGoodsDefs);
|
|
|
gridCodiGoodsOptions.enableBrowserTooltips = true;
|
|
|
- var gridGoodsExtendOptions = gagaAgGrid.getGridOptions(columnGoodsExtendDefs);
|
|
|
- gridGoodsExtendOptions.enableBrowserTooltips = true;
|
|
|
+ var gridGoodsComposeOptions = gagaAgGrid.getGridOptions(columnGoodsComposeDefs);
|
|
|
+ gridGoodsComposeOptions.enableBrowserTooltips = true;
|
|
|
// 드래그
|
|
|
- gridGoodsExtendOptions.suppressRowClickSelection = true;
|
|
|
- gridGoodsExtendOptions.rowDragManaged = true;
|
|
|
- //gridGoodsExtendOptions.rowDeselection = true;
|
|
|
- //gridGoodsExtendOptions.enableMultiRowDragging = true;
|
|
|
- //gridGoodsExtendOptions.rowSelection = 'multiple';
|
|
|
+ gridGoodsComposeOptions.suppressRowClickSelection = true;
|
|
|
+ gridGoodsComposeOptions.rowDragManaged = true;
|
|
|
+ //gridGoodsComposeOptions.rowDeselection = true;
|
|
|
+ //gridGoodsComposeOptions.enableMultiRowDragging = true;
|
|
|
+ //gridGoodsComposeOptions.rowSelection = 'multiple';
|
|
|
gridCodiGoodsOptions.suppressRowClickSelection = true;
|
|
|
gridCodiGoodsOptions.rowDragManaged = true;
|
|
|
|
|
|
- gridGoodsExtendOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
|
+ gridGoodsComposeOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
|
gridCodiGoodsOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
|
|
|
|
//기준여부 표시
|
|
|
- gridGoodsExtendOptions.getRowStyle = function(params) {
|
|
|
+ gridGoodsComposeOptions.getRowStyle = function(params) {
|
|
|
if ("Y" == params.data.baseYn) {
|
|
|
return { background: '#1ab394' };
|
|
|
}
|
|
|
@@ -741,10 +734,10 @@
|
|
|
}else{
|
|
|
$("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='N']").trigger('click');
|
|
|
}
|
|
|
- if (result.dispYn == "Y"){
|
|
|
- $("#goodsDetailForm input:radio[name=dispYn]:input[value='Y']").trigger('click');
|
|
|
+ if (result.selfMallYn == "Y"){
|
|
|
+ $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='Y']").trigger('click');
|
|
|
}else{
|
|
|
- $("#goodsDetailForm input:radio[name=dispYn]:input[value='N']").trigger('click');
|
|
|
+ $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='N']").trigger('click');
|
|
|
}
|
|
|
$('#goodsDetailForm').find('#sellFeeRateTxt').html(result.sellFeeRate);
|
|
|
|
|
|
@@ -766,7 +759,7 @@
|
|
|
|
|
|
$("#goodsDetailForm input[name=formalGbOrg]").val(result.formalGb);
|
|
|
$("#goodsDetailForm input[name=erpPriceLinkYnOrg]").val(result.erpPriceLinkYn);
|
|
|
- $("#goodsDetailForm input[name=dispYnOrg]").val(result.dispYn);
|
|
|
+ $("#goodsDetailForm input[name=selfMallYnOrg]").val(result.selfMallYn);
|
|
|
$("#goodsDetailForm input[name=prePpntUsableYnOrg]").val(result.prePpntUsableYn);
|
|
|
$("#goodsDetailForm input[name=preMpntUsableYnOrg]").val(result.preMpntUsableYn);
|
|
|
$("#goodsDetailForm input[name=changeableYnOrg]").val(result.changeableYn);
|
|
|
@@ -859,12 +852,12 @@
|
|
|
//세트
|
|
|
if ("G056_S" == result.goodsType){
|
|
|
$('#goodsDetailForm #erplinkarea').addClass('off');
|
|
|
- if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsExtendTab').css('display','block');
|
|
|
+ if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
|
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
}else if ("G056_D" == result.goodsType){
|
|
|
$('#goodsDetailForm #erplinkarea').addClass('off');
|
|
|
$('#goodsDetailForm #erplinkarea').addClass('off');
|
|
|
- if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsExtendTab').css('display','block');
|
|
|
+ if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
|
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
}
|
|
|
|
|
|
@@ -888,7 +881,7 @@
|
|
|
|
|
|
//구성상품
|
|
|
if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
|
- fnGoodsExtendListSearch(params);
|
|
|
+ fnGoodsComposeListSearch(params);
|
|
|
}
|
|
|
//이력
|
|
|
fnGoodsDetailHstSearch();
|
|
|
@@ -907,18 +900,18 @@
|
|
|
}
|
|
|
|
|
|
//구성상품
|
|
|
- var fnGoodsExtendListSearch = function(params) {
|
|
|
+ var fnGoodsComposeListSearch = function(params) {
|
|
|
if ("G056_S" == params.goodsType){ //세트
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsExtendOptions, 'currPrice', false);
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsExtendOptions, 'useYn', false);
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsExtendOptions, 'extendGoodsOptNm', false);
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'currPrice', false);
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'useYn', false);
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'extendGoodsOptNm', false);
|
|
|
|
|
|
- $('#goodsExtendBtnArea').addClass("off");
|
|
|
+ $('#GoodsComposeBtnArea').addClass("off");
|
|
|
}else{ //딜
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsExtendOptions, 'qty', false);
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsExtendOptions, 'extendCurrPrice', false);
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'qty', false);
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'extendcompsCurrPrice', false);
|
|
|
}
|
|
|
- gagaAgGrid.fetch("/goods/detail/extend/list?goodsCd=" + params.goodsCd , gridGoodsExtendOptions);
|
|
|
+ gagaAgGrid.fetch("/goods/detail/compose/list?goodsCd=" + params.goodsCd , gridGoodsComposeOptions);
|
|
|
}
|
|
|
|
|
|
//이력
|
|
|
@@ -983,10 +976,10 @@
|
|
|
var fnCurrPriceCheck = function(){
|
|
|
var dcRate = 0;
|
|
|
|
|
|
- var tagPrice = $("#goodsDetailForm input[name=tagPrice]").val().removeComma();
|
|
|
+ var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
- //dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(tagPrice) * 100)*100)/100);
|
|
|
- dcRate = 100 - (Number((Number(currPrice) / Number(tagPrice)).toFixed(2)) *100)
|
|
|
+ //dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(listPrice) * 100)*100)/100);
|
|
|
+ dcRate = 100 - (Number((Number(currPrice) / Number(listPrice)).toFixed(2)) *100)
|
|
|
|
|
|
$("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
$("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
@@ -997,10 +990,10 @@
|
|
|
/* var fnCurrPriceCheck_org = function(){
|
|
|
var dcRate = 0;
|
|
|
|
|
|
- var tagPrice = $("#goodsDetailForm input[name=tagPrice]").val().removeComma();
|
|
|
+ var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
- //dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(tagPrice) * 100)*100)/100);
|
|
|
- dcRate = 100 - (Number((Number(currPrice) / Number(tagPrice)).toFixed(2)) *100)
|
|
|
+ //dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(listPrice) * 100)*100)/100);
|
|
|
+ dcRate = 100 - (Number((Number(currPrice) / Number(listPrice)).toFixed(2)) *100)
|
|
|
|
|
|
if (dcRate < 0){
|
|
|
mcxDialog.alert('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', function(){
|
|
|
@@ -1105,8 +1098,8 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- //teg가 등록되지 않은 상품은 상태변경 불가
|
|
|
- if(Number($("#goodsDetailForm input[name=tagPrice]").val()) == 0){
|
|
|
+ //list가 등록되지 않은 상품은 상태변경 불가
|
|
|
+ if(Number($("#goodsDetailForm input[name=listPrice]").val()) == 0){
|
|
|
mcxDialog.alertC("TAG가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
@@ -1150,7 +1143,7 @@
|
|
|
}
|
|
|
|
|
|
//고시정보가 등록되지 않은 상품은 상태변경 불가 - 일반상품만 체크
|
|
|
- if ("N" == $("#goodsDetailForm input[name=goodsType]").val()){
|
|
|
+ if ("G056_N" == $("#goodsDetailForm input[name=goodsType]").val()){
|
|
|
if($("#goodsDetailForm #notiArea").find("#infoContents tr").length == 0){
|
|
|
mcxDialog.alertC("고시정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
sureBtnText: "확인",
|
|
|
@@ -1245,6 +1238,17 @@
|
|
|
});
|
|
|
} */
|
|
|
|
|
|
+ //정상가와 판매가 비교
|
|
|
+ if(Number($("#goodsDetailForm input[name=listPrice]").val().removeComma()) < Number($("#goodsDetailForm input[name=currPrice]").val().removeComma())) {
|
|
|
+ mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
// 포인트
|
|
|
if ( gagajf.isNull($("#goodsDetailForm input[name=pntPrate]").val())) {
|
|
|
mcxDialog.alertC("PC 포인트를 입력해 주세요.", {
|
|
|
@@ -1302,6 +1306,24 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
+ if ( gagajf.isNull($("#goodsDetailForm input[name=dayMaxOrdQty]").val())) {
|
|
|
+ mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val()) <= 0) {
|
|
|
+ mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
if(Number($("#goodsDetailForm input[name=minOrdQty]").val()) > Number($("#goodsDetailForm input[name=maxOrdQty]").val())){
|
|
|
mcxDialog.alertC("최소주문수량은 최대주문수량보다 클 수 없습니다.", {
|
|
|
@@ -1312,6 +1334,16 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ if(Number($("#goodsDetailForm input[name=maxOrdQty]").val()) > Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val())){
|
|
|
+ mcxDialog.alertC("최대주문수량이 ID당1일최대구매수량보다 클 수 없습니다.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=maxOrdQty]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
// 무료배송비
|
|
|
if ( gagajf.isNull($("#goodsDetailForm input[name=minOrdAmt]").val())) {
|
|
|
@@ -1341,29 +1373,21 @@
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('N');
|
|
|
|
|
|
$("#optionList tr").each(function() {
|
|
|
- var sizeNm = $(this).find("input[name=sizeNm]").val();
|
|
|
- var hidSizeNm = $(this).find("input[name=hidSizeNm]").val();
|
|
|
- var baseOnStockQty = $(this).find("input[name=baseOnStockQty]").val();
|
|
|
- var hidBaseOnStockQty = $(this).find("input[name=hidBaseOnStockQty]").val();
|
|
|
- var baseOffStockQty = $(this).find("input[name=baseOffStockQty]").val();
|
|
|
- var hidBaseOffStockQty = $(this).find("input[name=hidBaseOfftockQty]").val();
|
|
|
- var baseShopStockQty = $(this).find("input[name=baseShopStockQty]").val();
|
|
|
- var hidBaseShopStockQty = $(this).find("input[name=hidBaseShopStockQty]").val();
|
|
|
- var basePcStockQty = $(this).find("input[name=basePcStockQty]").val();
|
|
|
- var hidBasePcStockQty = $(this).find("input[name=hidBasePcStockQty]").val();
|
|
|
- var baseMoStockQty = $(this).find("input[name=baseMoStockQty]").val();
|
|
|
- var hidBaseMoStockQty = $(this).find("input[name=hidBaseMotockQty]").val();
|
|
|
- var baseAppStockQty = $(this).find("input[name=baseAppStockQty]").val();
|
|
|
- var hidBaseAppStockQty = $(this).find("input[name=hidBaseAppStockQty]").val();
|
|
|
+ var optNm1 = $(this).find("input[name=optNm1]").val();
|
|
|
+ var optNm2 = $(this).find("input[name=optNm2]").val();
|
|
|
+ var hidOptNm1 = $(this).find("input[name=hidOptNm1]").val();
|
|
|
+ var hidOptNm2 = $(this).find("input[name=hidOptNm2]").val();
|
|
|
+ var baseStockQty = $(this).find("input[name=baseStockQty]").val();
|
|
|
+ var hidBaseStockQty = $(this).find("input[name=hidBaseStockQty]").val();
|
|
|
var dispOrd = $(this).find("input[name=dispOrd]").val();
|
|
|
var hidDispOrd = $(this).find("input[name=hidDispOrd]").val();
|
|
|
+ var dispYn = $(this).find("select[name=dispYn]").val();
|
|
|
+ var hidDispYn = $(this).find("input[name=hidDispYn]").val();
|
|
|
var soldoutYn = $(this).find("select[name=soldoutYn]").val();
|
|
|
var hidSoldoutYn = $(this).find("input[name=hidSoldoutYn]").val();
|
|
|
- var hidSoldoutDt = $(this).find("input[name=hidSoldoutDt]").val();
|
|
|
- var hidSoldoutDt3day = $(this).find("input[name=hidSoldoutDt3day]").val();
|
|
|
|
|
|
- var editCurrOnStockQty = $(this).find("input[name=editCurrOnStockQty]").val(); // 입점 확인용
|
|
|
- var currOnStockQty = $(this).find("input[name=currOnStockQty]").val(); // 입점 확인용 (hidden)
|
|
|
+ var editCurrStockQty = $(this).find("input[name=editCurrStockQty]").val(); // 입점 확인용
|
|
|
+ var currStockQty = $(this).find("input[name=currStockQty]").val(); // 입점 확인용 (hidden)
|
|
|
|
|
|
if(gagajf.isNull(dispOrd)){
|
|
|
optCheck = true;
|
|
|
@@ -1393,141 +1417,57 @@
|
|
|
// 입점만 체크
|
|
|
if ("N" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
|
|
|
|
|
|
- if(gagajf.isNull(editCurrOnStockQty)){
|
|
|
+ if(gagajf.isNull(editCurrStockQty)){
|
|
|
optCheck = true;
|
|
|
- mcxDialog.alertC("온라인 재고를 입력해주세요", {
|
|
|
+ mcxDialog.alertC("가용재고를 입력해주세요", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("input[name=editCurrOnStockQty]").eq(idx).focus();
|
|
|
+ $("#optionList tr").find("input[name=editCurrStockQty]").eq(idx).focus();
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(gagajf.isNull(baseOnStockQty)){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("온라인 안전재고를 입력해주세요", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("input[name=baseOnStockQty]").eq(idx).focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if(gagajf.isNull(baseOffStockQty)){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("오프라인 안전재고를 입력해주세요", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("input[name=baseOffStockQty]").eq(idx).focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if(gagajf.isNull(baseShopStockQty)){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("직송 안전재고를 입력해주세요", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("input[name=baseShopStockQty]").eq(idx).focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if(gagajf.isNull(basePcStockQty)){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("PC 안전재고를 입력해주세요", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("input[name=basePcStockQty]").eq(idx).focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if(gagajf.isNull(baseMoStockQty)){
|
|
|
+ if(gagajf.isNull(baseStockQty)){
|
|
|
optCheck = true;
|
|
|
- mcxDialog.alertC("모바일 안전재고를 입력해주세요", {
|
|
|
+ mcxDialog.alertC("안전재고를 입력해주세요", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("input[name=baseMoStockQty]").eq(idx).focus();
|
|
|
+ $("#optionList tr").find("input[name=baseStockQty]").eq(idx).focus();
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- if(gagajf.isNull(baseAppStockQty)){
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("APP 안전재고를 입력해주세요", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("input[name=baseAppStockQty]").eq(idx).focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- // 품절로 인한 soldout은 3일(당일 포함)동안 품절 풀 수 없음
|
|
|
- if (soldoutYn != hidSoldoutYn && hidSoldoutYn == "Y" && !gagajf.isNull(hidSoldoutDt)){
|
|
|
- var date = new Date();
|
|
|
- var after3Day = date.before(0, 0, 3).format("YYYYMMDD");
|
|
|
- if (hidSoldoutDt > after3Day) {
|
|
|
- optCheck = true;
|
|
|
- mcxDialog.alertC("주문품절로 인한 품절건은 "+hidSoldoutDt3day+" 에 수정할 수 있습니다.", {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $("#optionList tr").find("select[name=soldoutYn]").eq(idx).focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (sizeNm != hidSizeNm){
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
- }
|
|
|
-
|
|
|
- if (editCurrOnStockQty != currOnStockQty){
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
- }
|
|
|
-
|
|
|
- if (baseOnStockQty != hidBaseOnStockQty){
|
|
|
+ if (optNm1 != hidOptNm1){
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
}
|
|
|
|
|
|
- if (baseOffStockQty != hidBaseOffStockQty){
|
|
|
+ if (optNm2 != hidOptNm2){
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
}
|
|
|
|
|
|
- if (baseShopStockQty != hidBaseShopStockQty){
|
|
|
+ if (editCurrStockQty != currStockQty){
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
}
|
|
|
|
|
|
- if (basePcStockQty != hidBasePcStockQty){
|
|
|
+ if (baseStockQty != hidBaseStockQty){
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
}
|
|
|
|
|
|
- if (baseMoStockQty != hidBaseMoStockQty){
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
- }
|
|
|
-
|
|
|
- if (baseAppStockQty != hidBaseAppStockQty){
|
|
|
+ if (dispOrd != hidDispOrd){
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
}
|
|
|
|
|
|
- if (dispOrd != hidDispOrd){
|
|
|
+ if (dispYn != hidDispYn){
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (soldoutYn != hidSoldoutYn){
|
|
|
$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
}
|
|
|
|
|
|
- //$(this).find("input[name=currStockQty]").val(editCurrStockQty); //DB 저장을 위해
|
|
|
idx++;
|
|
|
});
|
|
|
|
|
|
@@ -1536,11 +1476,9 @@
|
|
|
}
|
|
|
|
|
|
var dcRate = 0;
|
|
|
- var tagPrice = $("#goodsDetailForm input[name=tagPrice]").val().removeComma();
|
|
|
+ var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
- dcRate = 100 - Math.floor(Number(currPrice) / Number(tagPrice) * 100); //절사
|
|
|
- //dcRate = 100 - Math.floor(Number((Number(currPrice) / Number(tagPrice)).toFixed(2)) *100);
|
|
|
-
|
|
|
+ dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
|
|
|
|
|
|
if (dcRate < 0){
|
|
|
mcxDialog.alertC('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', {
|
|
|
@@ -1551,11 +1489,15 @@
|
|
|
});
|
|
|
return false;
|
|
|
}else if (dcRate >= 90){
|
|
|
- gagaAlert.confirm("할인율이 90%이상입니다. 계속하시겠습니까?", function(){
|
|
|
- fnNoticheck();
|
|
|
- },
|
|
|
- function(){
|
|
|
- optCheck = true;
|
|
|
+ mcxDialog.confirmC("할인율이 90%이상입니다. 계속하시겠습니까?", {
|
|
|
+ btn: ["아니요","예"],
|
|
|
+ btnClick: function(index){
|
|
|
+ if (index == 1){
|
|
|
+ optCheck = true;
|
|
|
+ } else {
|
|
|
+ fnNoticheck();
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
@@ -1567,16 +1509,20 @@
|
|
|
|
|
|
if (optCheck) return false;
|
|
|
|
|
|
- if (!fnExtendGoodsCheck()) return false;
|
|
|
+ if (!fnGoodsComposeCheck()) return false;
|
|
|
|
|
|
//fnNoticheck();
|
|
|
|
|
|
if($("#goodsDetailForm input:checkbox[name=chkDescKeep]").is(':checked')){
|
|
|
- gagaAlert.confirm("'정보유지' 체크박스가 선택되어 있어 '상품상세설명' 항목이 저장되지 않습니다. 저장을 원하시면 체크를 해제하세요. 계속하시겠습니까?", function(){
|
|
|
- fnGoodsSave();
|
|
|
- },
|
|
|
- function(){
|
|
|
- optCheck = true;
|
|
|
+ mcxDialog.confirmC("'정보유지' 체크박스가 선택되어 있어 '상품상세설명' 항목이 저장되지 않습니다.<br/>저장을 원하시면 체크를 해제하세요. 계속하시겠습니까?", {
|
|
|
+ btn: ["아니요","예"],
|
|
|
+ btnClick: function(index){
|
|
|
+ if (index == 1){
|
|
|
+ optCheck = true;
|
|
|
+ } else {
|
|
|
+ fnGoodsSave();
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
}else{
|
|
|
fnGoodsSave();
|
|
|
@@ -1587,13 +1533,13 @@
|
|
|
|
|
|
});
|
|
|
|
|
|
- //고시정보 관련 체크
|
|
|
- var fnExtendGoodsCheck = function(){
|
|
|
+ // 구성 정보 관련 체크
|
|
|
+ var fnGoodsComposeCheck = function(){
|
|
|
if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_N"){
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- var allData = gagaAgGrid.getAllRowData(gridGoodsExtendOptions);
|
|
|
+ var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
var comSupplyCompCd = '';
|
|
|
var comSelfGoodsYn = '';
|
|
|
//기준여부 Y 존재하는지 확인
|
|
|
@@ -1611,20 +1557,20 @@
|
|
|
|
|
|
if (comSelfGoodsYn != item.selfGoodsYn){
|
|
|
optCheck = true;
|
|
|
- mcxDialog.alertC("구상상품중 자사/입점상품 구분값이 다릅니다.\n확인해 주세요", {
|
|
|
+ mcxDialog.alertC("구상상품중 자사/입점상품 구분값이 다릅니다.<br/>확인해 주세요", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- gridGoodsExtendOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
+ gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
}else{
|
|
|
if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
|
|
|
optCheck = true;
|
|
|
- mcxDialog.alertC("구상상품중 입점은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
|
|
|
+ mcxDialog.alertC("구상상품중 입점은 같은 업체 상품만 가능합니다.<br/>확인해 주세요", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- gridGoodsExtendOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
+ gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
@@ -1670,8 +1616,8 @@
|
|
|
$('#goodsDetailForm input[name=extmallGoodsPriceList]').val(jsonDataPrice); */
|
|
|
|
|
|
//구성상품
|
|
|
- var allData = gagaAgGrid.getAllRowData(gridGoodsExtendOptions);
|
|
|
- //var allData = gagaAgGrid.getChangedData(gridGoodsExtendOptions);
|
|
|
+ var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
+ //var allData = gagaAgGrid.getChangedData(gridGoodsComposeOptions);
|
|
|
/* var changedData = [];
|
|
|
|
|
|
$.each(allData, function(idx, item) {
|
|
|
@@ -1680,14 +1626,13 @@
|
|
|
}); */
|
|
|
|
|
|
var jsonData = JSON.stringify(allData);
|
|
|
- $('#goodsDetailForm input[name=goodsExtendList]').val(jsonData);
|
|
|
-
|
|
|
+ $('#goodsDetailForm input[name=GoodsComposeList]').val(jsonData);
|
|
|
|
|
|
$('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
$('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
$('#goodsDetailForm input[name=goodsSnm1]').val($('#goodsDetailForm input[name=goodsSnm1]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
|
|
|
- gagajf.ajaxFormSubmit("/goods/detail/save", "#goodsDetailForm", fnGoodsSaveCallBack); //fnGoodsDeailSearch fnGoodsDeailNotiSave
|
|
|
+ gagajf.ajaxFormSubmit("/goods/detail/save", "#goodsDetailForm", fnGoodsSaveCallBack);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -1753,12 +1698,13 @@
|
|
|
return true;
|
|
|
}
|
|
|
//상품정상이월구분
|
|
|
- if ($("#goodsDetailForm input[name=goodsType]").val() != 'N' || $("#goodsDetailForm input[name=selfGoodsYn]").val() == 'N'){
|
|
|
- if ($("#goodsDetailForm input[name=formalGbOrg]").val() != $("input:radio[name=formalGb]:checked").val()){
|
|
|
- return true;
|
|
|
- }
|
|
|
+ if ($("#goodsDetailForm input[name=formalGbOrg]").val() != $("input:radio[name=formalGb]:checked").val()){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ //상품구분
|
|
|
+ if ($("#goodsDetailForm input[name=goodsGbOrg]").val() != $("input:radio[name=goodsGb]:checked").val()){
|
|
|
+ return true;
|
|
|
}
|
|
|
-
|
|
|
//상품상태
|
|
|
if ($("#goodsDetailForm input[name=goodsStatOrg]").val() != $("#goodsDetailForm select[name=goodsStat]").val()){
|
|
|
return true;
|
|
|
@@ -1782,13 +1728,9 @@
|
|
|
if ($("#goodsDetailForm input[name=erpStockLinkYnOrg]").val() != $("input[name=erpStockLinkYn]:checked").val()){
|
|
|
return true;
|
|
|
}
|
|
|
- //ERP가격연동여부
|
|
|
- if ($("#goodsDetailForm input[name=erpPriceLinkYnOrg]").val() != $("input[name=erpPriceLinkYn]:checked").val()){
|
|
|
- return true;
|
|
|
- }
|
|
|
}
|
|
|
//자사몰 노출여부
|
|
|
- if ($("#goodsDetailForm input[name=dispYnOrg]").val() != $("input[name=dispYn]:checked").val()){
|
|
|
+ if ($("#goodsDetailForm input[name=selfMallYnOrg]").val() != $("input[name=selfMallYn]:checked").val()){
|
|
|
return true;
|
|
|
}
|
|
|
//PC포인트
|
|
|
@@ -1815,6 +1757,10 @@
|
|
|
if ($("#goodsDetailForm input[name=maxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=maxOrdQty]").val()){
|
|
|
return true;
|
|
|
}
|
|
|
+ //ID당1일최대구매수량
|
|
|
+ if ($("#goodsDetailForm input[name=dayMaxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=dayMaxOrdQty]").val()){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
//무료배송기준
|
|
|
if ($("#goodsDetailForm input[name=minOrdAmtOrg]").val() != $("#goodsDetailForm input[name=minOrdAmt]").val().removeComma()){
|
|
|
return true;
|
|
|
@@ -1887,14 +1833,14 @@
|
|
|
if (goodsData.length < 1) return;
|
|
|
|
|
|
// 기존상품
|
|
|
- var oldGoodsDealList = gagaAgGrid.getAllRowData(gridGoodsExtendOptions);
|
|
|
+ var oldGoodsDealList = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
var idx = oldGoodsDealList.length+1;
|
|
|
|
|
|
var isExist = false;
|
|
|
goodsData.forEach(function(goods){
|
|
|
isExist = false;
|
|
|
|
|
|
- gridGoodsExtendOptions.api.forEachNode(function(rowNode, index) {
|
|
|
+ gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
|
if (goods.goodsCd == rowNode.data.extendGoodsCd){
|
|
|
isExist = true;
|
|
|
@@ -1912,7 +1858,7 @@
|
|
|
, goodsType: $('#goodsDetailForm input[name=goodsType]').val()
|
|
|
, dispOrd: idx
|
|
|
, qty: 1
|
|
|
- , extendCurrPrice: goods.currPrice
|
|
|
+ , compsCurrPrice: goods.currPrice
|
|
|
, extendStaffCurrPrice: goods.currPrice
|
|
|
, baseYn: 'N'
|
|
|
, goodsStat : goods.goodsStat
|
|
|
@@ -1925,13 +1871,13 @@
|
|
|
, imgPath1 : goods.imgPath1
|
|
|
, imgPath6 : goods.imgPath6
|
|
|
};
|
|
|
- gridGoodsExtendOptions.api.updateRowData({add: [data], addIndex: idx});
|
|
|
+ gridGoodsComposeOptions.api.updateRowData({add: [data], addIndex: idx});
|
|
|
|
|
|
idx++;
|
|
|
|
|
|
}
|
|
|
});
|
|
|
- gridGoodsExtendOptions.api.refreshCells();
|
|
|
+ gridGoodsComposeOptions.api.refreshCells();
|
|
|
}
|
|
|
|
|
|
// 코디상품 조회 팝업
|
|
|
@@ -1984,7 +1930,7 @@
|
|
|
|
|
|
}
|
|
|
});
|
|
|
- gridGoodsExtendOptions.api.refreshCells();
|
|
|
+ gridGoodsComposeOptions.api.refreshCells();
|
|
|
}
|
|
|
|
|
|
//엑셀 상품 조회
|
|
|
@@ -2022,7 +1968,7 @@
|
|
|
|
|
|
gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
|
|
|
gagaAgGrid.createGrid('gridGoodsCodiList', gridCodiGoodsOptions);
|
|
|
- gagaAgGrid.createGrid('gridGoodsExtendList', gridGoodsExtendOptions);
|
|
|
+ gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);
|
|
|
|
|
|
fnGoodsDeailSearch();
|
|
|
|