Pārlūkot izejas kodu

공급벤더 추가

gagamel 5 gadi atpakaļ
vecāks
revīzija
fb22d9b585

+ 25 - 0
src/main/java/com/style24/admin/biz/dao/TsaBusinessDao.java

@@ -23,6 +23,31 @@ import com.style24.persistence.domain.SupplyCompany;
 @ShopDs
 public interface TsaBusinessDao {
 
+	/**
+	 * 공급벤더 목록
+	 * @param supplyComp - 공급업체 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	Collection<SupplyCompany> getSupplyVendorList(SupplyCompany supplyComp);
+
+	/**
+	 * 공급벤더 생성
+	 * @param supplyComp - 공급업체 정보
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	void createSupplyVendor(SupplyCompany supplyComp);
+
+	/**
+	 * 공급벤더 수정
+	 * @param supplyComp - 공급업체 정보
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	void updateSupplyVendor(SupplyCompany supplyComp);
+
 	/**
 	 * 공급업체 목록
 	 * @param supplyComp - 공급업체 정보

+ 25 - 0
src/main/java/com/style24/admin/biz/service/TsaBusinessService.java

@@ -48,6 +48,31 @@ public class TsaBusinessService {
 	@Autowired
 	private TsaBusinessDao businessDao;
 
+	/**
+	 * 공급벤더 목록
+	 * @param supplyComp - 공급업체 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	public Collection<SupplyCompany> getSupplyVendorList(SupplyCompany supplyComp) {
+		return businessDao.getSupplyVendorList(supplyComp);
+	}
+
+	/**
+	 * 공급벤더 저장 처리
+	 * @param supplyComp - 공급업체 정보
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	public void saveSupplyVendor(SupplyCompany supplyComp) {
+		if (!StringUtils.isEmpty(supplyComp.getSupplyVendorCd())) {
+			businessDao.updateSupplyVendor(supplyComp);
+		} else {
+			businessDao.createSupplyVendor(supplyComp);
+		}
+	}
+
 	/**
 	 * 공급업체 목록
 	 * @param supplyComp - 공급업체 정보

+ 100 - 20
src/main/java/com/style24/admin/biz/web/TsaBusinessController.java

@@ -1,6 +1,19 @@
 package com.style24.admin.biz.web;
 
-import com.gagaframework.web.rest.server.GagaResponse;
+import java.util.Collection;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
 import com.style24.admin.biz.service.TsaBusinessService;
 import com.style24.admin.biz.service.TsaRendererService;
 import com.style24.admin.support.controller.TsaBaseController;
@@ -8,16 +21,20 @@ import com.style24.admin.support.security.session.TsaSession;
 import com.style24.core.biz.service.TscEnvsetService;
 import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.message.TscMessageByLocale;
-import com.style24.persistence.domain.*;
+import com.style24.persistence.domain.Aflink;
+import com.style24.persistence.domain.Brand;
+import com.style24.persistence.domain.BrandMd;
+import com.style24.persistence.domain.DeliveryLoc;
+import com.style24.persistence.domain.DelvFeePolicy;
+import com.style24.persistence.domain.SellStore;
+import com.style24.persistence.domain.ShipCompany;
+import com.style24.persistence.domain.SiteBrand;
+import com.style24.persistence.domain.StockSyncBase;
+import com.style24.persistence.domain.SupplyCompany;
+
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.ModelAndView;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
+import com.gagaframework.web.rest.server.GagaResponse;
 
 /**
  * 영업관리 Controller
@@ -42,6 +59,74 @@ public class TsaBusinessController extends TsaBaseController {
 	@Autowired
 	private TscEnvsetService cenvsetService;
 
+	/**
+	 * 공급벤더관리 화면
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	@GetMapping("/supply/vendor/form")
+	public ModelAndView supplyVendorForm() {
+		ModelAndView mav = new ModelAndView();
+
+		mav.setViewName("/business/SupplyVendorForm");
+
+		return mav;
+	}
+
+	/**
+	 * 공급벤더 목록
+	 * @param supplyComp - 공급벤더 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	@PostMapping("/supply/vendor/list")
+	@ResponseBody
+	public Collection<SupplyCompany> getSupplyVendorList(@RequestBody SupplyCompany supplyComp) {
+		return businessService.getSupplyVendorList(supplyComp);
+	}
+
+	/**
+	 * 공급벤더 저장 처리
+	 * @param supplyComp - 공급벤더 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 10. 14
+	 */
+	@PostMapping("/supply/vendor/save")
+	@ResponseBody
+	public GagaResponse saveSupplyVendor(@RequestBody SupplyCompany supplyComp) {
+		supplyComp.setRegNo(TsaSession.getInfo().getUserNo());
+		supplyComp.setUpdNo(TsaSession.getInfo().getUserNo());
+
+		businessService.saveSupplyVendor(supplyComp);
+
+		return super.ok(message.getMessage("SUCC_0001"));
+	}
+
+	/**
+	 * 공급벤더팝업 화면
+	 * @param returnCode - 반환할코드. 필수
+	 * @param returnName - 반환할명칭. 필수
+	 * @param supplyVendorNm - 공급업체명. 옵션
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 18
+	 */
+	@GetMapping("/supply/vendor/popup/form")
+	public ModelAndView supplyVendorPopupForm(@RequestParam(value = "returnCode") String returnCode, @RequestParam(value = "returnName") String returnName, @RequestParam(value = "supplyVendorNm", required = false) String supplyVendorNm) {
+		ModelAndView mav = new ModelAndView();
+
+		mav.addObject("returnCode", returnCode);
+		mav.addObject("returnName", returnName);
+		mav.addObject("supplyVendorNm", StringUtils.defaultString(supplyVendorNm, ""));
+
+		mav.setViewName("/business/SupplyVendorPopupForm");
+
+		return mav;
+	}
+
 	/**
 	 * 공급업체관리 화면
 	 * @return
@@ -70,25 +155,20 @@ public class TsaBusinessController extends TsaBaseController {
 	}
 
 	/**
-	 * 공급업체관리 목록
+	 * 공급업체 목록
+	 * @param supplyComp - 공급업체 정보
 	 * @return
 	 * @author gagamel
 	 * @since 2020. 10. 14
 	 */
 	@PostMapping("/supply/company/list")
 	@ResponseBody
-	public List<SupplyCompany> getCompanyList(@RequestBody SupplyCompany supplyComp) {
-		List<SupplyCompany> result = (ArrayList<SupplyCompany>) businessService.getSupplyCompanyList(supplyComp);
-
-		for (SupplyCompany supplyCompany : result) {
-			log.info("CHECK supplyCompNm >> " + supplyCompany.getSupplyCompNm());
-		}
-
-		return result;
+	public Collection<SupplyCompany> getSupplyCompanyList(@RequestBody SupplyCompany supplyComp) {
+		return businessService.getSupplyCompanyList(supplyComp);
 	}
 
 	/**
-	 * 공급업체관리 저장 처리
+	 * 공급업체 저장 처리
 	 * @param supplyComp - 공급업체 정보
 	 * @return
 	 * @author gagamel
@@ -96,7 +176,7 @@ public class TsaBusinessController extends TsaBaseController {
 	 */
 	@PostMapping("/supply/company/save")
 	@ResponseBody
-	public GagaResponse saveSupplyInfo(@RequestBody SupplyCompany supplyComp) {
+	public GagaResponse saveSupplyCompany(@RequestBody SupplyCompany supplyComp) {
 		supplyComp.setRegNo(TsaSession.getInfo().getUserNo());
 		supplyComp.setUpdNo(TsaSession.getInfo().getUserNo());
 

+ 5 - 4
src/main/java/com/style24/persistence/domain/SupplyCompany.java

@@ -16,7 +16,8 @@ public class SupplyCompany extends TscBaseDomain {
 
 	private String supplyCompCd;		// 공급업체코드
 	private String supplyCompNm;		// 공급업체명
-	private String supplyVendorCd;		// 상위공급업체코드
+	private String supplyVendorCd;		// 공급벤더코드
+	private String supplyVendorNm;		// 공급벤더명
 	private int provierNo;				// ProvierNo(WMS)
 	private String bizGb;				// 사업자구분
 	private String bizNo;				// 사업자번호
@@ -33,8 +34,9 @@ public class SupplyCompany extends TscBaseDomain {
 	private String distributionGb;		// 유통구분(공통코드G065)
 	private String shotDelvYn;			// 총알배송여부
 	private String supplyStat;			// 입점상태(공통코드G010)
-	private int minOrdAmt;				// 무료배송비최소주문금액
-	private int delvFee;				// 배송비
+	private String supplyStatNm;		// 입점상태명
+//	private int minOrdAmt;				// 무료배송비최소주문금액
+//	private int delvFee;				// 배송비
 	private float sellFeeRate;			// 판매수수료율
 	private String settleDay;			// 정산일(매월)
 	private String bankCd;				// 은행코드
@@ -52,7 +54,6 @@ public class SupplyCompany extends TscBaseDomain {
 	private String econtractYn;			// 전자계약여부
 	private String remarks;				// 비고
 	private String useYn;				// 사용여부
-	private String supplyStatNm;		// 입점상태명
 
 	// 검색조건
 	private String searchGb;			// 검색구분

+ 148 - 82
src/main/java/com/style24/persistence/mybatis/shop/TsaBusiness.xml

@@ -2,61 +2,166 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.style24.admin.biz.dao.TsaBusinessDao">
 
+	<!-- 공급벤더 목록 -->
+	<select id="getSupplyVendorList" parameterType="SupplyCompany" resultType="SupplyCompany">
+		/* TsaBusiness.getSupplyVendorList */
+		SELECT SUPPLY_VENDOR_CD /*공급벤더코드*/
+		     , SUPPLY_VENDOR_NM /*공급벤더명*/
+		     , BIZ_GB           /*사업자구분*/
+		     , BIZ_NO           /*사업자등록번호*/
+		     , BIZ_KIND         /*업종*/
+		     , BIZ_TYPE         /*업태*/
+		     , OWNER_NM         /*대표자명*/
+		     , BIZ_ZIPCODE      /*사업장우편번호*/
+		     , BIZ_BASE_ADDR    /*사업장기본주소*/
+		     , BIZ_DTL_ADDR     /*사업장상세주소*/
+		     , MAIN_TELNO       /*대표전화번호*/
+		     , MAIN_FAXNO       /*대표팩스번호*/
+		     , HOMEPAGE_URL     /*홈페이지URL*/
+		     , USE_YN           /*사용여부*/
+		FROM   TB_SUPPLY_VENDOR
+		WHERE  1 = 1
+		<if test="searchTxt != null and searchTxt != ''">
+		    <if test='searchGb == "NAME"'>
+		AND    UPPER(SUPPLY_VENDOR_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+		    </if>
+		    <if test='searchGb == "OWNER"'>
+		AND    UPPER(OWNER_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+		    </if>
+		</if>
+		<if test="supplyVendorNm != null and supplyVendorNm != ''"> <!-- 공급벤더팝업에서 사용 -->
+		AND    UPPER(SUPPLY_VENDOR_NM) LIKE CONCAT('%',UPPER(#{supplyVendorNm}),'%')
+		</if>
+	</select>
+	
+	<!-- 공급벤더 생성 -->
+	<insert id="createSupplyVendor" parameterType="SupplyCompany">
+		/* TsaBusiness.createSupplyVendor */
+		INSERT INTO TB_SUPPLY_VENDOR (
+		       SUPPLY_VENDOR_CD
+		     , SUPPLY_VENDOR_NM
+		     , BIZ_GB
+		     , BIZ_NO
+		     , BIZ_KIND
+		     , BIZ_TYPE
+		     , OWNER_NM
+		     , BIZ_ZIPCODE
+		     , BIZ_BASE_ADDR
+		     , BIZ_DTL_ADDR
+		     , MAIN_TELNO
+		     , MAIN_FAXNO
+		     , HOMEPAGE_URL
+		     , USE_YN
+		     , REG_NO
+		     , REG_DT
+		     , UPD_NO
+		     , UPD_DT
+		)
+		VALUES (
+		       (SELECT CONCAT('SV',IFNULL(LPAD(SUBSTRING(MAX(SUPPLY_VENDOR_CD),3) + 1,4,'0'),'0000'))
+		        FROM   TB_SUPPLY_VENDOR Z
+		       )
+		     , #{supplyVendorNm}
+		     , #{bizGb}
+		     , #{bizNo}
+		     , #{bizKind}
+		     , #{bizType}
+		     , #{ownerNm}
+		     , #{bizZipcode}
+		     , #{bizBaseAddr}
+		     , #{bizDtlAddr}
+		     , #{mainTelno}
+		     , #{mainFaxno}
+		     , #{homepageUrl}
+		     , #{useYn}
+		     , #{regNo}
+		     , NOW()
+		     , #{updNo}
+		     , NOW()
+		)
+	</insert>
+	
+	<!-- 공급벤더 수정 -->
+	<update id="updateSupplyVendor" parameterType="SupplyCompany">
+		/* TsaBusiness.updateSupplyVendor */
+		UPDATE TB_SUPPLY_VENDOR
+		SET    SUPPLY_VENDOR_NM = #{supplyVendorNm}
+		     , BIZ_GB = #{bizGb}
+		     , BIZ_NO = #{bizNo}
+		     , BIZ_KIND = #{bizKind}
+		     , BIZ_TYPE = #{bizType}
+		     , OWNER_NM = #{ownerNm}
+		     , BIZ_ZIPCODE = #{bizZipcode}
+		     , BIZ_BASE_ADDR = #{bizBaseAddr}
+		     , BIZ_DTL_ADDR = #{bizDtlAddr}
+		     , MAIN_TELNO = #{mainTelno}
+		     , MAIN_FAXNO = #{mainFaxno}
+		     , HOMEPAGE_URL = #{homepageUrl}
+		     , USE_YN = #{useYn}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+		WHERE  SUPPLY_VENDOR_CD = #{supplyVendorCd}
+	</update>
+	
 	<!-- 공급업체 목록 -->
 	<select id="getSupplyCompanyList" parameterType="SupplyCompany" resultType="SupplyCompany">
 		/* TsaBusiness.getSupplyCompanyList */
-		SELECT SC.SUPPLY_COMP_CD       /*공급업체코드*/
-		     , SC.SUPPLY_COMP_NM       /*공급업체명*/
-		     , SC.SUPPLY_VENDOR_CD     /*상위공급업체코드*/
-		     -- , SC.BIZ_GB               /*사업자구분*/
-		     -- , SC.BIZ_NO               /*사업자등록번호*/
-		     -- , SC.BIZ_KIND             /*업종*/
-		     -- , SC.BIZ_TYPE             /*업태*/
-		     -- , SC.OWNER_NM             /*대표자명*/
-		     -- , SC.BIZ_ZIPCODE          /*사업장우편번호*/
-		     -- , SC.BIZ_BASE_ADDR        /*사업장기본주소*/
-		     -- , SC.BIZ_DTL_ADDR         /*사업장상세주소*/
-		     -- , SC.MAIN_TELNO           /*대표전화번호*/
-		     -- , SC.MAIN_FAXNO           /*대표팩스번호*/
-		     -- , SC.HOMEPAGE_URL         /*홈페이지URL*/
-		     , SC.DISTRIBUTION_GB      /*유통구분*/
-		     , SC.SHOT_DELV_YN         /*총알배송여부*/
-		     , SC.SUPPLY_STAT          /*입점상태*/
-		     , (SELECT CD_NM FROM TB_COMMON_CODE CC WHERE SC.SUPPLY_STAT = CC.CD AND CC.CD_GB = 'G010') AS SUPPLY_STAT_NM
-		    --  , SC.MIN_ORD_AMT          /*무료배송비최소주문금액*/
-		     -- , SC.DELV_FEE             /*배송비*/
-		     -- , SC.SELL_FEE_RATE        /*판매수수료율*/
-		     , SC.SETTLE_DAY           /*정산일*/
-		     , SC.BANK_CD              /*은행코드*/
-		     , SC.ACCOUNT_NO           /*계좌번호*/
-		     , SC.DEPOSITOR_NM         /*예금주명*/
-		     , SC.CS_CHARGE_NM         /*CS담당자명*/
-		     , SC.CS_CHARGE_TELNO      /*CS담당자전화번호*/
-		     , SC.SETTLE_CHARGE_NM     /*정산담당자명*/
-		     , SC.SETTLE_CHARGE_TELNO  /*정산담당자전화번호*/
-		     , SC.SETTLE_CHARGE_EMAIL  /*정산담당자이메일*/
-		     , SC.BILL_EMAIL           /*계산서이메일*/
-		     , SC.ECONTRACT_YN         /*전자계약여부*/
-		     , SC.REMARKS              /*비고*/
-		     , SC.USE_YN               /*사용여부*/
+		SELECT SC.SUPPLY_COMP_CD                                       /*공급업체코드*/
+		     , SC.SUPPLY_COMP_NM                                       /*공급업체명*/
+		     , SC.SUPPLY_VENDOR_CD                                     /*공급벤더코드*/
+		     , SV.SUPPLY_VENDOR_NM                                     /*공급벤더명*/
+		     , SV.BIZ_GB                                               /*사업자구분*/
+		     , SV.BIZ_NO                                               /*사업자등록번호*/
+		     , SV.BIZ_KIND                                             /*업종*/
+		     , SV.BIZ_TYPE                                             /*업태*/
+		     , SV.OWNER_NM                                             /*대표자명*/
+		     , SV.BIZ_ZIPCODE                                          /*사업장우편번호*/
+		     , SV.BIZ_BASE_ADDR                                        /*사업장기본주소*/
+		     , SV.BIZ_DTL_ADDR                                         /*사업장상세주소*/
+		     , SV.MAIN_TELNO                                           /*대표전화번호*/
+		     , SV.MAIN_FAXNO                                           /*대표팩스번호*/
+		     , SV.HOMEPAGE_URL                                         /*홈페이지URL*/
+		     , SC.DISTRIBUTION_GB                                      /*유통구분*/
+		     , SC.SHOT_DELV_YN                                         /*총알배송여부*/
+		     , SC.SUPPLY_STAT                                          /*입점상태*/
+		     , FN_GET_CODE_NM('G010',SC.SUPPLY_STAT) AS SUPPLY_STAT_NM /*입점상태명*/
+		     , SC.SELL_FEE_RATE                                        /*판매수수료율*/
+		     , SC.SETTLE_DAY                                           /*정산일*/
+		     , SC.BANK_CD                                              /*은행코드*/
+		     , SC.ACCOUNT_NO                                           /*계좌번호*/
+		     , SC.DEPOSITOR_NM                                         /*예금주명*/
+		     , SC.CS_CHARGE_NM                                         /*CS담당자명*/
+		     , SC.CS_CHARGE_TELNO                                      /*CS담당자전화번호*/
+		     , SC.SETTLE_CHARGE_NM                                     /*정산담당자명*/
+		     , SC.SETTLE_CHARGE_TELNO                                  /*정산담당자전화번호*/
+		     , SC.SETTLE_CHARGE_EMAIL                                  /*정산담당자이메일*/
+		     , SC.BILL_EMAIL                                           /*계산서이메일*/
+		     , SC.ECONTRACT_YN                                         /*전자계약여부*/
+		     , SC.REMARKS                                              /*비고*/
+		     , SC.USE_YN                                               /*사용여부*/
 		FROM   TB_SUPPLY_COMPANY SC
-		WHERE  1 = 1
+		     , TB_SUPPLY_VENDOR SV
+		WHERE  SC.SUPPLY_VENDOR_CD = SV.SUPPLY_VENDOR_CD
 		<if test="supplyStat != null and supplyStat != ''">
-		AND    SUPPLY_STAT = #{supplyStat}
+		AND    SC.SUPPLY_STAT = #{supplyStat}
 		</if>
 		<if test="searchTxt != null and searchTxt != ''">
 		    <if test='searchGb == "NAME"'>
-		AND    UPPER(SUPPLY_COMP_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+		AND    (
+		        UPPER(SC.SUPPLY_COMP_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+		        OR
+		        UPPER(SV.SUPPLY_VENDOR_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+		       )
 		    </if>
 		    <if test='searchGb == "OWNER"'>
-		AND    UPPER(OWNER_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+		AND    UPPER(SV.OWNER_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
 		    </if>
 		</if>
 		<if test="econtractYn != null and econtractYn != ''">
-		AND    ECONTRACT_YN = #{econtractYn}
+		AND    SC.ECONTRACT_YN = #{econtractYn}
 		</if>
 		<if test="supplyCompCd != null and supplyCompCd != ''"> <!-- 브랜드관리 화면에서 사용 -->
-		AND    SUPPLY_COMP_CD = #{supplyCompCd}
+		AND    SC.SUPPLY_COMP_CD = #{supplyCompCd}
 		</if>
 	</select>
 	
@@ -66,24 +171,11 @@
 		INSERT INTO TB_SUPPLY_COMPANY (
 		       SUPPLY_COMP_CD
 		     , SUPPLY_COMP_NM
-		     , SUPPLY_COMP_UCD
+		     , SUPPLY_VENDOR_CD
 		     , PROVIDER_NO
-		     , BIZ_GB
-		     , BIZ_NO
-		     , BIZ_KIND
-		     , BIZ_TYPE
-		     , OWNER_NM
-		     , BIZ_ZIPCODE
-		     , BIZ_BASE_ADDR
-		     , BIZ_DTL_ADDR
-		     , MAIN_TELNO
-		     , MAIN_FAXNO
-		     , HOMEPAGE_URL
 		     , DISTRIBUTION_GB
 		     , SHOT_DELV_YN
 		     , SUPPLY_STAT
-		     , MIN_ORD_AMT
-		     , DELV_FEE
 		     , SELL_FEE_RATE
 		     , SETTLE_DAY
 		     , BANK_CD
@@ -108,7 +200,7 @@
 		        FROM   TB_SUPPLY_COMPANY Z
 		       )
 		     , #{supplyCompNm}
-		     , #{supplyCompUcd}
+		     , #{supplyVendorCd}
 		     , (SELECT CASE WHEN MAX(PROVIDER_NO) IS NULL THEN
 		                        40000 /* AS-IS 최대 수보다 크게 수정해야함*/
 		                    ELSE
@@ -117,22 +209,9 @@
 		        FROM   TB_SUPPLY_COMPANY Z
 		        WHERE  PROVIDER_NO > 40000 /* AS-IS 최대 수보다 크게 크게 수정해야함*/
 		       )
-		     , #{bizGb}
-		     , #{bizNo}
-		     , #{bizKind}
-		     , #{bizType}
-		     , #{ownerNm}
-		     , #{bizZipcode}
-		     , #{bizBaseAddr}
-		     , #{bizDtlAddr}
-		     , #{mainTelno}
-		     , #{mainFaxno}
-		     , #{homepageUrl}
 		     , #{distributionGb}
 		     , #{shotDelvYn}
 		     , #{supplyStat}
-		     , IFNULL(#{minOrdAmt},0)
-		     , IFNULL(#{delvFee},0)
 		     , IFNULL(#{sellFeeRate},0.0)
 		     , #{settleDay}
 		     , #{bankCd}
@@ -159,23 +238,10 @@
 		/* TsaBusiness.updateSupplyCompany */
 		UPDATE TB_SUPPLY_COMPANY
 		SET    SUPPLY_COMP_NM = #{supplyCompNm}
-		     , SUPPLY_COMP_UCD = #{supplyCompUcd}
-		     , BIZ_GB = #{bizGb}
-		     , BIZ_NO = #{bizNo}
-		     , BIZ_KIND = #{bizKind}
-		     , BIZ_TYPE = #{bizType}
-		     , OWNER_NM = #{ownerNm}
-		     , BIZ_ZIPCODE = #{bizZipcode}
-		     , BIZ_BASE_ADDR = #{bizBaseAddr}
-		     , BIZ_DTL_ADDR = #{bizDtlAddr}
-		     , MAIN_TELNO = #{mainTelno}
-		     , MAIN_FAXNO = #{mainFaxno}
-		     , HOMEPAGE_URL = #{homepageUrl}
+		     , SUPPLY_VENDOR_CD = #{supplyVendorCd}
 		     , DISTRIBUTION_GB = #{distributionGb}
 		     , SHOT_DELV_YN = #{shotDelvYn}
 		     , SUPPLY_STAT = #{supplyStat}
-		     , MIN_ORD_AMT = IFNULL(#{minOrdAmt},0)
-		     , DELV_FEE = IFNULL(#{delvFee},0)
 		     , SELL_FEE_RATE = IFNULL(#{sellFeeRate},0.0)
 		     , SETTLE_DAY = #{settleDay}
 		     , BANK_CD = #{bankCd}

+ 60 - 43
src/main/webapp/WEB-INF/views/business/SupplyCompanyForm.html

@@ -112,62 +112,67 @@
 						<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>
+						<th>공급벤더<i class="required" title="필수"></i></th>
+						<td colspan="3">
+							<input type="text" class="w200" name="supplyVendorNm" onkeypress="if (window.event.keyCode == 13) { fnOpenSupplyVendorPopup('input[name=supplyVendorCd]', 'input[name=supplyVendorNm]'); }"/>
+							<button type="button" class="btn icn" onclick="fnOpenSupplyVendorPopup('input[name=supplyVendorCd]', 'input[name=supplyVendorNm]');"><i class="fa fa-search cpn" aria-hidden="true"></i></button>
+							<input name="supplyVendorCd" type="text" class="w100" maxlength="20" readonly="readonly"/>
+							<button type="button" class="btn icn" onclick="$('input[name=supplyVendorCd], input[name=supplyVendorNm]').val('');"><i class="fa fa-eraser" aria-hidden="true"></i></button>
 						</td>
 					</tr>
 					<tr>
-						<th>업종<i class="required" title="필수"></i></th>
+						<th>사업자구분</th>
 						<td>
-							<input type="text" name="bizKind" maxlength="100" required="required" data-valid-name="업종"/>
+							<label class="rdoBtn"><input type="radio" name="bizGb" value="C" checked="checked" readonly="readonly"/>법인<span></span></label>
+							<label class="rdoBtn"><input type="radio" name="bizGb" value="P" readonly="readonly"/>개인<span></span></label>
 						</td>
-						<th>업태<i class="required" title="필수"></i></th>
+						<th>사업자등록번호</th>
 						<td>
-							<input type="text" name="bizType" maxlength="100" required="required" data-valid-name="업태"/>
+							<input type="text" name="bizNo" maxlength="20" readonly="readonly"/>
 						</td>
-						<th>입점상태<i class="required" title="필수"></i></th>
+						<th>업종</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>
+							<input type="text" name="bizKind" maxlength="100" readonly="readonly"/>
 						</td>
-						<th>대표자명<i class="required" title="필수"></i></th>
+						<th>업태</th>
 						<td>
-							<input type="text" name="ownerNm" maxlength="50" required="required" data-valid-name="대표자명"/>
+							<input type="text" name="bizType" maxlength="100" readonly="readonly"/>
 						</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>
-							<input type="text" name="bizBaseAddr" class="w300" maxlength="200" required="required" data-valid-name="사업장주소" readonly="readonly"/><br>
-							<input type="text" name="bizDtlAddr" class="w300" maxlength="200"/>
+						<th>대표자명</th>
+						<td>
+							<input type="text" name="ownerNm" maxlength="50" readonly="readonly"/>
 						</td>
-						<th>홈페이지URL</th>
+						<th>대표전화</th>
+						<td>
+							<input type="text" name="mainTelno" maxlength="20" readonly="readonly"/>
+						</td>
+						<th>대표팩스번호</th>
 						<td colspan="3">
-							<input type="text" name="homepageUrl" data-valid-name="홈페이지URL"/>
+							<input type="text" class="w200" name="mainFaxno" maxlength="20" readonly="readonly"/>
 						</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="대표전화"/>
+						<th>사업장주소</th>
+						<td colspan="5">
+							<input type="text" name="bizZipcode"  class="w100" data-valid-name="우편번호" readonly="readonly"/>
+							<input type="text" name="bizBaseAddr" class="w300" maxlength="200" readonly="readonly"/>
+							<input type="text" name="bizDtlAddr" class="w300" maxlength="200" readonly="readonly"/>
 						</td>
-						<th>대표팩스번호</th>
+						<th>홈페이지URL</th>
 						<td>
-							<input type="text" name="mainFaxno" placeholder="02-0000-0000" maxlength="20" data-valid-name="대표팩스번호"/>
+							<input type="text" name="homepageUrl" readonly="readonly"/>
 						</td>
 					</tr>
 					<tr>
+						<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>
 							<select name="distributionGb" required="required" data-valid-name="유통구분">
@@ -179,11 +184,6 @@
 						<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>
@@ -193,19 +193,19 @@
 					<tr>
 						<th>CS담당자</th>
 						<td>
-							<input type="text" name="csChargeNm" class="w100 aR" maxlength="50"/>
+							<input type="text" name="csChargeNm" class="w100" maxlength="50"/>
 						</td>
 						<th>CS담당자 연락처</th>
 						<td>
-							<input type="text" name="csChargeTelno" placeholder="02-0000-0000" maxlength="20"/>
+							<input type="text" name="csChargeTelno" placeholder="02-0000-0000" maxlength="13"/>
 						</td>
 						<th>정산담당자</th>
 						<td>
-							<input type="text" name="settleChargeNm" class="w100 aR" maxlength="50"/>
+							<input type="text" name="settleChargeNm" class="w100" maxlength="50"/>
 						</td>
 						<th>정산담당자 연락처</th>
 						<td>
-							<input type="text" name="settleChargeTelno" placeholder="02-0000-0000" maxlength="20"/>
+							<input type="text" name="settleChargeTelno" placeholder="02-0000-0000" maxlength="13"/>
 						</td>
 					</tr>
 					<tr>
@@ -243,9 +243,14 @@
 							<input type="text" name="accountNo" maxlength="20"/>
 						</td>
 						<th>예금주명</th>
-						<td colspan="3">
+						<td>
 							<input type="text" class="w100" 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>비고</th>
@@ -324,6 +329,8 @@
 				return '<a href="javascript:void(0);">' + params.value + '</a>';
 			}
 		},
+		{ headerName: "공급벤더코드", field: "supplyVendorCd", width: 100, cellClass: 'text-center', hide: true },
+		{ headerName: "공급벤더명", field: "supplyVendorNm", width: 150, cellClass: 'text-center', hide: true },
 		{
 			headerName: "사업자구분", field: "bizGb", width: 100, cellClass: 'text-center',
 			valueGetter: function (params) { return params.data.bizGb == 'C' ? '법인' : '개인'; }
@@ -407,6 +414,8 @@
 		
 		$('#detailForm input[name=supplyCompCd]').val(event.data.supplyCompCd);
 		$('#detailForm input[name=supplyCompNm]').val(event.data.supplyCompNm);
+		$('#detailForm input[name=supplyVendorCd]').val(event.data.supplyVendorCd);
+		$('#detailForm input[name=supplyVendorNm]').val(event.data.supplyVendorNm);
 		$('#detailForm select[name=supplyStat]').val(event.data.supplyStat);
 		$('#detailForm input[name=ownerNm]').val(event.data.ownerNm);
 		
@@ -469,6 +478,14 @@
 		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
 	});
 	
+	// 공급벤더 팝업
+	var fnOpenSupplyVendorPopup = function(strReturnCode, strReturnName) {
+		var oParam = new Object();
+		oParam.returnCode = strReturnCode;
+		oParam.returnName = strReturnName;
+		cfnOpenSupplyVendorPopup($(strReturnName).val(), oParam);
+	}
+	
 	// 신규버튼
 	$('#btnNew').on('click', function() {
 		$("#detailForm")[0].reset();

+ 282 - 0
src/main/webapp/WEB-INF/views/business/SupplyVendorForm.html

@@ -0,0 +1,282 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : SupplyVendorForm.html
+ * @desc    : 공급벤더관리 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.01.18   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/vendor/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
+				<table class="frmStyle" aria-describedby="검색조건">
+					<colgroup>
+						<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>
+					</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/vendor/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="supplyVendorCd" placeholder="자동생성" maxlength="6" data-valid-name="벤더코드" readonly="readonly"/>
+						</td>
+						<th>벤더명<i class="required" title="필수"></i></th>
+						<td>
+							<input type="text" name="supplyVendorNm" 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>
+							<input type="text" name="ownerNm" maxlength="50" required="required" data-valid-name="대표자명"/>
+						</td>
+						<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>
+					</tr>
+					<tr>
+						<th>대표팩스번호</th>
+						<td>
+							<input type="text" name="mainFaxno" placeholder="02-0000-0000" maxlength="20" data-valid-name="대표팩스번호"/>
+						</td>
+						<th>사업장주소<i class="required" title="필수"></i></th>
+						<td colspan="5">
+							<input type="text" name="bizZipcode"  class="w100" data-valid-name="우편번호" readonly="readonly"/>
+							<button type="button" class="btn btn-info btn-sm" onclick="fnOpenDaumAddr();">우편번호찾기</button>
+							<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>
+					</tr>
+					<tr>
+						<th>홈페이지URL</th>
+						<td colspan="5">
+							<input type="text" class="w300" name="homepageUrl" data-valid-name="홈페이지URL"/>
+						</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>
+				</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 columnDefs = [
+		{ headerName: "벤더코드", field: "supplyVendorCd", width: 100, cellClass: 'text-center' },
+		{
+			headerName: "벤더명", field: "supplyVendorNm", 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: 150, cellClass: 'text-center' },
+		{ headerName: "업태", field: "bizType", width: 150, cellClass: 'text-center' },
+		{ headerName: "대표자명", field: "ownerNm", width: 100, cellClass: 'text-center' },
+		{ headerName: "대표전화번호", field: "mainTelno", width: 120, cellClass: 'text-center' },
+		{ headerName: "대표팩스번호", field: "mainFaxno", width: 120, cellClass: 'text-center' },
+		{ headerName: "우편번호", field: "bizZipcode", width: 80, cellClass: 'text-center' },
+		{ headerName: "기본주소", field: "bizBaseAddr", width: 250 },
+		{ headerName: "상세주소", field: "bizDtlAddr", width: 150 },
+		{ headerName: "홈페이지URL", field: "homepageUrl", width: 200 }
+	];
+
+	let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+
+	// Cell click
+	gridOptions.onCellClicked = function(event) {
+		if (event.colDef.field != 'supplyVendorNm')
+			return;
+		
+		$('#detailForm input[name=supplyVendorCd]').val(event.data.supplyVendorCd);
+		$('#detailForm input[name=supplyVendorNm]').val(event.data.supplyVendorNm);
+		
+		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=ownerNm]').val(event.data.ownerNm);
+		$('#detailForm input[name=mainTelno]').val(event.data.mainTelno);
+		$('#detailForm input[name=mainFaxno]').val(event.data.mainFaxno);
+		$('#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);
+		
+		if (event.data.useYn == 'Y') {
+			$('#detailForm input:radio[name=useYn]').eq(0).trigger('click');
+		} else {
+			$('#detailForm input:radio[name=useYn]').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>

+ 142 - 0
src/main/webapp/WEB-INF/views/business/SupplyVendorPopupForm.html

@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : SupplyVendorPopupForm.html
+ * @desc    : 공급벤더 팝업 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.01.18   gagamel     최초 작성
+ *******************************************************************************
+ -->
+<div class="modalPopup" data-width="1200" id="popupSupplyVendor">
+	<div class="panelStyle">
+		<!-- TITLE -->
+		<div class="panelTitle">
+			<strong>쿠폰 조회</strong>
+			<button type="button" class="close" onclick="uifnPopupClose('popupSupplyVendor');"><em class="fa fa-times"></em></button>
+		</div>
+		<!-- //TITLE -->
+		
+		<!-- CONTENT -->
+		<div class="panelContent">
+			<form id="searchSupplyVendorForm" name="searchSupplyVendorForm" action="#" th:action="@{'/business/supply/vendor/list'}" th:method="post">
+				<table class="frmStyle" aria-describedby="검색조건">
+					<colgroup>
+						<col style="width:10%;"/>
+						<col/>
+					</colgroup>
+					<tbody>
+						<tr>
+							<th>벤더명</th>
+							<td>
+								<input type="text" name="supplyVendorNm" class="w300" maxlength="50" th:value="${supplyVendorNm}"/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-base btn-lg" id="btnSearchSupplyVendor">조회</button>
+					</li>
+				</ul>
+			</form>
+		</div>
+		<!-- //CONTENT -->
+
+		<!-- 리스트 영역 -->
+		<div class="panelContent">
+			<div id="gridSupplyVendorList" style="width: 100%; height: 470px" class="ag-theme-balham"></div>
+		</div>
+		<!-- //리스트 영역 -->
+		
+		<!-- 버튼 배치 영역 -->
+		<ul class="panelBar">
+			<li class="right">
+				<button type="button" class="btn btn-info btn-lg" id="btnConfirmSupplyVendor">확인</button>
+			</li>
+		</ul>
+		<!-- //버튼 배치 영역 -->
+	</div>
+</div>
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	let returnCode = [[${returnCode}]];
+	let returnName = [[${returnName}]];
+
+	let columnDefsSupplyVendorList = [
+// 		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+		{ headerName: "벤더코드", field: "supplyVendorCd", width: 100, cellClass: 'text-center' },
+		{ headerName: "벤더명", field: "supplyVendorNm", width: 150, cellClass: 'text-center'},
+		{
+			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: 150, cellClass: 'text-center' },
+		{ headerName: "업태", field: "bizType", width: 150, cellClass: 'text-center' },
+		{ headerName: "대표자명", field: "ownerNm", width: 100, cellClass: 'text-center' },
+		{ headerName: "대표전화번호", field: "mainTelno", width: 120, cellClass: 'text-center', hide: true },
+		{ headerName: "대표팩스번호", field: "mainFaxno", width: 120, cellClass: 'text-center', hide: true },
+		{ headerName: "우편번호", field: "bizZipcode", width: 80, cellClass: 'text-center' },
+		{ headerName: "기본주소", field: "bizBaseAddr", width: 250 },
+		{ headerName: "상세주소", field: "bizDtlAddr", width: 150 },
+		{ headerName: "홈페이지URL", field: "homepageUrl", width: 200 }
+	];
+
+	let gridOptionsSupplyVendorList = gagaAgGrid.getGridOptions(columnDefsSupplyVendorList);
+	
+	gridOptionsSupplyVendorList.rowSelection = 'single';
+	gridOptionsSupplyVendorList.rowMultiSelectWithClick = true; // 클릭으로 선택 가능
+	
+// 	// Row double click
+// 	gridOptionsSupplyVendorList.onRowDoubleClicked = function(event) {
+// 		$('#btnConfirmSupplyVendor').trigger('click');
+// 	}
+
+	// 조회
+	$('#btnSearchSupplyVendor').on('click', function() {
+		// Fetch data
+		gagaAgGrid.fetch($('#searchSupplyVendorForm').prop('action'), gridOptionsSupplyVendorList, '#searchSupplyVendorForm', function(result) {
+			if (result.length == 1) {
+				// TODO: row를 클릭한 것처럼 활성화 하고, $('#btnConfirmSupplyVendor').trigger('click');
+			}
+		});
+	});
+	
+	// 부모창에 값을 설정
+	let fnSetSupplyVendorValueToOpener = function(rowData) {
+		$(returnCode).val(rowData.supplyVendorCd);
+		$(returnName).val(rowData.supplyVendorNm);
+
+		uifnPopupClose('popupSupplyVendor');
+	}
+	
+	// 확인
+	$('#btnConfirmSupplyVendor').on('click', function() {
+		var selectedData = gagaAgGrid.selectedRowData(gridOptionsSupplyVendorList);
+		if (selectedData.length == 0) {
+			mcxDialog.alert('선택된 항목이 없습니다.');
+			return false;
+		}
+		
+		fnSetSupplyVendorValueToOpener(selectedData[0]);
+	});
+	
+	$(document).ready(function() {
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridSupplyVendorList', gridOptionsSupplyVendorList);
+		
+		$('#btnSearchSupplyVendor').trigger('click');
+	});
+/*]]>*/
+</script>
+
+</html>

+ 31 - 3
src/main/webapp/ux/js/admin.popup.js

@@ -788,9 +788,9 @@ var cfnOpenMorebetterSetPopup = function(mode ,tmtbSeq) {
 /**
  * @type   : function
  * @access : public
- * @desc   : 공급업체 조회 팝업
+ * @desc   : 외부몰 조회 팝업
  * <pre>
- *     cfnOpenCompanyListPopup();
+ *     cfnOpenExtmallListPopup();
  * </pre>
  * @since  : 2020/12/23
  * @author : xodud1202
@@ -800,4 +800,32 @@ var cfnOpenExtmallListPopup = function(callbackfn) {
 	if (typeof(callbackfn) != 'undefined') actionUrl += "?callbackFn=" + callbackfn;
 	uifnPopupClose('popupExtmallList');
 	cfnOpenModalPopup(actionUrl, 'popupExtmallList');
-}
+}
+
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 공급벤더 팝업
+ * <pre>
+ *     var oParam = new Object();
+ *     oParam.returnCode = 'input[name=supplyVendorCd]'; // 반환할코드
+ *     oParam.returnName = 'input[name=supplyVendorNm]'; // 반환할코드명칭
+ *     cfnOpenSupplyVendorPopup($('input[name=supplyVendorNm]').val(), oParam);
+ * </pre>
+ * @param sName - 명칭. 필수
+ * @param oParam - 파라미터 오브젝트. 필수
+ * @since  : 2021/01/18
+ * @author : gagamel
+ */
+var cfnOpenSupplyVendorPopup = function(sName, oParam) {
+	var oEvt = window.event;
+	if (oEvt.type == 'click') sName = '';
+	var returnCode = oParam.returnCode;
+	var returnName = oParam.returnName;
+
+	var actionUrl = '/business/supply/vendor/popup/form?supplyVendorNm=' + encodeURIComponent(sName)
+			+ '&returnCode=' + encodeURIComponent(returnCode)
+			+ '&returnName=' + encodeURIComponent(returnName);
+
+	cfnOpenModalPopup(actionUrl, 'popupSupplyVendor');
+}