|
|
@@ -29,6 +29,7 @@
|
|
|
<div class="tabsNav">
|
|
|
<li class="on"><a href="#coupontab1">기본정보</a></li>
|
|
|
<li><a href="#coupontab2">적용대상</a></li>
|
|
|
+ <li><a href="#coupontab3">입점업체분담율</a></li>
|
|
|
</div>
|
|
|
<ul class="tabsCont">
|
|
|
<li class="tab on" id="coupontab1">
|
|
|
@@ -183,8 +184,8 @@
|
|
|
<th class="downAblArea">다운로드가능여부<em class="required" title="필수"></em></th>
|
|
|
<td class="downAblArea">
|
|
|
<select name="downAblYn" id="downAblYn" required="required" data-valid-name="다운로드가능여부">
|
|
|
- <option value="Y">Y</option>
|
|
|
- <option value="N" selected="selected">N</option>
|
|
|
+ <option value="Y" selected="selected">Y</option>
|
|
|
+<!-- <option value="N" >N</option>-->
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@@ -298,6 +299,36 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
|
+ <li class="tab" id="coupontab3">
|
|
|
+ <div class="panelStyle">
|
|
|
+ <div class="inner-panelContent">
|
|
|
+ <div class="panelContent">
|
|
|
+ <div class="panelBar">
|
|
|
+ <h4>업체 분담율</h4>
|
|
|
+ </div>
|
|
|
+ <table class="frmStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:15%;">
|
|
|
+ <col style="width:85%;">
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>업체 분담율</th>
|
|
|
+ <td>
|
|
|
+ <div class="padding10 inner-tb-solid">
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnAddApplyBurden">업체추가</button>
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnDelApplyBurden">선택삭제</button>
|
|
|
+ <br/>
|
|
|
+ <div id="inComGridList" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="mdPopBtnB aR">
|
|
|
@@ -320,13 +351,173 @@
|
|
|
var cpnDtlRefvalCateList = [[${cpnDtlRefvalCateList}]];
|
|
|
var cpnDtlRefvalBrandList = [[${cpnDtlRefvalBrandList}]];
|
|
|
var cpnDtlRefvalExceptGoodsList = [[${cpnDtlRefvalExceptGoodsList}]];
|
|
|
+ var cpnDtlBurdenList = [[${cpnDtlBurdenList}]];
|
|
|
|
|
|
var issueCnt = [[${issueCnt}]];
|
|
|
|
|
|
// 공통코드 리스트
|
|
|
- //var cateGbList = gagajf.convertToArray([[${cateGbList}]]);
|
|
|
+ var ibSupplyComList = gagajf.convertToArray([[${ibSupplyCompList}]]);
|
|
|
+ var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
|
|
|
+ var cateGbList = gagajf.convertToArray([[${cateGbList}]]);
|
|
|
var delYnList = { "Y":"Yes", "N":"No" };
|
|
|
- //var selfBrandList = gagajf.convertToArray([[${selfBrandList}]]);
|
|
|
+ var selfBrandList = gagajf.convertToArray([[${selfBrandList}]]);
|
|
|
+ var siteCdList = gagajf.convertToArray([[${siteCdList}]]);
|
|
|
+
|
|
|
+ // ag-grid 입점업체분담율 컬럼
|
|
|
+ var columnDefs = [
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
+ { headerName: "입점업체코드" , field:"supplyCompCd" , width:150, cellClass:"text-center"} ,
|
|
|
+ { headerName: "입점업체명" , field: "supplyCompNm" , width: 120 , cellClass: 'text-center'},
|
|
|
+ { headerName: "쿠폰분담율(%)", field:"burdenRate" , width:150, cellClass: "text-center" , required: true
|
|
|
+ ,valueFormatter: function(params) {
|
|
|
+ if(params.value && params.value > 0) {
|
|
|
+ if(params.value > 100){
|
|
|
+ mcxDialog.alert('할인율은 100이하로 설정해주세요.');
|
|
|
+ params.data.burdenRate = '0';
|
|
|
+ return '0';
|
|
|
+ }
|
|
|
+ return params.value.addComma();
|
|
|
+ } else {
|
|
|
+ return '0';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cellEditorParams: { maxlength: 4, validType: 'numeric'}
|
|
|
+ } ,
|
|
|
+ { headerName: "쿠폰번호" , field: "cpnId" , width: 120 , cellClass: 'text-center' , hide:true},
|
|
|
+ { headerName: "삭제여부" , field: "delYn" , width: 120 , cellClass: 'text-center' , hide:true}
|
|
|
+ ];
|
|
|
+
|
|
|
+ // ag-grid 공급처 컬럼
|
|
|
+ var supplyColumnDefs = [
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
+ { headerName : "공급업체코드" , field: "supplyCompCd" , width:150, cellClass: 'text-center'} ,
|
|
|
+ { headerName: "공급업체명" , field: "supplyCompNm" , width:150, cellClass: 'text-center'},
|
|
|
+ { headerName: "쿠폰대상일련번호" , field: "cpnRefvalSq" , width: 120 , cellClass: 'text-center' , hide:true},
|
|
|
+ { headerName: "삭제여부" , field: "delYn" , width: 120 , cellClass: 'text-center' , hide:true}
|
|
|
+ ];
|
|
|
+
|
|
|
+ // ag-grid 브랜드 컬럼
|
|
|
+ var brandSelColumnDefs = [
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
+ { headerName : "브랜드ID" , field: "brandCd" , width: 120, cellClass : 'text-center'} ,
|
|
|
+ { headerName : "브랜드명" , field: "brandEnm" , width: 120, cellClass: 'text-center'} ,
|
|
|
+ //{ headerName : "공급업체명", field: "supplyCompNm" , width: 150, cellClass: 'text-center' } ,
|
|
|
+ { headerName: "쿠폰대상일련번호" , field: "cpnRefvalSq" , width: 120 , cellClass: 'text-center' , hide:true},
|
|
|
+ { headerName: "삭제여부" , field: "delYn" , width: 120 , cellClass: 'text-center' , hide:true}
|
|
|
+ ];
|
|
|
+
|
|
|
+ // ag-grid 적용상품 컬럼
|
|
|
+ var goodsSelColumnDefs = [
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
+ { headerName: "상품구분" , field: "goodsGb" , width: 100, cellClass: 'text-center'} ,
|
|
|
+ { headerName: "Product ID" , field: "goodsCd" , width: 120, cellClass: 'text-center'},
|
|
|
+ { headerName: "상품명" , field: "goodsNm" , width: 250 , cellClass: 'text-center'} ,
|
|
|
+ { headerName: "쿠폰대상일련번호" , field: "cpnRefvalSq" , width: 120 , cellClass: 'text-center' , hide:true},
|
|
|
+ { headerName: "삭제여부" , field: "delYn" , width: 120 , cellClass: 'text-center' , hide:true}
|
|
|
+ ];
|
|
|
+
|
|
|
+ // ag-grid 카테고리 컬럼
|
|
|
+ var cateSelColumnDefs = [
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
+ { headerName: "사이트" , field: "siteCd" , width: 100 , cellClass: 'text-center' ,
|
|
|
+ cellEditor: 'agRichSelectCellEditor',
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(siteCdList) },
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(siteCdList, params.value); },
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(siteCdList, params.newValue); }
|
|
|
+ },
|
|
|
+ { headerName: "카테고리구분" , field: "cateGb" , width: 100 , cellClass: 'text-center' ,
|
|
|
+ cellEditor: 'agRichSelectCellEditor',
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(cateGbList) },
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(cateGbList, params.value); },
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(cateGbList, params.newValue); }
|
|
|
+ },
|
|
|
+ { headerName: "카테고리코드" , field: "cateNo" , width: 100 , cellClass: 'text-center'} ,
|
|
|
+ { headerName: "카테고리명" , field: "cateNm" , width: 120 , cellClass: 'text-center'},
|
|
|
+ { headerName: "이월/정상구분" , field: "formalGb" , width: 120 , cellClass: 'text-center',
|
|
|
+ cellEditor: 'agRichSelectCellEditor',
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
|
|
|
+ },
|
|
|
+ { headerName: "브랜드명" , field:"brandCd" , width:150, cellClass: "text-center", required: true ,
|
|
|
+ editable: true, cellEditor: 'agRichSelectCellEditor',
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(selfBrandList) },
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(selfBrandList, params.value); },
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(selfBrandList, params.newValue); }
|
|
|
+ },
|
|
|
+ { headerName: "쿠폰대상일련번호" , field: "cpnRefvalSq" , width: 120 , cellClass: 'text-center' , hide:true},
|
|
|
+ { headerName: "삭제여부" , field: "delYn" , width: 120 , cellClass: 'text-center' , hide:true}
|
|
|
+ ];
|
|
|
+
|
|
|
+ // ag-grid 제외상품 컬럼
|
|
|
+ var excepGoodsColumnDefs = [
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
+ { headerName: "상품구분" , field: "goodsGb" , width: 100, cellClass: 'text-center'} ,
|
|
|
+ { headerName: "Product ID" , field: "goodsCd" , width: 120, cellClass: 'text-center'},
|
|
|
+ { headerName: "상품명" , field: "goodsNm" , width: 250 , cellClass: 'text-center'} ,
|
|
|
+ { headerName: "쿠폰대상일련번호" , field: "cpnRefvalSq" , width: 120 , cellClass: 'text-center' , hide:true},
|
|
|
+ { headerName: "삭제여부" , field: "delYn" , width: 120 , cellClass: 'text-center' , hide:true}
|
|
|
+ ];
|
|
|
+
|
|
|
+ var inComGridOptions = gagaAgGrid.getGridOptions(columnDefs);
|
|
|
+ var cateGridOptions = gagaAgGrid.getGridOptions(cateSelColumnDefs);
|
|
|
+ var goodsGridOptions = gagaAgGrid.getGridOptions(goodsSelColumnDefs);
|
|
|
+ var brandGridOptions = gagaAgGrid.getGridOptions(brandSelColumnDefs);
|
|
|
+ var supplyGridOptions = gagaAgGrid.getGridOptions(supplyColumnDefs);
|
|
|
+ var excepGoodsGridOptions = gagaAgGrid.getGridOptions(excepGoodsColumnDefs);
|
|
|
+
|
|
|
+ inComGridOptions.rowSelection = "multiple";
|
|
|
+ goodsGridOptions.rowSelection = "multiple";
|
|
|
+ supplyGridOptions.rowSelection = "multiple";
|
|
|
+ excepGoodsGridOptions.rowSelection = "multiple";
|
|
|
+ cateGridOptions.rowSelection = "multiple";
|
|
|
+ brandGridOptions.rowSelection = "multiple";
|
|
|
+
|
|
|
+ // 삭제버튼 클릭시
|
|
|
+ // 1.공급업체
|
|
|
+ $('#btnSupplyDel').on('click', function() {
|
|
|
+ supplyGridOptions.api.updateRowData({remove:gagaAgGrid.selectedRowData(supplyGridOptions)});
|
|
|
+ });
|
|
|
+ // 2.브랜드
|
|
|
+ $('#btnBrandDel').on('click', function() {
|
|
|
+ brandGridOptions.api.updateRowData({remove:gagaAgGrid.selectedRowData(brandGridOptions)});
|
|
|
+ });
|
|
|
+ // 3.카테고리
|
|
|
+ $('#btnCateDel').on('click', function() {
|
|
|
+ cateGridOptions.api.updateRowData({remove:gagaAgGrid.selectedRowData(cateGridOptions)});
|
|
|
+ });
|
|
|
+ // 4.적용상품
|
|
|
+ $('#btnGoodsDel').on('click', function() {
|
|
|
+ goodsGridOptions.api.updateRowData({remove:gagaAgGrid.selectedRowData(goodsGridOptions)});
|
|
|
+ });
|
|
|
+ // 5.제외상품
|
|
|
+ $('#btnExcepGoodsDel').on('click', function() {
|
|
|
+ excepGoodsGridOptions.api.updateRowData({remove:gagaAgGrid.selectedRowData(excepGoodsGridOptions)});
|
|
|
+ });
|
|
|
+
|
|
|
+ // 업체분담율 추가 버튼 클릭시
|
|
|
+ $('#CouponForm #btnAddApplyBurden').on('click', function() {
|
|
|
+ cfnOpenCompanyListPopup("fnSetPopupApplyBurdenInfo" ,"M");
|
|
|
+ });
|
|
|
+
|
|
|
+ // 분담업체율 설정 / 업체 추가 콜백함수
|
|
|
+ var fnSetPopupApplyBurdenInfo = function(result) {
|
|
|
+ // 기존 리스트 데이터 for
|
|
|
+ for(let i = 0 ; i < result.length ; i++) {
|
|
|
+ let addChk = true, gridListValue = gagaAgGrid.getAllRowData(inComGridOptions); // 받아온 모든 데이터
|
|
|
+
|
|
|
+ // 받아온 data for
|
|
|
+ for(let j = 0 ; j < gridListValue.length ; j++) {
|
|
|
+ // 동일한 data는 추가하지 않음
|
|
|
+ if(gridListValue[j].supplyCompCd == result[i].supplyCompCd) { addChk = false; } // 중복체크
|
|
|
+ }
|
|
|
+
|
|
|
+ // 중복되지 않은 데이터 리스트에 추가
|
|
|
+ if(addChk) {
|
|
|
+ gagaAgGrid.addRowData(inComGridOptions, {"supplyCompCd" : result[i].supplyCompCd, "supplyCompNm" : result[i].supplyCompNm, "burdenRate" : 100, "delYn" : result[i].delYn});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
|
|
|
// 종료시간 클릭시
|
|
|
var fnChangeEdHH = function (obj){
|
|
|
@@ -523,35 +714,19 @@
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ var usableCustGbArr = [];
|
|
|
+ var usableCustGradeArr = [];
|
|
|
+ var payTypeArr = [];
|
|
|
|
|
|
mcxDialog.confirm('저장하시겠습니까?' , {
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function () {
|
|
|
- var usableCustGbArr = [];
|
|
|
- var chkCustGb = $('#CouponForm input:checkbox[name=usableCustGbArr]:checked');
|
|
|
- for(let i=0; i< chkCustGb.length; i++){
|
|
|
- usableCustGbArr.push(chkCustGb.eq(i).val());
|
|
|
- }
|
|
|
-
|
|
|
- var usableCustGradeArr = [];
|
|
|
- var chkCustGrade = $('#CouponForm input:checkbox[name=usableCustGradeArr]:checked');
|
|
|
- for(let i=0; i< chkCustGrade.length; i++){
|
|
|
- usableCustGradeArr.push(chkCustGrade.eq(i).val());
|
|
|
- }
|
|
|
-
|
|
|
- var payTypeArr = [];
|
|
|
- var chkPayType = $('#CouponForm input:checkbox[name=payTypeArr]:checked');
|
|
|
- for(let i=0; i< chkPayType.length; i++){
|
|
|
- payTypeArr.push(chkPayType.eq(i).val());
|
|
|
- }
|
|
|
-
|
|
|
var data = {
|
|
|
cpnId : $('#CouponForm input[name=cpnId]').val()
|
|
|
,cpnNm : $('#CouponForm input[name=cpnNm]').val()
|
|
|
,cpnDesc : $('#CouponForm input[name=cpnDesc]').val()
|
|
|
,siteCd : $('#CouponForm select[name=siteCd]').val()
|
|
|
- // ,afLinkCd : $('#CouponForm select[name=afLinkCd]').val()
|
|
|
,cpnType : $('input:radio[name="rdoCpnType"]:checked').val()
|
|
|
,applyScope : $('input:radio[name="rdoApplyScope"]:checked').val()
|
|
|
,dcWay : $('input:radio[name="rdoDcWay"]:checked').val()
|
|
|
@@ -570,31 +745,32 @@
|
|
|
,downEddt : $('#CouponForm input[name=downEddt]').val()
|
|
|
,buyLimitAmt : $('#CouponForm input[name=buyLimitAmt]').val().replaceAll(',','')
|
|
|
,cpnStat : $('input:radio[name="disCpnStat"]:checked').val()
|
|
|
- ,endAlimYn : $('#CouponForm select[name=endAlimYn]').val()
|
|
|
- ,firstOrdYn : $('#CouponForm select[name=firstOrdYn]').val()
|
|
|
- ,downAblYn : $('#CouponForm select[name=downAblYn]').val()
|
|
|
- ,custJoinStdt : $('#CouponForm input[name=custJoinStdt]').val()
|
|
|
- ,custJoinEddt : $('#CouponForm input[name=custJoinEddt]').val()
|
|
|
- ,buyStdt : $('#CouponForm input[name=buyStdt]').val()
|
|
|
- ,buyEddt : $('#CouponForm input[name=buyEddt]').val()
|
|
|
- ,newCustYn : $('#CouponForm select[name=newCustYn]').val()
|
|
|
- // ,afChannel : $('#CouponForm select[name=afChannel]').val()
|
|
|
- ,dcCdGb : $('input:radio[name="dcCdGb"]:checked').val()
|
|
|
- ,rdCpnNm : $('input[name="serialCpnNm"]').val()
|
|
|
+ ,endAlimYn : 'N'
|
|
|
+ ,firstOrdYn : 'N'
|
|
|
+ ,downAblYn : 'Y'
|
|
|
+ ,custJoinStdt : null
|
|
|
+ ,custJoinEddt : null
|
|
|
+ ,buyStdt : null
|
|
|
+ ,buyEddt : null
|
|
|
+ ,newCustYn : 'N'
|
|
|
+ ,dcCdGb : 'G233_00'
|
|
|
+ ,rdCpnNm : null
|
|
|
+ ,usableCustGbArr : usableCustGbArr
|
|
|
+ ,usableCustGradeArr : usableCustGradeArr
|
|
|
+ ,payTypeArr : payTypeArr
|
|
|
,supplyCompList : gagaAgGrid.getAllRowData(supplyGridOptions)
|
|
|
,brandList : gagaAgGrid.getAllRowData(brandGridOptions)
|
|
|
,applyGoodsList : gagaAgGrid.getAllRowData(goodsGridOptions)
|
|
|
,exceptGoodsList : gagaAgGrid.getAllRowData(excepGoodsGridOptions)
|
|
|
,cateList : gagaAgGrid.getAllRowData(cateGridOptions)
|
|
|
,burdenList : gagaAgGrid.getAllRowData(inComGridOptions)
|
|
|
- ,usableCustGbArr : usableCustGbArr
|
|
|
- ,usableCustGradeArr : usableCustGradeArr
|
|
|
- ,payTypeArr : payTypeArr
|
|
|
- ,limitedTimeCpnList : gagaAgGrid.getAllRowData(limitedTimeCpnGridOptions)
|
|
|
- ,afChannelList : gagaAgGrid.getAllRowData(afLinkOptions)
|
|
|
,mode : $('#CouponForm input[name=mode]').val()
|
|
|
+ ,limitedTimeCpnList : null
|
|
|
+ ,afChannelList : null
|
|
|
+ ,scmYn : 'Y'
|
|
|
};
|
|
|
var jsonData = JSON.stringify(data);
|
|
|
+ console.log('jsonData::>>'+jsonData);
|
|
|
gagajf.ajaxJsonSubmit($('#CouponForm').prop('action'), jsonData, fnCouponSaveCollback);
|
|
|
}
|
|
|
});
|
|
|
@@ -716,23 +892,14 @@
|
|
|
|
|
|
// 즉시할인 쿠폰일때
|
|
|
if(radioValue == 'G230_10'){
|
|
|
- $('#CouponForm .custJoinTr').hide();
|
|
|
- $('#CouponForm .custJoinDateTr').hide();
|
|
|
- $('#CouponForm .firstBuyTr').hide();
|
|
|
- $('#CouponForm .buyDateTr').hide();
|
|
|
$('#CouponForm .dcCdCheck1').hide();
|
|
|
- $('#CouponForm .limitedTimeCpnArea').hide();
|
|
|
- $('#CouponForm .pdGbArea').hide();
|
|
|
$('#CouponForm .availDaysArea').hide();
|
|
|
// 다운로드 시작,종료 , 기간/일수 , 제휴채널, 고객 등급, 구매제한 , 할인율일때 구매제한한도, 1회발행수량, 다운로드 가능여부 숨기기
|
|
|
$('#CouponForm .downStdtArea').hide();
|
|
|
$('#CouponForm .downEddtArea').hide();
|
|
|
$('#CouponForm .pdGbArea').hide();
|
|
|
$('#CouponForm .buyLimitAmtArea').hide();
|
|
|
- $('#CouponForm .usableCustGbArea').hide();
|
|
|
- $('#CouponForm .usableCustGradeArea').hide();
|
|
|
$('#CouponForm .downAblArea').hide();
|
|
|
- $('#CouponForm .linkAfArea').hide();
|
|
|
$('#CouponForm .dcCdCheck2').hide();
|
|
|
$('#CouponForm .maxDcAmtArea').hide();
|
|
|
$('#CouponForm .availDateTr').show();
|
|
|
@@ -744,47 +911,24 @@
|
|
|
$("#CouponForm").find("input:radio[name='rdoApplyScope']").attr('disabled', false);
|
|
|
$("#CouponForm").find("input:radio[name='rdoApplyScope']").attr('readonly', false);
|
|
|
|
|
|
- if(radioValue == 'G230_11'){ // 상품쿠폰일때 선착순쿠폰 등록 가능
|
|
|
- $('#CouponForm .limitedTimeCpnArea').show();
|
|
|
- }else{
|
|
|
- $('#CouponForm .limitedTimeCpnArea').hide();
|
|
|
- }
|
|
|
|
|
|
- if(radioValue == 'G230_30'){ // 배송비쿠폰일때 할인금액만 적용
|
|
|
- $("#CouponForm input:radio[name='rdoDcWay']:radio[value=G240_10]").prop('checked', true);
|
|
|
- $("#CouponForm").find("input:radio[name='rdoDcWay']").attr('disabled', true);
|
|
|
- $("#CouponForm").find("input:radio[name='rdoDcWay']").attr('readonly', true);
|
|
|
- $('#CouponForm .maxDcAmtArea').hide();
|
|
|
- // 적용대상 탭
|
|
|
- $("#CouponForm .supplyTrArea").show();
|
|
|
- $("#CouponForm .brandTrArea").hide();
|
|
|
- $("#CouponForm .categoryTrArea").hide();
|
|
|
- $("#CouponForm .goodsTrArea").hide();
|
|
|
- $("#CouponForm .exceptArea").hide();
|
|
|
- }else{
|
|
|
- $("#CouponForm").find("input:radio[name='rdoDcWay']").attr('disabled', false);
|
|
|
- $("#CouponForm").find("input:radio[name='rdoDcWay']").attr('readonly', false);
|
|
|
- $('#CouponForm .maxDcAmtArea').show();
|
|
|
- // 적용대상 탭
|
|
|
- $("#CouponForm .supplyTrArea").show();
|
|
|
- $("#CouponForm .brandTrArea").show();
|
|
|
- $("#CouponForm .categoryTrArea").show();
|
|
|
- $("#CouponForm .goodsTrArea").show();
|
|
|
- $("#CouponForm .exceptArea").show();
|
|
|
- }
|
|
|
+ $("#CouponForm").find("input:radio[name='rdoDcWay']").attr('disabled', false);
|
|
|
+ $("#CouponForm").find("input:radio[name='rdoDcWay']").attr('readonly', false);
|
|
|
+ $('#CouponForm .maxDcAmtArea').show();
|
|
|
+ // 적용대상 탭
|
|
|
+ $("#CouponForm .supplyTrArea").show();
|
|
|
+ $("#CouponForm .brandTrArea").show();
|
|
|
+ $("#CouponForm .categoryTrArea").show();
|
|
|
+ $("#CouponForm .goodsTrArea").show();
|
|
|
+ $("#CouponForm .exceptArea").show();
|
|
|
|
|
|
- $('#CouponForm .custJoinTr').show();
|
|
|
- $('#CouponForm .firstBuyTr').show();
|
|
|
$('#CouponForm .dcCdCheck1').show();
|
|
|
$('#CouponForm .pdGbArea').show();
|
|
|
// 다운로드 시작,종료 , 기간/일수 , 제휴채널, 고객 등급, 구매제한 , 할인율일때 구매제한한도, 1회발행수량, 다운로드 가능여부 숨기기
|
|
|
$('#CouponForm .downStdtArea').show();
|
|
|
$('#CouponForm .downEddtArea').show();
|
|
|
$('#CouponForm .buyLimitAmtArea').show();
|
|
|
- $('#CouponForm .usableCustGbArea').show();
|
|
|
- $('#CouponForm .usableCustGradeArea').show();
|
|
|
$('#CouponForm .downAblArea').show();
|
|
|
- $('#CouponForm .linkAfArea').show();
|
|
|
$('#CouponForm .dcCdCheck2').show();
|
|
|
|
|
|
// 즉시할인아닌 쿠폰들 할인금액체크시 최대할인금액 숨김
|
|
|
@@ -802,67 +946,9 @@
|
|
|
$("input:radio[name='rdoApplyScope']:radio[value='A']").prop('checked', true);
|
|
|
}
|
|
|
|
|
|
- // 주문서 쿠폰 선택시 결제수단 노출
|
|
|
- if(radioValue == 'G230_20') {
|
|
|
- $('#CouponForm .payTypeTr').show();
|
|
|
- $('#CouponForm #payType').attr('required' , true);
|
|
|
- $("#CouponForm .dcCdGb").show(); // 할인쿠폰유형 노출
|
|
|
- } else {
|
|
|
- $('#CouponForm .payTypeTr').hide();
|
|
|
- $('#CouponForm #payType').attr('required' , false );
|
|
|
- $("#CouponForm .dcCdGb").hide(); // 할인쿠폰유형 숨김
|
|
|
- $("#CouponForm input:radio[name='dcCdGb']:radio[value='G233_00']").prop('checked', true); // 주문서 쿠폰이 아닐 경우 일반 쿠폰으로 설정
|
|
|
- }
|
|
|
-
|
|
|
- // 선착순 쿠폰 비노출
|
|
|
- $("#CouponForm .limitedTimeCpnTab").hide();
|
|
|
- $('#CouponForm input:checkbox[name=limitedTimeCpnYn]').prop('checked', false);
|
|
|
- $("#limitedTimeCpnYn").val("N");
|
|
|
- $("#CouponForm #totPubLimitQty").val(0);
|
|
|
- $("#CouponForm input[id=chkBoxTotPubQty]").prop("disabled", false);
|
|
|
- $("#CouponForm input[id=totPubLimitQty]").prop("disabled", false);
|
|
|
- $("#CouponForm input[id=chkNoLimitTotPubLimitQty]").parent("label").removeClass("checked");
|
|
|
- $("#CouponForm input[id=chkNoLimitTotPubLimitQty]").attr('readonly', false);
|
|
|
- $("#CouponForm input[id=chkNoLimitTotPubLimitQty]").prop('disabled', false);
|
|
|
- $("#CouponForm input[id=chkNoLimitTotPubLimitQty]").parent().prop('disabled', false);
|
|
|
-
|
|
|
$('#CouponForm #cpnType').val(radioValue);
|
|
|
});
|
|
|
|
|
|
- // 할인 쿠폰 유형 변경
|
|
|
- $("#CouponForm input[name=dcCdGb]").bind('click change', function () {
|
|
|
- if(this.value == "G233_00") { // 일반 유형
|
|
|
- $("#CouponForm .dcCdCheck1").show();
|
|
|
- $("#CouponForm .dcCdCheck2").show();
|
|
|
- $("#CouponForm .serialCpnArea").hide();
|
|
|
- $("#CouponForm .randomCpnArea").hide();
|
|
|
- $("#CouponForm #newCustYn").parent().attr("colspan", "");
|
|
|
- $("#CouponForm .normalCol").attr("colspan", "5");
|
|
|
- $('#CouponForm input[name="serialCpnNm"]').attr('required' , false);
|
|
|
- $('#CouponForm input[name="serialCpnQty"]').attr('required' , false);
|
|
|
- $('#CouponForm input[name="randomCpnQty"]').attr('required' , false);
|
|
|
- } else {
|
|
|
- if(this.value == "G233_10") { // 시리얼 유형
|
|
|
- $("#CouponForm .serialCpnArea").show();
|
|
|
- $("#CouponForm .randomCpnArea").hide();
|
|
|
- $("#CouponForm .normalCol").attr("colspan", "5");
|
|
|
- $('#CouponForm input[name="serialCpnNm"]').attr('required' , true);
|
|
|
- $('#CouponForm input[name="serialCpnQty"]').attr('required' , true);
|
|
|
- $('#CouponForm input[name="randomCpnQty"]').attr('required' , false);
|
|
|
- } else { // 난수 유형
|
|
|
- $("#CouponForm .serialCpnArea").hide();
|
|
|
- $("#CouponForm .randomCpnArea").show();
|
|
|
- $("#CouponForm .normalCol").attr("colspan", "");
|
|
|
- $('#CouponForm input[name="serialCpnNm"]').attr('required' , false);
|
|
|
- $('#CouponForm input[name="serialCpnQty"]').attr('required' , false);
|
|
|
- $('#CouponForm input[name="randomCpnQty"]').attr('required' , true);
|
|
|
- }
|
|
|
- $("#CouponForm .dcCdCheck1").hide(); // 총발행제한수량, 1회발행수량, 1인당발행제한수량 숨김
|
|
|
- $("#CouponForm .dcCdCheck2").hide(); // 총발행제한수량, 1회발행수량, 1인당발행제한수량 숨김
|
|
|
- $("#CouponForm #newCustYn").parent().attr("colspan", "5"); // 총발행제한 수량을 없애면서 신규회원여부 colspan 수정
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
// 적용대상 - 브랜드 추가 버튼시
|
|
|
$('#btnBrandAdd').on('click' , function(){
|
|
|
cfnOpenBrandListPopup("fnSetPopupBrandInfo", "M");
|
|
|
@@ -888,7 +974,7 @@
|
|
|
|
|
|
// 적용대상 - 공급처 추가 버튼시
|
|
|
$('#btnSupplyAdd').on('click' , function (){
|
|
|
- cfnOpenCompanyListPopup("fnSetPopupComapnyInfo" , "M");
|
|
|
+ cfnOpenCompanyListPopup("fnSetPopupComapnyInfo" , "M" ,"","","N");
|
|
|
});
|
|
|
|
|
|
// 공급업체 설정 / 업체 추가 콜백함수
|
|
|
@@ -1022,11 +1108,6 @@
|
|
|
cfnOpenModalPopup(actionUrl, 'CpnPubCustListPopup');
|
|
|
};
|
|
|
|
|
|
- // 쿠폰발행팝업
|
|
|
- function fnCustomerIssuePopUp(){
|
|
|
- cfnCpnPubForCustPopup();
|
|
|
- };
|
|
|
-
|
|
|
// 전송시 값 세팅
|
|
|
function setReqValue(){
|
|
|
// 쿠폰유형값 세팅
|
|
|
@@ -1073,6 +1154,13 @@
|
|
|
}
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
+ gagaAgGrid.createGrid('inComGridList', inComGridOptions);
|
|
|
+ gagaAgGrid.createGrid('brandGridList', brandGridOptions);
|
|
|
+ gagaAgGrid.createGrid('cateGridList', cateGridOptions);
|
|
|
+ gagaAgGrid.createGrid('supplyGridList', supplyGridOptions);
|
|
|
+ gagaAgGrid.createGrid('goodsGridList', goodsGridOptions);
|
|
|
+ gagaAgGrid.createGrid('excepGoodsGridList', excepGoodsGridOptions);
|
|
|
+
|
|
|
// 일단 버튼 숨김
|
|
|
$(".couponButton").hide();
|
|
|
|
|
|
@@ -1107,6 +1195,14 @@
|
|
|
$("#CouponForm .buttonSpan").show();
|
|
|
|
|
|
} else {
|
|
|
+ // 수정모드시 그리드 세팅
|
|
|
+ inComGridOptions.api.setRowData(cpnDtlBurdenList);
|
|
|
+ supplyGridOptions.api.setRowData(cpnDtlRefvalSupplyCompList);
|
|
|
+ goodsGridOptions.api.setRowData(cpnDtlRefvalApplyGoodsList);
|
|
|
+ excepGoodsGridOptions.api.setRowData(cpnDtlRefvalExceptGoodsList);
|
|
|
+ brandGridOptions.api.setRowData(cpnDtlRefvalBrandList);
|
|
|
+ cateGridOptions.api.setRowData(cpnDtlRefvalCateList);
|
|
|
+
|
|
|
if(cpnDetail.cpnStat == "G232_10"){
|
|
|
$("#btnCouponSave").show(); // 저장버튼
|
|
|
$("#btnChangeStatIng").show(); // 진행버튼
|