|
@@ -13,83 +13,126 @@
|
|
|
* 1.0 2020.11.16 jsh77b 최초 작성
|
|
* 1.0 2020.11.16 jsh77b 최초 작성
|
|
|
*******************************************************************************
|
|
*******************************************************************************
|
|
|
-->
|
|
-->
|
|
|
-<div class="modalPopup" data-width="1500"> <!-- data-width="1500" data-height="870" -->
|
|
|
|
|
|
|
+<div class="modalPopup" data-width="1500" data-height="700"> <!-- data-width="1500" data-height="870" -->
|
|
|
<div class="panelStyle">
|
|
<div class="panelStyle">
|
|
|
<div class="panelTitle">
|
|
<div class="panelTitle">
|
|
|
<h2>주문상세내역</h2>
|
|
<h2>주문상세내역</h2>
|
|
|
<button type="button" class="close" onclick="fnOrderDetailClose()"><i class="fa fa-times"></i></button>
|
|
<button type="button" class="close" onclick="fnOrderDetailClose()"><i class="fa fa-times"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div class="panelContent">
|
|
|
|
|
- <form id="orderDetailInfo" name="orderDetailInfo" action="#" th:method="post">
|
|
|
|
|
- <input type="hidden" name="custNo"/>
|
|
|
|
|
- <input type="hidden" name="orderNm"/>
|
|
|
|
|
- <input type="hidden" name="orderPhnno"/>
|
|
|
|
|
- <input type="hidden" name="orderEmail"/>
|
|
|
|
|
-
|
|
|
|
|
- <h4>기본정보</h4>
|
|
|
|
|
- <div id="gridOrderInfo" style="width:100%; height:100px;" class="ag-theme-balham"></div>
|
|
|
|
|
-
|
|
|
|
|
- <h4>주문상품정보</h4>
|
|
|
|
|
- <button type="button" style="margin-left:10px;" class="btn btnRight btn-base btn-sm" id="btnExchange">교환요청</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-base btn-sm" id="btnReturn">반품요청</button>
|
|
|
|
|
- <button type="button" class="btn btnRight btn-base btn-sm" id="btnCancel">취소요청</button>
|
|
|
|
|
- <div id="gridOrderGoodsInfo" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
-
|
|
|
|
|
- <h4>배송정보</h4>
|
|
|
|
|
- <button type="button" style="margin-left:10px;" class="btn btnRight btn-base btn-sm" id="btnUpdateOrderAddr">수정</button>
|
|
|
|
|
- <div id="gridDeliveryAddrInfo" style="width:100%; height:100px;" class="ag-theme-balham"></div>
|
|
|
|
|
-
|
|
|
|
|
- <table style="width:100%;">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col style="width:65%;"/>
|
|
|
|
|
- <col/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td style="">
|
|
|
|
|
- <h4>결제정보</h4>
|
|
|
|
|
- <div id="gridPaymentInfo" style="width:100%; height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="">
|
|
|
|
|
- <h4>배송비정보</h4>
|
|
|
|
|
- <div id="gridDeliveryFeeInfo" style="width:100%; height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
- </td>
|
|
|
|
|
- <tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- </form>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="panelContent" style="height:90%; overflow-y:auto; padding:0px 20px !important; ">
|
|
|
|
|
+ <form id="orderDetailInfo" name="orderDetailInfo" action="#" th:method="post">
|
|
|
|
|
+ <input type="hidden" name="custNo"/>
|
|
|
|
|
+ <input type="hidden" name="orderNm"/>
|
|
|
|
|
+ <input type="hidden" name="orderPhnno"/>
|
|
|
|
|
+ <input type="hidden" name="orderEmail"/>
|
|
|
|
|
+
|
|
|
|
|
+ <h4>기본정보</h4>
|
|
|
|
|
+ <div id="gridOrderInfo" style="width:100%; height:100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <h4>주문상품정보</h4>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-base btn-sm" id="btnExchange" style="margin-left:10px;" >교환요청</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-base btn-sm" id="btnReturn">반품요청</button>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-base btn-sm" id="btnCancel">취소요청</button>
|
|
|
|
|
+ <div id="gridOrderGoodsInfo" style="width:100%; height:200px;" class="ag-theme-balham"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <h4>주문사은품정보</h4>
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-base btn-sm" id="btnFreeGiftCancel" style="margin-left:10px;" >사은품취소</button>
|
|
|
|
|
+ <div id="gridOrderFreeGiftInfo" style="width:100%; height:120px;" class="ag-theme-balham"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <h4>배송정보</h4>
|
|
|
|
|
+ <button type="button" style="margin-left:10px;" class="btn btnRight btn-base btn-sm" id="btnUpdateOrderAddr">수정</button>
|
|
|
|
|
+ <div id="gridDeliveryAddrInfo" style="width:100%; height:100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <table style="width:100%;">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col style="width:65%;"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td style="">
|
|
|
|
|
+ <h4>결제정보</h4>
|
|
|
|
|
+ <div id="gridPaymentInfo" style="width:100%; height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="">
|
|
|
|
|
+ <h4>배송비정보</h4>
|
|
|
|
|
+ <div id="gridDeliveryFeeInfo" style="width:100%; height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="wrapOrderChange">
|
|
|
|
|
+ <h4>(취소/반품/교환)요청 정보</h4>
|
|
|
|
|
+ <div id="gridOrderChangeInfo" style="width:100%; height: 100px; min-height:99px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="wrapRefund">
|
|
|
|
|
+ <h4>환불정보</h4>
|
|
|
|
|
+ <div id="gridOrderRefundInfo" style="width:100%; height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <table style="width:100%;">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col style="width:65%;"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td style="">
|
|
|
|
|
+ <h4>상담내역</h4>
|
|
|
|
|
+ <div id="gridOrderCounselInfo" style="width:100%; height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="">
|
|
|
|
|
+ <h4>관리자메모</h4>
|
|
|
|
|
+ <button type="button" id="btnCreateOrderMemo" class="btn btnRight btn-base btn-sm" style="margin-left:10px;"> +</button>
|
|
|
|
|
+ <div id="gridOrderMemoInfo" style="width:100%; height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="wrapRefundAccount" style="width:25%;">
|
|
|
|
|
+ <h4>환불계좌정보</h4>
|
|
|
|
|
+ <button type="button" id="btnSaveAccount" class="btn btnRight btn-base btn-sm" style="margin-left:10px;" >등록</button>
|
|
|
|
|
+ <div id="gridOptionsRefundAccountInfo" style="height: 100px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </form>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- data -->
|
|
<!-- data -->
|
|
|
<script th:inline="javascript">
|
|
<script th:inline="javascript">
|
|
|
-var ordNo = [[${ordNo}]]; // 주문번호
|
|
|
|
|
-var orderInfo = [[${orderInfo}]]; // 기본정보
|
|
|
|
|
-var orderGoodsInfo = [[${orderGoodsInfo}]]; // 주문상세정보
|
|
|
|
|
-var orderDeliveryAddrInfo = [[${orderDeliveryAddrInfo}]]; // 배송정보
|
|
|
|
|
-var orderPaymentInfo = [[${orderPaymentInfo}]]; // 결제정보
|
|
|
|
|
-var orderDeliveryFeeInfo = [[${orderDeliveryFeeInfo}]]; // 배송비정보
|
|
|
|
|
-
|
|
|
|
|
-//var orderChangeInfo = [[${orderChangeInfo}]]; // 취소/반품/교환요청 정보
|
|
|
|
|
-//var orderRefundInfo = [[${orderRefundInfo}]]; // 환불정보
|
|
|
|
|
-//var orderCounselInfo = [[${orderCounselInfo}]]; // 상담내역
|
|
|
|
|
-//var orderAdminMemoInfo = [[${orderAdminMemoInfo}]]; // 관리자메모
|
|
|
|
|
-//var orderRfAccountInfo = [[${orderRfAccountInfo}]]; // 환불계좌정보
|
|
|
|
|
-//var siteCdList = cfnConvertToArray([[${siteCdList}]]);
|
|
|
|
|
-//var bankList = cfnConvertToArray([[${bankList}]]); // 은행코드
|
|
|
|
|
|
|
+var ordNo = [[${ordNo}]]; // 주문번호
|
|
|
|
|
+var orderInfo = [[${orderInfo}]]; // 기본정보
|
|
|
|
|
+var orderGoodsInfo = [[${orderGoodsInfo}]]; // 주문상세정보
|
|
|
|
|
+var orderFreeGiftInfo = [[${orderFreeGiftInfo}]]; // 주문사은품정보
|
|
|
|
|
+var orderDeliveryAddrInfo = [[${orderDeliveryAddrInfo}]]; // 배송정보
|
|
|
|
|
+var orderPaymentInfo = [[${orderPaymentInfo}]]; // 결제정보
|
|
|
|
|
+var orderDeliveryFeeInfo = [[${orderDeliveryFeeInfo}]]; // 배송비정보
|
|
|
|
|
+var orderChangeInfo = [[${orderChangeInfo}]]; // 취소/반품/교환요청 정보
|
|
|
|
|
+var orderRefundInfo = [[${orderRefundInfo}]]; // 환불정보
|
|
|
|
|
+var orderCounselInfo = [[${orderCounselInfo}]]; // 상담내역
|
|
|
|
|
+var orderAdminMemoInfo = [[${orderAdminMemoInfo}]]; // 관리자메모
|
|
|
|
|
+var orderRfAccountInfo = [[${orderRfAccountInfo}]]; // 환불계좌정보
|
|
|
|
|
+
|
|
|
|
|
+var siteCdList = gagajf.convertToArray([[${siteCdList}]]); // 사이트목록
|
|
|
|
|
+var bankList = gagajf.convertToArray([[${bankList}]]); // 은행코드
|
|
|
|
|
|
|
|
// 쿠폰,포인트,적립금 컬럼배경색설정
|
|
// 쿠폰,포인트,적립금 컬럼배경색설정
|
|
|
-//var goodsCpnDcAmtClass = (orderGoodsInfo[0].goodsCpnDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
-//var cartCpnDcAmtClass = (orderGoodsInfo[0].cartCpnDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
-//var plusCpnDcAmtClass = (orderGoodsInfo[0].plusCpnDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
-//var pntDcAmtClass = (orderGoodsInfo[0].pntDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
-//var prePntDcAmtClass = (orderGoodsInfo[0].prePntDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
-//var savePntAmtClass = (orderGoodsInfo[0].savePntAmt > 0) ? 'bgSky' : 'text-right';
|
|
|
|
|
-//var custNo = orderInfo[0].custNo;
|
|
|
|
|
-//var payMeans = orderInfo[0].payMeans;
|
|
|
|
|
-//var mallGb = orderInfo[0].mallGb;
|
|
|
|
|
|
|
+var goodsCpnDcAmtClass = (orderGoodsInfo[0].goodsCpnDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
+var cartCpnDcAmtClass = (orderGoodsInfo[0].cartCpnDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
+var plusCpnDcAmtClass = (orderGoodsInfo[0].plusCpnDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
+var pntDcAmtClass = (orderGoodsInfo[0].pntDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
+var prePntDcAmtClass = (orderGoodsInfo[0].prePntDcAmt > 0) ? 'bgPink' : 'text-right';
|
|
|
|
|
+var savePntAmtClass = (orderGoodsInfo[0].savePntAmt > 0) ? 'bgSky' : 'text-right';
|
|
|
|
|
+
|
|
|
|
|
+var custNo = orderInfo[0].custNo;
|
|
|
|
|
+var payMeans = orderInfo[0].payMeans;
|
|
|
|
|
+var mallGb = orderInfo[0].mallGb;
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<!-- AgGrid 컬럼 세팅 -->
|
|
<!-- AgGrid 컬럼 세팅 -->
|
|
@@ -347,13 +390,18 @@ var columnDefsGoodsInfo = [
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- headerName : "상품권"
|
|
|
|
|
- , field : "gfcdUseAmt"
|
|
|
|
|
- , width : 80
|
|
|
|
|
- , cellClass : 'text-right'
|
|
|
|
|
- , cellRenderer : function (params) {
|
|
|
|
|
- return params.value.addComma();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ headerName : "상품권",
|
|
|
|
|
+ children : [
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "사용"
|
|
|
|
|
+ , field : "gfcdUseAmt"
|
|
|
|
|
+ , width : 80
|
|
|
|
|
+ , cellClass : 'text-right' //pntDcAmtClass
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ return "<a href=\"javascript:void(0);\" onclick=\"fnOrderPointHst('" + params.data.ordNo + "');\">" + params.value.addComma() + "</a>";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
headerName : "금액(원/단위)",
|
|
headerName : "금액(원/단위)",
|
|
@@ -408,6 +456,32 @@ var columnDefsGoodsInfo = [
|
|
|
];
|
|
];
|
|
|
var gridOptionsGoodsInfo = orderAgGrid.getGridOptions(columnDefsGoodsInfo);
|
|
var gridOptionsGoodsInfo = orderAgGrid.getGridOptions(columnDefsGoodsInfo);
|
|
|
|
|
|
|
|
|
|
+// 2.5 주문사은품정보
|
|
|
|
|
+var columnDefsOrderFreeGiftInfo = [
|
|
|
|
|
+ {headerName: "주문사은품번호" , field: "ordFreeFigtSq" , width: 100, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {headerName: "주문번호" , field: "ordNo" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사은품프로모션" , field: "freeGiftSq" , width: 100, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {headerName: "사은품프로모션명" , field: "freeGiftName" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사은품혜택번호" , field: "freeGiftValSq" , width: 100, cellClass: 'text-center', hide: true},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "사용포인트"
|
|
|
|
|
+ , field : "usePoint"
|
|
|
|
|
+ , width : 100
|
|
|
|
|
+ , cellClass : 'text-right'
|
|
|
|
|
+ , valueFormatter : function (params) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "사은품코드" , field: "itemCd" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사은품명" , field: "itemNm" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사은품수량" , field: "itemQty" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "옵션명" , field: "optCd" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "옵션코드1" , field: "optCd1" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "옵션코드2" , field: "optCd2" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "삭제여부" , field: "delYn" , width: 100, cellClass: 'text-center'}
|
|
|
|
|
+];
|
|
|
|
|
+var gridOptionsOrderFreeGiftInfo = orderAgGrid.getGridOptions(columnDefsOrderFreeGiftInfo);
|
|
|
|
|
+
|
|
|
// 3.배송정보
|
|
// 3.배송정보
|
|
|
var columnDefsDeliveryInfo = [
|
|
var columnDefsDeliveryInfo = [
|
|
|
{headerName: "배송지번호" , field: "delvAddrSq" , width: 100, cellClass: 'text-center'},
|
|
{headerName: "배송지번호" , field: "delvAddrSq" , width: 100, cellClass: 'text-center'},
|
|
@@ -431,7 +505,7 @@ var gridOptionsDeliveryInfo = orderAgGrid.getGridOptions(columnDefsDeliveryInfo)
|
|
|
|
|
|
|
|
// 4.결제정보
|
|
// 4.결제정보
|
|
|
var columnDefsPaymentInfo = [
|
|
var columnDefsPaymentInfo = [
|
|
|
- {headerName: "에스크로여부" , field: "escrowYn" , width: 80 , cellClass: 'text-center'},
|
|
|
|
|
|
|
+ {headerName: "에스크로여부" , field: "escrowYn" , width: 100 , cellClass: 'text-center'},
|
|
|
{headerName: "결제수단" , field: "payMeansNm" , width: 100 , cellClass: 'text-center'},
|
|
{headerName: "결제수단" , field: "payMeansNm" , width: 100 , cellClass: 'text-center'},
|
|
|
{
|
|
{
|
|
|
headerName : "카드(은행)"
|
|
headerName : "카드(은행)"
|
|
@@ -525,6 +599,204 @@ var columnDefsDeliveryFeeInfo = [
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
|
var gridOptionsDeliveryFeeInfo = orderAgGrid.getGridOptions(columnDefsDeliveryFeeInfo);
|
|
var gridOptionsDeliveryFeeInfo = orderAgGrid.getGridOptions(columnDefsDeliveryFeeInfo);
|
|
|
|
|
+
|
|
|
|
|
+// 6. 반품/교환 정보
|
|
|
|
|
+var columnDefsOrderChangeInfo = [
|
|
|
|
|
+ {headerName: "요청번호" , field: "ordChgSq" , width: 60 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "요청구분" , field: "chgGbNm" , width: 75 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "상품코드" , field: "goodsCd" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "사이즈" , field: "sizeCd" , width: 50 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "수량" , field: "chgQty" , width: 40 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "요청상태" , field: "chgStatNm" , width: 80 , cellClass: 'text-center'},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "요청일자"
|
|
|
|
|
+ , field : "chgRegDt"
|
|
|
|
|
+ , width : 90
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "변경사유" , field: "chgReasonNm" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "요청메모" , field: "chgMemo" , width: 120 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "변경자명" , field: "chgerNm" , width: 70 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "변경자핸드폰" , field: "chgerPhnno" , width: 105 , cellClass: 'text-center', editable: true},
|
|
|
|
|
+ {headerName: "우편번호" , field: "chgerPostNo" , width: 60 , cellClass: 'text-center'},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "주소(기본)"
|
|
|
|
|
+ , field : "chgerBaseAddr"
|
|
|
|
|
+ , width : 250
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ var retStr = "";
|
|
|
|
|
+
|
|
|
|
|
+ if (params.data.wdInvoiceSendYn == 'N') {
|
|
|
|
|
+ retStr += "<button type=\"button\" class=\"btn btn-info\" onclick=\"fnOpenPostFindPopup('" + params.node.rowIndex + "');\">POST</button>";
|
|
|
|
|
+ retStr += "<button type=\"button\" class=\"btn btn-info\" onclick=\"fnSaveChgerAddr('" + params.node.rowIndex + "');\">저장</button>";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ retStr += (gagajf.isNull(params.value)) ? '' : (gagajf.isNull(params.data.chgerDtlAddr)) ? params.value : params.value + params.data.chgerDtlAddr;
|
|
|
|
|
+ return retStr;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "주소(상세)" , field: "chgerDtlAddr" , width: 105 , cellClass: 'text-center' , editable: true},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "택배사전송"
|
|
|
|
|
+ , field : "wdInvoiceSendYn"
|
|
|
|
|
+ , width : 70
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ return (params.value == 'N') ? '미전송' : '전송';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "요청취소"
|
|
|
|
|
+ , field : "ordDtlNo"
|
|
|
|
|
+ , width : 100
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ var retStr = "";
|
|
|
|
|
+
|
|
|
|
|
+ if (params.data.chgGb == "30" && params.data.chgStat == "40") {
|
|
|
|
|
+ retStr = ' <button type="button" class="btn btn-success" onclick="fnReturnReqeustCancel(\'' + params.data.ordChgSq + '\',\'' + params.value + '\',\'' + params.node.rowIndex + '\');"> 반품취소 </button>';
|
|
|
|
|
+ } else if (params.data.chgGb == "40" && params.data.chgStat == "30") {
|
|
|
|
|
+ retStr = ' <button type="button" class="btn btn-success" onclick="fnExchangeReqeustCancel(\'' + params.data.ordChgSq + '\',\'' + ordNo + '\',\'' + params.value + '\',\'' + params.node.rowIndex + '\');"> 교환취소 </button>';
|
|
|
|
|
+ } else if (params.data.chgGb == "20" && params.data.chgStat == "20") {
|
|
|
|
|
+ //retStr = '<button type="button" class="btn btn-success" onclick="fnCancelConfirmRequestCancel(\'' + params.data.ordChgSq + '\')">요청철회 </button>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return retStr;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "회수지시전송"
|
|
|
|
|
+ , field : "wdInvoiceSendYn"
|
|
|
|
|
+ , width : 90
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "회수송장번호", field: "wdInvoiceNo", width: 90, cellClass: 'text-center'}
|
|
|
|
|
+];
|
|
|
|
|
+var gridOptionsOrderChangeInfo = orderAgGrid.getGridOptions(columnDefsOrderChangeInfo);
|
|
|
|
|
+
|
|
|
|
|
+// 7.환불정보
|
|
|
|
|
+var columnDefsRefundInfo = [
|
|
|
|
|
+ {headerName: "환불수단" , field: "payMeansNm" , width: 80 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "환불은행(카드)" , field: "raBank" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "환불은행계좌번호" , field: "raNo" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "예금주" , field: "raNm" , width: 80 , cellClass: 'text-center'},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "환불금액"
|
|
|
|
|
+ , field : "refundAmt"
|
|
|
|
|
+ , width : 100
|
|
|
|
|
+ , cellClass : 'text-right'
|
|
|
|
|
+ , valueFormatter : function (params) {
|
|
|
|
|
+ return params.value.addComma();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "환불완료일자"
|
|
|
|
|
+ , field : "regDt"
|
|
|
|
|
+ , width : 140
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "환불처리자" , field: "regNo" , width: 80 , cellClass: 'text-center'}
|
|
|
|
|
+];
|
|
|
|
|
+var gridOptionsRefundInfo = orderAgGrid.getGridOptions(columnDefsRefundInfo);
|
|
|
|
|
+
|
|
|
|
|
+// 8.상담내역
|
|
|
|
|
+var columnDefsOrderCounselInfo = [
|
|
|
|
|
+ {headerName: "상담구분" , field: "counselClsfNm" , width: 120 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "상품코드" , field: "goodsCd" , width: 120 , cellClass: 'text-center'},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "질문제목"
|
|
|
|
|
+ , field : "questTitle"
|
|
|
|
|
+ , width : 400
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ return '<a href="javascript:void(0);" onclick="cfnOpenOneToOneAskDetailPopup(\'' + params.data.counselSq + '\')">' + params.value + '</a>';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "등록일"
|
|
|
|
|
+ , field : "questDt"
|
|
|
|
|
+ , width : 120
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "답변일"
|
|
|
|
|
+ , field : "ansDt"
|
|
|
|
|
+ , width : 120
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "답변자" , field: "ansNm" , width: 80 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "삭제여부" , field: "delYn" , width: 80 , cellClass: 'text-center'}
|
|
|
|
|
+];
|
|
|
|
|
+var gridOptionsOrderCounselInfo = orderAgGrid.getGridOptions(columnDefsOrderCounselInfo);
|
|
|
|
|
+
|
|
|
|
|
+// 9.주문메모
|
|
|
|
|
+var columnDefsOrderMemoInfo = [
|
|
|
|
|
+ {headerName: "등록일시" , field: "regDt" , width: 135 , cellClass: 'text-center'},
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "등록자"
|
|
|
|
|
+ , field : "regNm"
|
|
|
|
|
+ , width : 130
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "관리메모"
|
|
|
|
|
+ , field : "memo"
|
|
|
|
|
+ , width : 250
|
|
|
|
|
+ , cellClass : 'text-left'
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ var retStr = '';
|
|
|
|
|
+
|
|
|
|
|
+ if (!gagajf.isNull(params.value)) {
|
|
|
|
|
+ retStr = '<a href="javascript:void(0);" onclick="fnCreateOrderMemo(\'' + params.data.ordNo + '\',\'' + params.data.seq + '\',\'U' + '\');">' + params.value + '</a>';
|
|
|
|
|
+ }
|
|
|
|
|
+ return retStr;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "삭제"
|
|
|
|
|
+ , field : "orderMemoSeq"
|
|
|
|
|
+ , width : 80
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , cellRenderer : function (params) {
|
|
|
|
|
+ var retStr = '';
|
|
|
|
|
+
|
|
|
|
|
+ if (params.data.updId == userId) {
|
|
|
|
|
+ retStr = '<button type="button" class="btn btn-danger" onclick="fnDeleteOrderMemo(\'' + params.data.ordNo + '\',\'' + params.value + '\');"> - </button>';
|
|
|
|
|
+ }
|
|
|
|
|
+ return retStr;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+];
|
|
|
|
|
+var gridOptionsOrderMemoInfo = orderAgGrid.getGridOptions(columnDefsOrderMemoInfo);
|
|
|
|
|
+
|
|
|
|
|
+// 10. 환불계좌정보
|
|
|
|
|
+var columnDefsRefundAccountInfo = [
|
|
|
|
|
+ {
|
|
|
|
|
+ headerName : "은행명"
|
|
|
|
|
+ , field : "raBnk"
|
|
|
|
|
+ , width : 120
|
|
|
|
|
+ , cellClass : 'text-center'
|
|
|
|
|
+ , valueFormatter : function (params) {
|
|
|
|
|
+ return gagaAgGrid.lookupValue(bankList, params.value);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "계좌번호" , field: "raNo" , width: 100 , cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "예금주" , field: "raNm" , width: 80 , cellClass: 'text-center'}
|
|
|
|
|
+];
|
|
|
|
|
+var gridOptionsRefundAccountInfo = orderAgGrid.getGridOptions(columnDefsRefundAccountInfo);
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -566,40 +838,470 @@ $(window).resize(function () {
|
|
|
</script>
|
|
</script>
|
|
|
<!-- AgGrid 생성 -->
|
|
<!-- AgGrid 생성 -->
|
|
|
<script>
|
|
<script>
|
|
|
-// 창종료
|
|
|
|
|
|
|
+// 팝업닫기
|
|
|
var fnOrderDetailClose = function(){
|
|
var fnOrderDetailClose = function(){
|
|
|
uifnPopupClose('popupOrderDetail');
|
|
uifnPopupClose('popupOrderDetail');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
$(document).ready(function () {
|
|
|
- // 그리드 그리기
|
|
|
|
|
- gagaAgGrid.createGrid('gridOrderInfo' , gridOptionsOrderInfo); // 기본정보
|
|
|
|
|
- gagaAgGrid.createGrid('gridOrderGoodsInfo' , gridOptionsGoodsInfo); // 상품정보
|
|
|
|
|
- gagaAgGrid.createGrid('gridDeliveryAddrInfo' , gridOptionsDeliveryInfo); // 배송정보
|
|
|
|
|
- gagaAgGrid.createGrid('gridPaymentInfo' , gridOptionsPaymentInfo); // 결제정보
|
|
|
|
|
- gagaAgGrid.createGrid('gridDeliveryFeeInfo' , gridOptionsDeliveryFeeInfo); // 배송비정보
|
|
|
|
|
|
|
|
|
|
- // 그리드 데이터 바인딩
|
|
|
|
|
|
|
+ // 1. 그리드 그리기
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderInfo' , gridOptionsOrderInfo); // 기본정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderGoodsInfo' , gridOptionsGoodsInfo); // 상품정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderFreeGiftInfo' , gridOptionsOrderFreeGiftInfo); // 사은품정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridDeliveryAddrInfo' , gridOptionsDeliveryInfo); // 배송정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridPaymentInfo' , gridOptionsPaymentInfo); // 결제정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridDeliveryFeeInfo' , gridOptionsDeliveryFeeInfo); // 배송비정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderChangeInfo' , gridOptionsOrderChangeInfo); // 취소/반품/교환 요청 정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderRefundInfo' , gridOptionsRefundInfo); // 환불정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOptionsRefundAccountInfo' , gridOptionsRefundAccountInfo); // 환불계좌정보
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderCounselInfo' , gridOptionsOrderCounselInfo); // 상담내역
|
|
|
|
|
+ gagaAgGrid.createGrid('gridOrderMemoInfo' , gridOptionsOrderMemoInfo); // 관리자메모
|
|
|
|
|
+
|
|
|
|
|
+ // 2. 그리드 데이터 바인딩
|
|
|
gridOptionsOrderInfo.api.setRowData(orderInfo); // 기본정보
|
|
gridOptionsOrderInfo.api.setRowData(orderInfo); // 기본정보
|
|
|
gridOptionsGoodsInfo.api.setRowData(orderGoodsInfo); // 상품정보
|
|
gridOptionsGoodsInfo.api.setRowData(orderGoodsInfo); // 상품정보
|
|
|
|
|
+ gridOptionsOrderFreeGiftInfo.api.setRowData(orderFreeGiftInfo); // 사은품품정보
|
|
|
gridOptionsDeliveryInfo.api.setRowData(orderDeliveryAddrInfo); // 배송정보
|
|
gridOptionsDeliveryInfo.api.setRowData(orderDeliveryAddrInfo); // 배송정보
|
|
|
gridOptionsPaymentInfo.api.setRowData(orderPaymentInfo); // 결제정보
|
|
gridOptionsPaymentInfo.api.setRowData(orderPaymentInfo); // 결제정보
|
|
|
gridOptionsDeliveryFeeInfo.api.setRowData(orderDeliveryFeeInfo); // 배송비정보
|
|
gridOptionsDeliveryFeeInfo.api.setRowData(orderDeliveryFeeInfo); // 배송비정보
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.setRowData(orderChangeInfo); // 취소/반품/교환요청 정보
|
|
|
|
|
+ gridOptionsRefundInfo.api.setRowData(orderRefundInfo); // 환불정보
|
|
|
|
|
+ gridOptionsRefundAccountInfo.api.setRowData(orderRfAccountInfo); // 환불계좌정보
|
|
|
|
|
+ gridOptionsOrderCounselInfo.api.setRowData(orderCounselInfo); // 상담내역
|
|
|
|
|
+ gridOptionsOrderMemoInfo.api.setRowData(orderAdminMemoInfo); // 관리자메모
|
|
|
|
|
|
|
|
- //gridOptionsOrderChangeInfo.api.setRowData(orderChangeInfo); // 취소/반품/교환요청 정보
|
|
|
|
|
- //gridOptionsRefundInfo.api.setRowData(orderRefundInfo); // 환불정보
|
|
|
|
|
- //gridOptionsOrderCounselInfo.api.setRowData(orderCounselInfo); // 상담내역
|
|
|
|
|
- //gridOptionsOrderMemoInfo.api.setRowData(orderAdminMemoInfo); // 관리자메모
|
|
|
|
|
- //gridOptionsRefundAccountInfo.api.setRowData(orderRfAccountInfo); // 환불계좌정보
|
|
|
|
|
-
|
|
|
|
|
- // 그리드 높이 설정
|
|
|
|
|
|
|
+ // 3. 그리드 높이 설정
|
|
|
fnSetGridHeightInit();
|
|
fnSetGridHeightInit();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
$(document).ready(function () {
|
|
|
$('#orderDetailContents').css("width", "97%").css("height", "96%");
|
|
$('#orderDetailContents').css("width", "97%").css("height", "96%");
|
|
|
|
|
+
|
|
|
|
|
+ // 취소요청
|
|
|
|
|
+ $('#btnCancel').on('click', function () {
|
|
|
|
|
+ fnCancelRequest(ordNo, 'N');
|
|
|
|
|
+ });
|
|
|
|
|
+ // 반품요청
|
|
|
|
|
+ $('#btnReturn').on('click', function () {
|
|
|
|
|
+ fnReturnRequest(ordNo, 'N');
|
|
|
|
|
+ });
|
|
|
|
|
+ // 교환요청
|
|
|
|
|
+ $('#btnExchange').on('click', function () {
|
|
|
|
|
+ fnExchangeRequest(ordNo, 'N');
|
|
|
|
|
+ });
|
|
|
|
|
+ // 메모등록
|
|
|
|
|
+ $('#btnCreateOrderMemo').on('click', function () {
|
|
|
|
|
+ fnCreateOrderMemo(ordNo, '', 'N');
|
|
|
|
|
+ });
|
|
|
|
|
+ // 배송 정보 수정
|
|
|
|
|
+ $('#btnUpdateOrderAddr').on('click', function () {
|
|
|
|
|
+ fnUpdateOrderAddr();
|
|
|
|
|
+ });
|
|
|
|
|
+ // 환불계좌 등록
|
|
|
|
|
+ $('#btnSaveAccount').on('click', function () {
|
|
|
|
|
+ fnCreateOrderRfAccount(ordNo, custNo);
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<!-- function -->
|
|
|
|
|
+<script>
|
|
|
|
|
+ var gridOrderChangeInfoSelectedIdx = '';
|
|
|
|
|
+
|
|
|
|
|
+ // 배송지변경
|
|
|
|
|
+ var fnUpdateOrderAddr = function () {
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.stopEditing();
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(gridOptionsDeliveryInfo.api.getRowNode(0).data);
|
|
|
|
|
+ mcxDialog.confirm("주소를 변경하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ "/order/deliver/addr/update"
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 반품요청
|
|
|
|
|
+ var fnReturnRequest = function () {
|
|
|
|
|
+ var actionUrl = "/order/return/request/form?ordNo=" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupReturnRequestForm');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 교환요청
|
|
|
|
|
+ var fnExchangeRequest = function () {
|
|
|
|
|
+ var actionUrl = "/order/exchange/request/form?ordNo=" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupExchangeRequestForm');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 취소요청
|
|
|
|
|
+ var fnCancelRequest = function () {
|
|
|
|
|
+ var actionUrl = "/order/cancel/request/form?ordNo=" + ordNo + "&cncWait=N";
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCancelRequestForm');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 취소승인
|
|
|
|
|
+ var fnCancelConfirmRequest = function (ordChgSq) {
|
|
|
|
|
+ mcxDialog.confirm("요청번호 [" + ordChgSq + "] 에 대한 취소승인 처리를 하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordNo = ordNo; //전역변수
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/cancel/confirm'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 취소요청철회
|
|
|
|
|
+ var fnCancelConfirmRequestCancel = function (ordChgSq) {
|
|
|
|
|
+ mcxDialog.confirm("요청번호 [" + ordChgSq + "] 에 대한 요청철회 처리를 하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/cancel/wait/cancel'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 주문상품 상세 변경 이력 팝업
|
|
|
|
|
+ var fnOrderDetailChangeHst = function (ordDtlNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/change/hst/form/" + ordDtlNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailChangeHstForm');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 쿠폰내역 팝업
|
|
|
|
|
+ var fnOrderCouponHst = function (ordNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/coupon/hst/form/" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailCouponHstForm');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 포인트내역 팝업
|
|
|
|
|
+ var fnOrderPointHst = function (ordNo) {
|
|
|
|
|
+ var actionUrl = "/order/detail/point/hst/form/" + ordNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupOrderDetailPointHstForm');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 관리자메모 등록
|
|
|
|
|
+ var fnCreateOrderMemo = function (ordNo, seq, mode) {
|
|
|
|
|
+ var actionUrl = "/order/memo/create/form?ordNo=" + ordNo + "&seq=" + seq + "&mode=" + mode;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCreateOrderMemo');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 환불계좌 등록
|
|
|
|
|
+ var fnCreateOrderRfAccount = function (ordNo, custNo) {
|
|
|
|
|
+ var actionUrl = "/order/refund/account/create/form?ordNo=" + ordNo + "&custNo="+custNo;
|
|
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupCreateRefundAccount');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 주문메모 삭제
|
|
|
|
|
+ var fnDeleteOrderMemo = function (ordNo, orderMemoSq) {
|
|
|
|
|
+ mcxDialog.confirm('삭제하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ data.orderMemoSq = orderMemoSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/memo/delete'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+ fnBindOrderMemo();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 주문메모 바인딩
|
|
|
|
|
+ var fnBindOrderMemo = function() {
|
|
|
|
|
+ gagaAgGrid.fetch(
|
|
|
|
|
+ "/order/admin/memo/list/" + ordNo
|
|
|
|
|
+ , gridOptionsOrderMemoInfo
|
|
|
|
|
+ , null
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ $('#gridOrderMemoInfo').css('height', 41 + 33 * ((result.length == 0 || result == null) ? 1 : result.length));
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 주문 변경요청정보 바인딩
|
|
|
|
|
+ var fnBindOrderChangeInfo = function() {
|
|
|
|
|
+ gagaAgGrid.fetch(
|
|
|
|
|
+ "/order/return/info/list/" + ordNo
|
|
|
|
|
+ , gridOptionsOrderChangeInfo
|
|
|
|
|
+ , null
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ $('#gridOrderChangeInfo').css('height', 31 + 33 * ((result.length == 0 || result == null) ? 1 : result.length));
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 환불계좌 정보
|
|
|
|
|
+ var fnBindOrderRfAccountInfo = function () {
|
|
|
|
|
+ gagaAgGrid.fetch(
|
|
|
|
|
+ "/order/refund/account/info/list?ordNo=" + ordNo+"&custNo="+custNo
|
|
|
|
|
+ , gridOptionsRefundAccountInfo
|
|
|
|
|
+ , null
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ $('#gridOptionsRefundAccountInfo').css('height', 31 + 33 * ((result.length == 0 || result == null) ? 1 : result.length));
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 배송비 DATA 바인딩
|
|
|
|
|
+ var fnBindDeliveryAddr = function(delvAddrSq) {
|
|
|
|
|
+ if (typeof (delvAddrSq) != 'undefined') {
|
|
|
|
|
+ var strLink = '/order/deliver/addr/info/' + delvAddrSq;
|
|
|
|
|
+ var jsonData = JSON.stringify([]);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(strLink, jsonData, fnBindDeliveryAddrCallBack);
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 배송정보
|
|
|
|
|
+ var fnBindDeliveryAddrCallBack = function(result) {
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.setRowData(result);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 우편번호 찾기관련
|
|
|
|
|
+ var fnSetPostValue = function(zipNo, baseRoadAddr1, baseRoadAddr2, etcAddr, postPosition) {
|
|
|
|
|
+ if (postPosition == 'grid') {
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.getRowNode(0).data.recipPostNo = zipNo;
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.getRowNode(0).data.recipBaseAddr = baseRoadAddr1;
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.getRowNode(0).data.recipDtlAddr = baseRoadAddr2;
|
|
|
|
|
+ gridOptionsDeliveryInfo.api.refreshCells();
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (postPosition == 'returnRequest') {
|
|
|
|
|
+ $("#returnRequestFrm input[name=chgerPostNo]").val(zipNo);
|
|
|
|
|
+ $("#returnRequestFrm input[name=chgerBaseAddr]").val(baseRoadAddr1);
|
|
|
|
|
+ $("#returnRequestFrm input[name=chgerDtlAddr]").val(baseRoadAddr2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (postPosition == 'updateOrderChangeAddr') {
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerPostNo = zipNo;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerBaseAddr = baseRoadAddr1;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.getRowNode(gridOrderChangeInfoSelectedIdx).data.chgerDtlAddr = baseRoadAddr2;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.refreshCells();
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 변경요청 > 우편번호찾기
|
|
|
|
|
+ var fnOpenPostFindPopup = function (idx) {
|
|
|
|
|
+ gridOrderChangeInfoSelectedIdx = idx;
|
|
|
|
|
+ cfnOpenPostFindPopup('updateOrderChangeAddr');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 변경요청 > 회수지정보 저장
|
|
|
|
|
+ var fnSaveChgerAddr = function (rowIdx) {
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.stopEditing();
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(gridOptionsOrderChangeInfo.api.getRowNode(rowIdx).data);
|
|
|
|
|
+
|
|
|
|
|
+ mcxDialog.confirm("주소를 변경하시겠습니까?", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ "/order/change/info/addr/update"
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function () {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 반품요청 철회
|
|
|
|
|
+ var fnReturnReqeustCancel = function (ordChgSq, ordDtlNo, rowIdx) {
|
|
|
|
|
+ mcxDialog.confirm('반품요청을 철회하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+ data.ordDtlNo = ordDtlNo;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/return/request/cancel'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ if (result.message != '회수컨펌 된 내역이 있습니다.') {
|
|
|
|
|
+ var selectedRow = gridOptionsOrderChangeInfo.api.getRowNode(rowIdx).data;
|
|
|
|
|
+ gridOptionsOrderChangeInfo.api.updateRowData({remove: [selectedRow]});
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 교환요청 철회
|
|
|
|
|
+ var fnExchangeReqeustCancel = function (ordChgSq, ordNo, ordDtlNo, rowIdx) {
|
|
|
|
|
+ mcxDialog.confirm('교환요청을 취소하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ data.ordDtlNo = ordDtlNo;
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/exchange/request/cancel'
|
|
|
|
|
+ , jsonData, function () {
|
|
|
|
|
+ uifnPopClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // LMS 전송
|
|
|
|
|
+ var fnOpenLmsForm = function (orderPhnno, custNo) {
|
|
|
|
|
+ if (gagajf.isNull(custNo) && gagajf.isNull(orderPhnno)) {
|
|
|
|
|
+ mcxDialog.alert("정보가 올바르지 않습니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $('#orderDetailInfo input[name=orderPhnno]').val(orderPhnno);
|
|
|
|
|
+ $('#orderDetailInfo input[name=custNo]').val(custNo);
|
|
|
|
|
+
|
|
|
|
|
+ var param = {};
|
|
|
|
|
+ param.elementCellPhnno = '#orderDetailInfo input[name=orderPhnno]';
|
|
|
|
|
+ param.elementCustNo = '#orderDetailInfo input[name=custNo]';
|
|
|
|
|
+ cfnOpenLmsPopup(param);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // EMAIL 전송
|
|
|
|
|
+ var fnOpenEmailForm = function (orderEmail, orderNm, custNo) {
|
|
|
|
|
+ if (gagajf.isNull(orderEmail) && gagajf.isNull(orderNm) && gagajf.isNull(custNo)) {
|
|
|
|
|
+ mcxDialog.alert("정보가 올바르지 않습니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ $('#orderDetailInfo input[name=orderEmail]').val(orderEmail);
|
|
|
|
|
+ $('#orderDetailInfo input[name=orderNm]').val(orderNm);
|
|
|
|
|
+ $('#orderDetailInfo input[name=custNo]').val(custNo);
|
|
|
|
|
+
|
|
|
|
|
+ var param = {};
|
|
|
|
|
+ param.elementRecipEmail = '#orderDetailInfo input[name=orderEmail]';
|
|
|
|
|
+ param.elementCustNm = '#orderDetailInfo input[name=orderNm]';
|
|
|
|
|
+ param.elementCustNo = '#orderDetailInfo input[name=custNo]';
|
|
|
|
|
+
|
|
|
|
|
+ cfnOpenEmailPopup(param);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 송장조회
|
|
|
|
|
+ var fnSearchDelivery = function (url, invoiceNo) {
|
|
|
|
|
+ var fullUrl = url + invoiceNo;
|
|
|
|
|
+ window.open(fullUrl, '_blank');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 카드전표 영수증 조회
|
|
|
|
|
+ var fnReceiptPage = function (tid) {
|
|
|
|
|
+ var fullUrl = "https://npg.nicepay.co.kr/issue/IssueLoader.do?TID=" + tid + "&type=0";
|
|
|
|
|
+ window.open(fullUrl, '_blank');
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 수동 회수 지시
|
|
|
|
|
+ var fnWdinvocieSend = function (ordChgSq) {
|
|
|
|
|
+ mcxDialog.confirm("요청번호 [" + ordChgSq + "] 회수지시 처리 하시겠습니까? <br> 시스템에서 회수지시를 보내지는않습니다.", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = new Object();
|
|
|
|
|
+ data.ordChgSq = ordChgSq;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/wdinvoice/send/save'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 구매확정철회
|
|
|
|
|
+ var fnChangedCompleteDelivery = function (ordNo, ordDtlNo, ordDtlStat) {
|
|
|
|
|
+ if ('70' !== ordDtlStat) {
|
|
|
|
|
+ mcxDialog.alert("구매확정철회는 구매확정인 상태여만 가능합니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var data = {};
|
|
|
|
|
+ data.ordDtlNo = ordDtlNo;
|
|
|
|
|
+ data.ordNo = ordNo;
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/order/check/status', jsonData, fnChangedCompleteDeliveryCallback);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ var fnChangedCompleteDeliveryCallback = function (result) {
|
|
|
|
|
+ // 구매확정 처리 가능 하지 않으면 얼럿 노출 끝
|
|
|
|
|
+ if (!result.isPossible) {
|
|
|
|
|
+ mcxDialog.alert("구매확정철회는 구매확정인 상태여만 가능합니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ mcxDialog.confirm("구매확정 철회 하시겠습니까? <br> 지급된 포인트에 대한 처리는 별도로 하셔야 합니다. ", {
|
|
|
|
|
+ cancelBtnText : "취소",
|
|
|
|
|
+ sureBtnText : "확인",
|
|
|
|
|
+ sureBtnClick : function () {
|
|
|
|
|
+ var data = {};
|
|
|
|
|
+ data.ordDtlNo = result.ordDtlNo;
|
|
|
|
|
+ data.ordNo = result.ordNo;
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit(
|
|
|
|
|
+ '/order/complete/delivery/changed'
|
|
|
|
|
+ , jsonData
|
|
|
|
|
+ , function (result) {
|
|
|
|
|
+ uifnPopClose('popupOrderDetail');
|
|
|
|
|
+ fnReOpenOrderDetailPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
</html>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|