|
|
@@ -0,0 +1,370 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko"
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : SupplyCompanyForm.html
|
|
|
+ * @desc : 공급업체관리 Page
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2020.10.14 gagamel 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+ <div id="main">
|
|
|
+ <!-- 메인타이틀 영역 -->
|
|
|
+ <div class="main-title">
|
|
|
+ </div>
|
|
|
+ <!-- //메인타이틀 영역 -->
|
|
|
+
|
|
|
+ <!-- 검색조건 영역 -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <form id="searchForm" name="searchForm" action="#" th:action="@{'/business/supply/company/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
|
|
|
+ <table class="frmStyle" aria-describedby="검색조건">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col style="width:40%;"/>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col/>
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th>검색어</th>
|
|
|
+ <td>
|
|
|
+ <select name="searchGb">
|
|
|
+ <option value="NAME">업체명</option>
|
|
|
+ <option value="OWNER">대표자명</option>
|
|
|
+ </select>
|
|
|
+ <input type="text" name="searchTxt" class="w300" maxlength="20"/>
|
|
|
+ </td>
|
|
|
+ <th>입점상태</th>
|
|
|
+ <td>
|
|
|
+ <select name="supplyStat">
|
|
|
+ <option value="">[전체]</option>
|
|
|
+ <option th:if="${supplyStatList}" th:each="oneData, status : ${supplyStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <ul class="panelBar">
|
|
|
+ <li class="center">
|
|
|
+ <button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
|
|
|
+ <button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <!-- 검색조건 영역 -->
|
|
|
+
|
|
|
+ <!-- 리스트 영역 -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <!-- 버튼 배치 영역 -->
|
|
|
+ <ul class="panelBar">
|
|
|
+ <li class="right">
|
|
|
+ <button type="button" class="btn btn-default btn-lg" id="btnExcelDown">엑셀다운로드</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <!-- //버튼 배치 영역 -->
|
|
|
+
|
|
|
+ <div id="gridList" style="width: 100%; height: 370px" class="ag-theme-balham"></div>
|
|
|
+ </div>
|
|
|
+ <!-- //리스트 영역 -->
|
|
|
+
|
|
|
+ <!-- 등록/수정 -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <form id="detailForm" name="detailForm" action="#" th:action="@{'/business/supply/company/save'}">
|
|
|
+ <table class="frmStyle" aria-describedby="등록/수정 폼">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col style="width:15%;"/>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col style="width:15%;"/>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col style="width:15%;"/>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col style="width:15%;"/>
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th>업체코드</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w150" name="supplyCompCd" placeholder="자동생성" maxlength="5" data-valid-name="업체코드" disabled="disabled"/>
|
|
|
+ </td>
|
|
|
+ <th>업체명<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="supplyCompNm" maxlength="100" required="required" data-valid-name="업체명"/>
|
|
|
+ </td>
|
|
|
+ <th>사업자구분<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="bizGb" id="bizGb" value="C">법인<span></span></label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="bizGb" id="bizGb" value="P">개인<span></span></label>
|
|
|
+ </td>
|
|
|
+ <th>사업자등록번호<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="bizNo" maxlength="20" required="required" data-valid-name="사업자등록번호"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>업종<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="bizKind" maxlength="100" required="required" data-valid-name="업종"/>
|
|
|
+ </td>
|
|
|
+ <th>업태<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="bizType" maxlength="100" required="required" data-valid-name="업태"/>
|
|
|
+ </td>
|
|
|
+ <th>입점상태<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <select name="supplyStat" id="supplyStat">
|
|
|
+ <option value="">[선택]</option>
|
|
|
+ <option th:if="${supplyStatList}" th:each="oneData, status : ${supplyStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <th>대표자명<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="ownerNm" maxlength="50" required="required" data-valid-name="대표자명"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th rowspan="2">사업장주소<i class="required" title="필수"></i></th>
|
|
|
+ <td colspan="3" rowspan="2">
|
|
|
+ <input type="text" name="bizZipcode" class="w100" data-valid-name="우편번호" readonly="readonly"/>
|
|
|
+
|
|
|
+ <button type="button" class="btn btn-info btn-sm" onclick="cfnOpenPostFindPopup();">우편번호찾기</button>
|
|
|
+ <br>
|
|
|
+ <input type="text" name="bizBaseAddr" class="w300" required="required" data-valid-name="사업장주소" readonly="readonly"/>
|
|
|
+ -
|
|
|
+ <input type="text" name="bizDtlAddr" class="w300" required="required" data-valid-name="사업장상세주소"/>
|
|
|
+ </td>
|
|
|
+ <th>홈페이지URL</th>
|
|
|
+ <td colspan="3">
|
|
|
+ <input type="text" name="homepageUrl" data-valid-name="홈페이지URL"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>대표전화<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="mainTelno" placeholder="02-0000-0000" maxlength="20" required="required" data-valid-name="대표전화"/>
|
|
|
+ </td>
|
|
|
+ <th>대표팩스번호</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="mainFaxno" placeholder="02-0000-0000" maxlength="20" data-valid-name="대표팩스번호"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>유통구분<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <select name="distributionGb" data-valid-name="유통구분">
|
|
|
+ <option value="">[선택]</option>
|
|
|
+ <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}" th:selected="${bankNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <th>무료배송비최소주문금액<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="minOrdAmt" class="w100 aR" placeholder="30,000" maxlength="7" required="required" data-valid-type="integer" data-valid-name="무료배송비최소주문금액"/>원
|
|
|
+ </td>
|
|
|
+ <th>배송비<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="delvFee" class="w100 aR" placeholder="2,500" maxlength="7" required="required" data-valid-type="integer" data-valid-name="배송비"/>원
|
|
|
+ </td>
|
|
|
+ <th>판매수수료율<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="sellFeeRate" class="w100 aR" placeholder="0.0" maxlength="5" required="required" data-valid-type="real" data-valid-name="판매수수료율"/>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>정산일<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ 매일 <input type="text" name="settleDay" class="w100 aR" maxlength="2" required="required" data-valid-type="numeric" data-valid-name="정산일"/>일
|
|
|
+ </td>
|
|
|
+ <th>거래은행</th>
|
|
|
+ <td>
|
|
|
+ <select name="bankCd">
|
|
|
+ <option value="">[선택]</option>
|
|
|
+ <option th:if="${bankList}" th:each="oneData, status : ${bankList}" th:value="${oneData.cd}"th:text="${oneData.cdNm}"th:selected="${bankNm}" ></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <th>계좌번호</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="accountNo" maxlength="20"/>
|
|
|
+ </td>
|
|
|
+ <th>예금주명</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="depositorNm" maxlength="50"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>사용여부<i class="required" title="필수"></i></th>
|
|
|
+ <td colspan="7">
|
|
|
+ <label class="rdoBtn"><input type="radio" name="useYn" id="useYn" value="Y" checked="checked">Yes<span></span></label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="useYn" id="useYn" value="N">No<span></span></label>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>비고</th>
|
|
|
+ <td colspan="7">
|
|
|
+ <textarea name="remarks" class="textareaR3" data-valid-name="비고" ></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </form>
|
|
|
+
|
|
|
+ <!-- 버튼 배치 영역 -->
|
|
|
+ <ul class="panelBar">
|
|
|
+ <li class="right">
|
|
|
+ <button type="button" class="btn btn-info btn-lg" id="btnNew">신규</button>
|
|
|
+ <button type="button" class="btn btn-success btn-lg" id="btnSave">저장</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <!-- //버튼 배치 영역 -->
|
|
|
+ </div>
|
|
|
+ <!-- 등록/수정 -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+<script th:inline="javascript">
|
|
|
+/*<![CDATA[*/
|
|
|
+ let supplyStatList = gagajf.convertToArray([[${supplyStatList}]]);
|
|
|
+ let distributionGbList = gagajf.convertToArray([[${distributionGbList}]]);
|
|
|
+ let bankList = gagajf.convertToArray([[${bankList}]]);
|
|
|
+
|
|
|
+ let columnDefs = [
|
|
|
+ {headerName: "업체코드", field: "supplyCompCd", width: 100, cellClass: 'text-center' },
|
|
|
+ {
|
|
|
+ headerName: "업체명", field: "supplyCompNm", width: 150, cellClass: 'text-center',
|
|
|
+ cellRenderer: function(params) {
|
|
|
+ return '<a href="javascript:void(0);">' + params.value + '</a>';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: "사업자구분", field: "bizGb", width: 100, cellClass: 'text-center',
|
|
|
+ valueGetter: function (params) { return params.data.bizGb == 'C' ? '법인' : '개인'; }
|
|
|
+ },
|
|
|
+ {headerName: "사업장자록번호", field: "bizNo", width: 120, cellClass: 'text-center' },
|
|
|
+ {headerName: "업종", field: "bizKind", width: 200 },
|
|
|
+ {headerName: "업태", field: "bizType", width: 200 },
|
|
|
+ {
|
|
|
+ headerName: "입점상태", field: "supplyStat", width: 100, cellClass: 'text-center',
|
|
|
+ valueGetter: function (params) {
|
|
|
+ return gagaAgGrid.lookupValue(supplyStatList, params.data.supplyStat);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {headerName: "대표자명", field: "ownerNm", width: 100, cellClass: 'text-center' },
|
|
|
+ {headerName: "우편번호", field: "bizZipcode", width: 80, cellClass: 'text-center' },
|
|
|
+ {headerName: "기본주소", field: "bizBaseAddr", width: 250 },
|
|
|
+ {headerName: "상세주소", field: "bizDtlAddr", width: 150 },
|
|
|
+ {headerName: "대표전화번호", field: "mainTelno", width: 120, cellClass: 'text-center' },
|
|
|
+ {headerName: "대표팩스번호", field: "mainFaxno", width: 120, cellClass: 'text-center' },
|
|
|
+ {headerName: "홈페이지URL", field: "homepageUrl", width: 200 },
|
|
|
+ {
|
|
|
+ headerName: "유통구분", field: "distributionGb", width: 100, cellClass: 'text-center',
|
|
|
+ valueGetter: function (params) {
|
|
|
+ return gagaAgGrid.lookupValue(distributionGbList, params.data.distributionGb);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: "무료배송비최소주문금액", field: "minOrdAmt", width: 150, cellClass: 'text-center',
|
|
|
+ valueGetter: function(params) {
|
|
|
+ return Number(params.data.minOrdAmt).addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: "배송비", field: "delvFee", width: 100, cellClass: 'text-center',
|
|
|
+ valueGetter: function(params) {
|
|
|
+ return Number(params.data.delvFee).addComma();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: "판매수수료율", field: "sellFeeRate", width: 120, cellClass: 'text-center',
|
|
|
+ valueGetter: function(params) {
|
|
|
+ return params.data.sellFeeRate + '%';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {headerName: "정산일(매월)", field: "settleDay", width: 100, cellClass: 'text-center' },
|
|
|
+ {
|
|
|
+ headerName: "은행명", field: "bankCd", width: 150, cellClass: 'text-center',
|
|
|
+ valueGetter: function (params) {
|
|
|
+ return gagaAgGrid.lookupValue(bankList, params.data.bankCd);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {headerName: "계좌번호", field: "accountNo", width: 150, cellClass: 'text-center' },
|
|
|
+ {headerName: "예금주명", field: "depositorNm", width: 100, cellClass: 'text-center' },
|
|
|
+ {
|
|
|
+ headerName: "사용여부", field: "useYn", width: 100, cellClass: 'text-center',
|
|
|
+ valueGetter: function (params) { return params.data.useYn == 'Y' ? 'Yes' : 'No'; }
|
|
|
+ },
|
|
|
+ {headerName: "비고", field: "remarks", width: 150, hide: true }
|
|
|
+ ];
|
|
|
+
|
|
|
+ let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
|
|
|
+
|
|
|
+ // Cell click
|
|
|
+ gridOptions.onCellClicked = function(event) {
|
|
|
+ if (event.colDef.field != 'supplyCompNm')
|
|
|
+ return;
|
|
|
+
|
|
|
+ $('#detailForm input[name=supplyCompCd]').val(event.data.supplyCompCd);
|
|
|
+ $('#detailForm input[name=supplyCompNm]').val(event.data.supplyCompNm);
|
|
|
+ $('#detailForm select[name=supplyStat]').val(event.data.supplyStat);
|
|
|
+ $('#detailForm input[name=ownerNm]').val(event.data.ownerNm);
|
|
|
+ $('#detailForm input:radio[name=useYn]:input[value= ' + event.data.useYn + '] ').click();
|
|
|
+ $('#detailForm input:radio[name=bizGb]:input[value= ' + event.data.bizGb + '] ').click();
|
|
|
+ $('#detailForm input[name=bizNo] ').val(event.data.bizNo);
|
|
|
+ $('#detailForm input[name=bizKind]').val(event.data.bizKind);
|
|
|
+ $('#detailForm input[name=bizType]').val(event.data.bizType);
|
|
|
+ $('#detailForm input[name=bizZipcode]').val(event.data.bizZipcode);
|
|
|
+ $('#detailForm input[name=bizBaseAddr]').val(event.data.bizBaseAddr);
|
|
|
+ $('#detailForm input[name=bizDtlAddr]').val(event.data.bizDtlAddr);
|
|
|
+ $('#detailForm input[name=homepageUrl]').val(event.data.homepageUrl);
|
|
|
+ $('#detailForm select[name=distributionGb]').val(event.data.distributionGb);
|
|
|
+ $('#detailForm input[name=mainTelno]').val(event.data.mainTelno);
|
|
|
+ $('#detailForm input[name=mainFaxno]').val(event.data.mainFaxno);
|
|
|
+ $('#detailForm input[name=sellFeeRate]').val(event.data.sellFeeRate);
|
|
|
+ $('#detailForm input[name=settleDay]').val(event.data.settleDay);
|
|
|
+ $('#detailForm input[name=minOrdAmt]').val(Number(event.data.minOrdAmt).addComma());
|
|
|
+ $('#detailForm input[name=delvFee]').val(Number(event.data.delvFee).addComma());
|
|
|
+ $('#detailForm select[name=bankNm]').val(event.data.bankNm);
|
|
|
+ $('#detailForm input[name=accountNo]').val(event.data.accountNo);
|
|
|
+ $('#detailForm input[name=depositorNm]').val(event.data.depositorNm);
|
|
|
+ $('#detailForm textarea[name=remarks]').val(event.data.remarks);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 신규버튼
|
|
|
+ $('#btnNew').on('click', function() {
|
|
|
+ $("#detailForm")[0].reset();
|
|
|
+ });
|
|
|
+
|
|
|
+ // 검색
|
|
|
+ $('#btnSearch').on('click', function() {
|
|
|
+ gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 저장
|
|
|
+ $("#btnSave").on("click", function() {
|
|
|
+ // 필수값 체크
|
|
|
+ if (!gagajf.validation('#detailForm'))
|
|
|
+ return false;
|
|
|
+
|
|
|
+// $('#detailForm input[name=useYn]').val($('#detailForm input:checkbox[name=chkUseYn]').is(":checked") ? 'Y' : 'N');
|
|
|
+
|
|
|
+ mcxDialog.confirm("저장하시겠습니까?", {
|
|
|
+ cancelBtnText: "취소",
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ gagajf.ajaxFormSubmit($('#detailForm').prop('action'), '#detailForm', function() {
|
|
|
+ $('#btnNew').trigger('click');
|
|
|
+ $('#btnSearch').trigger('click');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ // Create a agGrid
|
|
|
+ gagaAgGrid.createGrid('gridList', gridOptions);
|
|
|
+ });
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
+
|
|
|
+</html>
|