|
|
@@ -22,18 +22,20 @@
|
|
|
<!-- 메뉴 설명 -->
|
|
|
<div class="infoBox menu-desc">
|
|
|
</div>
|
|
|
- <form id="goodsPriceHstForm" name="goodsPriceHstForm" action="#" th:action="@{'/goods/price/hst/list'}">
|
|
|
+ <form id="goodsPriceHstForm" name="goodsPriceHstForm" action="#" th:action="@{'/goods/supply/price/list'}">
|
|
|
<input type="hidden" id="confirmY" name="confirmY">
|
|
|
<!-- 패널 영역1 -->
|
|
|
<div class="panelStyle" >
|
|
|
<div class="panelTitle">
|
|
|
- <h3><i class="fa fa-info-circle"></i>아래 검색조건 중 하나를 꼭 입력해 주세요.</h3>
|
|
|
+ <h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 상품코드, 발생일</font> 중 하나를 꼭 입력해 주세요.</h3>
|
|
|
</div>
|
|
|
<div class="panelContent">
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
<col width="10%"/>
|
|
|
- <col width="40%"/>
|
|
|
+ <col width="23%"/>
|
|
|
+ <col width="10%"/>
|
|
|
+ <col width="23%"/>
|
|
|
<col width="10%"/>
|
|
|
<col/>
|
|
|
</colgroup>
|
|
|
@@ -41,7 +43,7 @@
|
|
|
<th>업체/브랜드</th>
|
|
|
<td>
|
|
|
<select name="supplyCompCd" id="supplyCompCd">
|
|
|
- <option value="" th:if="${sessionInfo.roleCd} != 'A101'">[전체]</option>
|
|
|
+ <option value="" >[전체]</option>
|
|
|
<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
</select>
|
|
|
<select name="brandCd" id="brandCd">
|
|
|
@@ -52,17 +54,24 @@
|
|
|
<td>
|
|
|
<input type="text" class="w150" name="goodsCd" id="goodsCd" maxlength="50"/>
|
|
|
</td>
|
|
|
+ <th>승인여부</th>
|
|
|
+ <td>
|
|
|
+ <select name="cfrmYn" id="cfrmYn">
|
|
|
+ <option value="">[전체]</option>
|
|
|
+ <option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>발생일</th>
|
|
|
- <td colspan="3" id="sellTerms"></td>
|
|
|
+ <td colspan="5" id="sellTerms"></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
<ul class="panelBar">
|
|
|
<li class="center">
|
|
|
<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
|
|
|
<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
|
|
|
- <button type="button" class="btn btn-base btn-lg" id="btnConfirmSearch" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">미승인목록 조회</button>
|
|
|
+ <!-- <button type="button" class="btn btn-base btn-lg" id="btnConfirmSearch" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">미승인목록 조회</button> -->
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -94,11 +103,8 @@
|
|
|
columnDefs = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
- {headerName: "등록일", field: "regYmd", width: 90, cellClass: 'text-center',
|
|
|
- cellRenderer: function(params) {
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDD").format("YYYY-MM-DD") : '';
|
|
|
- }
|
|
|
- },
|
|
|
+ {headerName: "업체", field: "supplyCompNm" , width: 100, cellClass: 'text-center'},
|
|
|
+ {headerName: "브랜드", field: "brandEnm" , width: 100, cellClass: 'text-center'},
|
|
|
{headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'
|
|
|
,cellRenderer: function(params) {
|
|
|
return '<a href="javascript:void(0);">' + params.value + '</a>';
|
|
|
@@ -109,36 +115,45 @@
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
|
|
|
},
|
|
|
- {headerName: "온라인 판매가", field: "onPrice", width: 120, cellClass: 'text-right'
|
|
|
+ {headerName: "온라인 현재판매가", field: "currPrice", width: 120, cellClass: 'text-right'
|
|
|
,valueFormatter: function(params) {return params.value.addComma();}
|
|
|
},
|
|
|
- {headerName: "판매가조정대상금액", field: "gapPrice", width: 140, cellClass: 'text-right'
|
|
|
+ {headerName: "판매가조정대상금액", field: "resGoodsPrice", width: 140, cellClass: 'text-right'
|
|
|
,cellRenderer: function(params) {
|
|
|
- var gapPrice = Number(params.data.onPrice) - Number(params.data.erpPrice);
|
|
|
-
|
|
|
- if (gapPrice >= 0){
|
|
|
- return '<font color="red"> '+ gapPrice.addComma() +'</font>';
|
|
|
+ if (params.data.resGoodsPrice <= 0){
|
|
|
+ return "-";
|
|
|
}else{
|
|
|
- return '<font color="blue"> '+ gapPrice.addComma() +'</font>';
|
|
|
+ var gapPrice = Number(params.data.currPrice) - Number(params.data.resGoodsPrice);
|
|
|
+
|
|
|
+ if (gapPrice >= 0){
|
|
|
+ return '<font color="red"> '+ params.value.addComma() +'</font>';
|
|
|
+ }else{
|
|
|
+ return '<font color="blue"> '+ params.value.addComma() +'</font>';
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- {headerName: "온라인 판매수수료", field: "onTagPrice", width: 140, cellClass: 'text-right'
|
|
|
+ {headerName: "온라인 판매수수료", field: "goodsSellFeeRate", width: 140, cellClass: 'text-right'
|
|
|
,valueFormatter: function(params) {return params.value.addComma();}
|
|
|
},
|
|
|
- {headerName: "판매수수료 조정대상수수료", field: "gapTagPrice", width: 180, cellClass: 'text-right'
|
|
|
+ {headerName: "판매수수료 조정대상수수료", field: "sellFeeRate", width: 180, cellClass: 'text-right'
|
|
|
,cellRenderer: function(params) {
|
|
|
- var gapTagPrice = Number(params.data.onTagPrice) - Number(params.data.erpTagPrice);
|
|
|
-
|
|
|
- if (gapTagPrice >= 0){
|
|
|
- return '<font color="red"> '+ gapTagPrice.addComma() +'</font>';
|
|
|
+ if (gagajf.isNull(params.data.sellFeeRate)){
|
|
|
+ return "-";
|
|
|
}else{
|
|
|
- return '<font color="blue"> '+ gapTagPrice.addComma() +'</font>';
|
|
|
- }
|
|
|
+ var gapRate = Number(params.data.goodsSellFeeRate) - Number(params.data.sellFeeRate);
|
|
|
+
|
|
|
+ if (gapRate >= 0){
|
|
|
+ return '<font color="red"> '+ params.data.sellFeeRate +'</font>';
|
|
|
+ }else{
|
|
|
+ return '<font color="blue"> '+ params.data.sellFeeRate +'</font>';
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- {headerName: "승인자", field: "applyId", width: 130, cellClass: 'text-center'},
|
|
|
- {headerName: "승인일자", field: "applyDt" , width: 150, cellClass: 'text-center',
|
|
|
+ {headerName: "승인자", field: "cfrmNm", width: 130, cellClass: 'text-center'},
|
|
|
+ {headerName: "승인일자", field: "cfrmDt" , width: 150, cellClass: 'text-center',
|
|
|
cellRenderer: function(params) {
|
|
|
return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
}
|
|
|
@@ -148,7 +163,7 @@
|
|
|
return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
}
|
|
|
},
|
|
|
- {headerName: "등록자", field: "regId" , width: 100, cellClass: 'text-center'}
|
|
|
+ {headerName: "등록자", field: "regNm" , width: 100, cellClass: 'text-center'}
|
|
|
|
|
|
];
|
|
|
|
|
|
@@ -239,7 +254,7 @@
|
|
|
for (i = 0; i < form.elements.length; i++ ) {
|
|
|
var el = form.elements[i];
|
|
|
|
|
|
- if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "dateGbn")) {
|
|
|
+ if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "dateGbn" && el.name != "cfrmYn")) {
|
|
|
if (!(el.value == null || el.value == "")) {
|
|
|
cnt++;
|
|
|
}
|
|
|
@@ -286,10 +301,10 @@
|
|
|
// 승인 클릭 시
|
|
|
$('#btnSaveGoodsPriceConfirm').on('click', function() {
|
|
|
|
|
|
- if ($("#goodsPriceHstForm input[name=confirmY]").val() != "Y"){
|
|
|
+ /* if ($("#goodsPriceHstForm input[name=confirmY]").val() != "Y"){
|
|
|
mcxDialog.alert("미승인목록 조회후 승인하세요.");
|
|
|
return false;
|
|
|
- }
|
|
|
+ } */
|
|
|
|
|
|
var selectedData = gagaAgGrid.selectedRowData(gridOptions);
|
|
|
|
|
|
@@ -297,19 +312,37 @@
|
|
|
mcxDialog.alert('선택된 행이 없습니다.');
|
|
|
return;
|
|
|
}
|
|
|
+ var checkFlag = false;
|
|
|
+ $.each(selectedData, function(idx, item) {
|
|
|
|
|
|
+ if (!gagajf.isNull(item.cfrmDt)){
|
|
|
+ checkFlag = true;
|
|
|
+ mcxDialog.alertC(item.goodsCd +" 상품은 승인된 상품입니다. ",{
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ gridOptions.api.setFocusedCell(idx, "goodsCd", null);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ if (checkFlag){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
mcxDialog.confirm('승인 하시겠습니까?',{
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
|
var jsonData = JSON.stringify(selectedData);
|
|
|
- gagajf.ajaxJsonSubmit('/goods/price/hst/save', jsonData, fnSaveGoodsPriceConfirmCollBack);
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/supply/price/save', jsonData, fnSaveGoodsPriceConfirmCollBack);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
var fnSaveGoodsPriceConfirmCollBack = function(){
|
|
|
- fnGoodsPriceHstListSearch('Y');
|
|
|
+ fnGoodsPriceHstListSearch('N');
|
|
|
}
|
|
|
|
|
|
$(document).ready(function() {
|