|
|
@@ -266,7 +266,7 @@
|
|
|
},
|
|
|
{
|
|
|
headerName: "판매수수료율(%)", field: "sellFeeRate", width: 120, cellClass: 'text-center',
|
|
|
- cellRenderer: function (params) { return params.value + '%'; }
|
|
|
+ cellRenderer: function (params) { return gagajf.isNull(params.value) ? '' : params.value + '%'; }
|
|
|
},
|
|
|
{
|
|
|
headerName: "수수료", field: "sellFeeAmt", width: 100, cellClass: 'text-right',
|
|
|
@@ -365,9 +365,73 @@
|
|
|
if (!gagajf.validation($('#searchForm')))
|
|
|
return false;
|
|
|
|
|
|
- gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
|
+ gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm', fnCreateTotal);
|
|
|
});
|
|
|
|
|
|
+ // 합계 생성
|
|
|
+ var fnCreateTotal = function() {
|
|
|
+// var mallPrice = 0; // 판매가
|
|
|
+// var sellPrice = 0; // 정산판매가
|
|
|
+ var sellQty = 0; // 판매수량
|
|
|
+ var sellAmt = 0; // 판매총액
|
|
|
+ var cpnDcAmt = 0; // 쿠폰할인금액
|
|
|
+ var cpn1DcAmt = 0; // 즉시사용쿠폰금액
|
|
|
+ var goodsCpnDcAmt = 0; // 상품쿠폰사용금액
|
|
|
+ var cartCpnDcAmt = 0; // 주문서쿠폰사용금액
|
|
|
+ var pntDcAmt = 0; // 포인트사용금액
|
|
|
+ var tmtbDcAmt = 0; // 다다익선할인금액
|
|
|
+ var selfTmtbDcAmt = 0; // 자사다다익선분담액
|
|
|
+ var supplyCompTmtbDcAmt = 0; // 입점다다익선분담액
|
|
|
+ var gfcdUseAmt = 0; // 상품권사용금액
|
|
|
+ var selfCpnDcAmt = 0; // 자사쿠폰분담액
|
|
|
+ var supplyCompCpnDcAmt = 0; // 입점쿠폰분담액
|
|
|
+ var realSellPrice = 0; // 실판매가
|
|
|
+ var realSellAmt = 0; // 상품총액
|
|
|
+ var sellFeeAmt = 0; // 수수료
|
|
|
+ var settleAmt = 0; // 정산대상액
|
|
|
+
|
|
|
+ gridOptions.api.forEachNode(function(rowNode, index) {
|
|
|
+ if (!rowNode.group) {
|
|
|
+// if (typeof rowNode.data.mallPrice == 'number') { mallPrice += rowNode.data.mallPrice; }
|
|
|
+// if (typeof rowNode.data.sellPrice =='number') { sellPrice += rowNode.data.sellPrice; }
|
|
|
+ if (typeof rowNode.data.sellQty =='number') { sellQty += rowNode.data.sellQty; }
|
|
|
+ if (typeof rowNode.data.sellAmt =='number') { sellAmt += rowNode.data.sellAmt; }
|
|
|
+ if (typeof rowNode.data.cpnDcAmt =='number') { cpnDcAmt += rowNode.data.cpnDcAmt; }
|
|
|
+ if (typeof rowNode.data.cpn1DcAmt =='number') { cpn1DcAmt += rowNode.data.cpn1DcAmt; }
|
|
|
+ if (typeof rowNode.data.goodsCpnDcAmt =='number') { goodsCpnDcAmt += rowNode.data.goodsCpnDcAmt; }
|
|
|
+ if (typeof rowNode.data.cartCpnDcAmt =='number') { cartCpnDcAmt += rowNode.data.cartCpnDcAmt; }
|
|
|
+ if (typeof rowNode.data.pntDcAmt =='number') { pntDcAmt += rowNode.data.pntDcAmt; }
|
|
|
+ if (typeof rowNode.data.tmtbDcAmt =='number') { tmtbDcAmt += rowNode.data.tmtbDcAmt; }
|
|
|
+ if (typeof rowNode.data.selfTmtbDcAmt =='number') { selfTmtbDcAmt += rowNode.data.selfTmtbDcAmt; }
|
|
|
+ if (typeof rowNode.data.supplyCompTmtbDcAmt =='number') { supplyCompTmtbDcAmt += rowNode.data.supplyCompTmtbDcAmt; }
|
|
|
+ if (typeof rowNode.data.gfcdUseAmt =='number') { gfcdUseAmt += rowNode.data.gfcdUseAmt; }
|
|
|
+ if (typeof rowNode.data.selfCpnDcAmt =='number') { selfCpnDcAmt += rowNode.data.selfCpnDcAmt; }
|
|
|
+ if (typeof rowNode.data.supplyCompCpnDcAmt =='number') { supplyCompCpnDcAmt += rowNode.data.supplyCompCpnDcAmt; }
|
|
|
+ if (typeof rowNode.data.realSellPrice =='number') { realSellPrice += rowNode.data.realSellPrice; }
|
|
|
+ if (typeof rowNode.data.realSellAmt =='number') { realSellAmt += rowNode.data.realSellAmt; }
|
|
|
+ if (typeof rowNode.data.sellFeeAmt =='number') { sellFeeAmt += rowNode.data.sellFeeAmt; }
|
|
|
+ if (typeof rowNode.data.settleAmt =='number') { settleAmt += rowNode.data.settleAmt; }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ var data = {
|
|
|
+ ordNo: null, ordDtlNo: null, mallGbNm: null, extmallOrderId: null, extmallNm: null,
|
|
|
+ supplyVendorNm: null, distributionGbNm: null, settleDayNm: null,
|
|
|
+ ordDt: null, settleGbNm: null, occurDt: null,
|
|
|
+ goodsCd: null, goodsNm: null, brandEnm: null, mdNm: null, itemCd: null, optCd1: null, optCd2: '합계',
|
|
|
+// mallPrice: mallPrice, sellPrice: sellPrice,
|
|
|
+ mallPrice: null, sellPrice: null,
|
|
|
+ sellQty: sellQty, sellAmt: sellAmt,
|
|
|
+ cpnDcAmt: cpnDcAmt, cpn1DcAmt: cpn1DcAmt, goodsCpnDcAmt: goodsCpnDcAmt, cartCpnDcAmt: cartCpnDcAmt,
|
|
|
+ pntDcAmt: pntDcAmt, tmtbDcAmt: tmtbDcAmt, selfTmtbDcAmt: selfTmtbDcAmt, supplyCompTmtbDcAmt: supplyCompTmtbDcAmt,
|
|
|
+ gfcdUseAmt: gfcdUseAmt, selfCpnDcAmt: selfCpnDcAmt, supplyCompCpnDcAmt: supplyCompCpnDcAmt,
|
|
|
+ realSellPrice: realSellPrice, realSellAmt: realSellAmt,
|
|
|
+ sellFeeRate: null, sellFeeAmt: sellFeeAmt, settleAmt: settleAmt
|
|
|
+ };
|
|
|
+
|
|
|
+ gagaAgGrid.setPinnedRowData(gridOptions, data, 'top');
|
|
|
+ }
|
|
|
+
|
|
|
// 초기화 클릭시
|
|
|
$('#btnInit').on('click', function() {
|
|
|
$('#searchForm')[0].reset();
|