|
|
@@ -1,492 +1,526 @@
|
|
|
-<!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="infoBox menu-desc">
|
|
|
- </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:30%;"/>
|
|
|
- <col style="width:10%;"/>
|
|
|
- <col style="width:20%;"/>
|
|
|
- <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>
|
|
|
- <th>전자계약여부</th>
|
|
|
- <td>
|
|
|
- <select name="econtractYn">
|
|
|
- <option value="">[전체]</option>
|
|
|
- <option value="Y">[Y] Yes</option>
|
|
|
- <option value="N">[N] No</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="btnExcel">엑셀다운로드</button>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <!-- //버튼 배치 영역 -->
|
|
|
-
|
|
|
- <div id="gridList" style="width: 100%; height: 470px" 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="업체코드" readonly="readonly"/>
|
|
|
- </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" value="C" checked="checked"/>법인<span></span></label>
|
|
|
- <label class="rdoBtn"><input type="radio" name="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" required="required" data-valid-name="입점상태">
|
|
|
- <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="fnOpenDaumAddr();">우편번호찾기</button>
|
|
|
- <br>
|
|
|
- <input type="text" name="bizBaseAddr" class="w300" maxlength="200" required="required" data-valid-name="사업장주소" readonly="readonly"/>
|
|
|
- -
|
|
|
- <input type="text" name="bizDtlAddr" class="w300" maxlength="200"/>
|
|
|
- </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" required="required" data-valid-name="유통구분">
|
|
|
- <option value="">[선택]</option>
|
|
|
- <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></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>CS담당자</th>
|
|
|
- <td>
|
|
|
- <input type="text" name="csChargeNm" class="w100 aR" maxlength="50"/>
|
|
|
- </td>
|
|
|
- <th>CS담당자 연락처</th>
|
|
|
- <td>
|
|
|
- <input type="text" name="csChargeTelno" placeholder="02-0000-0000" maxlength="20"/>
|
|
|
- </td>
|
|
|
- <th>정산담당자</th>
|
|
|
- <td>
|
|
|
- <input type="text" name="settleChargeNm" class="w100 aR" maxlength="50"/>
|
|
|
- </td>
|
|
|
- <th>정산담당자 연락처</th>
|
|
|
- <td>
|
|
|
- <input type="text" name="settleChargeTelno" placeholder="02-0000-0000" maxlength="20"/>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>정산담당자 이메일</th>
|
|
|
- <td>
|
|
|
- <input type="text" name="settleChargeEmail" maxlength="100" data-valid-type="email"/>
|
|
|
- </td>
|
|
|
- <th>계산서 이메일</th>
|
|
|
- <td>
|
|
|
- <input type="text" name="billEmail" maxlength="100" data-valid-type="email"/>
|
|
|
- </td>
|
|
|
- <th>전자계약여부<i class="required" title="필수"></i></th>
|
|
|
- <td>
|
|
|
- <label class="rdoBtn"><input type="radio" name="econtractYn" value="Y" checked="checked"/>Yes<span></span></label>
|
|
|
- <label class="rdoBtn"><input type="radio" name="econtractYn" value="N"/>No<span></span></label>
|
|
|
- </td>
|
|
|
- <th>정산주기<i class="required" title="필수"></i></th>
|
|
|
- <td>
|
|
|
- <select name="settleDay" required="required" data-valid-name="정산주기">
|
|
|
- <option value="">[선택]</option>
|
|
|
- <option th:if="${settleDayList}" th:each="oneData, status : ${settleDayList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <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}"></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>
|
|
|
- <th>사용여부<i class="required" title="필수"></i></th>
|
|
|
- <td>
|
|
|
- <label class="rdoBtn"><input type="radio" name="useYn" value="Y" checked="checked"/>Yes<span></span></label>
|
|
|
- <label class="rdoBtn"><input type="radio" name="useYn" value="N"/>No<span></span></label>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>총알배송여부<i class="required" title="필수"></i></th>
|
|
|
- <td colspan="7">
|
|
|
- <label class="rdoBtn"><input type="radio" name="shotDelvYn" value="Y"/>Yes<span></span></label>
|
|
|
- <label class="rdoBtn"><input type="radio" name="shotDelvYn" value="N" checked="checked"/>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: "econtractYn", width: 100, cellClass: 'text-center',
|
|
|
- valueGetter: function (params) { return params.data.econtractYn == 'Y' ? 'Yes' : 'No'; }
|
|
|
- },
|
|
|
- { headerName: "업종", field: "bizKind", width: 150, cellClass: 'text-center' },
|
|
|
- { headerName: "업태", field: "bizType", width: 150, cellClass: 'text-center' },
|
|
|
- {
|
|
|
- headerName: "총알배송여부", field: "shotDelvYn", width: 100, cellClass: 'text-center',
|
|
|
- valueGetter: function (params) { return params.data.shotDelvYn == 'Y' ? 'Yes' : 'No'; }
|
|
|
- },
|
|
|
- {
|
|
|
- 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: "CS담당자", field: "csChargeNm", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- { headerName: "CS담당자연락처", field: "csChargeTelno", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- { headerName: "정산담당자", field: "settleChargeNm", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- { headerName: "정산담당자연락처", field: "settleChargeTelno", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- { headerName: "정산담당자이메일", field: "settleChargeEmail", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- { headerName: "계산서이메일", field: "billEmail", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- { headerName: "정산주기", field: "settleDay", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- {
|
|
|
- headerName: "은행명", field: "bankCd", width: 150, cellClass: 'text-center', hide: true,
|
|
|
- valueGetter: function (params) {
|
|
|
- return gagaAgGrid.lookupValue(bankList, params.data.bankCd);
|
|
|
- }
|
|
|
- },
|
|
|
- { headerName: "계좌번호", field: "accountNo", width: 150, cellClass: 'text-center', hide: true },
|
|
|
- { headerName: "예금주명", field: "depositorNm", width: 100, cellClass: 'text-center', hide: true },
|
|
|
- {
|
|
|
- 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);
|
|
|
-
|
|
|
- if (event.data.bizGb == 'C') {
|
|
|
- $('#detailForm input:radio[name=bizGb]').eq(0).trigger('click');
|
|
|
- } else {
|
|
|
- $('#detailForm input:radio[name=bizGb]').eq(1).trigger('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=csChargeNm]').val(event.data.csChargeNm);
|
|
|
- $('#detailForm input[name=csChargeTelno]').val(event.data.csChargeTelno);
|
|
|
- $('#detailForm input[name=settleChargeNm]').val(event.data.settleChargeNm);
|
|
|
- $('#detailForm input[name=settleChargeTelno]').val(event.data.settleChargeTelno);
|
|
|
- $('#detailForm input[name=settleChargeEmail]').val(event.data.settleChargeEmail);
|
|
|
- $('#detailForm input[name=billEmail]').val(event.data.billEmail);
|
|
|
-
|
|
|
- if (event.data.econtractYn == 'Y') {
|
|
|
- $('#detailForm input:radio[name=econtractYn]').eq(0).trigger('click');
|
|
|
- } else {
|
|
|
- $('#detailForm input:radio[name=econtractYn]').eq(1).trigger('click');
|
|
|
- }
|
|
|
-
|
|
|
- $('#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=bankCd]').val(event.data.bankCd);
|
|
|
- $('#detailForm input[name=accountNo]').val(event.data.accountNo);
|
|
|
- $('#detailForm input[name=depositorNm]').val(event.data.depositorNm);
|
|
|
- $('#detailForm textarea[name=remarks]').val(event.data.remarks);
|
|
|
-
|
|
|
- if (event.data.useYn == 'Y') {
|
|
|
- $('#detailForm input:radio[name=useYn]').eq(0).trigger('click');
|
|
|
- } else {
|
|
|
- $('#detailForm input:radio[name=useYn]').eq(1).trigger('click');
|
|
|
- }
|
|
|
-
|
|
|
- if (event.data.shotDelvYn == 'Y') {
|
|
|
- $('#detailForm input:radio[name=shotDelvYn]').eq(0).trigger('click');
|
|
|
- } else {
|
|
|
- $('#detailForm input:radio[name=shotDelvYn]').eq(1).trigger('click');
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 검색
|
|
|
- $('#btnSearch').on('click', function() {
|
|
|
- gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
|
- });
|
|
|
-
|
|
|
- // 신규버튼
|
|
|
- $('#btnNew').on('click', function() {
|
|
|
- $("#detailForm")[0].reset();
|
|
|
- });
|
|
|
-
|
|
|
- // 저장
|
|
|
- $("#btnSave").on("click", function() {
|
|
|
- // 필수값 체크
|
|
|
- if (!gagajf.validation('#detailForm'))
|
|
|
- return false;
|
|
|
-
|
|
|
- mcxDialog.confirm("저장하시겠습니까?", {
|
|
|
- cancelBtnText: "취소",
|
|
|
- sureBtnText: "확인",
|
|
|
- sureBtnClick: function() {
|
|
|
- gagajf.ajaxFormSubmit($('#detailForm').prop('action'), '#detailForm', function() {
|
|
|
- $('#btnNew').trigger('click');
|
|
|
- $('#btnSearch').trigger('click');
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- // 엑셀다운로드
|
|
|
- $('#btnExcel').on('click', function() {
|
|
|
- gagaAgGrid.exportToExcel('공급업체 목록', gridOptions);
|
|
|
- });
|
|
|
-
|
|
|
- /**
|
|
|
- * DAUM을 이용한 우편번호 팝업 레이어
|
|
|
- */
|
|
|
- var fnOpenDaumAddr = function() {
|
|
|
- let daumZip = new daum.Postcode({
|
|
|
- oncomplete: function(data) {
|
|
|
- // 우편번호와 주소 정보를 해당 필드에 넣는다.
|
|
|
- $('#detailForm input[name=bizZipcode]').val(data.zonecode);
|
|
|
- $('#detailForm input[name=bizBaseAddr]').val(cfnGetDaumRoadAddr(data));
|
|
|
- $('#detailForm input[name=bizDtlAddr]').focus();
|
|
|
-
|
|
|
- cfnCloseDaumAddr();
|
|
|
- },
|
|
|
- width: '100%'
|
|
|
- });
|
|
|
-
|
|
|
- cfnOpenDaumAddr(daumZip);
|
|
|
- }
|
|
|
-
|
|
|
- $(document).ready(function() {
|
|
|
- // Create a agGrid
|
|
|
- gagaAgGrid.createGrid('gridList', gridOptions);
|
|
|
- });
|
|
|
-/*]]>*/
|
|
|
-</script>
|
|
|
-
|
|
|
-</html>
|
|
|
+<!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="infoBox menu-desc">
|
|
|
+ </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:30%;"/>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col style="width:20%;"/>
|
|
|
+ <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>
|
|
|
+ <th>전자계약여부</th>
|
|
|
+ <td>
|
|
|
+ <select name="econtractYn">
|
|
|
+ <option value="">[전체]</option>
|
|
|
+ <option value="Y">[Y] Yes</option>
|
|
|
+ <option value="N">[N] No</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="btnExcel">엑셀다운로드</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <!-- //버튼 배치 영역 -->
|
|
|
+
|
|
|
+ <div id="gridList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
|
|
|
+ </div>
|
|
|
+ <!-- //리스트 영역 -->
|
|
|
+
|
|
|
+ <!-- 등록/수정 -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <form id="detailForm" name="detailForm" action="#" th:action="@{'/business/supply/company/save'}">
|
|
|
+ <h4>기본정보</h4>
|
|
|
+ <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="업체코드" readonly="readonly"/>
|
|
|
+ </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" value="C" checked="checked"/>법인<span></span></label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="bizGb" value="P"/>개인<span></span></label>
|
|
|
+ </td>
|
|
|
+ <th>사업자등록번호<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w150" name="bizNo" maxlength="20" required="required" data-valid-name="사업자등록번호"/>
|
|
|
+ <button type="button" class="btn btn-info btn-sm" onclick="fnCertifyBizNo();">인증</button>
|
|
|
+ </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" required="required" data-valid-name="입점상태">
|
|
|
+ <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="fnOpenDaumAddr();">우편번호찾기</button>
|
|
|
+ <br>
|
|
|
+ <input type="text" name="bizBaseAddr" class="w300" maxlength="200" required="required" data-valid-name="사업장주소" readonly="readonly"/>
|
|
|
+ -
|
|
|
+ <input type="text" name="bizDtlAddr" class="w300" maxlength="200"/>
|
|
|
+ </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" required="required" data-valid-name="유통구분">
|
|
|
+ <option value="">[선택]</option>
|
|
|
+ <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </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>
|
|
|
+ <th>사용여부<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="useYn" value="Y" checked="checked"/>Yes<span></span></label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="useYn" value="N"/>No<span></span></label>
|
|
|
+ </td>
|
|
|
+ <th>총알배송여부<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="shotDelvYn" value="Y"/>Yes<span></span></label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="shotDelvYn" value="N" checked="checked"/>No<span></span></label>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>비고</th>
|
|
|
+ <td colspan="7">
|
|
|
+ <textarea name="remarks" class="textareaR3" data-valid-name="비고" ></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <h4>담당자/정산 정보</h4>
|
|
|
+ <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>CS담당자</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="csChargeNm" class="w100 aR" maxlength="50"/>
|
|
|
+ </td>
|
|
|
+ <th>CS담당자 연락처</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="csChargeTelno" placeholder="02-0000-0000" maxlength="20"/>
|
|
|
+ </td>
|
|
|
+ <th>정산담당자</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="settleChargeNm" class="w100 aR" maxlength="50"/>
|
|
|
+ </td>
|
|
|
+ <th>정산담당자 연락처</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="settleChargeTelno" placeholder="02-0000-0000" maxlength="20"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>정산담당자 이메일</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="settleChargeEmail" maxlength="100" data-valid-type="email"/>
|
|
|
+ </td>
|
|
|
+ <th>계산서 이메일</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="billEmail" maxlength="100" data-valid-type="email"/>
|
|
|
+ </td>
|
|
|
+ <th>전자계약여부<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="econtractYn" value="Y" checked="checked"/>Yes<span></span></label>
|
|
|
+ <label class="rdoBtn"><input type="radio" name="econtractYn" value="N"/>No<span></span></label>
|
|
|
+ </td>
|
|
|
+ <th>정산주기<i class="required" title="필수"></i></th>
|
|
|
+ <td>
|
|
|
+ <select name="settleDay" required="required" data-valid-name="정산주기">
|
|
|
+ <option value="">[선택]</option>
|
|
|
+ <option th:if="${settleDayList}" th:each="oneData, status : ${settleDayList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <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}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <th>계좌번호</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" name="accountNo" maxlength="20"/>
|
|
|
+ </td>
|
|
|
+ <th>예금주명</th>
|
|
|
+ <td colspan="3">
|
|
|
+ <input type="text" class="w100" name="depositorNm" maxlength="50"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <h4>배송정책</h4>
|
|
|
+ <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>무료배송비기준<i class="required" title="필수"></i></th>
|
|
|
+ <td colspan="3">
|
|
|
+ <input type="text" name="minOrdAmt" class="w100 aR" placeholder="40,000" maxlength="7" required="required" data-valid-type="integer" data-valid-name="무료배송비기준"/>원 이상
|
|
|
+ <span class="infoTxt cBlue marL20"><i class="fa fa-info-circle" aria-hidden="true"></i>배송비를 무료로 적용할 수 있는 최소주문금액</span>
|
|
|
+ </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="rtnDelvFeee" class="w100 aR" placeholder="2,500" maxlength="7" required="required" data-valid-type="real" data-valid-name="반품배송비"/>원
|
|
|
+ </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: "econtractYn", width: 100, cellClass: 'text-center',
|
|
|
+ valueGetter: function (params) { return params.data.econtractYn == 'Y' ? 'Yes' : 'No'; }
|
|
|
+ },
|
|
|
+ { headerName: "업종", field: "bizKind", width: 150, cellClass: 'text-center' },
|
|
|
+ { headerName: "업태", field: "bizType", width: 150, cellClass: 'text-center' },
|
|
|
+ {
|
|
|
+ headerName: "총알배송여부", field: "shotDelvYn", width: 100, cellClass: 'text-center',
|
|
|
+ valueGetter: function (params) { return params.data.shotDelvYn == 'Y' ? 'Yes' : 'No'; }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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: "CS담당자", field: "csChargeNm", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ { headerName: "CS담당자연락처", field: "csChargeTelno", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ { headerName: "정산담당자", field: "settleChargeNm", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ { headerName: "정산담당자연락처", field: "settleChargeTelno", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ { headerName: "정산담당자이메일", field: "settleChargeEmail", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ { headerName: "계산서이메일", field: "billEmail", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ { headerName: "정산주기", field: "settleDay", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ {
|
|
|
+ headerName: "은행명", field: "bankCd", width: 150, cellClass: 'text-center', hide: true,
|
|
|
+ valueGetter: function (params) {
|
|
|
+ return gagaAgGrid.lookupValue(bankList, params.data.bankCd);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { headerName: "계좌번호", field: "accountNo", width: 150, cellClass: 'text-center', hide: true },
|
|
|
+ { headerName: "예금주명", field: "depositorNm", width: 100, cellClass: 'text-center', hide: true },
|
|
|
+ {
|
|
|
+ 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);
|
|
|
+
|
|
|
+ if (event.data.bizGb == 'C') {
|
|
|
+ $('#detailForm input:radio[name=bizGb]').eq(0).trigger('click');
|
|
|
+ } else {
|
|
|
+ $('#detailForm input:radio[name=bizGb]').eq(1).trigger('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=csChargeNm]').val(event.data.csChargeNm);
|
|
|
+ $('#detailForm input[name=csChargeTelno]').val(event.data.csChargeTelno);
|
|
|
+ $('#detailForm input[name=settleChargeNm]').val(event.data.settleChargeNm);
|
|
|
+ $('#detailForm input[name=settleChargeTelno]').val(event.data.settleChargeTelno);
|
|
|
+ $('#detailForm input[name=settleChargeEmail]').val(event.data.settleChargeEmail);
|
|
|
+ $('#detailForm input[name=billEmail]').val(event.data.billEmail);
|
|
|
+
|
|
|
+ if (event.data.econtractYn == 'Y') {
|
|
|
+ $('#detailForm input:radio[name=econtractYn]').eq(0).trigger('click');
|
|
|
+ } else {
|
|
|
+ $('#detailForm input:radio[name=econtractYn]').eq(1).trigger('click');
|
|
|
+ }
|
|
|
+
|
|
|
+ $('#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=bankCd]').val(event.data.bankCd);
|
|
|
+ $('#detailForm input[name=accountNo]').val(event.data.accountNo);
|
|
|
+ $('#detailForm input[name=depositorNm]').val(event.data.depositorNm);
|
|
|
+ $('#detailForm textarea[name=remarks]').val(event.data.remarks);
|
|
|
+
|
|
|
+ if (event.data.useYn == 'Y') {
|
|
|
+ $('#detailForm input:radio[name=useYn]').eq(0).trigger('click');
|
|
|
+ } else {
|
|
|
+ $('#detailForm input:radio[name=useYn]').eq(1).trigger('click');
|
|
|
+ }
|
|
|
+
|
|
|
+ if (event.data.shotDelvYn == 'Y') {
|
|
|
+ $('#detailForm input:radio[name=shotDelvYn]').eq(0).trigger('click');
|
|
|
+ } else {
|
|
|
+ $('#detailForm input:radio[name=shotDelvYn]').eq(1).trigger('click');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 검색
|
|
|
+ $('#btnSearch').on('click', function() {
|
|
|
+ gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 신규버튼
|
|
|
+ $('#btnNew').on('click', function() {
|
|
|
+ $("#detailForm")[0].reset();
|
|
|
+ });
|
|
|
+
|
|
|
+ // 저장
|
|
|
+ $("#btnSave").on("click", function() {
|
|
|
+ // 필수값 체크
|
|
|
+ if (!gagajf.validation('#detailForm'))
|
|
|
+ return false;
|
|
|
+
|
|
|
+ mcxDialog.confirm("저장하시겠습니까?", {
|
|
|
+ cancelBtnText: "취소",
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ gagajf.ajaxFormSubmit($('#detailForm').prop('action'), '#detailForm', function() {
|
|
|
+ $('#btnNew').trigger('click');
|
|
|
+ $('#btnSearch').trigger('click');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 엑셀다운로드
|
|
|
+ $('#btnExcel').on('click', function() {
|
|
|
+ gagaAgGrid.exportToExcel('공급업체 목록', gridOptions);
|
|
|
+ });
|
|
|
+
|
|
|
+ /**
|
|
|
+ * DAUM을 이용한 우편번호 팝업 레이어
|
|
|
+ */
|
|
|
+ var fnOpenDaumAddr = function() {
|
|
|
+ let daumZip = new daum.Postcode({
|
|
|
+ oncomplete: function(data) {
|
|
|
+ // 우편번호와 주소 정보를 해당 필드에 넣는다.
|
|
|
+ $('#detailForm input[name=bizZipcode]').val(data.zonecode);
|
|
|
+ $('#detailForm input[name=bizBaseAddr]').val(cfnGetDaumRoadAddr(data));
|
|
|
+ $('#detailForm input[name=bizDtlAddr]').focus();
|
|
|
+
|
|
|
+ cfnCloseDaumAddr();
|
|
|
+ },
|
|
|
+ width: '100%'
|
|
|
+ });
|
|
|
+
|
|
|
+ cfnOpenDaumAddr(daumZip);
|
|
|
+ }
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ // Create a agGrid
|
|
|
+ gagaAgGrid.createGrid('gridList', gridOptions);
|
|
|
+ });
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
+
|
|
|
+</html>
|