|
|
@@ -20,13 +20,15 @@
|
|
|
<h2>딜 상품 구성</h2>
|
|
|
<button type="button" class="close" onclick="fngoodsDealFormClose()"><i class="fa fa-times"></i></button>
|
|
|
</div>
|
|
|
+ <form id="goodsDealForm" name="goodsDealForm" th:method="post">
|
|
|
+ <input type="hidden" id="goodsComposeList" name="goodsComposeList" />
|
|
|
<div class="panelContent">
|
|
|
<ul class="notice">
|
|
|
<li>구성상품 등록시 기본값
|
|
|
<!-- 아이콘 툴팁 -->
|
|
|
<div class="iconTooltip">
|
|
|
<i class="fa fa-info" aria-hidden="true"></i>
|
|
|
- <span class="left" style="width:400px; text-align:left;">
|
|
|
+ <span class="left" style="width:450px; text-align:left;">
|
|
|
- 상품상태 : 정보부족<br/>
|
|
|
- 정상가 : 판매가 입력값<br/>
|
|
|
- 브랜드코드 : 구성상품의 기준여부 'Y'상품의 브랜드코드<br/>
|
|
|
@@ -39,8 +41,6 @@
|
|
|
<!-- //아이콘 툴팁 -->
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <form id="goodsDealForm" name="goodsDealForm" th:method="post">
|
|
|
- <input type="hidden" id="compsGoodsList" name="compsGoodsList" />
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
<col width="10%"/>
|
|
|
@@ -51,17 +51,17 @@
|
|
|
<col width="23%"/>
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
- <th>상품명<i class="star"></i></th>
|
|
|
+ <th>상품명<em class="required" title="필수"></em></th>
|
|
|
<td><input type="text" id="goodsNm" name="goodsNm" maxlength="60"/></td>
|
|
|
- <th>판매가<i class="star"></i></th>
|
|
|
+ <th>판매가<em class="required" title="필수"></em></th>
|
|
|
<td><input type="text" class="w100" id="currPrice" name="currPrice" maxlength="8" data-valid-type="numeric"/></td>
|
|
|
- <th>자사노출여부<i class="star"></i></th>
|
|
|
+ <th>자사노출여부<em class="required" title="필수"></em></th>
|
|
|
<td><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>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>년도/시즌<i class="star"></i></th>
|
|
|
+ <th>년도/시즌<em class="required" title="필수"></em></th>
|
|
|
<td colspan="3"><select name="styleYear" id="styleYear">
|
|
|
<option value="">[전체]</option>
|
|
|
<option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
@@ -71,7 +71,7 @@
|
|
|
<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
</select>
|
|
|
</td>
|
|
|
- <th>성별<i class="star"></i></th>
|
|
|
+ <th>성별<em class="required" title="필수"></em></th>
|
|
|
<td><select name="sexGb" id="sexGb">
|
|
|
<option value="">[전체]</option>
|
|
|
<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
@@ -79,37 +79,38 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>색상<i class="star"></i></th>
|
|
|
+ <th>색상<em class="required" title="필수"></em></th>
|
|
|
<td >
|
|
|
<select name="colorCd" id="colorCd">
|
|
|
<option value="">[전체]</option>
|
|
|
<option th:if="${colorCdList}" th:each="oneData, status : ${colorCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
</select>
|
|
|
</td>
|
|
|
- <th>원산지<i class="star"></i></th>
|
|
|
+ <th>원산지<em class="required" title="필수"></em></th>
|
|
|
<td><input type="text" class="w100" id="makeNm" name="makeNm" maxlength="20" /></td>
|
|
|
- <th>제조년월일<i class="star"></i></th>
|
|
|
+ <th>제조년월일<em class="required" title="필수"></em></th>
|
|
|
<td><input type="text" class="w100" id="makeYmd" name="makeYmd" maxlength="8" data-valid-type="date"/></td>
|
|
|
</tr>
|
|
|
- <tr>
|
|
|
- <th>제조년월일<i class="star"></i></th>
|
|
|
- <td colspan="5"><input type="text" class="w100" id="makeYmd" name="makeYmd" maxlength="8" data-valid-type="date"/></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
</table>
|
|
|
- <div class="padT15 padB15">
|
|
|
+ </div>
|
|
|
+ <ul class="panelBar">
|
|
|
+ <li class="left">
|
|
|
<button type="button" class="btn btn-danger btn-lg" onclick="fnGoodsDealDeleteRow();">행삭제</button>
|
|
|
- <button type="button" class="btn btnRight btn-base btn-lg" onclick="fnOpenGoodsDealPopup();">구상상품추가</button>
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDealSearchExcel" >엑셀조회</button>
|
|
|
+ </li>
|
|
|
+ <li class="right">
|
|
|
<button type="button" class="btn btnRight btn-default btn-lg" onclick="cfnDownloadSampleFile('SF003');">상품엑셀조회 양식 다운로드</button>
|
|
|
- </div>
|
|
|
- <div id="gridGoodsDealList" style="height: 450px;" class="ag-theme-balham lh60"></div>
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDealSearchExcel" >엑셀조회</button>
|
|
|
+ <button type="button" class="btn btnRight btn-base btn-lg" onclick="fnOpenGoodsDealPopup();">구상상품추가</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div id="gridGoodsDealList" style="height: 450px;" class="ag-theme-balham lh60"></div>
|
|
|
</form>
|
|
|
- </div>
|
|
|
<ul class="panelBar">
|
|
|
- <th:block th:if="${sessionInfo.roleCd == '0000' OR sessionInfo.roleCd == 'A000' OR sessionInfo.roleCd == 'A101' OR sessionInfo.roleCd == 'A100' OR sessionInfo.roleCd == 'A001'}">
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDealSave">저장</button>
|
|
|
- </th:block>
|
|
|
+ <li class="right">
|
|
|
+ <th:block 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 type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDealSave">저장</button>
|
|
|
+ </th:block>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -120,35 +121,35 @@
|
|
|
// specify the columns
|
|
|
var columnGoodsDealDefs = [
|
|
|
{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
+ {headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
|
|
|
{headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center', rowDrag: true },
|
|
|
//{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
|
|
|
,cellRenderer: function(params) {
|
|
|
- if (params.data.imgType == "A"){
|
|
|
- if(!gagajf.isNull(params.data.imgPath6)){
|
|
|
- return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6.replace("/1000/","/100/") + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
- }else{
|
|
|
- return '<img width="60" src="'+ uploadGoodsUrl+params.value.replace("/1000/","/100/") + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
- }
|
|
|
- }else{
|
|
|
- if(!gagajf.isNull(params.data.imgPath6)){
|
|
|
- return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
- }else{
|
|
|
+ if (params.data.imgType == "G030_A"){
|
|
|
+ if (gagajf.isNull(params.value)) {
|
|
|
+ return '<img width="60" src="'+ params.data.imgPath6 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
+ } else {
|
|
|
return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
}
|
|
|
+
|
|
|
+ }else{
|
|
|
+ return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
|
|
|
{headerName: "옵션명", field: "compsGoodsOptNm" , width: 250, cellClass: 'text-left',editable: true, required: true},
|
|
|
- {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "기준여부(품목/전시카테)", field: "baseYn" , width: 180, cellClass: 'text-center',editable: true, required: true,
|
|
|
+ {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
|
|
|
+ ,valueFormatter: function(params) {return params.value.addComma();}
|
|
|
+ },
|
|
|
+ {headerName: "기준여부(품목/전시카테)", field: "baseYn" , width: 170, cellClass: 'text-center',editable: true, required: true,
|
|
|
cellEditor: 'agRichSelectCellEditor',
|
|
|
cellEditorParams: { values: gagaAgGrid.extractValues(useYnList) },
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
|
|
|
},
|
|
|
- {headerName: "전시여부", field: "useYn" , width: 90, cellClass: 'text-center',editable: true, required: true,
|
|
|
+ {headerName: "전시여부", field: "useYn" , width: 80, cellClass: 'text-center',editable: true, required: true,
|
|
|
cellEditor: 'agRichSelectCellEditor',
|
|
|
cellEditorParams: { values: gagaAgGrid.extractValues(useYnList) },
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
|
|
|
@@ -160,18 +161,6 @@
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
|
|
|
},
|
|
|
{headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right',hide:true}
|
|
|
- /* {headerName: "등록일자", field: "regDt", width: 150, cellClass: 'text-center' ,
|
|
|
- cellRenderer: function(params) {
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
- }
|
|
|
- },
|
|
|
- {headerName: "등록자", field: "regId", width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "수정일자", field: "regDt", width: 150, cellClass: 'text-center' ,
|
|
|
- cellRenderer: function(params) {
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
- }
|
|
|
- },
|
|
|
- {headerName: "수정자", field: "regId", width: 100, cellClass: 'text-center'} */
|
|
|
];
|
|
|
|
|
|
// Get GridOptions
|
|
|
@@ -247,14 +236,14 @@
|
|
|
isExist = true;
|
|
|
}
|
|
|
});
|
|
|
- if (goods.goodsType != 'N'){
|
|
|
+ if (goods.goodsType != 'G056_N'){
|
|
|
isExist = true;
|
|
|
}
|
|
|
|
|
|
if(!isExist){
|
|
|
var data = {
|
|
|
compsGoodsCd: goods.goodsCd
|
|
|
- , goodsType: 'D'
|
|
|
+ , goodsType: 'G056_D'
|
|
|
, dispOrd: idx
|
|
|
, qty: 1
|
|
|
, compsCurrPrice: goods.currPrice
|
|
|
@@ -308,8 +297,8 @@
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function(){
|
|
|
- var compsGoodsList = gagaAgGrid.getAllRowData(gridGoodsDealOptions);
|
|
|
- $("#goodsDealForm input[name=compsGoodsList]").val(JSON.stringify(compsGoodsList));
|
|
|
+ var goodsComposeList = gagaAgGrid.getAllRowData(gridGoodsDealOptions);
|
|
|
+ $("#goodsDealForm input[name=goodsComposeList]").val(JSON.stringify(goodsComposeList));
|
|
|
gagajf.ajaxFormSubmit("/goods/deal/save", "#goodsDealForm", fngoodsDealFormClose);
|
|
|
}
|
|
|
});
|
|
|
@@ -461,7 +450,7 @@
|
|
|
checkBaseYn = true;
|
|
|
}
|
|
|
|
|
|
- if(item.goodsStat != "90"){
|
|
|
+ if(item.goodsStat != "G008_90"){
|
|
|
optCheck = true;
|
|
|
mcxDialog.alertC("상품상태를 확인해 주세요.", {
|
|
|
sureBtnText: "확인",
|
|
|
@@ -520,7 +509,7 @@
|
|
|
}
|
|
|
|
|
|
//상품삭제
|
|
|
- var fnGoodsDealDeleteRow = function() {
|
|
|
+ var fnGoodsDealDeleteRow = function() {debugger;
|
|
|
var selectedData = gagaAgGrid.selectedRowData(gridGoodsDealOptions);
|
|
|
|
|
|
if (selectedData.length == 0) {
|
|
|
@@ -528,15 +517,8 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- var iTotalCnt = 0;
|
|
|
- var iCnt = 0;
|
|
|
- $.each(selectedData, function(index, item) {
|
|
|
- iTotalCnt ++;
|
|
|
- if (item.crud == "C"){
|
|
|
- gridGoodsDealOptions.api.updateRowData({remove: [item]});
|
|
|
- iCnt ++;
|
|
|
- }
|
|
|
- });
|
|
|
+ //화면에서 삭제
|
|
|
+ var removedData = gagaAgGrid.removeRowData(gridGoodsDealOptions, false);
|
|
|
}
|
|
|
|
|
|
/*]]>*/
|