|
|
@@ -263,7 +263,6 @@
|
|
|
<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 btn-info btn-sm" onclick="fnGoodsStatArea();" >상태일괄적용</button>
|
|
|
- <button type="button" class="btn btn-info btn-sm" onclick="fnGoodsStaSelfNotArea();" >입점상태일괄적용</button>
|
|
|
</th:block>
|
|
|
</li>
|
|
|
</ul>
|
|
|
@@ -420,26 +419,7 @@
|
|
|
</table>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <ul class="boxContent off" id="goodsStatSelfNoArea">
|
|
|
- <li class="pad20">
|
|
|
- <table class="frmStyle">
|
|
|
- <colgroup>
|
|
|
- <col width="7%"/>
|
|
|
- <col/>
|
|
|
- </colgroup>
|
|
|
- <tr>
|
|
|
- <th>상품상태</th>
|
|
|
- <td>
|
|
|
- <select name="goodsStatNC" id="goodsStatNC">
|
|
|
- <option value="">[선택]</option>
|
|
|
- <option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
- <button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsStateSelfNo('goodsStat')">적용</button>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+
|
|
|
<!-- 검색결과 영역 -->
|
|
|
</div>
|
|
|
</form>
|
|
|
@@ -1016,75 +996,10 @@
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
- // 입점 상품상태 변경시
|
|
|
- var fnChangeGoodsStateSelfNo = function(proc){
|
|
|
-
|
|
|
- var objId = '#'+proc+"NC";
|
|
|
-
|
|
|
- if (gagajf.isNull($(objId).val())){
|
|
|
- mcxDialog.alertC('적용하실 항목을 선택(입력)해주세요.', {
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- $(objId).focus();
|
|
|
- }
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- var selectedData = gridOptions.api.getSelectedRows();
|
|
|
-
|
|
|
- if (selectedData.length == 0) {
|
|
|
- mcxDialog.alert('선택된 행이 없습니다.');
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- var checkFlag = false;
|
|
|
- $.each(selectedData, function(idx, item) {
|
|
|
- if (item.selfGoodsYn == 'Y'){
|
|
|
- checkFlag = true;
|
|
|
- mcxDialog.alert(item.goodsCd + ' 자사상품은 수정하실 수 없습니다.');
|
|
|
- return;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (checkFlag){
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- var goodsStatVal = '';
|
|
|
-
|
|
|
- if (proc == "goodsStat") {
|
|
|
- goodsStatVal = $(objId).val();
|
|
|
- }else{
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- mcxDialog.confirm('적용 하시겠습니까?', {
|
|
|
- cancelBtnText: "취소",
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function(){
|
|
|
- var arrGoodsCd = [];
|
|
|
-
|
|
|
- $.each(selectedData, function(idx, item) {
|
|
|
- arrGoodsCd.push(item.goodsCd);
|
|
|
- });
|
|
|
-
|
|
|
- var data = {arrGoodsCd: arrGoodsCd
|
|
|
- ,goodsStat : goodsStatVal
|
|
|
- ,procJob : proc
|
|
|
- };
|
|
|
-
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
- gagajf.ajaxJsonSubmit('/goods/state/update', jsonData, fnChangeGoodsStateCollback);
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
var fnChangeGoodsStateCollback = function(result){
|
|
|
if (result.resultFlag == "FAIL"){
|
|
|
- mcxDialog.alert("[ " + result.returnGoods + " ]은<br/>이미지, 가격, 고시정보 가 등록되지 않아 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.<br/>상품을 확인하시고, 다시 시도해주세요.");
|
|
|
+ mcxDialog.alert("[ " + result.returnGoods + " ]은<br/> 필수 이미지나 가격이나 고시정보가 등록되지 않아 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.<br/>상품을 확인하시고, 다시 시도해주세요.");
|
|
|
return false;
|
|
|
}else{
|
|
|
mcxDialog.alert('성공적으로 저장되었습니다.');
|
|
|
@@ -1097,28 +1012,13 @@
|
|
|
if ($("#searchForm").find("#goodsStatArea").hasClass('off')) {
|
|
|
$("#searchForm").find("#goodsStatArea").removeClass('off');
|
|
|
$("#searchForm").find("#goodsStatArea").addClass('on');
|
|
|
-
|
|
|
- $("#searchForm").find("#goodsStatSelfNoArea").removeClass('on');
|
|
|
- $("#searchForm").find("#goodsStatSelfNoArea").addClass('off');
|
|
|
}else{
|
|
|
$("#searchForm").find("#goodsStatArea").removeClass('on');
|
|
|
$("#searchForm").find("#goodsStatArea").addClass('off');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 입점 상태일괄변경 버튼 클릭시
|
|
|
- var fnGoodsStaSelfNotArea = function(){
|
|
|
- if ($("#searchForm").find("#goodsStatSelfNoArea").hasClass('off')) {
|
|
|
- $("#searchForm").find("#goodsStatSelfNoArea").removeClass('off');
|
|
|
- $("#searchForm").find("#goodsStatSelfNoArea").addClass('on');
|
|
|
-
|
|
|
- $("#searchForm").find("#goodsStatArea").removeClass('on');
|
|
|
- $("#searchForm").find("#goodsStatArea").addClass('off');
|
|
|
- }else{
|
|
|
- $("#searchForm").find("#goodsStatSelfNoArea").removeClass('on');
|
|
|
- $("#searchForm").find("#goodsStatSelfNoArea").addClass('off');
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
//세트상품구성 클릭 시
|
|
|
$('#btnGoodsSetMake').click(function(e) {
|