|
@@ -97,7 +97,7 @@
|
|
|
<div class="panelStyle">
|
|
<div class="panelStyle">
|
|
|
<form id="detailForm" name="detailForm" action="#" th:action="@{'/business/brand/save'}">
|
|
<form id="detailForm" name="detailForm" action="#" th:action="@{'/business/brand/save'}">
|
|
|
<input type="hidden" name="mode" value="N"/>
|
|
<input type="hidden" name="mode" value="N"/>
|
|
|
-
|
|
|
|
|
|
|
+ <input type="hidden" name="brandSupplyListInfo" />
|
|
|
<table class="frmStyle" aria-describedby="등록/수정 폼">
|
|
<table class="frmStyle" aria-describedby="등록/수정 폼">
|
|
|
<colgroup>
|
|
<colgroup>
|
|
|
<col style="width:10%;"/>
|
|
<col style="width:10%;"/>
|
|
@@ -132,19 +132,20 @@
|
|
|
<label class="rdoBtn"><input type="radio" name="dispNmLang" value="KR">국문</label>
|
|
<label class="rdoBtn"><input type="radio" name="dispNmLang" value="KR">국문</label>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
- <tr>
|
|
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <!--
|
|
|
<th>공급업체<i class="required" title="필수"></i></th>
|
|
<th>공급업체<i class="required" title="필수"></i></th>
|
|
|
<td>
|
|
<td>
|
|
|
-
|
|
|
|
|
-<!-- <select name="supplyCompCd" required="required" data-valid-name="공급업체">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- </select>
|
|
|
|
|
- -->
|
|
|
|
|
<input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
|
|
<input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
|
|
|
<button type="button" class="btn icn" id="btnSearchSupplyComp"><i class="fa fa-search"></i></button>
|
|
<button type="button" class="btn icn" id="btnSearchSupplyComp"><i class="fa fa-search"></i></button>
|
|
|
<input type="text" class="w100" name="supplyCompNm" readonly="readonly"/>
|
|
<input type="text" class="w100" name="supplyCompNm" readonly="readonly"/>
|
|
|
<input type="hidden" class="w100" name="supplyCompCd" />
|
|
<input type="hidden" class="w100" name="supplyCompCd" />
|
|
|
</td>
|
|
</td>
|
|
|
|
|
+ -->
|
|
|
|
|
+ <th>판매수수료율<i class="required" title="필수"></i></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w100 aR" name="sellFeeRate" value="0" maxlength="3" required="required" data-valid-name="판매수수료율" data-valid-type="real"/>%
|
|
|
|
|
+ </td>
|
|
|
<th>유통구분<i class="required" title="필수"></i></th>
|
|
<th>유통구분<i class="required" title="필수"></i></th>
|
|
|
<td>
|
|
<td>
|
|
|
<select name="distributionGb" required="required" data-valid-name="유통구분">
|
|
<select name="distributionGb" required="required" data-valid-name="유통구분">
|
|
@@ -153,7 +154,7 @@
|
|
|
</select>
|
|
</select>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
- <tr>
|
|
|
|
|
|
|
+ <!-- <tr>
|
|
|
<th>출고처<i class="required" title="필수"></i></th>
|
|
<th>출고처<i class="required" title="필수"></i></th>
|
|
|
<td>
|
|
<td>
|
|
|
<select name="delvLocCd">
|
|
<select name="delvLocCd">
|
|
@@ -167,14 +168,7 @@
|
|
|
</select>
|
|
</select>
|
|
|
<span class="marL10 cRed"><i class="fa fa-info-circle" aria-hidden="true"></i> 변경된 배송정책은 이후 등록된 상품부터 적용됩니다.</span>
|
|
<span class="marL10 cRed"><i class="fa fa-info-circle" aria-hidden="true"></i> 변경된 배송정책은 이후 등록된 상품부터 적용됩니다.</span>
|
|
|
</td>
|
|
</td>
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>판매수수료율<i class="required" title="필수"></i></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w100 aR" name="sellFeeRate" value="0" maxlength="3" required="required" data-valid-name="판매수수료율" data-valid-type="real"/>%
|
|
|
|
|
- </td>
|
|
|
|
|
- <td colspan="2"></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
|
|
+ </tr>-->
|
|
|
<tr>
|
|
<tr>
|
|
|
<th>포인트적립율(PC정상)<i class="required" title="필수"></i></th>
|
|
<th>포인트적립율(PC정상)<i class="required" title="필수"></i></th>
|
|
|
<td>
|
|
<td>
|
|
@@ -209,12 +203,10 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
<th>RGB코드</th>
|
|
<th>RGB코드</th>
|
|
|
- <td>
|
|
|
|
|
|
|
+ <td colspan="3">
|
|
|
<input type="text" class="w100 aR" name="rgbCd" maxlength="6" data-valid-name="REG코드" />
|
|
<input type="text" class="w100 aR" name="rgbCd" maxlength="6" data-valid-name="REG코드" />
|
|
|
<span class="marL10 cRed"><i class="fa fa-info-circle" aria-hidden="true"></i> 브랜드메인 GBN 배경색으로 적용, 미 입력시 기본색상으로 설정됩니다.</span>
|
|
<span class="marL10 cRed"><i class="fa fa-info-circle" aria-hidden="true"></i> 브랜드메인 GBN 배경색으로 적용, 미 입력시 기본색상으로 설정됩니다.</span>
|
|
|
</td>
|
|
</td>
|
|
|
- <td colspan="2">
|
|
|
|
|
- </td>
|
|
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr id="brandImgArea" class="off">
|
|
<tr id="brandImgArea" class="off">
|
|
|
<th>브랜드이미지</th>
|
|
<th>브랜드이미지</th>
|
|
@@ -256,11 +248,16 @@
|
|
|
<button type="button" class="btn btn-success btn-lg" id="btnSaveSiteBrand">전시사이트 수정</button>
|
|
<button type="button" class="btn btn-success btn-lg" id="btnSaveSiteBrand">전시사이트 수정</button>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</table>
|
|
</table>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <ul class="panelBar">
|
|
|
|
|
+ <li class="left">
|
|
|
|
|
+ <button type="button" class="btn btn-base btn-lg" id="btnSearchSupplyComp">공급업체조회</button>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <div id="gridList2" style="width: 100%; height: 200px" class="ag-theme-balham"></div>
|
|
|
|
|
+ </div>
|
|
|
</form>
|
|
</form>
|
|
|
-
|
|
|
|
|
<!-- 버튼 배치 영역 -->
|
|
<!-- 버튼 배치 영역 -->
|
|
|
<ul class="panelBar">
|
|
<ul class="panelBar">
|
|
|
<li class="right">
|
|
<li class="right">
|
|
@@ -289,28 +286,28 @@
|
|
|
{headerName: "브랜드영문명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
{headerName: "브랜드영문명", field: "brandEnm", width: 150, cellClass: 'text-center'},
|
|
|
{headerName: "브랜드국문명", field: "brandKnm", width: 150, cellClass: 'text-center'},
|
|
{headerName: "브랜드국문명", field: "brandKnm", width: 150, cellClass: 'text-center'},
|
|
|
{headerName: "브랜드그룹명", field: "brandGrpNm", width: 150, cellClass: 'text-center'},
|
|
{headerName: "브랜드그룹명", field: "brandGrpNm", width: 150, cellClass: 'text-center'},
|
|
|
- {
|
|
|
|
|
|
|
+ /*{
|
|
|
headerName: "공급업체", field: "supplyCompCd", width: 150, cellClass: 'text-center',
|
|
headerName: "공급업체", field: "supplyCompCd", width: 150, cellClass: 'text-center',
|
|
|
valueGetter: function (params) {
|
|
valueGetter: function (params) {
|
|
|
return gagaAgGrid.lookupValue(supplyCompList, params.data.supplyCompCd);
|
|
return gagaAgGrid.lookupValue(supplyCompList, params.data.supplyCompCd);
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
|
|
+ },*/
|
|
|
{
|
|
{
|
|
|
headerName: "유통구분", field: "distributionGb", width: 150, cellClass: 'text-center',
|
|
headerName: "유통구분", field: "distributionGb", width: 150, cellClass: 'text-center',
|
|
|
valueGetter: function (params) {
|
|
valueGetter: function (params) {
|
|
|
return gagaAgGrid.lookupValue(distributionGbList, params.data.distributionGb);
|
|
return gagaAgGrid.lookupValue(distributionGbList, params.data.distributionGb);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- {headerName: "출고처코드", field: "delvLocCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "출고처명", field: "delvLocNm", width: 150, cellClass: 'text-center'},
|
|
|
|
|
|
|
+ /*{headerName: "출고처코드", field: "delvLocCd", width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "출고처명", field: "delvLocNm", width: 150, cellClass: 'text-center'},*/
|
|
|
{headerName: "ERP브랜드코드", field: "erpBrandCd", width: 120, cellClass: 'text-center', hide: true},
|
|
{headerName: "ERP브랜드코드", field: "erpBrandCd", width: 120, cellClass: 'text-center', hide: true},
|
|
|
- {
|
|
|
|
|
|
|
+ /*{
|
|
|
headerName: "무료배송비기준",
|
|
headerName: "무료배송비기준",
|
|
|
children : [
|
|
children : [
|
|
|
{headerName: "기본배송비", field: "delvFee", width: 120, cellClass: 'text-center', valueFormatter: function(params) { return Number(params.value).addComma(); }},
|
|
{headerName: "기본배송비", field: "delvFee", width: 120, cellClass: 'text-center', valueFormatter: function(params) { return Number(params.value).addComma(); }},
|
|
|
{headerName: "최소주문금액", field: "minOrdAmt", width: 120, cellClass: 'text-center', valueFormatter: function(params) { return Number(params.value).addComma(); }}
|
|
{headerName: "최소주문금액", field: "minOrdAmt", width: 120, cellClass: 'text-center', valueFormatter: function(params) { return Number(params.value).addComma(); }}
|
|
|
]
|
|
]
|
|
|
- },
|
|
|
|
|
|
|
+ },*/
|
|
|
{headerName: "판매수수료율(%)", field: "sellFeeRate", width: 150, cellClass: 'text-center'},
|
|
{headerName: "판매수수료율(%)", field: "sellFeeRate", width: 150, cellClass: 'text-center'},
|
|
|
{
|
|
{
|
|
|
headerName: "포인트적립율(%)",
|
|
headerName: "포인트적립율(%)",
|
|
@@ -326,7 +323,16 @@
|
|
|
{headerName: "사용여부", field: "useYn", width: 80, cellClass: 'text-center'}
|
|
{headerName: "사용여부", field: "useYn", width: 80, cellClass: 'text-center'}
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
+ let columnDefs2 = [
|
|
|
|
|
+ {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
|
|
|
|
|
+ {headerName: "공급업체코드", field: "supplyCompCd", width: 150, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "공급업체명", field: "supplyCompNm", width: 150}
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
|
|
let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
|
|
|
|
|
+ let gridOptions2 = gagaAgGrid.getGridOptions(columnDefs2);
|
|
|
|
|
+
|
|
|
|
|
+ gridOptions2.rowSelection = "multiple";
|
|
|
|
|
|
|
|
// Cell click
|
|
// Cell click
|
|
|
gridOptions.onCellClicked = function(event) {
|
|
gridOptions.onCellClicked = function(event) {
|
|
@@ -345,28 +351,28 @@
|
|
|
$("#detailForm input[name=brandGrpNm]").val(event.data.brandGrpNm);
|
|
$("#detailForm input[name=brandGrpNm]").val(event.data.brandGrpNm);
|
|
|
$("#detailForm input[name=erpBrandCd]").val(event.data.erpBrandCd);
|
|
$("#detailForm input[name=erpBrandCd]").val(event.data.erpBrandCd);
|
|
|
$("#detailForm select[name=distributionGb]").val(event.data.distributionGb);
|
|
$("#detailForm select[name=distributionGb]").val(event.data.distributionGb);
|
|
|
- $("#detailForm input[name=supplyCompCd]").val(event.data.supplyCompCd);
|
|
|
|
|
- $("#detailForm input[name=supplyCompNm]").val(event.data.supplyCompNm);
|
|
|
|
|
|
|
+ //$("#detailForm input[name=supplyCompCd]").val(event.data.supplyCompCd);
|
|
|
|
|
+ //$("#detailForm input[name=supplyCompNm]").val(event.data.supplyCompNm);
|
|
|
//fnGetSupplyCompCdList(event.data.supplyCompCd, event.data.delvFeeCd);
|
|
//fnGetSupplyCompCdList(event.data.supplyCompCd, event.data.delvFeeCd);
|
|
|
|
|
|
|
|
// 출고처 정보
|
|
// 출고처 정보
|
|
|
- $.getJSON('/renderer/delvloc/list/' + event.data.supplyCompCd
|
|
|
|
|
- , function(delvLocList) {
|
|
|
|
|
- $('#detailForm select[name=delvLocCd]').empty().append('<option value="">[선택]</option>');
|
|
|
|
|
- $.each(delvLocList, function(idx, item) {
|
|
|
|
|
- var optionHtml = '<option value="' + item.cd + '">[' + item.cd + '] '+ item.cdNm + '</option>\n';
|
|
|
|
|
- $('#detailForm select[name=delvLocCd]').append(optionHtml);
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $("#detailForm select[name=delvLocCd]").val(event.data.delvLocCd);
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ //$.getJSON('/renderer/delvloc/list/' + event.data.supplyCompCd
|
|
|
|
|
+ // , function(delvLocList) {
|
|
|
|
|
+ // $('#detailForm select[name=delvLocCd]').empty().append('<option value="">[선택]</option>');
|
|
|
|
|
+ // $.each(delvLocList, function(idx, item) {
|
|
|
|
|
+ // var optionHtml = '<option value="' + item.cd + '">[' + item.cd + '] '+ item.cdNm + '</option>\n';
|
|
|
|
|
+ // $('#detailForm select[name=delvLocCd]').append(optionHtml);
|
|
|
|
|
+ // });
|
|
|
|
|
+ //
|
|
|
|
|
+ // $("#detailForm select[name=delvLocCd]").val(event.data.delvLocCd);
|
|
|
|
|
+ // }
|
|
|
|
|
+ //);
|
|
|
|
|
|
|
|
// 배송비 정책
|
|
// 배송비 정책
|
|
|
- cfnCreateCombo('/renderer/delvFee/list/' + event.data.supplyCompCd, $('#detailForm select[name=delvFeeCd]'), "[선택]", event.data.delvFeeCd);
|
|
|
|
|
|
|
+ //cfnCreateCombo('/renderer/delvFee/list/' + event.data.supplyCompCd, $('#detailForm select[name=delvFeeCd]'), "[선택]", event.data.delvFeeCd);
|
|
|
|
|
|
|
|
- $("#detailForm input[name=delvFee]").val(Number(event.data.delvFee).addComma());
|
|
|
|
|
- $("#detailForm input[name=minOrdAmt]").val(Number(event.data.minOrdAmt).addComma());
|
|
|
|
|
|
|
+ //$("#detailForm input[name=delvFee]").val(Number(event.data.delvFee).addComma());
|
|
|
|
|
+ //$("#detailForm input[name=minOrdAmt]").val(Number(event.data.minOrdAmt).addComma());
|
|
|
$("#detailForm input[name=sellFeeRate]").val(event.data.sellFeeRate);
|
|
$("#detailForm input[name=sellFeeRate]").val(event.data.sellFeeRate);
|
|
|
$("#detailForm input[name=pntPrate10]").val(event.data.pntPrate10);
|
|
$("#detailForm input[name=pntPrate10]").val(event.data.pntPrate10);
|
|
|
$("#detailForm input[name=pntMrate10]").val(event.data.pntMrate10);
|
|
$("#detailForm input[name=pntMrate10]").val(event.data.pntMrate10);
|
|
@@ -396,6 +402,9 @@
|
|
|
// 로고이미지 영역 노출
|
|
// 로고이미지 영역 노출
|
|
|
$("#brandImgArea").removeClass("off").addClass("on");
|
|
$("#brandImgArea").removeClass("off").addClass("on");
|
|
|
|
|
|
|
|
|
|
+ // 공급업체정보 조회
|
|
|
|
|
+ gagaAgGrid.fetch("/business/brand/supply/list/" + $('#detailForm input[name=brandCd]').val() , gridOptions2);
|
|
|
|
|
+
|
|
|
$("#detailForm select[name=supplyCompCd]").val(event.data.supplyCompCd);
|
|
$("#detailForm select[name=supplyCompCd]").val(event.data.supplyCompCd);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -493,22 +502,51 @@
|
|
|
*/
|
|
*/
|
|
|
// 공급업체 선택시
|
|
// 공급업체 선택시
|
|
|
$('#btnSearchSupplyComp').on('click', function() {
|
|
$('#btnSearchSupplyComp').on('click', function() {
|
|
|
-/*
|
|
|
|
|
- if (gagajf.isNull($("#detailForm input[name=searchTxt]").val())){
|
|
|
|
|
- mcxDialog.alert('공급업체 검색어를 입력하세요.');
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ var selfYn = "";
|
|
|
|
|
+ selfYn = 'Y'; //자사
|
|
|
|
|
+ if($("#detailForm select[name=brandGb]").val() == 'E'){ //입점
|
|
|
|
|
+ selfYn = 'N';
|
|
|
}
|
|
}
|
|
|
-*/
|
|
|
|
|
- cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'S', $("#detailForm input[name=searchTxt]").val());
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'S', $("#detailForm input[name=searchTxt]").val(), '' , selfYn);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 공급업체 조회 팝업에서 호출
|
|
// 공급업체 조회 팝업에서 호출
|
|
|
var fnSetSupplyCompInfo = function(result) {
|
|
var fnSetSupplyCompInfo = function(result) {
|
|
|
- $("#detailForm input[name=supplyCompCd]").val(result[0].supplyCompCd);
|
|
|
|
|
- $("#detailForm input[name=supplyCompNm]").val(result[0].supplyCompNm);
|
|
|
|
|
|
|
+ //$("#detailForm input[name=supplyCompCd]").val(result[0].supplyCompCd);
|
|
|
|
|
+ //$("#detailForm input[name=supplyCompNm]").val(result[0].supplyCompNm);
|
|
|
|
|
|
|
|
- // 출고처 정보
|
|
|
|
|
|
|
+ if (result.length < 1) return;
|
|
|
|
|
+
|
|
|
|
|
+ // 기존상품
|
|
|
|
|
+ var brandSupplyList = gagaAgGrid.getAllRowData(gridOptions2);
|
|
|
|
|
+ var idx = brandSupplyList.length+1;
|
|
|
|
|
+
|
|
|
|
|
+ var isExist = false;
|
|
|
|
|
+ result.forEach(function(supply){
|
|
|
|
|
+ isExist = false;
|
|
|
|
|
+
|
|
|
|
|
+ gridOptions2.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
+ if (supply.supplyCompCd == rowNode.data.supplyCompCd){
|
|
|
|
|
+ isExist = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if(!isExist){
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ supplyCompCd: supply.supplyCompCd
|
|
|
|
|
+ , supplyCompNm: supply.supplyCompNm
|
|
|
|
|
+ };
|
|
|
|
|
+ //그리드 마지막에 추가해야함
|
|
|
|
|
+ gridOptions2.api.updateRowData({add: [data], addIndex: idx});
|
|
|
|
|
+
|
|
|
|
|
+ idx++;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ gridOptions2.api.refreshCells();
|
|
|
|
|
+
|
|
|
|
|
+ /* // 출고처 정보
|
|
|
$.getJSON('/renderer/delvloc/list/' + result[0].supplyCompCd
|
|
$.getJSON('/renderer/delvloc/list/' + result[0].supplyCompCd
|
|
|
, function(delvLocList, status) {
|
|
, function(delvLocList, status) {
|
|
|
$('#detailForm select[name=delvLocCd]').empty().append('<option value="">[선택]</option>');
|
|
$('#detailForm select[name=delvLocCd]').empty().append('<option value="">[선택]</option>');
|
|
@@ -519,7 +557,7 @@
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- cfnCreateCombo('/renderer/delvFee/list/' + result[0].supplyCompCd, $('#detailForm select[name=delvFeeCd]'), "[선택]");
|
|
|
|
|
|
|
+ cfnCreateCombo('/renderer/delvFee/list/' + result[0].supplyCompCd, $('#detailForm select[name=delvFeeCd]'), "[선택]"); */
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 브랜드담당MD 목록
|
|
// 브랜드담당MD 목록
|
|
@@ -686,8 +724,8 @@
|
|
|
$("#detailForm input[name=mode]").val("N");
|
|
$("#detailForm input[name=mode]").val("N");
|
|
|
$("#detailForm select[name=brandGb]").trigger('change');
|
|
$("#detailForm select[name=brandGb]").trigger('change');
|
|
|
$("#detailForm select[name=brandGb]").removeAttr("disabled");
|
|
$("#detailForm select[name=brandGb]").removeAttr("disabled");
|
|
|
- $('#detailForm select[name=delvLocCd]').empty().append('<option value="">[선택]</option>');
|
|
|
|
|
- $('#detailForm select[name=delvFeeCd]').empty().append('<option value="">[선택]</option>');
|
|
|
|
|
|
|
+ //$('#detailForm select[name=delvLocCd]').empty().append('<option value="">[선택]</option>');
|
|
|
|
|
+ //$('#detailForm select[name=delvFeeCd]').empty().append('<option value="">[선택]</option>');
|
|
|
|
|
|
|
|
$("#detailForm input[type=checkbox]").removeClass("checked");
|
|
$("#detailForm input[type=checkbox]").removeClass("checked");
|
|
|
$("#detailForm input[type=checkbox]").parent("label").removeClass("checked");
|
|
$("#detailForm input[type=checkbox]").parent("label").removeClass("checked");
|
|
@@ -763,13 +801,29 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //공급업체
|
|
|
|
|
+ var allData = gagaAgGrid.getAllRowData(gridOptions2);
|
|
|
|
|
+ if (allData.length <= 0){
|
|
|
|
|
+ mcxDialog.alert("공급업체를 추가해 주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
mcxDialog.confirm('저장하시겠습니까?', {
|
|
mcxDialog.confirm('저장하시겠습니까?', {
|
|
|
cancelBtnText: "취소",
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
sureBtnClick: function() {
|
|
|
|
|
+
|
|
|
|
|
+ var jsonData = JSON.stringify(allData);
|
|
|
|
|
+ $('#detailForm input[name=brandSupplyListInfo]').val(jsonData);
|
|
|
|
|
+
|
|
|
gagajf.ajaxFormSubmit($('#detailForm').prop('action'), '#detailForm', function() {
|
|
gagajf.ajaxFormSubmit($('#detailForm').prop('action'), '#detailForm', function() {
|
|
|
$('#btnNew').trigger('click');
|
|
$('#btnNew').trigger('click');
|
|
|
$('#btnSearch').trigger('click');
|
|
$('#btnSearch').trigger('click');
|
|
|
|
|
+
|
|
|
|
|
+ // 그리드 삭제
|
|
|
|
|
+ allData.forEach(function(item, index) {
|
|
|
|
|
+ gridOptions2.api.updateRowData({remove: [item]});
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -778,6 +832,7 @@
|
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
// Create a agGrid
|
|
// Create a agGrid
|
|
|
gagaAgGrid.createGrid('gridList', gridOptions);
|
|
gagaAgGrid.createGrid('gridList', gridOptions);
|
|
|
|
|
+ gagaAgGrid.createGrid('gridList2', gridOptions2);
|
|
|
|
|
|
|
|
$('#detailForm select[name=brandGb]').trigger('change');
|
|
$('#detailForm select[name=brandGb]').trigger('change');
|
|
|
});
|
|
});
|